ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/PhotonIDMod.h
(Generate patch)

Comparing UserCode/MitPhysics/Mods/interface/PhotonIDMod.h (file contents):
Revision 1.3 by loizides, Wed Dec 3 10:19:13 2008 UTC vs.
Revision 1.23 by fabstoec, Tue Oct 18 11:27:19 2011 UTC

# Line 13 | Line 13
13   #define MITPHYSICS_MODS_PHOTONIDMOD_H
14  
15   #include "MitAna/TreeMod/interface/BaseMod.h"
16 < #include "MitAna/DataTree/interface/Collections.h"
16 > #include "MitAna/DataTree/interface/PhotonFwd.h"
17 > #include "MitAna/DataTree/interface/TrackCol.h"
18 > #include "MitAna/DataTree/interface/BeamSpotCol.h"
19 > #include "MitAna/DataTree/interface/PileupEnergyDensityCol.h"
20 > #include "MitAna/DataTree/interface/DecayParticleCol.h"
21 > #include "MitAna/DataTree/interface/ElectronCol.h"
22 > #include "MitAna/DataTree/interface/VertexCol.h"
23 > #include "MitAna/DataTree/interface/DecayParticleCol.h"
24 > #include "MitAna/DataTree/interface/PileupInfoCol.h"
25 > #include "MitAna/DataTree/interface/MCParticleCol.h"
26 >
27 > #include "MitPhysics/Utils/interface/MVATools.h"
28  
29   namespace mithep
30   {
# Line 22 | Line 33 | namespace mithep
33      public:
34        PhotonIDMod(const char *name="PhotonIDMod",
35                    const char *title="Photon identification module");
25      ~PhotonIDMod() {}
36  
37 <      void          SetPhotonBranchName(const char *n) { fPhotonBranchName= n;      }  
38 <      void          SetGoodPhotonsName(const char *n)  { fGoodPhotonsName = n;      }  
39 <      void          SetPhotonIDType(const char *type)  { fPhotonIDType    = type;   }
40 <      void          SetPhotonIsoType(const char *type) { fPhotonIsoType   = type;   }
41 <      void          SetPhotonPtMin(Double_t pt)        { fPhotonPtMin     = pt;     }
42 <      void          SetHadOverEmMax(Double_t hovere)   { fHadOverEmMax    = hovere; }
43 <      void          SetPhotonPtMin(Bool_t b)           { fApplyPixelSeed  = b;      }
37 >      Bool_t              GetApplySpikeRemoval()      const { return fApplySpikeRemoval;   }
38 >      Bool_t              GetApplyPixelSeed()         const { return fApplyPixelSeed;      }
39 >      const char         *GetGoodName()               const { return GetGoodPhotonsName(); }  
40 >      const char         *GetGoodPhotonsName()        const { return fGoodPhotonsName;     }  
41 >      Double_t            GetHadOverEmMax()           const { return fHadOverEmMax;        }
42 >      const char         *GetIDType()                 const { return fPhotonIDType;        }
43 >      const char         *GetInputName()              const { return fPhotonBranchName;    }  
44 >      const char         *GetIsoType()                const { return fPhotonIsoType;       }
45 >      const char         *GetOutputName()             const { return GetGoodPhotonsName(); }  
46 >      Double_t            GetPtMin()                  const { return fPhotonPtMin;         }
47 >      Bool_t              GetApplyFiduciality()       const { return fFiduciality;         }
48 >      Double_t            GetEtaWidthEB()             const { return fEtaWidthEB;          }
49 >      Double_t            GetEtaWidthEE()             const { return fEtaWidthEE;          }
50 >      Double_t            GetAbsEtaMax()              const { return fAbsEtaMax;           }
51 >      void                SetApplySpikeRemoval(Bool_t b)    { fApplySpikeRemoval  = b;     }
52 >      void                SetApplyPixelSeed(Bool_t b)       { fApplyPixelSeed  = b;        }
53 >      void                SetApplyElectronVeto(Bool_t b)    { fApplyElectronVeto = b;      }
54 >      void                SetInvertElectronVeto(Bool_t b)   { fInvertElectronVeto = b;     }      
55 >      void                SetApplyElectronVetoConvRecovery(Bool_t b) { fApplyElectronVetoConvRecovery = b; }
56 >      void                SetApplyConversionId(Bool_t b)    { fApplyConversionId = b;      }
57 >      void                SetApplyTriggerMatching(Bool_t b)      { fApplyTriggerMatching = b;  }      
58 >      void                SetGoodName(const char *n)        { SetGoodPhotonsName(n);       }  
59 >      void                SetGoodPhotonsName(const char *n) { fGoodPhotonsName = n;        }  
60 >      void                SetHadOverEmMax(Double_t hoe)     { fHadOverEmMax    = hoe;      }
61 >      void                SetIDType(const char *type)       { fPhotonIDType    = type;     }
62 >      void                SetInputName(const char *n)       { fPhotonBranchName= n;        }  
63 >      void                SetTrackName(const char *n)       { fTrackBranchName = n;        }  
64 >      void                SetBeamspotName(const char *n)    { fBeamspotBranchName = n;     }  
65 >      void                SetIsoType(const char *type)      { fPhotonIsoType   = type;     }
66 >      void                SetOutputName(const char *n)      { SetGoodPhotonsName(n);       }    
67 >      void                SetPtMin(Double_t pt)             { fPhotonPtMin     = pt;       }
68 >      void                SetR9Min(Double_t x)              { fPhotonR9Min     = x;        }
69 >      void                SetEtaWidthEB(Double_t x)         { fEtaWidthEB      = x;        }
70 >      void                SetEtaWidthEE(Double_t x)         { fEtaWidthEE      = x;        }
71 >      void                SetAbsEtaMax(Double_t x)          { fAbsEtaMax       = x;        }
72 >      void                SetApplyR9Min(Bool_t b)           { fApplyR9Min      = b;        }
73 >      void                SetApplyFiduciality(Bool_t b)     { fFiduciality = b;            }      
74 >      void                SetEffAreas(Double_t ecal, Double_t hcal, Double_t track) {
75 >        fEffAreaEcalEE = ecal; fEffAreaHcalEE = hcal; fEffAreaTrackEE = track;
76 >        fEffAreaEcalEB = ecal; fEffAreaHcalEB = hcal; fEffAreaTrackEB = track;
77 >      }
78 >      void                SetEffAreasEEEB(Double_t ecalEE, Double_t hcalEE, Double_t trackEE,
79 >                                          Double_t ecalEB, Double_t hcalEB, Double_t trackEB) {
80 >        fEffAreaEcalEE = ecalEE; fEffAreaHcalEE = hcalEE; fEffAreaTrackEE = trackEE;
81 >        fEffAreaEcalEB = ecalEB; fEffAreaHcalEB = hcalEB; fEffAreaTrackEB = trackEB;
82 >      }
83 >      void                SetTriggerObjectsName(const char *n)   { fTrigObjectsName = n;       }
84 >    
85 >    void                SetPVName(const char *n)          { fPVName = n;                 }
86 >    void                SetPVFromBranch(bool b)           { fPVFromBranch = b;           }
87 >    void                SetIsData (Bool_t b) { fIsData = b;};
88 >    void                SetGoodElectronsFromBranch(Bool_t b) { fGoodElectronsFromBranch = b; }
89 >    void                SetGoodElectronName(TString name) { fGoodElectronName = name; }
90 >
91 >    void                SetBdtCutBarrel(double a) {fbdtCutBarrel = a; }
92 >    void                SetBdtCutEndcap(double a) {fbdtCutEndcap = a; }
93  
94  
95        enum EPhIdType {
# Line 38 | Line 97 | namespace mithep
97          kTight,             //"Tight"
98          kLoose,             //"Loose"
99          kLooseEM,           //"LooseEM"
100 +        kBaseLineCiC,        //"2011" Hgg BaseLine CiC
101 +        kMITMVAId,          // MingMing MVA ID
102          kCustomId           //"Custom"
103        };
104 +
105        enum EPhIsoType {
106          kIsoUndef = 0,      //not defined        
107          kNoIso,             //"NoIso"
108          kCombinedIso,       //"CombinedIso"
109 <        kCustomIso          //"Custom"
109 >        kCustomIso,         //"Custom"
110 >        kMITPUCorrected     //PileUp Corrected Hgg Isolation
111        };
112  
113      protected:
114 <      TString       fPhotonBranchName;     //branch name of electron collection
115 <      TString       fGoodPhotonsName;      //name of exported "good electrons" collection
53 <      TString       fPhotonIDType;         //type of electron ID we impose
54 <      TString       fPhotonIsoType;        //type of electron Isolation we impose
55 <      Double_t      fPhotonPtMin;          //min pt cut
56 <      Double_t      fHadOverEmMax;         //!maximum of hadronic/em energy
57 <      Bool_t        fApplyPixelSeed;       //!=true then apply PixelSeed
58 <      PhotonCol    *fPhotons;              //!photon branch
59 <      EPhIdType     fPhIdType;             //!identification scheme
60 <      EPhIsoType    fPhIsoType;            //!isolation scheme
114 >      void                Process();
115 >      void                SlaveBegin();
116  
117 <      void          Process();
118 <      void          SlaveBegin();
119 <    
120 <      ClassDef(PhotonIDMod,1) // Photon identification module
117 >      TString             fPhotonBranchName;     //name of photon collection (input)
118 >      TString             fGoodPhotonsName;      //name of exported "good photon" collection
119 >      TString             fTrackBranchName;      // name of the track collection (only needed for PU corrected isolation)
120 >      TString             fBeamspotBranchName;   //name of the Beamspot collection (only needed for PU corrected isolation)
121 >      TString             fPileUpDenName;        //name of the PU density collection      
122 >      TString             fConversionName;       //name of conversion branch
123 >      TString             fElectronName;
124 >      TString             fGoodElectronName;
125 >      TString             fTrigObjectsName;        //name of trigger object collection
126 >      TString             fPVName;
127 >      TString             fMCParticleName;
128 >      TString             fPileUpName;
129 >      TString             fPhotonIDType;         //type of photon identification we impose
130 >      TString             fPhotonIsoType;        //type of photon isolation we impose
131 >      Double_t            fPhotonPtMin;          //min pt cut
132 >      Double_t            fHadOverEmMax;         //maximum of hadronic/em energy
133 >      Bool_t              fApplySpikeRemoval;    //whether apply spike removal      
134 >      Bool_t              fApplyPixelSeed;       //=true then apply pixel seed constraint
135 >      Bool_t              fApplyElectronVeto;    //=true then apply electron veto (with no conversion recovery)
136 >      Bool_t              fInvertElectronVeto;    //=true then invert electron veto (for cic selection only atm)      
137 >      Bool_t              fApplyElectronVetoConvRecovery; //=true then apply electron veto with conversion recovery
138 >      Bool_t              fApplyConversionId;    //=true then apply conversion id cuts
139 >      Bool_t              fApplyTriggerMatching;   //match to hlt photon (default=0)      
140 >      Double_t            fPhotonR9Min;          //min R9 value
141 >      EPhIdType           fPhIdType;             //!identification scheme
142 >      EPhIsoType          fPhIsoType;            //!isolation scheme
143 >      Bool_t              fFiduciality;          //=true then apply fiducual requirement
144 >      Double_t            fEtaWidthEB;           //max Eta Width in ECAL Barrel
145 >      Double_t            fEtaWidthEE;           //max Eta Width in ECAL End Cap
146 >      Double_t            fAbsEtaMax;            //max Abs Eta
147 >      Bool_t              fApplyR9Min;           //apply R9 min
148 >      Double_t            fEffAreaEcalEE;
149 >      Double_t            fEffAreaHcalEE;
150 >      Double_t            fEffAreaTrackEE;
151 >      Double_t            fEffAreaEcalEB;
152 >      Double_t            fEffAreaHcalEB;
153 >      Double_t            fEffAreaTrackEB;
154 >      const PhotonCol    *fPhotons;              //!photon branch
155 >      const TrackCol     *fTracks;               //!track branch
156 >      const BeamSpotCol  *fBeamspots;            //!beamspot branch    
157 >      const PileupEnergyDensityCol *fPileUpDen;  //!rho branch
158 >      const DecayParticleCol *fConversions;      //!conversion branch
159 >      const ElectronCol  *fElectrons;            //!electron branch
160 >      const ElectronCol  *fGoodElectrons;        //!electron branch
161 >      const VertexCol*    fPV;                   //!
162 >      const MCParticleCol          *fMCParticles;//!
163 >      const PileupInfoCol          *fPileUp;     //!  
164 >
165 >      Double_t fbdtCutBarrel;
166 >      Double_t fbdtCutEndcap;
167 >      int                         fVariableType;
168 >      TString                     fEndcapWeights;
169 >      TString                     fBarrelWeights;
170 >      MVATools                    fTool;
171 >
172 >      bool                fPVFromBranch;
173 >      Bool_t              fGoodElectronsFromBranch;
174 >      Bool_t              fIsData;
175 >
176 >
177 >
178 >    ClassDef(PhotonIDMod, 1) // Photon identification module
179    };
180   }
181   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines