ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/PhotonMvaMod.h
Revision: 1.2
Committed: Sun Jun 17 23:12:56 2012 UTC (12 years, 10 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Changes since 1.1: +3 -2 lines
Log Message:
add support for shower shape rescaling for sigmaE computation

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2     // M.Yang 2011/10/12
3 bendavid 1.2 // $Id: PhotonMvaMod.h,v 1.1 2011/12/11 00:03:04 bendavid Exp $
4 bendavid 1.1 //
5     // PhotonMvaMod
6     //
7     //Precompute regression energy corrections and id bdt output to save memory and cpu time
8     //in subsequent module chains.
9     //
10     // Authors: J.Bendavid
11     //--------------------------------------------------------------------------------------------------
12    
13     #ifndef MITPHYSICS_MODS_PHOTONMVAMOD_H
14     #define MITPHYSICS_MODS_PHOTONMVAMOD_H
15    
16     #include "MitAna/TreeMod/interface/BaseMod.h"
17     #include "MitAna/DataTree/interface/PhotonFwd.h"
18     #include "MitAna/DataTree/interface/TrackCol.h"
19     #include "MitAna/DataTree/interface/VertexCol.h"
20     #include "MitAna/DataTree/interface/BeamSpotCol.h"
21     #include "MitAna/DataTree/interface/PFCandidateCol.h"
22     #include "MitAna/DataTree/interface/PileupEnergyDensityCol.h"
23     #include "MitAna/DataTree/interface/DecayParticleCol.h"
24     #include "MitAna/DataTree/interface/ElectronCol.h"
25     #include "MitAna/DataTree/interface/DecayParticleCol.h"
26     #include "MitAna/DataTree/interface/PileupInfoCol.h"
27     #include "MitAna/DataTree/interface/MCParticleCol.h"
28    
29     #include "MitPhysics/Utils/interface/PhotonTools.h"
30     #include "MitPhysics/Utils/interface/EGEnergyCorrector.h"
31    
32     #include "MitPhysics/Utils/interface/MVATools.h"
33     #include "MitPhysics/Utils/interface/VertexTools.h"
34    
35     class TNtuple;
36     class TRandom3;
37     class TH1D;
38    
39     namespace mithep
40     {
41     class PhotonMvaMod : public BaseMod
42     {
43     public:
44     PhotonMvaMod(const char *name ="PhotonMvaMod",
45     const char *title="Selecting PhotonPairs");
46    
47     ~PhotonMvaMod();
48    
49    
50    
51     // setting all the input Names
52     void SetInputPhotonsName(const char *n){ fPhotonBranchName= n; }
53     void SetPhotonsFromBranch(bool b) { fPhotonsFromBranch = b; }
54     void SetTrackName(const char *n) { fTrackBranchName = n; }
55     void SetElectronName(const char *n) { fElectronName = n; }
56     void SetConversionName(const char *n) { fConversionName = n; }
57     void SetPUDensityName(const char *n) { fPileUpDenName = n; }
58     void SetPVName(const char *n) { fPVName = n; }
59     void SetPVFromBranch(bool b) { fPVFromBranch = b; }
60     void SetMCParticle(const char *n) { fMCParticleName = n; }
61     void SetPUInfoName(const char *n) { fPileUpName = n; }
62     void SetBeamspotName(const char *n) { fBeamspotName = n; }
63     void SetPFCandName(const char *n) { fPFCandName = n; }
64    
65    
66     // get/set the Names for the output Photon Collection
67     const char *GetOutputName() const { return fGoodPhotonsName; }
68     void SetOutputName(const char *n) { fGoodPhotonsName=n; }
69    
70     // set basic Cut variables (FOR PRE-SELECTION)
71     void SetPtMin(Double_t pt) { fPhotonPtMin = pt; }
72     void SetAbsEtaMax(Double_t eta) { fPhotonEtaMax = eta; }
73    
74     // is Data Or Not?
75     void SetIsData (Bool_t b) { fIsData = b;};
76    
77 bendavid 1.2 void SetApplyShowerRescaling(Bool_t b) { fApplyShowerRescaling = b; }
78 bendavid 1.1
79     void ApplyEleVeto(bool a) { fApplyEleVeto = a; }
80    
81     void SetDoRegression(Bool_t b) { fDoRegression = b; }
82    
83     void SetRegressionVersion(UInt_t v) { fRegressionVersion = v; }
84     void SetRegressionWeights(TString f) { fRegWeights = f; }
85    
86     protected:
87     void Process();
88     void SlaveBegin();
89    
90     // private auxiliary methods...
91     // Names for the input Collections
92     TString fPhotonBranchName;
93     TString fElectronName;
94     TString fGoodElectronName;
95     TString fConversionName;
96     TString fTrackBranchName;
97     TString fPileUpDenName;
98     TString fPVName;
99     TString fBeamspotName;
100     TString fPFCandName;
101     TString fMCParticleName;
102     TString fPileUpName;
103    
104     TString fGoodPhotonsName; //name of exported "good photon" collection
105    
106    
107     // Basic Pre-Selection kinematics
108     Double_t fPhotonPtMin; // min pt cut fro PRE-SELECTION!
109     Double_t fPhotonEtaMax; // max eta cut for PRE-SELECTION!
110    
111     // is it Data or MC?
112     Bool_t fIsData;
113 bendavid 1.2 Bool_t fApplyShowerRescaling;
114 bendavid 1.1
115     // in case there's some PV pre-selection
116     Bool_t fPhotonsFromBranch;
117     Bool_t fPVFromBranch;
118     Bool_t fGoodElectronsFromBranch;
119    
120     const PhotonCol *fPhotons;
121     const ElectronCol *fElectrons;
122     const ElectronCol *fGoodElectrons;
123     const DecayParticleCol *fConversions;
124     const TrackCol *fTracks;
125     const PileupEnergyDensityCol *fPileUpDen;
126     const VertexCol *fPV;
127     const BeamSpotCol *fBeamspot;
128     const PFCandidateCol *fPFCands;
129     const MCParticleCol *fMCParticles;
130     const PileupInfoCol *fPileUp;
131    
132     EGEnergyCorrector egcor;
133     Bool_t fDoRegression;
134     TString fPhFixString;
135     TString fPhFixFile;
136     TString fRegWeights;
137    
138     const TH1D *fEtaCorrections;
139    
140     // --------------------------------
141     bool fApplyEleVeto;
142     UInt_t fRegressionVersion;
143    
144    
145     ClassDef(PhotonMvaMod, 1) // Photon identification module
146     };
147     }
148     #endif