ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/interface/PhotonMvaMod.h
Revision: 1.3
Committed: Tue Jul 24 10:13:45 2012 UTC (12 years, 9 months ago) by fabstoec
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_029c, Mit_029b, Mit_029a, HEAD
Changes since 1.2: +9 -3 lines
Log Message:
some fixes

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2     // M.Yang 2011/10/12
3 fabstoec 1.3 // $Id: PhotonMvaMod.h,v 1.2 2012/06/17 23:12:56 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 fabstoec 1.3
86    
87     void SetMinNumPhotons ( UInt_t i ) { fMinNumPhotons = i;}
88     void SetDoPreselection( Bool_t b ) { fDoPreselection = b;}
89 bendavid 1.1
90     protected:
91     void Process();
92     void SlaveBegin();
93    
94     // private auxiliary methods...
95     // Names for the input Collections
96     TString fPhotonBranchName;
97     TString fElectronName;
98     TString fGoodElectronName;
99     TString fConversionName;
100     TString fTrackBranchName;
101     TString fPileUpDenName;
102     TString fPVName;
103     TString fBeamspotName;
104     TString fPFCandName;
105     TString fMCParticleName;
106     TString fPileUpName;
107    
108     TString fGoodPhotonsName; //name of exported "good photon" collection
109    
110    
111     // Basic Pre-Selection kinematics
112     Double_t fPhotonPtMin; // min pt cut fro PRE-SELECTION!
113     Double_t fPhotonEtaMax; // max eta cut for PRE-SELECTION!
114    
115     // is it Data or MC?
116     Bool_t fIsData;
117 bendavid 1.2 Bool_t fApplyShowerRescaling;
118 bendavid 1.1
119     // in case there's some PV pre-selection
120     Bool_t fPhotonsFromBranch;
121     Bool_t fPVFromBranch;
122     Bool_t fGoodElectronsFromBranch;
123    
124     const PhotonCol *fPhotons;
125     const ElectronCol *fElectrons;
126     const ElectronCol *fGoodElectrons;
127     const DecayParticleCol *fConversions;
128     const TrackCol *fTracks;
129     const PileupEnergyDensityCol *fPileUpDen;
130     const VertexCol *fPV;
131     const BeamSpotCol *fBeamspot;
132     const PFCandidateCol *fPFCands;
133     const MCParticleCol *fMCParticles;
134     const PileupInfoCol *fPileUp;
135    
136     EGEnergyCorrector egcor;
137     Bool_t fDoRegression;
138     TString fPhFixString;
139     TString fPhFixFile;
140     TString fRegWeights;
141    
142     const TH1D *fEtaCorrections;
143    
144     // --------------------------------
145     bool fApplyEleVeto;
146     UInt_t fRegressionVersion;
147 fabstoec 1.3
148     UInt_t fMinNumPhotons;
149     Bool_t fDoPreselection;
150    
151 bendavid 1.1 ClassDef(PhotonMvaMod, 1) // Photon identification module
152     };
153     }
154     #endif