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.22 by bendavid, Wed Aug 3 17:15:43 2011 UTC vs.
Revision 1.30 by fabstoec, Thu Aug 2 12:59:31 2012 UTC

# Line 23 | Line 23
23   #include "MitAna/DataTree/interface/DecayParticleCol.h"
24   #include "MitAna/DataTree/interface/PileupInfoCol.h"
25   #include "MitAna/DataTree/interface/MCParticleCol.h"
26 + #include "MitAna/DataTree/interface/PFCandidateCol.h"
27 +
28 + #include "MitPhysics/Utils/interface/MVATools.h"
29 + #include "MitPhysics/Utils/interface/PhotonTools.h"
30 + #include "MitPhysics/Utils/interface/RhoUtilities.h"
31 +
32 + class TRandom3;
33  
34   namespace mithep
35   {
# Line 80 | Line 87 | namespace mithep
87        }
88        void                SetTriggerObjectsName(const char *n)   { fTrigObjectsName = n;       }
89      
90 +
91 +    void                SetPhotonsFromBranch(bool b)           { fPhotonsFromBranch = b;           }
92 +
93      void                SetPVName(const char *n)          { fPVName = n;                 }
94      void                SetPVFromBranch(bool b)           { fPVFromBranch = b;           }
95      void                SetIsData (Bool_t b) { fIsData = b;};
96 +
97 +
98 +    void                SetShowerShapeType(const char *type) { fShowerShapeType        = type;    }
99 +
100 +        // methods to set the MC smearing/energy correction values
101 +    void                AddEnCorrPerRun( UInt_t sRun, UInt_t eRun,
102 +                                         Double_t corr_EBlowEta_hR9central,
103 +                                         Double_t corr_EBlowEta_hR9gap,
104 +                                         Double_t corr_EBlowEta_lR9,
105 +                                         Double_t corr_EBhighEta_hR9,
106 +                                         Double_t corr_EBhighEta_lR9,                                        
107 +                                         Double_t corr_EElowEta_hR9,
108 +                                         Double_t corr_EElowEta_lR9,
109 +                                         Double_t corr_EEhighEta_hR9,
110 +                                         Double_t corr_EEhighEta_lR9) {
111 +
112 +      fDataEnCorr_EBlowEta_hR9central.push_back(corr_EBlowEta_hR9central);
113 +      fDataEnCorr_EBlowEta_hR9gap.push_back(corr_EBlowEta_hR9gap);
114 +      fDataEnCorr_EBlowEta_lR9.push_back(corr_EBlowEta_lR9);
115 +      fDataEnCorr_EBhighEta_hR9.push_back(corr_EBhighEta_hR9);
116 +      fDataEnCorr_EBhighEta_lR9.push_back(corr_EBhighEta_lR9);      
117 +      fDataEnCorr_EElowEta_hR9.push_back(corr_EElowEta_hR9);
118 +      fDataEnCorr_EElowEta_lR9.push_back(corr_EElowEta_lR9);      
119 +      fDataEnCorr_EEhighEta_hR9.push_back(corr_EEhighEta_hR9);
120 +      fDataEnCorr_EEhighEta_lR9.push_back(corr_EEhighEta_lR9);      
121 +      fRunStart.push_back         (sRun);
122 +      fRunEnd.push_back           (eRun);
123 +    };
124 +
125 +    void                SetMCSmearFactors(Double_t _EBlowEta_hR9central,
126 +                                          Double_t _EBlowEta_hR9gap,
127 +                                          Double_t _EBlowEta_lR9,
128 +                                          Double_t _EBhighEta_hR9,
129 +                                          Double_t _EBhighEta_lR9,
130 +                                          Double_t _EElowEta_hR9,
131 +                                          Double_t _EElowEta_lR9,
132 +                                          Double_t _EEhighEta_hR9,
133 +                                          Double_t _EEhighEta_lR9) {
134 +      fMCSmear_EBlowEta_hR9central = _EBlowEta_hR9central;
135 +      fMCSmear_EBlowEta_hR9gap = _EBlowEta_hR9gap;
136 +      fMCSmear_EBlowEta_lR9 = _EBlowEta_lR9;
137 +      fMCSmear_EBhighEta_hR9 = _EBhighEta_hR9;
138 +      fMCSmear_EBhighEta_lR9 = _EBhighEta_lR9;      
139 +      fMCSmear_EElowEta_hR9 = _EElowEta_hR9;
140 +      fMCSmear_EElowEta_lR9 = _EElowEta_lR9;
141 +      fMCSmear_EEhighEta_hR9 = _EEhighEta_hR9;
142 +      fMCSmear_EEhighEta_lR9 = _EEhighEta_lR9;      
143 +    };
144 +
145      void                SetGoodElectronsFromBranch(Bool_t b) { fGoodElectronsFromBranch = b; }
146      void                SetGoodElectronName(TString name) { fGoodElectronName = name; }
147  
148 +    void                SetBdtCutBarrel(double a) {fbdtCutBarrel = a; }
149 +    void                SetBdtCutEndcap(double a) {fbdtCutEndcap = a; }
150 +
151 +
152 +    void                DoDataEneCorr(bool a)              { fDoDataEneCorr = a; }
153 +    void                DoMCSmear(bool a)                  { fDoMCSmear     = a; }
154 +    void                SetDoShowerShapeScaling(Bool_t b)  { fDoShowerShapeScaling = b; }
155 +
156 +    // replaced by ShowerShapeScaling (fab)
157 + /*     void                SetDoMCR9Scaling(Bool_t b)        { fDoMCR9Scaling = b; } */
158 + /*     void                SetMCR9Scale(Double_t ebscale, Double_t eescale) { fMCR9ScaleEB = ebscale; fMCR9ScaleEE = eescale; } */
159 + /*     void                SetDoMCSigIEtaIEtaScaling(Bool_t b)        { fDoMCSigIEtaIEtaScaling = b; } */
160 + /*     void                SetDoMCWidthScaling(Bool_t b)        { fDoMCWidthScaling = b; } */
161 +
162 +    void                SetDoMCErrScaling(Bool_t b)        { fDoMCErrScaling = b; }
163 +    void                SetMCErrScale(Double_t ebscale, Double_t eescale) { fMCErrScaleEB = ebscale; fMCErrScaleEE = eescale; }
164 +
165 +    void                SetIdMVAType(const char *type)    { fIdMVATypeName        = type;    }
166 +
167 +    void                SetRhoType(RhoUtilities::RhoType type) { fRhoType = type ; }
168 +
169        enum EPhIdType {
170          kIdUndef = 0,       //not defined
171          kTight,             //"Tight"
172          kLoose,             //"Loose"
173          kLooseEM,           //"LooseEM"
174 <        kBaseLineCiC,        //"2011" Hgg BaseLine CiC
175 <        kCustomId           //"Custom"
174 >        kBaseLineCiC,         //"2011" Hgg BaseLine CiC
175 >        kBaseLineCiCPF,       //"2012" Hgg BaseLine CiC
176 >        kMITMVAId,            // MingMing MVA ID
177 >        kMITPhSelection,      //MIT loose preselection (for mva)
178 >        kMITPFPhSelection,    //MIT loose preselection (for mva)
179 >        kMITPFPhSelection_NoTrigger,    //MIT loose preselection (for mva, no Trigger)
180 >        kVgamma2011Selection, // Vgamma 2011 Photon ID
181 >        kTrivialSelection,    // only pt & eta cuts
182 >        kCustomId             //"Custom"
183        };
184  
185        enum EPhIsoType {
# Line 107 | Line 194 | namespace mithep
194        void                Process();
195        void                SlaveBegin();
196  
197 +      Int_t               FindRunRangeIdx(UInt_t run);
198 +      Double_t            GetDataEnCorr(Int_t runRange, PhotonTools::eScaleCats cat);
199 +      Double_t            GetMCSmearFac(PhotonTools::eScaleCats cat);
200 +
201        TString             fPhotonBranchName;     //name of photon collection (input)
202        TString             fGoodPhotonsName;      //name of exported "good photon" collection
203        TString             fTrackBranchName;      // name of the track collection (only needed for PU corrected isolation)
# Line 119 | Line 210 | namespace mithep
210        TString             fPVName;
211        TString             fMCParticleName;
212        TString             fPileUpName;
213 +      TString             fPFCandsName;
214        TString             fPhotonIDType;         //type of photon identification we impose
215        TString             fPhotonIsoType;        //type of photon isolation we impose
216        Double_t            fPhotonPtMin;          //min pt cut
# Line 134 | Line 226 | namespace mithep
226        EPhIdType           fPhIdType;             //!identification scheme
227        EPhIsoType          fPhIsoType;            //!isolation scheme
228        Bool_t              fFiduciality;          //=true then apply fiducual requirement
229 +
230        Double_t            fEtaWidthEB;           //max Eta Width in ECAL Barrel
231        Double_t            fEtaWidthEE;           //max Eta Width in ECAL End Cap
232        Double_t            fAbsEtaMax;            //max Abs Eta
# Line 154 | Line 247 | namespace mithep
247        const VertexCol*    fPV;                   //!
248        const MCParticleCol          *fMCParticles;//!
249        const PileupInfoCol          *fPileUp;     //!  
250 <      bool                fPVFromBranch;
250 >      const PFCandidateCol          *fPFCands;     //!  
251 >
252 >      Double_t fbdtCutBarrel;
253 >      Double_t fbdtCutEndcap;
254 >
255 >      // ----------------------------------------------------------------
256 >      // these guys should go away.... (let MVATools handle this)   (fab)
257 >      int                         fVariableType;
258 >      TString                     fEndcapWeights;
259 >      TString                     fBarrelWeights;
260 >      // ----------------------------------------------------------------
261 >      MVATools                    fTool;
262 >      TString                     fIdMVATypeName;
263 >      MVATools::IdMVAType         fIdMVAType;
264 >      // ----------------------------------------------------------------
265 >
266 >      Bool_t fDoMCR9Scaling;
267 >      Double_t fMCR9ScaleEB;
268 >      Double_t fMCR9ScaleEE;
269 >      
270 >      Bool_t fDoMCSigIEtaIEtaScaling;
271 >      Bool_t fDoMCWidthScaling;
272 >      
273 >      Bool_t fDoMCErrScaling;
274 >      Double_t fMCErrScaleEB;
275 >      Double_t fMCErrScaleEE;    
276 >
277 >      Bool_t              fPhotonsFromBranch;
278 >      Bool_t              fPVFromBranch;
279        Bool_t              fGoodElectronsFromBranch;
280        Bool_t              fIsData;
281  
282  
283 +      // showershape
284 +      TString                                fShowerShapeType;
285 +      PhotonTools::ShowerShapeScales         fSSType;
286 +      
287 +      bool                  fDoDataEneCorr;
288 +      bool                  fDoMCSmear;
289 +      Bool_t                fDoShowerShapeScaling;
290 +
291 +
292 +      // Vectroes to hols smeraring/correction factors
293 +      std::vector<Double_t> fDataEnCorr_EBlowEta_hR9central;
294 +      std::vector<Double_t> fDataEnCorr_EBlowEta_hR9gap;
295 +      std::vector<Double_t> fDataEnCorr_EBlowEta_lR9;
296 +      std::vector<Double_t> fDataEnCorr_EBhighEta_hR9;
297 +      std::vector<Double_t> fDataEnCorr_EBhighEta_lR9;    
298 +      std::vector<Double_t> fDataEnCorr_EElowEta_hR9;
299 +      std::vector<Double_t> fDataEnCorr_EElowEta_lR9;
300 +      std::vector<Double_t> fDataEnCorr_EEhighEta_hR9;
301 +      std::vector<Double_t> fDataEnCorr_EEhighEta_lR9;
302 +      
303 +      std::vector<UInt_t>   fRunStart;
304 +      std::vector<UInt_t>   fRunEnd;
305 +      
306 +      Double_t              fMCSmear_EBlowEta_hR9central;
307 +      Double_t              fMCSmear_EBlowEta_hR9gap;
308 +      Double_t              fMCSmear_EBlowEta_lR9;
309 +      Double_t              fMCSmear_EBhighEta_hR9;
310 +      Double_t              fMCSmear_EBhighEta_lR9;    
311 +      Double_t              fMCSmear_EElowEta_hR9;
312 +      Double_t              fMCSmear_EElowEta_lR9;
313 +      Double_t              fMCSmear_EEhighEta_hR9;
314 +      Double_t              fMCSmear_EEhighEta_lR9;    
315 +
316 +      TRandom3* fRng;
317 +
318 +      RhoUtilities::RhoType fRhoType;
319  
320      ClassDef(PhotonIDMod, 1) // Photon identification module
321    };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines