ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/src/TauIDMod.cc
(Generate patch)

Comparing UserCode/MitPhysics/Mods/src/TauIDMod.cc (file contents):
Revision 1.1 by ceballos, Wed Apr 8 10:11:44 2009 UTC vs.
Revision 1.8 by loizides, Mon Jun 15 15:00:21 2009 UTC

# Line 2 | Line 2
2  
3   #include "MitPhysics/Mods/interface/TauIDMod.h"
4   #include "MitPhysics/Init/interface/ModNames.h"
5 + #include "MitAna/DataTree/interface/CaloTauCol.h"
6  
7   using namespace mithep;
8  
# Line 11 | Line 12 | ClassImp(mithep::TauIDMod)
12   TauIDMod::TauIDMod(const char *name, const char *title) :
13    BaseMod(name,title),
14    fCaloTausName(Names::gkCaloTauBrn),
14  fCaloTaus(0),
15    fGoodTausName(ModNames::gkGoodTausName),
16 <  fTauPtMin(10.0),
17 <  fTauJetPtMin(20.0),
16 >  fPtMin(10.0),
17 >  fJetPtMin(20.0),
18 >  fLeadTrackPtMin(6.0),
19    fNSignalTracksMax(3),
20    fNIsoTracksMax(0),
21    fSignalTracksMassMax(2.0),
22 <  fIsoTrackPtSumMax(5.0)
22 >  fIsoTrackPtSumMax(5.0),
23 >  fEnergyFractionEmMax(0.95),
24 >  fHCalEtOverPtMin(0.1),
25 >  fCaloTaus(0)
26   {
27    // Constructor.
28   }
# Line 36 | Line 40 | void TauIDMod::Process()
40    for (UInt_t i=0; i<fCaloTaus->GetEntries(); ++i) {    
41      const CaloTau *tau = fCaloTaus->At(i);        
42  
43 <    if (tau->Pt() <= fTauPtMin)
43 >    if (tau->Pt() <= fPtMin)
44        continue;
45      
46 <    if (tau->SourceCaloJet()->Pt() <= fTauJetPtMin)
46 >    if (tau->SourceCaloJet()->Pt() <= fJetPtMin)
47        continue;
48      
49      if (tau->NSignalTracks() == 0 || tau->NSignalTracks() > fNSignalTracksMax)
50        continue;
51      
52 +    if (!tau->LeadTrack() || tau->LeadTrack()->Pt() < fLeadTrackPtMin)
53 +      continue;
54 +    
55      if (tau->NIsoTracks() > fNIsoTracksMax)
56        continue;
57  
# Line 54 | Line 61 | void TauIDMod::Process()
61      if (tau->IsoTrackPtSum() > fIsoTrackPtSumMax)
62        continue;
63  
64 <    // Always apply this requirement
58 <    Double_t nCharge = 0;
59 <    for (UInt_t j=0; j<tau->NSignalTracks(); ++j) {
60 <      nCharge += tau->SignalTrack(j)->Charge();
61 <    }
62 <    if (TMath::Abs(nCharge) != 1)
64 >    if (tau->SourceCaloJet()->EnergyFractionEm() > fEnergyFractionEmMax)
65        continue;
66  
67 <    // add good electron
67 >    if (tau->LeadTrack3x3HCalEt()/tau->LeadTrack()->Pt() < fHCalEtOverPtMin)
68 >      continue;
69 >
70 >    // always apply these requirements
71 >    if (TMath::Abs(tau->Charge()) != 1)
72 >      continue;
73 >
74 >    if (TMath::Abs(TMath::Abs(tau->Eta())-1.53) < 0.02)
75 >      continue;
76 >
77 >    // add good tau to output collection
78      GoodTaus->Add(tau);
79    }
80  
# Line 80 | Line 92 | void TauIDMod::SlaveBegin()
92    // we just request the Tau collection branch.
93  
94    ReqBranch(fCaloTausName, fCaloTaus);
83
95   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines