CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PhotonAnalyzer.h
Go to the documentation of this file.
1 #ifndef PhotonAnalyzer_H
2 #define PhotonAnalyzer_H
3 
6 //
11 // DataFormats
22 
31 
36 
41 
43 
44 // Geometry
54 //
55 #include "TFile.h"
56 #include "TH1.h"
57 #include "TH2.h"
58 #include "TTree.h"
59 #include "TVector3.h"
60 #include "TProfile.h"
61 //
62 
71 
72 //
73 //DQM services
77 
78 //
79 
80 #include <vector>
81 #include <string>
82 
94 // forward declarations
95 class TFile;
96 class TH1F;
97 class TH2F;
98 class TProfile;
99 class TTree;
100 class SimVertex;
101 class SimTrack;
102 
103 
105 {
106 
107 
108  public:
109 
110  //
111  explicit PhotonAnalyzer( const edm::ParameterSet& ) ;
112  virtual ~PhotonAnalyzer();
113 
114 
115  virtual void analyze( const edm::Event&, const edm::EventSetup& ) ;
116  virtual void beginJob() ;
117  virtual void endJob() ;
118  virtual void endRun(const edm::Run& , const edm::EventSetup& ) ;
119 
120 
121  private:
122  //
123 
124  float phiNormalization( float& a);
125 
126  MonitorElement* bookHisto(std::string histoName, std::string title, int bin, double min, double max);
127 
128  void book2DHistoVector(std::vector<std::vector<MonitorElement*> > & toFill,
129  std::string histoType, std::string histoName, std::string title,
130  int xbin, double xmin, double xmax,
131  int ybin=1,double ymin=1, double ymax=2);
132 
133  void book3DHistoVector( std::vector<std::vector<std::vector<MonitorElement*> > > & toFill,
134  std::string histoType, std::string histoName, std::string title,
135  int xbin, double xmin, double xmax,
136  int ybin=1,double ymin=1, double ymax=2);
137 
138 
139  void fill2DHistoVector(std::vector<std::vector<MonitorElement*> >& histoVector,double x, int cut, int type);
140  void fill2DHistoVector(std::vector<std::vector<MonitorElement*> >& histoVector,double x, double y, int cut, int type);
141 
142  void fill3DHistoVector(std::vector<std::vector<std::vector<MonitorElement*> > >& histoVector,double x, int cut, int type, int part);
143  void fill3DHistoVector(std::vector<std::vector<std::vector<MonitorElement*> > >& histoVector,double x, double y, int cut, int type, int part);
144 
145 
146 
148 
151 
152  unsigned int prescaleFactor_;
153 
155 
157 
159 
161 
163 
165 
166  double minPhoEtCut_;
168 
169  double cutStep_;
171 
176 
179 
181 
183 
185 
187 
189  std::stringstream currentFolder_;
190 
195 
196 
197  int nEvt_;
198  int nEntry_;
199 
200  std::vector<std::string> types_;
201  std::vector<std::string> parts_;
202 
204 
209 
210 
215 
220 
225 
226 
228 
235 
237 
238 
239  std::vector<std::vector<MonitorElement*> > h_nTrackIsolSolidVsEta_;
240  std::vector<std::vector<MonitorElement*> > h_trackPtSumSolidVsEta_;
241  std::vector<std::vector<MonitorElement*> > h_nTrackIsolHollowVsEta_;
242  std::vector<std::vector<MonitorElement*> > h_trackPtSumHollowVsEta_;
243  std::vector<std::vector<MonitorElement*> > h_ecalSumVsEta_;
244  std::vector<std::vector<MonitorElement*> > h_hcalSumVsEta_;
245 
246 
247  std::vector<std::vector<MonitorElement*> > h_nTrackIsolSolidVsEt_;
248  std::vector<std::vector<MonitorElement*> > h_trackPtSumSolidVsEt_;
249  std::vector<std::vector<MonitorElement*> > h_nTrackIsolHollowVsEt_;
250  std::vector<std::vector<MonitorElement*> > h_trackPtSumHollowVsEt_;
251  std::vector<std::vector<MonitorElement*> > h_ecalSumVsEt_;
252  std::vector<std::vector<MonitorElement*> > h_hcalSumVsEt_;
253 
254 
255  std::vector<std::vector<MonitorElement*> > h_nTrackIsolSolid_;
256  std::vector<std::vector<MonitorElement*> > h_trackPtSumSolid_;
257  std::vector<std::vector<MonitorElement*> > h_nTrackIsolHollow_;
258  std::vector<std::vector<MonitorElement*> > h_trackPtSumHollow_;
259  std::vector<std::vector<MonitorElement*> > h_ecalSum_;
260  std::vector<std::vector<MonitorElement*> > h_ecalSumEBarrel_;
261  std::vector<std::vector<MonitorElement*> > h_ecalSumEEndcap_;
262  std::vector<std::vector<MonitorElement*> > h_hcalSum_;
263  std::vector<std::vector<MonitorElement*> > h_hcalSumEBarrel_;
264  std::vector<std::vector<MonitorElement*> > h_hcalSumEEndcap_;
265 
266  std::vector<std::vector<MonitorElement*> > p_nTrackIsolSolidVsEta_;
267  std::vector<std::vector<MonitorElement*> > p_trackPtSumSolidVsEta_;
268  std::vector<std::vector<MonitorElement*> > p_nTrackIsolHollowVsEta_;
269  std::vector<std::vector<MonitorElement*> > p_trackPtSumHollowVsEta_;
270  std::vector<std::vector<MonitorElement*> > p_ecalSumVsEta_;
271  std::vector<std::vector<MonitorElement*> > p_hcalSumVsEta_;
272 
273  std::vector<std::vector<MonitorElement*> > p_nTrackIsolSolidVsEt_;
274  std::vector<std::vector<MonitorElement*> > p_trackPtSumSolidVsEt_;
275  std::vector<std::vector<MonitorElement*> > p_nTrackIsolHollowVsEt_;
276  std::vector<std::vector<MonitorElement*> > p_trackPtSumHollowVsEt_;
277 
278  std::vector<std::vector<MonitorElement*> > p_r9VsEt_;
279  std::vector<std::vector<MonitorElement*> > p_r9VsEta_;
280 
281  std::vector<std::vector<MonitorElement*> > p_e1x5VsEt_;
282  std::vector<std::vector<MonitorElement*> > p_e1x5VsEta_;
283 
284  std::vector<std::vector<MonitorElement*> > p_e2x5VsEt_;
285  std::vector<std::vector<MonitorElement*> > p_e2x5VsEta_;
286 
287  std::vector<std::vector<MonitorElement*> > p_maxEXtalOver3x3VsEt_;
288  std::vector<std::vector<MonitorElement*> > p_maxEXtalOver3x3VsEta_;
289 
290  std::vector<std::vector<MonitorElement*> > p_r1x5VsEt_;
291  std::vector<std::vector<MonitorElement*> > p_r1x5VsEta_;
292 
293  std::vector<std::vector<MonitorElement*> > p_r2x5VsEt_;
294  std::vector<std::vector<MonitorElement*> > p_r2x5VsEta_;
295 
296  std::vector<std::vector<MonitorElement*> > p_sigmaIetaIetaVsEta_;
297 
298  std::vector<std::vector<MonitorElement*> > p_dCotTracksVsEta_;
299 
300  std::vector<std::vector<MonitorElement*> > p_hOverEVsEta_;
301  std::vector<std::vector<MonitorElement*> > p_hOverEVsEt_;
302 
303  std::vector<std::vector<MonitorElement*> > h_phoEta_;
304  std::vector<std::vector<MonitorElement*> > h_scEta_;
305 
306 
307  std::vector<std::vector<MonitorElement*> > h_phoConvEtaForEfficiency_;
308 
309  std::vector<std::vector<MonitorElement*> > h_phoEta_BadChannels_;
310  std::vector<std::vector<MonitorElement*> > h_phoEt_BadChannels_;
311  std::vector<std::vector<MonitorElement*> > h_phoPhi_BadChannels_;
312 
313  std::vector<std::vector<MonitorElement*> > h_phoConvEta_;
314 
315  std::vector<std::vector<MonitorElement*> > h_convVtxRvsZ_;
316  std::vector<std::vector<MonitorElement*> > h_convVtxZEndcap_;
317  std::vector<std::vector<MonitorElement*> > h_convVtxZ_;
318  std::vector<std::vector<MonitorElement*> > h_convVtxYvsX_;
319  std::vector<std::vector<MonitorElement*> > h_convVtxR_;
320 
321  std::vector<std::vector<MonitorElement*> > h_r9VsEt_;
322  std::vector<std::vector<MonitorElement*> > h_r9VsEta_;
323 
324 
325  std::vector<std::vector<MonitorElement*> > h_e1x5VsEt_;
326  std::vector<std::vector<MonitorElement*> > h_e1x5VsEta_;
327 
328  std::vector<std::vector<MonitorElement*> > h_e2x5VsEt_;
329  std::vector<std::vector<MonitorElement*> > h_e2x5VsEta_;
330 
331  std::vector<std::vector<MonitorElement*> > h_maxEXtalOver3x3VsEt_;
332  std::vector<std::vector<MonitorElement*> > h_maxEXtalOver3x3VsEta_;
333 
334  std::vector<std::vector<MonitorElement*> > h_r1x5VsEt_;
335  std::vector<std::vector<MonitorElement*> > h_r1x5VsEta_;
336 
337  std::vector<std::vector<MonitorElement*> > h_r2x5VsEt_;
338  std::vector<std::vector<MonitorElement*> > h_r2x5VsEta_;
339 
340  std::vector<std::vector<MonitorElement*> > h_sigmaIetaIetaVsEta_;
341 
342  std::vector<std::vector<MonitorElement*> > h_tkChi2_;
343 
344  std::vector<std::vector<MonitorElement*> > h_vertexChi2Prob_;
345 
346  std::vector<std::vector<MonitorElement*> > p_nHitsVsEta_;
347 
348  std::vector<std::vector<MonitorElement*> > p_tkChi2VsEta_;
349 
350 
352 
353  std::vector<std::vector<std::vector<MonitorElement*> > > p_ecalSumVsEt_;
354  std::vector<std::vector<std::vector<MonitorElement*> > > p_hcalSumVsEt_;
355 
356  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoE_;
357  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoEt_;
358  std::vector<std::vector<std::vector<MonitorElement*> > > h_r9_;
359  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoPhi_;
360  std::vector<std::vector<std::vector<MonitorElement*> > > h_scPhi_;
361  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoConvPhiForEfficiency_;
362  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoConvPhi_;
363 
364 
365 
366  std::vector<std::vector<std::vector<MonitorElement*> > > h_hOverE_;
367  std::vector<std::vector<std::vector<MonitorElement*> > > h_h1OverE_;
368  std::vector<std::vector<std::vector<MonitorElement*> > > h_h2OverE_;
369 
370  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoSigmaIetaIeta_;
371 
372  std::vector<std::vector<std::vector<MonitorElement*> > > h_nPho_;
373 
374  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoConvE_;
375  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoConvEt_;
376  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoConvR9_;
377 
378  std::vector<std::vector<std::vector<MonitorElement*> > > h_nConv_;
379 
380  std::vector<std::vector<std::vector<MonitorElement*> > > h_eOverPTracks_;
381  std::vector<std::vector<std::vector<MonitorElement*> > > h_pOverETracks_;
382 
383  std::vector<std::vector<std::vector<MonitorElement*> > > h_dCotTracks_;
384 
385  std::vector<std::vector<std::vector<MonitorElement*> > > h_dPhiTracksAtVtx_;
386  std::vector<std::vector<std::vector<MonitorElement*> > > h_dPhiTracksAtEcal_;
387 
388  std::vector<std::vector<std::vector<MonitorElement*> > > h_dEtaTracksAtEcal_;
389 
390 };
391 
392 
393 
394 
395 
396 #endif
397 
398 
399 
400 
virtual void endJob()
std::vector< std::vector< MonitorElement * > > h_sigmaIetaIetaVsEta_
type
Definition: HCALResponse.h:21
MonitorElement * h_invMassOneWithTracks_
std::vector< std::vector< std::vector< MonitorElement * > > > h_dEtaTracksAtEcal_
std::vector< std::vector< std::vector< MonitorElement * > > > h_phoEt_
MonitorElement * h_phoEt_preHLT_
std::vector< std::vector< MonitorElement * > > h_phoEta_BadChannels_
virtual void beginJob()
MonitorElement * totalNumberOfHistos_photonsFolder
std::vector< std::vector< MonitorElement * > > p_maxEXtalOver3x3VsEta_
std::vector< std::vector< MonitorElement * > > p_trackPtSumSolidVsEta_
std::vector< std::vector< MonitorElement * > > h_nTrackIsolSolid_
std::vector< std::vector< MonitorElement * > > p_hOverEVsEta_
std::vector< std::vector< MonitorElement * > > p_nTrackIsolSolidVsEt_
std::vector< std::vector< MonitorElement * > > p_r9VsEta_
edm::EDGetTokenT< edm::SortedCollection< EcalRecHit, edm::StrictWeakOrdering< EcalRecHit > > > barrelRecHit_token_
edm::EDGetTokenT< edm::ValueMap< bool > > PhotonIDLoose_token_
MonitorElement * bookHisto(std::string histoName, std::string title, int bin, double min, double max)
std::vector< std::vector< MonitorElement * > > p_sigmaIetaIetaVsEta_
std::vector< std::vector< MonitorElement * > > h_e1x5VsEt_
std::vector< std::vector< std::vector< MonitorElement * > > > h_phoE_
MonitorElement * h_phoEta_Vertex_
std::vector< std::vector< MonitorElement * > > p_e2x5VsEta_
std::vector< std::vector< MonitorElement * > > p_e1x5VsEta_
std::vector< std::vector< MonitorElement * > > h_convVtxRvsZ_
std::vector< std::vector< MonitorElement * > > p_r2x5VsEt_
std::vector< std::string > parts_
MonitorElement * h_convEta_Loose_
std::vector< std::vector< MonitorElement * > > h_phoEta_
MonitorElement * totalNumberOfHistos_efficiencyFolder
std::vector< std::vector< MonitorElement * > > h_hcalSumEBarrel_
std::vector< std::vector< std::vector< MonitorElement * > > > h_phoConvPhiForEfficiency_
int histo_index_conversions_
std::vector< std::vector< MonitorElement * > > p_r1x5VsEt_
std::vector< std::vector< MonitorElement * > > h_nTrackIsolHollow_
MonitorElement * h_phoEta_preHLT_
edm::EDGetTokenT< edm::ValueMap< bool > > PhotonIDTight_token_
std::vector< std::vector< MonitorElement * > > h_convVtxZ_
std::vector< std::vector< MonitorElement * > > h_ecalSumVsEta_
std::vector< std::vector< std::vector< MonitorElement * > > > h_dCotTracks_
std::vector< std::vector< std::vector< MonitorElement * > > > h_hOverE_
MonitorElement * h_convEt_Loose_
std::vector< std::vector< MonitorElement * > > h_trackPtSumSolidVsEta_
std::vector< std::vector< std::vector< MonitorElement * > > > h_pOverETracks_
void fill3DHistoVector(std::vector< std::vector< std::vector< MonitorElement * > > > &histoVector, double x, int cut, int type, int part)
MonitorElement * totalNumberOfHistos_conversionsFolder
std::vector< std::vector< std::vector< MonitorElement * > > > h_phoConvR9_
std::vector< std::vector< MonitorElement * > > h_r9VsEta_
std::vector< std::vector< MonitorElement * > > h_hcalSumEEndcap_
std::vector< std::vector< MonitorElement * > > h_vertexChi2Prob_
MonitorElement * h_phoEt_postHLT_
std::stringstream currentFolder_
std::vector< std::vector< MonitorElement * > > h_convVtxZEndcap_
std::vector< std::vector< MonitorElement * > > h_nTrackIsolHollowVsEta_
MonitorElement * h_convEta_Tight_
std::vector< std::vector< MonitorElement * > > h_e2x5VsEta_
std::vector< std::vector< MonitorElement * > > h_ecalSum_
std::vector< std::vector< MonitorElement * > > p_dCotTracksVsEta_
std::vector< std::vector< std::vector< MonitorElement * > > > p_hcalSumVsEt_
std::vector< std::vector< MonitorElement * > > h_scEta_
std::vector< std::vector< MonitorElement * > > h_r1x5VsEt_
MonitorElement * h_invMassZeroWithTracks_
std::vector< std::vector< std::vector< MonitorElement * > > > h_phoConvE_
void fill2DHistoVector(std::vector< std::vector< MonitorElement * > > &histoVector, double x, int cut, int type)
std::vector< std::vector< MonitorElement * > > h_convVtxR_
std::vector< std::vector< MonitorElement * > > h_hcalSumVsEta_
std::vector< std::vector< MonitorElement * > > h_maxEXtalOver3x3VsEta_
std::string fName_
std::vector< std::vector< MonitorElement * > > h_phoConvEta_
std::vector< std::vector< std::vector< MonitorElement * > > > h_eOverPTracks_
EgammaCoreTools.
std::vector< std::vector< MonitorElement * > > h_maxEXtalOver3x3VsEt_
MonitorElement * h_phoEt_Tight_
std::vector< std::vector< MonitorElement * > > h_hcalSum_
MonitorElement * h_invMassPhotonsEBarrel_
std::vector< std::vector< MonitorElement * > > p_hcalSumVsEta_
std::vector< std::vector< MonitorElement * > > h_r1x5VsEta_
std::vector< std::vector< std::vector< MonitorElement * > > > h_phoConvEt_
const T & max(const T &a, const T &b)
std::vector< std::vector< MonitorElement * > > p_nHitsVsEta_
unsigned int prescaleFactor_
std::vector< std::string > types_
MonitorElement * totalNumberOfHistos_invMassFolder
std::vector< std::vector< std::vector< MonitorElement * > > > h_h1OverE_
DQMStore * dbe_
std::vector< std::vector< MonitorElement * > > p_r1x5VsEta_
std::vector< std::vector< MonitorElement * > > p_hOverEVsEt_
std::vector< std::vector< std::vector< MonitorElement * > > > h_dPhiTracksAtVtx_
std::string outputFileName_
std::vector< std::vector< MonitorElement * > > p_e2x5VsEt_
std::vector< std::vector< MonitorElement * > > p_maxEXtalOver3x3VsEt_
MonitorElement * h_invMassTwoWithTracks_
std::vector< std::vector< MonitorElement * > > h_nTrackIsolHollowVsEt_
std::vector< std::vector< std::vector< MonitorElement * > > > h_phoSigmaIetaIeta_
edm::EDGetTokenT< edm::SortedCollection< EcalRecHit, edm::StrictWeakOrdering< EcalRecHit > > > endcapRecHit_token_
std::vector< std::vector< MonitorElement * > > h_e2x5VsEt_
std::vector< std::vector< MonitorElement * > > h_phoPhi_BadChannels_
std::vector< std::vector< MonitorElement * > > p_nTrackIsolSolidVsEta_
float phiNormalization(float &a)
MonitorElement * h_phoEta_Tight_
void book3DHistoVector(std::vector< std::vector< std::vector< MonitorElement * > > > &toFill, std::string histoType, std::string histoName, std::string title, int xbin, double xmin, double xmax, int ybin=1, double ymin=1, double ymax=2)
std::vector< std::vector< MonitorElement * > > h_nTrackIsolSolidVsEt_
MonitorElement * h_phoEt_Loose_
std::vector< std::vector< std::vector< MonitorElement * > > > p_ecalSumVsEt_
std::vector< std::vector< std::vector< MonitorElement * > > > h_r9_
MonitorElement * h_invMassAllPhotons_
virtual ~PhotonAnalyzer()
std::vector< std::vector< MonitorElement * > > p_nTrackIsolHollowVsEt_
std::vector< std::vector< MonitorElement * > > h_trackPtSumHollowVsEt_
std::vector< std::vector< MonitorElement * > > h_nTrackIsolSolidVsEta_
edm::EDGetTokenT< trigger::TriggerEvent > triggerEvent_token_
std::vector< std::vector< std::vector< MonitorElement * > > > h_scPhi_
virtual void endRun(const edm::Run &, const edm::EventSetup &)
std::vector< std::vector< MonitorElement * > > p_e1x5VsEt_
part
Definition: HCALResponse.h:20
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * h_invMassPhotonsEEndcap_
std::vector< std::vector< MonitorElement * > > p_nTrackIsolHollowVsEta_
std::vector< std::vector< MonitorElement * > > h_trackPtSumSolidVsEt_
std::vector< std::vector< std::vector< MonitorElement * > > > h_h2OverE_
std::vector< std::vector< MonitorElement * > > p_r2x5VsEta_
std::vector< std::vector< MonitorElement * > > p_r9VsEt_
std::vector< std::vector< MonitorElement * > > p_trackPtSumHollowVsEta_
std::vector< std::vector< MonitorElement * > > p_trackPtSumSolidVsEt_
std::vector< std::vector< MonitorElement * > > p_ecalSumVsEta_
std::vector< std::vector< MonitorElement * > > h_tkChi2_
std::vector< std::vector< MonitorElement * > > h_trackPtSumHollowVsEta_
edm::ParameterSet parameters_
double a
Definition: hdecay.h:121
std::vector< std::vector< MonitorElement * > > h_phoConvEtaForEfficiency_
MonitorElement * h_convEt_Tight_
std::vector< std::vector< MonitorElement * > > h_hcalSumVsEt_
std::vector< std::vector< MonitorElement * > > p_trackPtSumHollowVsEt_
MonitorElement * h_phoEta_postHLT_
std::vector< std::vector< MonitorElement * > > h_e1x5VsEta_
MonitorElement * h_phoEta_Loose_
std::vector< std::vector< std::vector< MonitorElement * > > > h_dPhiTracksAtEcal_
std::vector< std::vector< MonitorElement * > > h_trackPtSumSolid_
Definition: DDAxes.h:10
std::vector< std::vector< std::vector< MonitorElement * > > > h_nConv_
std::vector< std::vector< MonitorElement * > > h_r2x5VsEt_
edm::EDGetTokenT< std::vector< reco::Photon > > photon_token_
std::vector< std::vector< MonitorElement * > > h_phoEt_BadChannels_
std::vector< std::vector< MonitorElement * > > h_r2x5VsEta_
std::vector< std::vector< std::vector< MonitorElement * > > > h_phoPhi_
std::vector< std::vector< MonitorElement * > > h_convVtxYvsX_
std::vector< std::vector< MonitorElement * > > h_trackPtSumHollow_
std::vector< std::vector< std::vector< MonitorElement * > > > h_nPho_
std::vector< std::vector< MonitorElement * > > h_r9VsEt_
std::vector< std::vector< std::vector< MonitorElement * > > > h_phoConvPhi_
PhotonAnalyzer(const edm::ParameterSet &)
std::vector< std::vector< MonitorElement * > > h_ecalSumVsEt_
Definition: Run.h:41
std::vector< std::vector< MonitorElement * > > h_ecalSumEEndcap_
std::vector< std::vector< MonitorElement * > > h_ecalSumEBarrel_
void book2DHistoVector(std::vector< std::vector< MonitorElement * > > &toFill, std::string histoType, std::string histoName, std::string title, int xbin, double xmin, double xmax, int ybin=1, double ymin=1, double ymax=2)
std::vector< std::vector< MonitorElement * > > p_tkChi2VsEta_