ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/src/TauIDMod.cc
Revision: 1.6
Committed: Thu Apr 9 10:45:18 2009 UTC (16 years ago) by ceballos
Content type: text/plain
Branch: MAIN
Changes since 1.5: +2 -2 lines
Log Message:
typo

File Contents

# User Rev Content
1 ceballos 1.6 // $Id: TauIDMod.cc,v 1.5 2009/04/09 10:25:02 ceballos Exp $
2 ceballos 1.1
3     #include "MitPhysics/Mods/interface/TauIDMod.h"
4     #include "MitPhysics/Init/interface/ModNames.h"
5    
6     using namespace mithep;
7    
8     ClassImp(mithep::TauIDMod)
9    
10     //------------------------------------------------------------------------------
11     TauIDMod::TauIDMod(const char *name, const char *title) :
12     BaseMod(name,title),
13     fCaloTausName(Names::gkCaloTauBrn),
14     fGoodTausName(ModNames::gkGoodTausName),
15 ceballos 1.5 fPtMin(10.0),
16     fJetPtMin(20.0),
17     fLeadTrackPtMin(6.0),
18 ceballos 1.1 fNSignalTracksMax(3),
19     fNIsoTracksMax(0),
20     fSignalTracksMassMax(2.0),
21 ceballos 1.3 fIsoTrackPtSumMax(5.0),
22 ceballos 1.5 fEnergyFractionEmMax(0.95),
23     fHCalEtOverPtMin(0.1),
24 loizides 1.4 fCaloTaus(0)
25 ceballos 1.1 {
26     // Constructor.
27     }
28    
29     //------------------------------------------------------------------------------
30     void TauIDMod::Process()
31     {
32     // Process entries of the tree.
33    
34     LoadBranch(fCaloTausName);
35    
36     CaloTauOArr *GoodTaus = new CaloTauOArr;
37     GoodTaus->SetName(fGoodTausName);
38    
39     for (UInt_t i=0; i<fCaloTaus->GetEntries(); ++i) {
40     const CaloTau *tau = fCaloTaus->At(i);
41    
42 ceballos 1.5 if (tau->Pt() <= fPtMin)
43 ceballos 1.1 continue;
44    
45 ceballos 1.5 if (tau->SourceCaloJet()->Pt() <= fJetPtMin)
46 ceballos 1.1 continue;
47    
48     if (tau->NSignalTracks() == 0 || tau->NSignalTracks() > fNSignalTracksMax)
49     continue;
50    
51 ceballos 1.5 if (!tau->LeadTrack() || tau->LeadTrack()->Pt() < fLeadTrackPtMin)
52     continue;
53    
54 ceballos 1.1 if (tau->NIsoTracks() > fNIsoTracksMax)
55     continue;
56    
57     if (tau->SignalTracksMass() > fSignalTracksMassMax)
58     continue;
59    
60     if (tau->IsoTrackPtSum() > fIsoTrackPtSumMax)
61     continue;
62    
63 ceballos 1.3 if (tau->SourceCaloJet()->EnergyFractionEm() > fEnergyFractionEmMax)
64     continue;
65    
66 ceballos 1.5 if (tau->LeadTrack3x3HCalEt()/tau->LeadTrack()->Pt() < fHCalEtOverPtMin)
67     continue;
68    
69 ceballos 1.6 // Always apply these requirements
70 ceballos 1.2 if (TMath::Abs(tau->Charge()) != 1)
71 ceballos 1.1 continue;
72    
73 ceballos 1.5 if (TMath::Abs(TMath::Abs(tau->Eta())-1.53) < 0.02)
74     continue;
75    
76 loizides 1.4 // add good tau to output collection
77 ceballos 1.1 GoodTaus->Add(tau);
78     }
79    
80     // sort according to pt
81     GoodTaus->Sort();
82    
83     // add to event for other modules to use
84     AddObjThisEvt(GoodTaus);
85     }
86    
87     //------------------------------------------------------------------------------
88     void TauIDMod::SlaveBegin()
89     {
90     // Run startup code on the computer (slave) doing the actual analysis. Here,
91     // we just request the Tau collection branch.
92    
93     ReqBranch(fCaloTausName, fCaloTaus);
94     }