ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/PhotonIDMod.h
Revision: 1.18
Committed: Wed May 18 14:01:18 2011 UTC (13 years, 11 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_021
Changes since 1.17: +2 -1 lines
Log Message:
make fiducial cuts consistent

File Contents

# User Rev Content
1 sixie 1.1 //--------------------------------------------------------------------------------------------------
2 bendavid 1.18 // $Id: PhotonIDMod.h,v 1.17 2011/04/19 09:13:37 fabstoec Exp $
3 sixie 1.1 //
4     // PhotonIDMod
5     //
6     // This module applies photon identification criteria and exports a pointer to a collection
7     // of "good photons" according to the specified identification scheme.
8     //
9     // Authors: S.Xie, C.Loizides
10     //--------------------------------------------------------------------------------------------------
11    
12     #ifndef MITPHYSICS_MODS_PHOTONIDMOD_H
13     #define MITPHYSICS_MODS_PHOTONIDMOD_H
14    
15     #include "MitAna/TreeMod/interface/BaseMod.h"
16 loizides 1.10 #include "MitAna/DataTree/interface/PhotonFwd.h"
17 fabstoec 1.15 #include "MitAna/DataTree/interface/TrackCol.h"
18     #include "MitAna/DataTree/interface/BeamSpotCol.h"
19     #include "MitAna/DataTree/interface/PileupEnergyDensityCol.h"
20 bendavid 1.16 #include "MitAna/DataTree/interface/DecayParticleCol.h"
21     #include "MitAna/DataTree/interface/ElectronCol.h"
22 sixie 1.1
23     namespace mithep
24     {
25     class PhotonIDMod : public BaseMod
26     {
27     public:
28     PhotonIDMod(const char *name="PhotonIDMod",
29 loizides 1.3 const char *title="Photon identification module");
30 sixie 1.1
31 sixie 1.13 Bool_t GetApplySpikeRemoval() const { return fApplySpikeRemoval; }
32 loizides 1.6 Bool_t GetApplyPixelSeed() const { return fApplyPixelSeed; }
33     const char *GetGoodName() const { return GetGoodPhotonsName(); }
34     const char *GetGoodPhotonsName() const { return fGoodPhotonsName; }
35     Double_t GetHadOverEmMax() const { return fHadOverEmMax; }
36     const char *GetIDType() const { return fPhotonIDType; }
37     const char *GetInputName() const { return fPhotonBranchName; }
38     const char *GetIsoType() const { return fPhotonIsoType; }
39     const char *GetOutputName() const { return GetGoodPhotonsName(); }
40     Double_t GetPtMin() const { return fPhotonPtMin; }
41 ceballos 1.11 Bool_t GetApplyFiduciality() const { return fFiduciality; }
42     Double_t GetEtaWidthEB() const { return fEtaWidthEB; }
43     Double_t GetEtaWidthEE() const { return fEtaWidthEE; }
44 ceballos 1.12 Double_t GetAbsEtaMax() const { return fAbsEtaMax; }
45 sixie 1.13 void SetApplySpikeRemoval(Bool_t b) { fApplySpikeRemoval = b; }
46 loizides 1.6 void SetApplyPixelSeed(Bool_t b) { fApplyPixelSeed = b; }
47 bendavid 1.16 void SetApplyElectronVeto(Bool_t b) { fApplyElectronVeto = b; }
48     void SetApplyElectronVetoConvRecovery(Bool_t b) { fApplyElectronVetoConvRecovery = b; }
49     void SetApplyConversionId(Bool_t b) { fApplyConversionId = b; }
50     void SetApplyTriggerMatching(Bool_t b) { fApplyTriggerMatching = b; }
51 loizides 1.6 void SetGoodName(const char *n) { SetGoodPhotonsName(n); }
52     void SetGoodPhotonsName(const char *n) { fGoodPhotonsName = n; }
53     void SetHadOverEmMax(Double_t hoe) { fHadOverEmMax = hoe; }
54     void SetIDType(const char *type) { fPhotonIDType = type; }
55     void SetInputName(const char *n) { fPhotonBranchName= n; }
56 fabstoec 1.15 void SetTrackName(const char *n) { fTrackBranchName = n; }
57     void SetBeamspotName(const char *n) { fBeamspotBranchName = n; }
58 loizides 1.6 void SetIsoType(const char *type) { fPhotonIsoType = type; }
59     void SetOutputName(const char *n) { SetGoodPhotonsName(n); }
60     void SetPtMin(Double_t pt) { fPhotonPtMin = pt; }
61 ceballos 1.11 void SetR9Min(Double_t x) { fPhotonR9Min = x; }
62     void SetEtaWidthEB(Double_t x) { fEtaWidthEB = x; }
63     void SetEtaWidthEE(Double_t x) { fEtaWidthEE = x; }
64 ceballos 1.12 void SetAbsEtaMax(Double_t x) { fAbsEtaMax = x; }
65 bendavid 1.14 void SetApplyR9Min(Bool_t b) { fApplyR9Min = b; }
66 bendavid 1.18 void SetApplyFiduciality(Bool_t b) { fFiduciality = b; }
67 fabstoec 1.15 void SetEffAreas(Double_t ecal, Double_t hcal, Double_t track) {
68 fabstoec 1.17 fEffAreaEcalEE = ecal; fEffAreaHcalEE = hcal; fEffAreaTrackEE = track;
69     fEffAreaEcalEB = ecal; fEffAreaHcalEB = hcal; fEffAreaTrackEB = track;
70     }
71     void SetEffAreasEEEB(Double_t ecalEE, Double_t hcalEE, Double_t trackEE,
72     Double_t ecalEB, Double_t hcalEB, Double_t trackEB) {
73     fEffAreaEcalEE = ecalEE; fEffAreaHcalEE = hcalEE; fEffAreaTrackEE = trackEE;
74     fEffAreaEcalEB = ecalEB; fEffAreaHcalEB = hcalEB; fEffAreaTrackEB = trackEB;
75     }
76 bendavid 1.16 void SetTriggerObjectsName(const char *n) { fTrigObjectsName = n; }
77 fabstoec 1.15
78 sixie 1.1 enum EPhIdType {
79     kIdUndef = 0, //not defined
80     kTight, //"Tight"
81     kLoose, //"Loose"
82 ceballos 1.2 kLooseEM, //"LooseEM"
83 sixie 1.1 kCustomId //"Custom"
84     };
85     enum EPhIsoType {
86     kIsoUndef = 0, //not defined
87     kNoIso, //"NoIso"
88 ceballos 1.2 kCombinedIso, //"CombinedIso"
89 fabstoec 1.15 kCustomIso, //"Custom"
90     kMITPUCorrected //PileUp Corrected Hgg Isolation
91 sixie 1.1 };
92    
93     protected:
94 loizides 1.5 void Process();
95     void SlaveBegin();
96    
97 loizides 1.6 TString fPhotonBranchName; //name of photon collection (input)
98     TString fGoodPhotonsName; //name of exported "good photon" collection
99 fabstoec 1.15 TString fTrackBranchName; // name of the track collection (only needed for PU corrected isolation)
100     TString fBeamspotBranchName; //name of the Beamspot collection (only needed for PU corrected isolation)
101 bendavid 1.16 TString fPileUpDenName; //name of the PU density collection
102     TString fConversionName; //name of conversion branch
103     TString fElectronName;
104     TString fTrigObjectsName; //name of trigger object collection
105 loizides 1.6 TString fPhotonIDType; //type of photon identification we impose
106     TString fPhotonIsoType; //type of photon isolation we impose
107 loizides 1.4 Double_t fPhotonPtMin; //min pt cut
108 loizides 1.6 Double_t fHadOverEmMax; //maximum of hadronic/em energy
109 sixie 1.13 Bool_t fApplySpikeRemoval; //whether apply spike removal
110 loizides 1.6 Bool_t fApplyPixelSeed; //=true then apply pixel seed constraint
111 bendavid 1.16 Bool_t fApplyElectronVeto; //=true then apply electron veto (with no conversion recovery)
112     Bool_t fApplyElectronVetoConvRecovery; //=true then apply electron veto with conversion recovery
113     Bool_t fApplyConversionId; //=true then apply conversion id cuts
114     Bool_t fApplyTriggerMatching; //match to hlt photon (default=0)
115 ceballos 1.8 Double_t fPhotonR9Min; //min R9 value
116 loizides 1.4 EPhIdType fPhIdType; //!identification scheme
117     EPhIsoType fPhIsoType; //!isolation scheme
118 ceballos 1.11 Bool_t fFiduciality; //=true then apply fiducual requirement
119     Double_t fEtaWidthEB; //max Eta Width in ECAL Barrel
120     Double_t fEtaWidthEE; //max Eta Width in ECAL End Cap
121 ceballos 1.12 Double_t fAbsEtaMax; //max Abs Eta
122 bendavid 1.14 Bool_t fApplyR9Min; //apply R9 min
123 fabstoec 1.17 Double_t fEffAreaEcalEE;
124     Double_t fEffAreaHcalEE;
125     Double_t fEffAreaTrackEE;
126     Double_t fEffAreaEcalEB;
127     Double_t fEffAreaHcalEB;
128     Double_t fEffAreaTrackEB;
129 loizides 1.10 const PhotonCol *fPhotons; //!photon branch
130 fabstoec 1.15 const TrackCol *fTracks; //!track branch
131     const BeamSpotCol *fBeamspots; //!beamspot branch
132 bendavid 1.16 const PileupEnergyDensityCol *fPileUpDen; //!rho branch
133     const DecayParticleCol *fConversions; //!conversion branch
134     const ElectronCol *fElectrons; //!electron branch
135 fabstoec 1.15
136    
137 loizides 1.6 ClassDef(PhotonIDMod, 1) // Photon identification module
138 sixie 1.1 };
139     }
140     #endif