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.20 by fabstoec, Fri Jul 15 17:24:37 2011 UTC vs.
Revision 1.34 by bendavid, Mon Dec 9 17:55:50 2013 UTC

# Line 20 | Line 20
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 + #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 46 | Line 56 | namespace mithep
56        void                SetApplySpikeRemoval(Bool_t b)    { fApplySpikeRemoval  = b;     }
57        void                SetApplyPixelSeed(Bool_t b)       { fApplyPixelSeed  = b;        }
58        void                SetApplyElectronVeto(Bool_t b)    { fApplyElectronVeto = b;      }
59 +      void                SetInvertElectronVeto(Bool_t b)   { fInvertElectronVeto = b;     }      
60        void                SetApplyElectronVetoConvRecovery(Bool_t b) { fApplyElectronVetoConvRecovery = b; }
61        void                SetApplyConversionId(Bool_t b)    { fApplyConversionId = b;      }
62        void                SetApplyTriggerMatching(Bool_t b)      { fApplyTriggerMatching = b;  }      
# Line 76 | 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 +    void                SetShowerShapeType(const char *type) { fShowerShapeType        = type;    }
98 +
99 +        // methods to set the MC smearing/energy correction values
100 +    void                AddEnCorrPerRun( UInt_t sRun, UInt_t eRun,
101 +                                         Double_t corr_EBlowEta_hR9,
102 +                                         Double_t corr_EBlowEta_lR9,
103 +                                         Double_t corr_EBhighEta_hR9,
104 +                                         Double_t corr_EBhighEta_lR9,                                        
105 +                                         Double_t corr_EElowEta_hR9,
106 +                                         Double_t corr_EElowEta_lR9,
107 +                                         Double_t corr_EEhighEta_hR9,
108 +                                         Double_t corr_EEhighEta_lR9) {
109 +
110 +      fDataEnCorr_EBlowEta_hR9.push_back(corr_EBlowEta_hR9);
111 +      fDataEnCorr_EBlowEta_lR9.push_back(corr_EBlowEta_lR9);
112 +      fDataEnCorr_EBhighEta_hR9.push_back(corr_EBhighEta_hR9);
113 +      fDataEnCorr_EBhighEta_lR9.push_back(corr_EBhighEta_lR9);      
114 +      fDataEnCorr_EElowEta_hR9.push_back(corr_EElowEta_hR9);
115 +      fDataEnCorr_EElowEta_lR9.push_back(corr_EElowEta_lR9);      
116 +      fDataEnCorr_EEhighEta_hR9.push_back(corr_EEhighEta_hR9);
117 +      fDataEnCorr_EEhighEta_lR9.push_back(corr_EEhighEta_lR9);      
118 +      fRunStart.push_back         (sRun);
119 +      fRunEnd.push_back           (eRun);
120 +    };
121 +
122 +    void                SetMCSmearFactors(Double_t _EBlowEta_hR9,
123 +                                          Double_t _EBlowEta_lR9,
124 +                                          Double_t _EBhighEta_hR9,
125 +                                          Double_t _EBhighEta_lR9,
126 +                                          Double_t _EElowEta_hR9,
127 +                                          Double_t _EElowEta_lR9,
128 +                                          Double_t _EEhighEta_hR9,
129 +                                          Double_t _EEhighEta_lR9) {
130 +      fMCSmear_EBlowEta_hR9 = _EBlowEta_hR9;
131 +      fMCSmear_EBlowEta_lR9 = _EBlowEta_lR9;
132 +      fMCSmear_EBhighEta_hR9 = _EBhighEta_hR9;
133 +      fMCSmear_EBhighEta_lR9 = _EBhighEta_lR9;      
134 +      fMCSmear_EElowEta_hR9 = _EElowEta_hR9;
135 +      fMCSmear_EElowEta_lR9 = _EElowEta_lR9;
136 +      fMCSmear_EEhighEta_hR9 = _EEhighEta_hR9;
137 +      fMCSmear_EEhighEta_lR9 = _EEhighEta_lR9;      
138 +    };
139 +
140 +
141 +
142 +
143 +    void                SetGoodElectronsFromBranch(Bool_t b) { fGoodElectronsFromBranch = b; }
144 +    void                SetGoodElectronName(TString name) { fGoodElectronName = name; }
145 +
146 +    void                SetBdtCutBarrel(double a) {fbdtCutBarrel = a; }
147 +    void                SetBdtCutEndcap(double a) {fbdtCutEndcap = a; }
148 +
149  
150 <      enum EPhIdType {
150 >    void                DoDataEneCorr(bool a)              { fDoDataEneCorr = a; }
151 >    void                DoMCSmear(bool a)                  { fDoMCSmear     = a; }
152 >    void                SetDoShowerShapeScaling(Bool_t b)  { fDoShowerShapeScaling = b; }
153 >
154 >    // replaced by ShowerShapeScaling (fab)
155 > /*     void                SetDoMCR9Scaling(Bool_t b)        { fDoMCR9Scaling = b; } */
156 > /*     void                SetMCR9Scale(Double_t ebscale, Double_t eescale) { fMCR9ScaleEB = ebscale; fMCR9ScaleEE = eescale; } */
157 > /*     void                SetDoMCSigIEtaIEtaScaling(Bool_t b)        { fDoMCSigIEtaIEtaScaling = b; } */
158 > /*     void                SetDoMCWidthScaling(Bool_t b)        { fDoMCWidthScaling = b; } */
159 >
160 >    void                SetDoMCErrScaling(Bool_t b)        { fDoMCErrScaling = b; }
161 >    void                SetMCErrScale(Double_t ebscale, Double_t eescale) { fMCErrScaleEB = ebscale; fMCErrScaleEE = eescale; }
162 >
163 >    void                SetIdMVAType(const char *type)    { fIdMVATypeName        = type;    }
164 >
165 >    void                SetRhoType(RhoUtilities::RhoType type) { fRhoType = type ; }
166 >    
167 >    enum EPhIdType {
168          kIdUndef = 0,       //not defined
169          kTight,             //"Tight"
170          kLoose,             //"Loose"
171          kLooseEM,           //"LooseEM"
172 <        kBaseLineCiC,        //"2011" Hgg BaseLine CiC
173 <        kCustomId           //"Custom"
172 >        kBaseLineCiC,         //"2011" Hgg BaseLine CiC
173 >        kBaseLineCiCPF,       //"2012" Hgg BaseLine CiC
174 >        kBaseLineCiCPFNoPresel,       //"2012" Hgg BaseLine CiC plus eleveto -- for mono photon
175 >        kMITMVAId,            // MingMing MVA ID
176 >        kMITPhSelection,      //MIT loose preselection (for mva)
177 >        kMITPFPhSelection,    //MIT loose preselection (for mva)
178 >        kMITPFPhSelectionNoEcal,
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 100 | 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);   // last flag in case of special smearing for error computation
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 107 | Line 205 | namespace mithep
205        TString             fPileUpDenName;        //name of the PU density collection      
206        TString             fConversionName;       //name of conversion branch
207        TString             fElectronName;
208 +      TString             fGoodElectronName;
209        TString             fTrigObjectsName;        //name of trigger object collection
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 116 | Line 218 | namespace mithep
218        Bool_t              fApplySpikeRemoval;    //whether apply spike removal      
219        Bool_t              fApplyPixelSeed;       //=true then apply pixel seed constraint
220        Bool_t              fApplyElectronVeto;    //=true then apply electron veto (with no conversion recovery)
221 +      Bool_t              fInvertElectronVeto;    //=true then invert electron veto (for cic selection only atm)      
222        Bool_t              fApplyElectronVetoConvRecovery; //=true then apply electron veto with conversion recovery
223        Bool_t              fApplyConversionId;    //=true then apply conversion id cuts
224        Bool_t              fApplyTriggerMatching;   //match to hlt photon (default=0)      
# Line 123 | 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 139 | Line 243 | namespace mithep
243        const PileupEnergyDensityCol *fPileUpDen;  //!rho branch
244        const DecayParticleCol *fConversions;      //!conversion branch
245        const ElectronCol  *fElectrons;            //!electron branch
246 <      const VertexCol*    fPV;
247 <      bool                fPVFromBranch;
246 >      const ElectronCol  *fGoodElectrons;        //!electron branch
247 >      const VertexCol*    fPV;                   //!
248 >      const MCParticleCol          *fMCParticles;//!
249 >      const PileupInfoCol          *fPileUp;     //!  
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 >      // showershape
283 >      TString                                fShowerShapeType;
284 >      PhotonTools::ShowerShapeScales         fSSType;
285 >      
286 >      bool                  fDoDataEneCorr;
287 >      bool                  fDoMCSmear;
288 >      Bool_t                fDoShowerShapeScaling;
289 >
290 >
291 >      // Vectroes to hols smeraring/correction factors
292 >      std::vector<Double_t> fDataEnCorr_EBlowEta_hR9;
293 >      std::vector<Double_t> fDataEnCorr_EBlowEta_lR9;
294 >      std::vector<Double_t> fDataEnCorr_EBhighEta_hR9;
295 >      std::vector<Double_t> fDataEnCorr_EBhighEta_lR9;    
296 >      std::vector<Double_t> fDataEnCorr_EElowEta_hR9;
297 >      std::vector<Double_t> fDataEnCorr_EElowEta_lR9;
298 >      std::vector<Double_t> fDataEnCorr_EEhighEta_hR9;
299 >      std::vector<Double_t> fDataEnCorr_EEhighEta_lR9;
300 >    
301 >      std::vector<UInt_t>   fRunStart;
302 >      std::vector<UInt_t>   fRunEnd;
303 >      
304 >      Double_t              fMCSmear_EBlowEta_hR9;
305 >      Double_t              fMCSmear_EBlowEta_lR9;
306 >      Double_t              fMCSmear_EBhighEta_hR9;
307 >      Double_t              fMCSmear_EBhighEta_lR9;    
308 >      Double_t              fMCSmear_EElowEta_hR9;
309 >      Double_t              fMCSmear_EElowEta_lR9;
310 >      Double_t              fMCSmear_EEhighEta_hR9;
311 >      Double_t              fMCSmear_EEhighEta_lR9;    
312 >      
313 >      TRandom3* fRng;
314 >
315 >      RhoUtilities::RhoType fRhoType;
316  
317      ClassDef(PhotonIDMod, 1) // Photon identification module
318    };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines