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.5 by ceballos, Thu Apr 9 10:25:02 2009 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines