ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/PhotonIDMod.h
Revision: 1.21
Committed: Wed Jul 27 15:17:36 2011 UTC (13 years, 9 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Changes since 1.20: +16 -2 lines
Log Message:
update photon stuff

File Contents

# User Rev Content
1 sixie 1.1 //--------------------------------------------------------------------------------------------------
2 bendavid 1.21 // $Id: PhotonIDMod.h,v 1.20 2011/07/15 17:24: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 fabstoec 1.20 #include "MitAna/DataTree/interface/VertexCol.h"
23 bendavid 1.21 #include "MitPhysics/Mods/interface/PhotonPairSelector.h"
24 sixie 1.1
25     namespace mithep
26     {
27     class PhotonIDMod : public BaseMod
28     {
29     public:
30     PhotonIDMod(const char *name="PhotonIDMod",
31 loizides 1.3 const char *title="Photon identification module");
32 sixie 1.1
33 sixie 1.13 Bool_t GetApplySpikeRemoval() const { return fApplySpikeRemoval; }
34 loizides 1.6 Bool_t GetApplyPixelSeed() const { return fApplyPixelSeed; }
35     const char *GetGoodName() const { return GetGoodPhotonsName(); }
36     const char *GetGoodPhotonsName() const { return fGoodPhotonsName; }
37     Double_t GetHadOverEmMax() const { return fHadOverEmMax; }
38     const char *GetIDType() const { return fPhotonIDType; }
39     const char *GetInputName() const { return fPhotonBranchName; }
40     const char *GetIsoType() const { return fPhotonIsoType; }
41     const char *GetOutputName() const { return GetGoodPhotonsName(); }
42     Double_t GetPtMin() const { return fPhotonPtMin; }
43 ceballos 1.11 Bool_t GetApplyFiduciality() const { return fFiduciality; }
44     Double_t GetEtaWidthEB() const { return fEtaWidthEB; }
45     Double_t GetEtaWidthEE() const { return fEtaWidthEE; }
46 ceballos 1.12 Double_t GetAbsEtaMax() const { return fAbsEtaMax; }
47 sixie 1.13 void SetApplySpikeRemoval(Bool_t b) { fApplySpikeRemoval = b; }
48 loizides 1.6 void SetApplyPixelSeed(Bool_t b) { fApplyPixelSeed = b; }
49 bendavid 1.16 void SetApplyElectronVeto(Bool_t b) { fApplyElectronVeto = b; }
50     void SetApplyElectronVetoConvRecovery(Bool_t b) { fApplyElectronVetoConvRecovery = b; }
51     void SetApplyConversionId(Bool_t b) { fApplyConversionId = b; }
52     void SetApplyTriggerMatching(Bool_t b) { fApplyTriggerMatching = b; }
53 loizides 1.6 void SetGoodName(const char *n) { SetGoodPhotonsName(n); }
54     void SetGoodPhotonsName(const char *n) { fGoodPhotonsName = n; }
55     void SetHadOverEmMax(Double_t hoe) { fHadOverEmMax = hoe; }
56     void SetIDType(const char *type) { fPhotonIDType = type; }
57     void SetInputName(const char *n) { fPhotonBranchName= n; }
58 fabstoec 1.15 void SetTrackName(const char *n) { fTrackBranchName = n; }
59     void SetBeamspotName(const char *n) { fBeamspotBranchName = n; }
60 loizides 1.6 void SetIsoType(const char *type) { fPhotonIsoType = type; }
61     void SetOutputName(const char *n) { SetGoodPhotonsName(n); }
62     void SetPtMin(Double_t pt) { fPhotonPtMin = pt; }
63 ceballos 1.11 void SetR9Min(Double_t x) { fPhotonR9Min = x; }
64     void SetEtaWidthEB(Double_t x) { fEtaWidthEB = x; }
65     void SetEtaWidthEE(Double_t x) { fEtaWidthEE = x; }
66 ceballos 1.12 void SetAbsEtaMax(Double_t x) { fAbsEtaMax = x; }
67 bendavid 1.14 void SetApplyR9Min(Bool_t b) { fApplyR9Min = b; }
68 bendavid 1.18 void SetApplyFiduciality(Bool_t b) { fFiduciality = b; }
69 fabstoec 1.15 void SetEffAreas(Double_t ecal, Double_t hcal, Double_t track) {
70 fabstoec 1.17 fEffAreaEcalEE = ecal; fEffAreaHcalEE = hcal; fEffAreaTrackEE = track;
71     fEffAreaEcalEB = ecal; fEffAreaHcalEB = hcal; fEffAreaTrackEB = track;
72     }
73     void SetEffAreasEEEB(Double_t ecalEE, Double_t hcalEE, Double_t trackEE,
74     Double_t ecalEB, Double_t hcalEB, Double_t trackEB) {
75     fEffAreaEcalEE = ecalEE; fEffAreaHcalEE = hcalEE; fEffAreaTrackEE = trackEE;
76     fEffAreaEcalEB = ecalEB; fEffAreaHcalEB = hcalEB; fEffAreaTrackEB = trackEB;
77     }
78 bendavid 1.16 void SetTriggerObjectsName(const char *n) { fTrigObjectsName = n; }
79 fabstoec 1.15
80 fabstoec 1.20 void SetPVName(const char *n) { fPVName = n; }
81     void SetPVFromBranch(bool b) { fPVFromBranch = b; }
82 bendavid 1.21 void SetIsData (Bool_t b) { fIsData = b;};
83     void SetWriteTree(Bool_t b) { fWriteTree = b;}
84 fabstoec 1.20
85 sixie 1.1 enum EPhIdType {
86     kIdUndef = 0, //not defined
87     kTight, //"Tight"
88     kLoose, //"Loose"
89 ceballos 1.2 kLooseEM, //"LooseEM"
90 fabstoec 1.20 kBaseLineCiC, //"2011" Hgg BaseLine CiC
91 sixie 1.1 kCustomId //"Custom"
92     };
93 fabstoec 1.19
94 sixie 1.1 enum EPhIsoType {
95     kIsoUndef = 0, //not defined
96     kNoIso, //"NoIso"
97 ceballos 1.2 kCombinedIso, //"CombinedIso"
98 fabstoec 1.15 kCustomIso, //"Custom"
99     kMITPUCorrected //PileUp Corrected Hgg Isolation
100 sixie 1.1 };
101    
102     protected:
103 loizides 1.5 void Process();
104     void SlaveBegin();
105    
106 loizides 1.6 TString fPhotonBranchName; //name of photon collection (input)
107     TString fGoodPhotonsName; //name of exported "good photon" collection
108 fabstoec 1.15 TString fTrackBranchName; // name of the track collection (only needed for PU corrected isolation)
109     TString fBeamspotBranchName; //name of the Beamspot collection (only needed for PU corrected isolation)
110 bendavid 1.16 TString fPileUpDenName; //name of the PU density collection
111     TString fConversionName; //name of conversion branch
112     TString fElectronName;
113 fabstoec 1.20 TString fTrigObjectsName; //name of trigger object collection
114     TString fPVName;
115 bendavid 1.21 TString fMCParticleName;
116     TString fPileUpName;
117 loizides 1.6 TString fPhotonIDType; //type of photon identification we impose
118     TString fPhotonIsoType; //type of photon isolation we impose
119 loizides 1.4 Double_t fPhotonPtMin; //min pt cut
120 loizides 1.6 Double_t fHadOverEmMax; //maximum of hadronic/em energy
121 sixie 1.13 Bool_t fApplySpikeRemoval; //whether apply spike removal
122 loizides 1.6 Bool_t fApplyPixelSeed; //=true then apply pixel seed constraint
123 bendavid 1.16 Bool_t fApplyElectronVeto; //=true then apply electron veto (with no conversion recovery)
124     Bool_t fApplyElectronVetoConvRecovery; //=true then apply electron veto with conversion recovery
125     Bool_t fApplyConversionId; //=true then apply conversion id cuts
126     Bool_t fApplyTriggerMatching; //match to hlt photon (default=0)
127 ceballos 1.8 Double_t fPhotonR9Min; //min R9 value
128 loizides 1.4 EPhIdType fPhIdType; //!identification scheme
129     EPhIsoType fPhIsoType; //!isolation scheme
130 ceballos 1.11 Bool_t fFiduciality; //=true then apply fiducual requirement
131     Double_t fEtaWidthEB; //max Eta Width in ECAL Barrel
132     Double_t fEtaWidthEE; //max Eta Width in ECAL End Cap
133 ceballos 1.12 Double_t fAbsEtaMax; //max Abs Eta
134 bendavid 1.14 Bool_t fApplyR9Min; //apply R9 min
135 fabstoec 1.17 Double_t fEffAreaEcalEE;
136     Double_t fEffAreaHcalEE;
137     Double_t fEffAreaTrackEE;
138     Double_t fEffAreaEcalEB;
139     Double_t fEffAreaHcalEB;
140     Double_t fEffAreaTrackEB;
141 loizides 1.10 const PhotonCol *fPhotons; //!photon branch
142 fabstoec 1.15 const TrackCol *fTracks; //!track branch
143     const BeamSpotCol *fBeamspots; //!beamspot branch
144 bendavid 1.16 const PileupEnergyDensityCol *fPileUpDen; //!rho branch
145     const DecayParticleCol *fConversions; //!conversion branch
146     const ElectronCol *fElectrons; //!electron branch
147 bendavid 1.21 const VertexCol* fPV; //!
148     const MCParticleCol *fMCParticles;//!
149     const PileupInfoCol *fPileUp; //!
150 fabstoec 1.20 bool fPVFromBranch;
151 bendavid 1.21 PhotonPairSelectorDiphotonEvent* fDiphotonEvent;
152     PhotonPairSelectorPhoton* fSinglePhoton;
153     TTree *hPhotonTree; //!
154     Bool_t fIsData;
155     Bool_t fWriteTree;
156    
157    
158 fabstoec 1.15
159 loizides 1.6 ClassDef(PhotonIDMod, 1) // Photon identification module
160 sixie 1.1 };
161     }
162     #endif