ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/PhotonIDMod.h
Revision: 1.20
Committed: Fri Jul 15 17:24:37 2011 UTC (13 years, 9 months ago) by fabstoec
Content type: text/plain
Branch: MAIN
Changes since 1.19: +10 -5 lines
Log Message:
added/improved stuff for CiC Selection

File Contents

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