ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/PhotonIDMod.h
Revision: 1.15
Committed: Wed Apr 6 18:03:48 2011 UTC (14 years, 1 month ago) by fabstoec
Content type: text/plain
Branch: MAIN
Changes since 1.14: +23 -4 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 sixie 1.1 //--------------------------------------------------------------------------------------------------
2 fabstoec 1.15 // $Id: PhotonIDMod.h,v 1.14 2011/02/01 17:02:21 bendavid 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 sixie 1.1
21     namespace mithep
22     {
23     class PhotonIDMod : public BaseMod
24     {
25     public:
26     PhotonIDMod(const char *name="PhotonIDMod",
27 loizides 1.3 const char *title="Photon identification module");
28 sixie 1.1
29 sixie 1.13 Bool_t GetApplySpikeRemoval() const { return fApplySpikeRemoval; }
30 loizides 1.6 Bool_t GetApplyPixelSeed() const { return fApplyPixelSeed; }
31     const char *GetGoodName() const { return GetGoodPhotonsName(); }
32     const char *GetGoodPhotonsName() const { return fGoodPhotonsName; }
33     Double_t GetHadOverEmMax() const { return fHadOverEmMax; }
34     const char *GetIDType() const { return fPhotonIDType; }
35     const char *GetInputName() const { return fPhotonBranchName; }
36     const char *GetIsoType() const { return fPhotonIsoType; }
37     const char *GetOutputName() const { return GetGoodPhotonsName(); }
38     Double_t GetPtMin() const { return fPhotonPtMin; }
39 ceballos 1.11 Bool_t GetApplyFiduciality() const { return fFiduciality; }
40     Double_t GetEtaWidthEB() const { return fEtaWidthEB; }
41     Double_t GetEtaWidthEE() const { return fEtaWidthEE; }
42 ceballos 1.12 Double_t GetAbsEtaMax() const { return fAbsEtaMax; }
43 sixie 1.13 void SetApplySpikeRemoval(Bool_t b) { fApplySpikeRemoval = b; }
44 loizides 1.6 void SetApplyPixelSeed(Bool_t b) { fApplyPixelSeed = b; }
45     void SetGoodName(const char *n) { SetGoodPhotonsName(n); }
46     void SetGoodPhotonsName(const char *n) { fGoodPhotonsName = n; }
47     void SetHadOverEmMax(Double_t hoe) { fHadOverEmMax = hoe; }
48     void SetIDType(const char *type) { fPhotonIDType = type; }
49     void SetInputName(const char *n) { fPhotonBranchName= n; }
50 fabstoec 1.15 void SetTrackName(const char *n) { fTrackBranchName = n; }
51     void SetBeamspotName(const char *n) { fBeamspotBranchName = n; }
52 loizides 1.6 void SetIsoType(const char *type) { fPhotonIsoType = type; }
53     void SetOutputName(const char *n) { SetGoodPhotonsName(n); }
54     void SetPtMin(Double_t pt) { fPhotonPtMin = pt; }
55 ceballos 1.11 void SetR9Min(Double_t x) { fPhotonR9Min = x; }
56     void SetEtaWidthEB(Double_t x) { fEtaWidthEB = x; }
57     void SetEtaWidthEE(Double_t x) { fEtaWidthEE = x; }
58 ceballos 1.12 void SetAbsEtaMax(Double_t x) { fAbsEtaMax = x; }
59 bendavid 1.14 void SetApplyR9Min(Bool_t b) { fApplyR9Min = b; }
60 fabstoec 1.15 void SetEffAreas(Double_t ecal, Double_t hcal, Double_t track) {
61     fEffAreaEcal = ecal; fEffAreaHcal = hcal; fEffAreaTrack = track;}
62    
63    
64 sixie 1.1 enum EPhIdType {
65     kIdUndef = 0, //not defined
66     kTight, //"Tight"
67     kLoose, //"Loose"
68 ceballos 1.2 kLooseEM, //"LooseEM"
69 sixie 1.1 kCustomId //"Custom"
70     };
71     enum EPhIsoType {
72     kIsoUndef = 0, //not defined
73     kNoIso, //"NoIso"
74 ceballos 1.2 kCombinedIso, //"CombinedIso"
75 fabstoec 1.15 kCustomIso, //"Custom"
76     kMITPUCorrected //PileUp Corrected Hgg Isolation
77 sixie 1.1 };
78    
79     protected:
80 loizides 1.5 void Process();
81     void SlaveBegin();
82    
83 loizides 1.6 TString fPhotonBranchName; //name of photon collection (input)
84     TString fGoodPhotonsName; //name of exported "good photon" collection
85 fabstoec 1.15 TString fTrackBranchName; // name of the track collection (only needed for PU corrected isolation)
86     TString fBeamspotBranchName; //name of the Beamspot collection (only needed for PU corrected isolation)
87     TString fPileUpDenName; //name of the PU density collection
88 loizides 1.6 TString fPhotonIDType; //type of photon identification we impose
89     TString fPhotonIsoType; //type of photon isolation we impose
90 loizides 1.4 Double_t fPhotonPtMin; //min pt cut
91 loizides 1.6 Double_t fHadOverEmMax; //maximum of hadronic/em energy
92 sixie 1.13 Bool_t fApplySpikeRemoval; //whether apply spike removal
93 loizides 1.6 Bool_t fApplyPixelSeed; //=true then apply pixel seed constraint
94 ceballos 1.8 Double_t fPhotonR9Min; //min R9 value
95 loizides 1.4 EPhIdType fPhIdType; //!identification scheme
96     EPhIsoType fPhIsoType; //!isolation scheme
97 ceballos 1.11 Bool_t fFiduciality; //=true then apply fiducual requirement
98     Double_t fEtaWidthEB; //max Eta Width in ECAL Barrel
99     Double_t fEtaWidthEE; //max Eta Width in ECAL End Cap
100 ceballos 1.12 Double_t fAbsEtaMax; //max Abs Eta
101 bendavid 1.14 Bool_t fApplyR9Min; //apply R9 min
102 fabstoec 1.15 Double_t fEffAreaEcal;
103     Double_t fEffAreaHcal;
104     Double_t fEffAreaTrack;
105 loizides 1.10 const PhotonCol *fPhotons; //!photon branch
106 fabstoec 1.15 const TrackCol *fTracks; //!track branch
107     const BeamSpotCol *fBeamspots; //!beamspot branch
108     const PileupEnergyDensityCol *fPileUpDen;
109    
110    
111 loizides 1.6 ClassDef(PhotonIDMod, 1) // Photon identification module
112 sixie 1.1 };
113     }
114     #endif