ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/src/TauIDMod.cc
Revision: 1.3
Committed: Wed Apr 8 17:48:13 2009 UTC (16 years, 1 month ago) by ceballos
Content type: text/plain
Branch: MAIN
Changes since 1.2: +6 -2 lines
Log Message:
adding some additional requirements

File Contents

# User Rev Content
1 ceballos 1.3 // $Id: TauIDMod.cc,v 1.2 2009/04/08 11:06:35 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     fCaloTaus(0),
15     fGoodTausName(ModNames::gkGoodTausName),
16     fTauPtMin(10.0),
17     fTauJetPtMin(20.0),
18     fNSignalTracksMax(3),
19     fNIsoTracksMax(0),
20     fSignalTracksMassMax(2.0),
21 ceballos 1.3 fIsoTrackPtSumMax(5.0),
22     fEnergyFractionEmMax(0.98)
23 ceballos 1.1 {
24     // Constructor.
25     }
26    
27     //------------------------------------------------------------------------------
28     void TauIDMod::Process()
29     {
30     // Process entries of the tree.
31    
32     LoadBranch(fCaloTausName);
33    
34     CaloTauOArr *GoodTaus = new CaloTauOArr;
35     GoodTaus->SetName(fGoodTausName);
36    
37     for (UInt_t i=0; i<fCaloTaus->GetEntries(); ++i) {
38     const CaloTau *tau = fCaloTaus->At(i);
39    
40     if (tau->Pt() <= fTauPtMin)
41     continue;
42    
43     if (tau->SourceCaloJet()->Pt() <= fTauJetPtMin)
44     continue;
45    
46     if (tau->NSignalTracks() == 0 || tau->NSignalTracks() > fNSignalTracksMax)
47     continue;
48    
49     if (tau->NIsoTracks() > fNIsoTracksMax)
50     continue;
51    
52     if (tau->SignalTracksMass() > fSignalTracksMassMax)
53     continue;
54    
55     if (tau->IsoTrackPtSum() > fIsoTrackPtSumMax)
56     continue;
57    
58 ceballos 1.3 if (tau->SourceCaloJet()->EnergyFractionEm() > fEnergyFractionEmMax)
59     continue;
60    
61 ceballos 1.1 // Always apply this requirement
62 ceballos 1.2 if (TMath::Abs(tau->Charge()) != 1)
63 ceballos 1.1 continue;
64    
65     // add good electron
66     GoodTaus->Add(tau);
67     }
68    
69     // sort according to pt
70     GoodTaus->Sort();
71    
72     // add to event for other modules to use
73     AddObjThisEvt(GoodTaus);
74     }
75    
76     //------------------------------------------------------------------------------
77     void TauIDMod::SlaveBegin()
78     {
79     // Run startup code on the computer (slave) doing the actual analysis. Here,
80     // we just request the Tau collection branch.
81    
82     ReqBranch(fCaloTausName, fCaloTaus);
83    
84     }