CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DQMAnalyzer.h
Go to the documentation of this file.
1 #ifndef DQMAnalyzer_h
2 #define DQMAnalyzer_h
3 
4 //
5 // Package: RecoEgamma/Examples
6 // Class: GsfElectronDataAnalyzer
7 //
8 
9 //
10 // Original Author: Ursula Berthon, Claude Charlot
11 // Created: Mon Mar 27 13:22:06 CEST 2006
12 // $Id: DQMAnalyzer.h,v 1.5 2011/05/20 17:17:28 wmtan Exp $
13 //
14 //
15 
16 
19 
22 
28 
29 class MagneticField;
30 class TFile;
31 class TH1F;
32 class TH2F;
33 class TH1I;
34 class TProfile;
35 class TTree;
36 
38 {
39  public:
40 
41  explicit DQMAnalyzer( const edm::ParameterSet & conf ) ;
42 
43  virtual ~DQMAnalyzer() ;
44 
45  virtual void beginJob() ;
46  virtual void endJob() ;
47  virtual void analyze( const edm::Event & e, const edm::EventSetup & c) ;
48 
49  private:
50 
51  //=========================================
52  // parameters
53  //=========================================
54 
55  std::string outputFile_;
58  std::string matchingCondition_;
59  //std::string type_;
60  bool readAOD_;
61 
62  // matching
65  double deltaR_;
66 
67  // tag and probe
69  double massLow_;
70  double massHigh_;
75 
76  // electron selection
77  double minEt_;
78  double minPt_;
79  double maxAbsEta_;
80  bool isEB_;
81  bool isEE_;
103  double mvaMin_;
106  double tkIso03Max_;
112 
113  // for trigger
115  std::vector<std::string > HLTPathsByName_;
116 
117  // histos limits and binning
118  int nbineta; int nbineta2D; double etamin; double etamax;
119  int nbinphi; int nbinphi2D; double phimin; double phimax;
120  int nbinpt; int nbinpteff; int nbinpt2D; double ptmax;
121  int nbinp; int nbinp2D; double pmax;
122  int nbineop; int nbineop2D; double eopmax; double eopmaxsht;
123  int nbindeta; double detamin; double detamax;
124  int nbindphi; double dphimin; double dphimax;
127  int nbinfhits; double fhitsmax;
128  int nbinlhits; double lhitsmax;
129  int nbinxyz;
130  int nbinpoptrue; double poptruemin; double poptruemax;
131  int nbinmee; double meemin; double meemax;
132  int nbinhoe; double hoemin; double hoemax;
133 
134 
135  //=========================================
136  // usual attributes and methods
137  //=========================================
138 
139 
140  unsigned int nEvents_ ;
141 
142  bool selected( const reco::GsfElectronCollection::const_iterator & gsfIter , double vertexTIP ) ;
143  bool generalCut( const reco::GsfElectronCollection::const_iterator & gsfIter) ;
144  bool etCut( const reco::GsfElectronCollection::const_iterator & gsfIter ) ;
145  bool isolationCut( const reco::GsfElectronCollection::const_iterator & gsfIter, double vertexTIP ) ;
146  bool idCut( const reco::GsfElectronCollection::const_iterator & gsfIter ) ;
147 
148  bool trigger( const edm::Event & e ) ;
149  unsigned int nAfterTrigger_;
150  std::vector<unsigned int> HLTPathsByIndex_;
151 
155 
156  TFile * histfile_ ;
157  TTree * tree_ ;
158 
159  float mcEnergy[10], mcEta[10], mcPhi[10], mcPt[10], mcQ[10] ;
161  float seedMomentum[10], seedEta[10], seedPhi[10], seedPt[10], seedQ[10] ;
162 
163 
164  //=========================================
165  // histograms
166  //=========================================
167 
169 
176 
182 
183  //TH1F *h_ele_vertexP;
185  TH1F *h_ele_Et;
187  //TH1F *h_ele_vertexAbsEta;
194 
195  TH1F *histNum_;
196 
197  TH1F *histSclEn_ ;
198  TH1F *histSclEt_ ;
199  TH1F *histSclEta_ ;
200  TH1F *histSclPhi_ ;
202 
208 // TH1F *h_ele_foundHits_barrel;
209 // TH1F *h_ele_foundHits_endcaps;
214 // TH1F *h_ele_lostHits_barrel;
215 // TH1F *h_ele_lostHits_endcaps;
219  TH1F *h_ele_chi2;
220 // TH1F *h_ele_chi2_barrel_;
221 // TH1F *h_ele_chi2_endcaps_;
225 
226  TH1F *h_ele_EoP;
227 // TH1F *h_ele_EoPout;
235 // TH1F *h_ele_dPhiEleCl_propOut_barrel;
236 // TH1F *h_ele_dPhiEleCl_propOut_endcaps;
237  TH1F *h_ele_HoE;
242 
245 
246  TH1F *h_ele_mva;
248 
257 
259 
260  // OBSOLETE
261  // TH1F *h_ele_PtoPtmatchingObject_matched; //OBSOLETE ?
262  // TH1F *h_ele_PtoPtmatchingObject_barrel_matched; //OBSOLETE ?
263  // TH1F *h_ele_PtoPtmatchingObject_endcaps_matched; //OBSOLETE ?
264  // TH1F *h_ele_PoPmatchingObject_matched; //OBSOLETE ?
265  // TH1F *h_ele_PoPmatchingObject_barrel_matched; //OBSOLETE ?
266  // TH1F *h_ele_PoPmatchingObject_endcaps_matched; //OBSOLETE ?
267  // TH1F *h_ele_EtaMnEtamatchingObject_matched; //OBSOLETE ?
268  // TH1F *h_ele_PhiMnPhimatchingObject_matched; //OBSOLETE ?
269  // TH1F *h_ele_PhiMnPhimatchingObject2_matched; //OBSOLETE ?
270 
271  };
272 
273 #endif
bool isEcalDriven_
Definition: DQMAnalyzer.h:83
TH1F * histNum_
Definition: DQMAnalyzer.h:195
double hcalIso03Depth2MaxEndcaps_
Definition: DQMAnalyzer.h:109
bool trigger(const edm::Event &e)
Definition: DQMAnalyzer.cc:939
double minEt_
Definition: DQMAnalyzer.h:77
double fhitsmax
Definition: DQMAnalyzer.h:127
TH1F * h_matchingObjectAbsEta
Definition: DQMAnalyzer.h:171
TFile * histfile_
Definition: DQMAnalyzer.h:156
double dEtaMinBarrel_
Definition: DQMAnalyzer.h:89
double lhitsmax
Definition: DQMAnalyzer.h:128
virtual ~DQMAnalyzer()
Definition: DQMAnalyzer.cc:177
double hoemin
Definition: DQMAnalyzer.h:132
double eOverPMinBarrel_
Definition: DQMAnalyzer.h:85
float mcPt[10]
Definition: DQMAnalyzer.h:159
float seedPhi[10]
Definition: DQMAnalyzer.h:161
double etamin
Definition: DQMAnalyzer.h:118
double dEtaMaxEndcaps_
Definition: DQMAnalyzer.h:92
edm::InputTag matchingObjectCollection_
Definition: DQMAnalyzer.h:57
TH1F * h_ele_provenance
Definition: DQMAnalyzer.h:247
double ptmax
Definition: DQMAnalyzer.h:120
double sigIetaIetaMinEndcaps_
Definition: DQMAnalyzer.h:99
TH1F * h_ele_mva
Definition: DQMAnalyzer.h:246
double dPhiMinBarrel_
Definition: DQMAnalyzer.h:93
TH1F * h_matchingObjectEta
Definition: DQMAnalyzer.h:170
TH2F * h_ele_ambiguousTracksVsEta
Definition: DQMAnalyzer.h:204
double maxAbsEtaMatchingObject_
Definition: DQMAnalyzer.h:64
int nbindetamatch
Definition: DQMAnalyzer.h:125
TH1F * h_ele_Et
Definition: DQMAnalyzer.h:185
TH1F * h_ele_dEtaSc_propVtx
Definition: DQMAnalyzer.h:229
virtual void beginJob()
Definition: DQMAnalyzer.cc:187
TH1F * h_ele_ecalRecHitSumEt_dr04
Definition: DQMAnalyzer.h:254
TH2F * h_ele_chi2VsPhi
Definition: DQMAnalyzer.h:223
TH1F * h_ele_dEtaEleCl_propOut
Definition: DQMAnalyzer.h:233
TH1F * h_ele_dPhiSc_propVtx
Definition: DQMAnalyzer.h:230
float superclusterPhi[10]
Definition: DQMAnalyzer.h:160
float mcEnergy[10]
Definition: DQMAnalyzer.h:159
double hcalIso03Depth1MaxBarrel_
Definition: DQMAnalyzer.h:107
TH1F * h_ele_ecalRecHitSumEt_dr03
Definition: DQMAnalyzer.h:250
TH1F * h_ele_vertexPhi
Definition: DQMAnalyzer.h:188
TH1F * h_ele_tkSumPt_dr03
Definition: DQMAnalyzer.h:249
double etamax
Definition: DQMAnalyzer.h:118
double poptruemin
Definition: DQMAnalyzer.h:130
bool generalCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
double dphimatchmax
Definition: DQMAnalyzer.h:126
float seedPt[10]
Definition: DQMAnalyzer.h:161
double massHigh_
Definition: DQMAnalyzer.h:70
double deltaR_
Definition: DQMAnalyzer.h:65
TH1F * h_matchingObjectP
Definition: DQMAnalyzer.h:172
TH1F * h_ele_matchingObjectAbsEta_matched
Definition: DQMAnalyzer.h:178
float mcPhi[10]
Definition: DQMAnalyzer.h:159
TH1F * h_ele_outerPt_mode
Definition: DQMAnalyzer.h:241
double maxPtMatchingObject_
Definition: DQMAnalyzer.h:63
bool readAOD_
Definition: DQMAnalyzer.h:60
double phimin
Definition: DQMAnalyzer.h:119
double detamatchmax
Definition: DQMAnalyzer.h:125
TH1F * h_ele_vertexX
Definition: DQMAnalyzer.h:189
double poptruemax
Definition: DQMAnalyzer.h:130
float seedMomentum[10]
Definition: DQMAnalyzer.h:161
double detamax
Definition: DQMAnalyzer.h:123
TH1F * histSclSigEtaEta_
Definition: DQMAnalyzer.h:201
double sigIetaIetaMaxBarrel_
Definition: DQMAnalyzer.h:98
bool PROBEetcut_
Definition: DQMAnalyzer.h:73
TH1F * h_ele_outerP_mode
Definition: DQMAnalyzer.h:239
TH1F * h_ele_hcalDepth1TowerSumEt_dr03
Definition: DQMAnalyzer.h:251
double hadronicOverEmMaxBarrel_
Definition: DQMAnalyzer.h:101
edm::ESHandle< TrackerGeometry > pDD
Definition: DQMAnalyzer.h:153
float superclusterEt[10]
Definition: DQMAnalyzer.h:160
double phimax
Definition: DQMAnalyzer.h:119
double hcalIso03Depth1MaxEndcaps_
Definition: DQMAnalyzer.h:108
TH1F * h_ele_hcalDepth1TowerSumEt_dr04
Definition: DQMAnalyzer.h:255
bool selected(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP)
bool isTrackerDriven_
Definition: DQMAnalyzer.h:84
double sigIetaIetaMaxEndcaps_
Definition: DQMAnalyzer.h:100
double dPhiMaxBarrel_
Definition: DQMAnalyzer.h:94
edm::ESHandle< MagneticField > theMagField
Definition: DQMAnalyzer.h:154
TH1F * h_ele_lostHits
Definition: DQMAnalyzer.h:213
float seedEta[10]
Definition: DQMAnalyzer.h:161
float seedQ[10]
Definition: DQMAnalyzer.h:161
TH2F * h_ele_lostHitsVsEta
Definition: DQMAnalyzer.h:216
double dphimin
Definition: DQMAnalyzer.h:124
unsigned int nAfterTrigger_
Definition: DQMAnalyzer.h:149
TH1F * h_ele_vertexEta
Definition: DQMAnalyzer.h:186
double eOverPMinEndcaps_
Definition: DQMAnalyzer.h:87
TH1F * h_ele_vertexZ
Definition: DQMAnalyzer.h:191
TrajectoryStateTransform transformer_
Definition: DQMAnalyzer.h:152
std::vector< unsigned int > HLTPathsByIndex_
Definition: DQMAnalyzer.h:150
double pmax
Definition: DQMAnalyzer.h:121
TH2F * h_ele_lostHitsVsPhi
Definition: DQMAnalyzer.h:217
TH1F * h_ele_mee_os
Definition: DQMAnalyzer.h:258
double massLow_
Definition: DQMAnalyzer.h:69
double eOverPMaxBarrel_
Definition: DQMAnalyzer.h:86
bool isNotEBEEGap_
Definition: DQMAnalyzer.h:82
bool isolationCut(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP)
bool PROBEcheckclass_
Definition: DQMAnalyzer.h:74
double dphimatchmin
Definition: DQMAnalyzer.h:126
TH2F * h_ele_ambiguousTracksVsPhi
Definition: DQMAnalyzer.h:205
std::string outputFile_
Definition: DQMAnalyzer.h:55
TH1F * h_ele_vertexY
Definition: DQMAnalyzer.h:190
bool TAGcheckclass_
Definition: DQMAnalyzer.h:72
TH1F * histSclEta_
Definition: DQMAnalyzer.h:199
TH1F * h_matchingObjectPhi
Definition: DQMAnalyzer.h:174
bool idCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
double tkIso03Max_
Definition: DQMAnalyzer.h:106
double maxAbsEta_
Definition: DQMAnalyzer.h:79
TH1F * histSclEt_
Definition: DQMAnalyzer.h:198
TH1F * h_ele_matchingObjectZ_matched
Definition: DQMAnalyzer.h:181
TTree * tree_
Definition: DQMAnalyzer.h:157
TH1F * h_ele_foundHits
Definition: DQMAnalyzer.h:207
TH1F * h_ele_PinMnPout_mode
Definition: DQMAnalyzer.h:244
int nbindetamatch2D
Definition: DQMAnalyzer.h:125
int nbindphimatch2D
Definition: DQMAnalyzer.h:126
double eopmaxsht
Definition: DQMAnalyzer.h:122
TH2F * h_ele_chi2VsPt
Definition: DQMAnalyzer.h:224
TH1F * h_ele_dPhiEleCl_propOut
Definition: DQMAnalyzer.h:234
TH1F * h_matchingObjectZ
Definition: DQMAnalyzer.h:175
TH1F * histSclPhi_
Definition: DQMAnalyzer.h:200
TH1F * h_ele_matchingObjectPhi_matched
Definition: DQMAnalyzer.h:180
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
Definition: DQMAnalyzer.cc:650
bool etCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
TH1F * h_ele_hcalDepth2TowerSumEt_dr03
Definition: DQMAnalyzer.h:252
tuple conf
Definition: dbtoconf.py:185
TH2F * h_ele_foundHitsVsPhi
Definition: DQMAnalyzer.h:211
float mcQ[10]
Definition: DQMAnalyzer.h:159
double hadronicOverEmMaxEndcaps_
Definition: DQMAnalyzer.h:102
double tipMaxEndcaps_
Definition: DQMAnalyzer.h:105
double eOverPMaxEndcaps_
Definition: DQMAnalyzer.h:88
double meemin
Definition: DQMAnalyzer.h:131
TH2F * h_ele_foundHitsVsPt
Definition: DQMAnalyzer.h:212
TH1F * h_ele_outerP
Definition: DQMAnalyzer.h:238
TH1F * h_ele_outerPt
Definition: DQMAnalyzer.h:240
double meemax
Definition: DQMAnalyzer.h:131
std::vector< std::string > HLTPathsByName_
Definition: DQMAnalyzer.h:115
TH2F * h_ele_ambiguousTracksVsPt
Definition: DQMAnalyzer.h:206
std::string matchingCondition_
Definition: DQMAnalyzer.h:58
double sigIetaIetaMinBarrel_
Definition: DQMAnalyzer.h:97
TH1F * h_ele_EoP
Definition: DQMAnalyzer.h:226
double detamin
Definition: DQMAnalyzer.h:123
TH1F * h_ele_charge
Definition: DQMAnalyzer.h:193
TH1F * h_ele_tkSumPt_dr04
Definition: DQMAnalyzer.h:253
TH1F * h_ele_matchingObjectPt_matched
Definition: DQMAnalyzer.h:179
double detamatchmin
Definition: DQMAnalyzer.h:125
double minPt_
Definition: DQMAnalyzer.h:78
TH1F * h_ele_vertexPt
Definition: DQMAnalyzer.h:184
edm::InputTag electronCollection_
Definition: DQMAnalyzer.h:56
double ecalIso03MaxEndcaps_
Definition: DQMAnalyzer.h:111
TH1F * h_ele_dEtaCl_propOut
Definition: DQMAnalyzer.h:231
double hoemax
Definition: DQMAnalyzer.h:132
TH2F * h_ele_chi2VsEta
Definition: DQMAnalyzer.h:222
TH1F * h_matchingObjectPt
Definition: DQMAnalyzer.h:173
int nbindphimatch
Definition: DQMAnalyzer.h:126
TH1F * h_ele_EeleOPout
Definition: DQMAnalyzer.h:228
TH1F * h_ele_vertexTIP
Definition: DQMAnalyzer.h:192
edm::InputTag triggerResults_
Definition: DQMAnalyzer.h:114
TH1F * histSclEn_
Definition: DQMAnalyzer.h:197
TH1F * h_ele_dPhiCl_propOut
Definition: DQMAnalyzer.h:232
double dPhiMinEndcaps_
Definition: DQMAnalyzer.h:95
TH1F * h_ele_HoE
Definition: DQMAnalyzer.h:237
TH2F * h_ele_lostHitsVsPt
Definition: DQMAnalyzer.h:218
TH1F * h_ele_chi2
Definition: DQMAnalyzer.h:219
TH1F * h_ele_matchingObjectEta_matched
Definition: DQMAnalyzer.h:177
double dEtaMinEndcaps_
Definition: DQMAnalyzer.h:91
double dphimax
Definition: DQMAnalyzer.h:124
TH1F * h_matchingObjectNum
Definition: DQMAnalyzer.h:168
double eopmax
Definition: DQMAnalyzer.h:122
bool TPchecksign_
Definition: DQMAnalyzer.h:71
TH1F * h_ele_ambiguousTracks
Definition: DQMAnalyzer.h:203
unsigned int nEvents_
Definition: DQMAnalyzer.h:140
TH2F * h_ele_foundHitsVsEta
Definition: DQMAnalyzer.h:210
double dPhiMaxEndcaps_
Definition: DQMAnalyzer.h:96
double dEtaMaxBarrel_
Definition: DQMAnalyzer.h:90
float superclusterEnergy[10]
Definition: DQMAnalyzer.h:160
DQMAnalyzer(const edm::ParameterSet &conf)
Definition: DQMAnalyzer.cc:58
TH1F * h_ele_hcalDepth2TowerSumEt_dr04
Definition: DQMAnalyzer.h:256
double mvaMin_
Definition: DQMAnalyzer.h:103
virtual void endJob()
Definition: DQMAnalyzer.cc:449
double tipMaxBarrel_
Definition: DQMAnalyzer.h:104
double ecalIso03MaxBarrel_
Definition: DQMAnalyzer.h:110
float superclusterEta[10]
Definition: DQMAnalyzer.h:160
float mcEta[10]
Definition: DQMAnalyzer.h:159
TH1F * h_ele_PinMnPout
Definition: DQMAnalyzer.h:243
int Selection_
Definition: DQMAnalyzer.h:68