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 
95 // forward declarations
96 class TFile;
97 class TH1F;
98 class TH2F;
99 class TProfile;
100 class TTree;
101 class SimVertex;
102 class SimTrack;
103 
104 
106 {
107 
108 
109  public:
110 
111  //
112  explicit PhotonAnalyzer( const edm::ParameterSet& ) ;
113  virtual ~PhotonAnalyzer();
114 
115 
116  virtual void analyze( const edm::Event&, const edm::EventSetup& ) ;
117  virtual void beginJob() ;
118  virtual void endJob() ;
119  virtual void endRun(const edm::Run& , const edm::EventSetup& ) ;
120 
121 
122  private:
123  //
124 
125  float phiNormalization( float& a);
126 
127  MonitorElement* bookHisto(std::string histoName, std::string title, int bin, double min, double max);
128 
129  std::vector<std::vector<MonitorElement*> > book2DHistoVector(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  std::vector<std::vector<std::vector<MonitorElement*> > > book3DHistoVector(std::string histoType, std::string histoName, std::string title,
134  int xbin, double xmin, double xmax,
135  int ybin=1,double ymin=1, double ymax=2);
136 
137 
138  void fill2DHistoVector(std::vector<std::vector<MonitorElement*> >& histoVector,double x, int cut, int type);
139  void fill2DHistoVector(std::vector<std::vector<MonitorElement*> >& histoVector,double x, double y, int cut, int type);
140 
141  void fill3DHistoVector(std::vector<std::vector<std::vector<MonitorElement*> > >& histoVector,double x, int cut, int type, int part);
142  void fill3DHistoVector(std::vector<std::vector<std::vector<MonitorElement*> > >& histoVector,double x, double y, int cut, int type, int part);
143 
144 
145 
147 
148  std::string fName_;
150 
151  unsigned int prescaleFactor_;
152 
153  std::string photonProducer_;
154  std::string photonCollection_;
155 
158 
161 
163 
164  double minPhoEtCut_;
166 
167  double cutStep_;
169 
173  std::string outputFileName_;
174 
175 
177 
179 
181 
183 
185  std::stringstream currentFolder_;
186 
191 
192 
193  int nEvt_;
194  int nEntry_;
195 
196  std::vector<std::string> types_;
197  std::vector<std::string> parts_;
198 
200 
205 
206 
211 
216 
221 
222 
224 
229 
231 
232 
233  std::vector<std::vector<MonitorElement*> > h_nTrackIsolSolidVsEta_;
234  std::vector<std::vector<MonitorElement*> > h_trackPtSumSolidVsEta_;
235  std::vector<std::vector<MonitorElement*> > h_nTrackIsolHollowVsEta_;
236  std::vector<std::vector<MonitorElement*> > h_trackPtSumHollowVsEta_;
237  std::vector<std::vector<MonitorElement*> > h_ecalSumVsEta_;
238  std::vector<std::vector<MonitorElement*> > h_hcalSumVsEta_;
239 
240 
241  std::vector<std::vector<MonitorElement*> > h_nTrackIsolSolidVsEt_;
242  std::vector<std::vector<MonitorElement*> > h_trackPtSumSolidVsEt_;
243  std::vector<std::vector<MonitorElement*> > h_nTrackIsolHollowVsEt_;
244  std::vector<std::vector<MonitorElement*> > h_trackPtSumHollowVsEt_;
245  std::vector<std::vector<MonitorElement*> > h_ecalSumVsEt_;
246  std::vector<std::vector<MonitorElement*> > h_hcalSumVsEt_;
247 
248 
249  std::vector<std::vector<MonitorElement*> > h_nTrackIsolSolid_;
250  std::vector<std::vector<MonitorElement*> > h_trackPtSumSolid_;
251  std::vector<std::vector<MonitorElement*> > h_nTrackIsolHollow_;
252  std::vector<std::vector<MonitorElement*> > h_trackPtSumHollow_;
253  std::vector<std::vector<MonitorElement*> > h_ecalSum_;
254  std::vector<std::vector<MonitorElement*> > h_hcalSum_;
255 
256 
257  std::vector<std::vector<MonitorElement*> > p_nTrackIsolSolidVsEta_;
258  std::vector<std::vector<MonitorElement*> > p_trackPtSumSolidVsEta_;
259  std::vector<std::vector<MonitorElement*> > p_nTrackIsolHollowVsEta_;
260  std::vector<std::vector<MonitorElement*> > p_trackPtSumHollowVsEta_;
261  std::vector<std::vector<MonitorElement*> > p_ecalSumVsEta_;
262  std::vector<std::vector<MonitorElement*> > p_hcalSumVsEta_;
263 
264  std::vector<std::vector<MonitorElement*> > p_nTrackIsolSolidVsEt_;
265  std::vector<std::vector<MonitorElement*> > p_trackPtSumSolidVsEt_;
266  std::vector<std::vector<MonitorElement*> > p_nTrackIsolHollowVsEt_;
267  std::vector<std::vector<MonitorElement*> > p_trackPtSumHollowVsEt_;
268 
269  std::vector<std::vector<MonitorElement*> > p_r9VsEt_;
270  std::vector<std::vector<MonitorElement*> > p_r9VsEta_;
271 
272  std::vector<std::vector<MonitorElement*> > p_e1x5VsEt_;
273  std::vector<std::vector<MonitorElement*> > p_e1x5VsEta_;
274 
275  std::vector<std::vector<MonitorElement*> > p_e2x5VsEt_;
276  std::vector<std::vector<MonitorElement*> > p_e2x5VsEta_;
277 
278  std::vector<std::vector<MonitorElement*> > p_maxEXtalOver3x3VsEt_;
279  std::vector<std::vector<MonitorElement*> > p_maxEXtalOver3x3VsEta_;
280 
281  std::vector<std::vector<MonitorElement*> > p_r1x5VsEt_;
282  std::vector<std::vector<MonitorElement*> > p_r1x5VsEta_;
283 
284  std::vector<std::vector<MonitorElement*> > p_r2x5VsEt_;
285  std::vector<std::vector<MonitorElement*> > p_r2x5VsEta_;
286 
287  std::vector<std::vector<MonitorElement*> > p_sigmaIetaIetaVsEta_;
288 
289  std::vector<std::vector<MonitorElement*> > p_dCotTracksVsEta_;
290 
291  std::vector<std::vector<MonitorElement*> > p_hOverEVsEta_;
292  std::vector<std::vector<MonitorElement*> > p_hOverEVsEt_;
293 
294  std::vector<std::vector<MonitorElement*> > h_phoEta_;
295  std::vector<std::vector<MonitorElement*> > h_scEta_;
296 
297 
298  std::vector<std::vector<MonitorElement*> > h_phoConvEtaForEfficiency_;
299 
300  std::vector<std::vector<MonitorElement*> > h_phoEta_BadChannels_;
301  std::vector<std::vector<MonitorElement*> > h_phoEt_BadChannels_;
302  std::vector<std::vector<MonitorElement*> > h_phoPhi_BadChannels_;
303 
304  std::vector<std::vector<MonitorElement*> > h_phoConvEta_;
305 
306  std::vector<std::vector<MonitorElement*> > h_convVtxRvsZ_;
307  std::vector<std::vector<MonitorElement*> > h_convVtxZEndcap_;
308  std::vector<std::vector<MonitorElement*> > h_convVtxZ_;
309  std::vector<std::vector<MonitorElement*> > h_convVtxYvsX_;
310  std::vector<std::vector<MonitorElement*> > h_convVtxR_;
311 
312  std::vector<std::vector<MonitorElement*> > h_r9VsEt_;
313  std::vector<std::vector<MonitorElement*> > h_r9VsEta_;
314 
315 
316  std::vector<std::vector<MonitorElement*> > h_e1x5VsEt_;
317  std::vector<std::vector<MonitorElement*> > h_e1x5VsEta_;
318 
319  std::vector<std::vector<MonitorElement*> > h_e2x5VsEt_;
320  std::vector<std::vector<MonitorElement*> > h_e2x5VsEta_;
321 
322  std::vector<std::vector<MonitorElement*> > h_maxEXtalOver3x3VsEt_;
323  std::vector<std::vector<MonitorElement*> > h_maxEXtalOver3x3VsEta_;
324 
325  std::vector<std::vector<MonitorElement*> > h_r1x5VsEt_;
326  std::vector<std::vector<MonitorElement*> > h_r1x5VsEta_;
327 
328  std::vector<std::vector<MonitorElement*> > h_r2x5VsEt_;
329  std::vector<std::vector<MonitorElement*> > h_r2x5VsEta_;
330 
331  std::vector<std::vector<MonitorElement*> > h_sigmaIetaIetaVsEta_;
332 
333  std::vector<std::vector<MonitorElement*> > h_tkChi2_;
334 
335  std::vector<std::vector<MonitorElement*> > h_vertexChi2Prob_;
336 
337  std::vector<std::vector<MonitorElement*> > p_nHitsVsEta_;
338 
339  std::vector<std::vector<MonitorElement*> > p_tkChi2VsEta_;
340 
341 
343 
344  std::vector<std::vector<std::vector<MonitorElement*> > > p_ecalSumVsEt_;
345  std::vector<std::vector<std::vector<MonitorElement*> > > p_hcalSumVsEt_;
346 
347  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoE_;
348  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoEt_;
349  std::vector<std::vector<std::vector<MonitorElement*> > > h_r9_;
350  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoPhi_;
351  std::vector<std::vector<std::vector<MonitorElement*> > > h_scPhi_;
352  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoConvPhiForEfficiency_;
353  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoConvPhi_;
354 
355 
356 
357  std::vector<std::vector<std::vector<MonitorElement*> > > h_hOverE_;
358  std::vector<std::vector<std::vector<MonitorElement*> > > h_h1OverE_;
359  std::vector<std::vector<std::vector<MonitorElement*> > > h_h2OverE_;
360 
361  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoSigmaIetaIeta_;
362 
363  std::vector<std::vector<std::vector<MonitorElement*> > > h_nPho_;
364 
365  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoConvE_;
366  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoConvEt_;
367  std::vector<std::vector<std::vector<MonitorElement*> > > h_phoConvR9_;
368 
369  std::vector<std::vector<std::vector<MonitorElement*> > > h_nConv_;
370 
371  std::vector<std::vector<std::vector<MonitorElement*> > > h_eOverPTracks_;
372  std::vector<std::vector<std::vector<MonitorElement*> > > h_pOverETracks_;
373 
374  std::vector<std::vector<std::vector<MonitorElement*> > > h_dCotTracks_;
375 
376  std::vector<std::vector<std::vector<MonitorElement*> > > h_dPhiTracksAtVtx_;
377  std::vector<std::vector<std::vector<MonitorElement*> > > h_dPhiTracksAtEcal_;
378 
379  std::vector<std::vector<std::vector<MonitorElement*> > > h_dEtaTracksAtEcal_;
380 
381 };
382 
383 
384 
385 
386 
387 #endif
388 
389 
390 
391 
virtual void endJob()
std::vector< std::vector< MonitorElement * > > h_sigmaIetaIetaVsEta_
type
Definition: HCALResponse.h:22
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_
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< 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_
#define min(a, b)
Definition: mlp_lapack.h:161
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_
edm::InputTag triggerEvent_
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_vertexChi2Prob_
MonitorElement * h_phoEt_postHLT_
std::stringstream currentFolder_
std::string barrelRecHitProducer_
std::string photonCollection_
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_
std::vector< std::vector< MonitorElement * > > p_hcalSumVsEta_
std::vector< std::vector< MonitorElement * > > h_r1x5VsEta_
std::vector< std::vector< std::vector< MonitorElement * > > > book3DHistoVector(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< 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::string endcapRecHitProducer_
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_
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_
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_
tuple cut
Definition: align_tpl.py:88
std::vector< std::vector< MonitorElement * > > h_trackPtSumHollowVsEt_
std::vector< std::vector< MonitorElement * > > h_nTrackIsolSolidVsEta_
std::vector< std::vector< MonitorElement * > > book2DHistoVector(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< 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:21
virtual void analyze(const edm::Event &, const edm::EventSetup &)
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::string barrelRecHitCollection_
std::vector< std::vector< MonitorElement * > > h_tkChi2_
std::string photonProducer_
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_
std::vector< std::vector< std::vector< MonitorElement * > > > h_nConv_
std::vector< std::vector< MonitorElement * > > h_r2x5VsEt_
std::string endcapRecHitCollection_
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:31
std::vector< std::vector< MonitorElement * > > p_tkChi2VsEta_