CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DQMAnalyzer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: RecoEgamma/Examples
4 // Class: GsfElectronDataAnalyzer
5 //
13 //
14 // Original Author: Ursula Berthon
15 // Created: Mon Mar 27 13:22:06 CEST 2006
16 // $Id: DQMAnalyzer.cc,v 1.6 2012/09/13 20:08:31 wdd Exp $
17 //
18 //
19 
20 // user include files
22 
29 
40 
42 
43 #include "CLHEP/Units/GlobalPhysicalConstants.h"
44 #include <iostream>
45 #include "TMath.h"
46 #include "TFile.h"
47 #include "TH1F.h"
48 #include "TH1I.h"
49 #include "TH2F.h"
50 #include "TProfile.h"
51 #include "TTree.h"
52 #include <iostream>
53 #include <cassert>
54 
55 using namespace reco;
56 
57 
59  beamSpot_(conf.getParameter<edm::InputTag>("beamSpot"))
60 {
61 
62  outputFile_ = conf.getParameter<std::string>("outputFile");
63  electronCollection_=conf.getParameter<edm::InputTag>("electronCollection");
64  matchingObjectCollection_ = conf.getParameter<edm::InputTag>("matchingObjectCollection");
65  matchingCondition_ = conf.getParameter<std::string>("matchingCondition");
66  readAOD_ = conf.getParameter<bool>("readAOD");
67 
68  histfile_ = new TFile(outputFile_.c_str(),"RECREATE");
69 
70  // currently only one possible matching conditions
71  assert(matchingCondition_=="Cone") ;
72  maxPtMatchingObject_ = conf.getParameter<double>("MaxPtMatchingObject");
73  maxAbsEtaMatchingObject_ = conf.getParameter<double>("MaxAbsEtaMatchingObject");
74  deltaR_ = conf.getParameter<double>("DeltaR");
75 
76  Selection_ = conf.getParameter<int>("Selection");
77  massLow_ = conf.getParameter< double >("MassLow");
78  massHigh_ = conf.getParameter< double >("MassHigh");
79  TPchecksign_ = conf.getParameter<bool>("TPchecksign");
80  TAGcheckclass_ = conf.getParameter<bool>("TAGcheckclass");
81  PROBEetcut_ = conf.getParameter<bool>("PROBEetcut");
82  PROBEcheckclass_ = conf.getParameter<bool>("PROBEcheckclass");
83 
84  minEt_ = conf.getParameter<double>("MinEt");
85  minPt_ = conf.getParameter<double>("MinPt");
86  maxAbsEta_ = conf.getParameter<double>("MaxAbsEta");
87  isEB_ = conf.getParameter<bool>("SelectEB");
88  isEE_ = conf.getParameter<bool>("SelectEE");
89  isNotEBEEGap_ = conf.getParameter<bool>("SelectNotEBEEGap");
90  isEcalDriven_ = conf.getParameter<bool>("SelectEcalDriven");
91  isTrackerDriven_ = conf.getParameter<bool>("SelectTrackerDriven");
92  eOverPMinBarrel_ = conf.getParameter<double>("MinEOverPBarrel");
93  eOverPMaxBarrel_ = conf.getParameter<double>("MaxEOverPBarrel");
94  eOverPMinEndcaps_ = conf.getParameter<double>("MinEOverPEndcaps");
95  eOverPMaxEndcaps_ = conf.getParameter<double>("MaxEOverPEndcaps");
96  dEtaMinBarrel_ = conf.getParameter<double>("MinDetaBarrel");
97  dEtaMaxBarrel_ = conf.getParameter<double>("MaxDetaBarrel");
98  dEtaMinEndcaps_ = conf.getParameter<double>("MinDetaEndcaps");
99  dEtaMaxEndcaps_ = conf.getParameter<double>("MaxDetaEndcaps");
100  dPhiMinBarrel_ = conf.getParameter<double>("MinDphiBarrel");
101  dPhiMaxBarrel_ = conf.getParameter<double>("MaxDphiBarrel");
102  dPhiMinEndcaps_ = conf.getParameter<double>("MinDphiEndcaps");
103  dPhiMaxEndcaps_ = conf.getParameter<double>("MaxDphiEndcaps");
104  sigIetaIetaMinBarrel_ = conf.getParameter<double>("MinSigIetaIetaBarrel");
105  sigIetaIetaMaxBarrel_ = conf.getParameter<double>("MaxSigIetaIetaBarrel");
106  sigIetaIetaMinEndcaps_ = conf.getParameter<double>("MinSigIetaIetaEndcaps");
107  sigIetaIetaMaxEndcaps_ = conf.getParameter<double>("MaxSigIetaIetaEndcaps");
108  hadronicOverEmMaxBarrel_ = conf.getParameter<double>("MaxHoEBarrel");
109  hadronicOverEmMaxEndcaps_ = conf.getParameter<double>("MaxHoEEndcaps");
110  mvaMin_ = conf.getParameter<double>("MinMVA");
111  tipMaxBarrel_ = conf.getParameter<double>("MaxTipBarrel");
112  tipMaxEndcaps_ = conf.getParameter<double>("MaxTipEndcaps");
113  tkIso03Max_ = conf.getParameter<double>("MaxTkIso03");
114  hcalIso03Depth1MaxBarrel_ = conf.getParameter<double>("MaxHcalIso03Depth1Barrel");
115  hcalIso03Depth1MaxEndcaps_ = conf.getParameter<double>("MaxHcalIso03Depth1Endcaps");
116  hcalIso03Depth2MaxEndcaps_ = conf.getParameter<double>("MaxHcalIso03Depth2Endcaps");
117  ecalIso03MaxBarrel_ = conf.getParameter<double>("MaxEcalIso03Barrel");
118  ecalIso03MaxEndcaps_ = conf.getParameter<double>("MaxEcalIso03Endcaps");
119 
120  triggerResults_ = conf.getParameter<edm::InputTag>("triggerResults");
121  HLTPathsByName_= conf.getParameter<std::vector<std::string > >("hltPaths");
122  HLTPathsByIndex_.resize(HLTPathsByName_.size());
123 
124  edm::ParameterSet pset =
125  conf.getParameter<edm::ParameterSet>("HistosConfigurationData") ;
126 
127  etamin=pset.getParameter<double>("Etamin");
128  etamax=pset.getParameter<double>("Etamax");
129  phimin=pset.getParameter<double>("Phimin");
130  phimax=pset.getParameter<double>("Phimax");
131  ptmax=pset.getParameter<double>("Ptmax");
132  pmax=pset.getParameter<double>("Pmax");
133  eopmax=pset.getParameter<double>("Eopmax");
134  eopmaxsht=pset.getParameter<double>("Eopmaxsht");
135  detamin=pset.getParameter<double>("Detamin");
136  detamax=pset.getParameter<double>("Detamax");
137  dphimin=pset.getParameter<double>("Dphimin");
138  dphimax=pset.getParameter<double>("Dphimax");
139  detamatchmin=pset.getParameter<double>("Detamatchmin");
140  detamatchmax=pset.getParameter<double>("Detamatchmax");
141  dphimatchmin=pset.getParameter<double>("Dphimatchmin");
142  dphimatchmax=pset.getParameter<double>("Dphimatchmax");
143  fhitsmax=pset.getParameter<double>("Fhitsmax");
144  lhitsmax=pset.getParameter<double>("Lhitsmax");
145  nbineta=pset.getParameter<int>("Nbineta");
146  nbineta2D=pset.getParameter<int>("Nbineta2D");
147  nbinp=pset.getParameter<int>("Nbinp");
148  nbinpt=pset.getParameter<int>("Nbinpt");
149  nbinp2D=pset.getParameter<int>("Nbinp2D");
150  nbinpt2D=pset.getParameter<int>("Nbinpt2D");
151  nbinpteff=pset.getParameter<int>("Nbinpteff");
152  nbinphi=pset.getParameter<int>("Nbinphi");
153  nbinphi2D=pset.getParameter<int>("Nbinphi2D");
154  nbineop=pset.getParameter<int>("Nbineop");
155  nbineop2D=pset.getParameter<int>("Nbineop2D");
156  nbinfhits=pset.getParameter<int>("Nbinfhits");
157  nbinlhits=pset.getParameter<int>("Nbinlhits");
158  nbinxyz=pset.getParameter<int>("Nbinxyz");
159  nbindeta=pset.getParameter<int>("Nbindeta");
160  nbindphi=pset.getParameter<int>("Nbindphi");
161  nbindetamatch=pset.getParameter<int>("Nbindetamatch");
162  nbindphimatch=pset.getParameter<int>("Nbindphimatch");
163  nbindetamatch2D=pset.getParameter<int>("Nbindetamatch2D");
164  nbindphimatch2D=pset.getParameter<int>("Nbindphimatch2D");
165  nbinpoptrue= pset.getParameter<int>("Nbinpoptrue");
166  poptruemin=pset.getParameter<double>("Poptruemin");
167  poptruemax=pset.getParameter<double>("Poptruemax");
168  nbinmee= pset.getParameter<int>("Nbinmee");
169  meemin=pset.getParameter<double>("Meemin");
170  meemax=pset.getParameter<double>("Meemax");
171  nbinhoe= pset.getParameter<int>("Nbinhoe");
172  hoemin=pset.getParameter<double>("Hoemin");
173  hoemax=pset.getParameter<double>("Hoemax");
174 
175 }
176 
177 
179 {
180 
181  // do anything here that needs to be done at desctruction time
182  // (e.g. close files, deallocate resources etc.)
183  histfile_->Write();
184  histfile_->Close();
185 }
186 
187 void
189 
190  histfile_->cd();
191 
192  nEvents_ = 0;
193  nAfterTrigger_ = 0;
194 
195  // matching object
196  std::string::size_type locSC = matchingObjectCollection_.label().find( "SuperCluster", 0 );
197  std::string type ;
198  if ( locSC != std::string::npos ) {
199  std::cout << "Matching objects are SuperClusters "<< std::endl;
200  type = "SC";
201  } else {
202  std::cout << "Didn't recognize input matching objects!! " << std::endl;
203  }
204 
205  //==================================================
206  // matching object distributions
207  //==================================================
208 
209  std::string htitle, hlabel;
210  hlabel="h_"+type+"Num"; htitle="# "+type+"s";
211  h_matchingObjectNum = new TH1F( hlabel.c_str(), htitle.c_str(), nbinfhits,0.,fhitsmax );
212  hlabel="h_"+type+"_eta"; htitle=type+" #eta";
213  h_matchingObjectEta = new TH1F( hlabel.c_str(), htitle.c_str(), nbineta,etamin,etamax);
214  hlabel="h_"+type+"_abseta"; htitle=type+" |#eta|";
215  h_matchingObjectAbsEta = new TH1F( hlabel.c_str(), htitle.c_str(), nbineta/2,0.,etamax);
216  hlabel="h_"+type+"_P"; htitle=type+" p";
217  h_matchingObjectP = new TH1F( hlabel.c_str(), htitle.c_str(), nbinp,0.,pmax);
218  hlabel="h_"+type+"_Pt"; htitle=type+" pt";
219  h_matchingObjectPt = new TH1F( hlabel.c_str(),htitle.c_str(), nbinpteff,5.,ptmax);
220  hlabel="h_"+type+"_phi"; htitle=type+" phi";
221  h_matchingObjectPhi = new TH1F( hlabel.c_str(), htitle.c_str(), nbinphi,phimin,phimax);
222  hlabel="h_"+type+"_z"; htitle=type+" z";
223  h_matchingObjectZ = new TH1F( hlabel.c_str(), htitle.c_str(), nbinxyz , -25, 25 );
224 
225  h_matchingObjectNum->GetXaxis()-> SetTitle("N_{SC}");
226  h_matchingObjectNum->GetYaxis()-> SetTitle("Events");
227  h_matchingObjectEta->GetXaxis()-> SetTitle("#eta_{SC}");
228  h_matchingObjectEta->GetYaxis()-> SetTitle("Events");
229  h_matchingObjectP->GetXaxis()-> SetTitle("E_{SC} (GeV)");
230  h_matchingObjectP->GetYaxis()-> SetTitle("Events");
231 
232  h_ele_matchingObjectEta_matched = new TH1F( "h_ele_matchingObjectEta_matched", "Efficiency vs matching SC #eta", nbineta,etamin,etamax);
234  h_ele_matchingObjectAbsEta_matched = new TH1F( "h_ele_matchingObjectAbsEta_matched", "Efficiency vs matching SC |#eta|", nbineta/2,0.,2.5);
236  h_ele_matchingObjectPt_matched = new TH1F( "h_ele_matchingObjectPt_matched", "Efficiency vs matching SC E_{T}", nbinpteff,5.,ptmax);
238  h_ele_matchingObjectPhi_matched = new TH1F( "h_ele_matchingObjectPhi_matched", "Efficiency vs matching SC phi", nbinphi,phimin,phimax);
240  h_ele_matchingObjectZ_matched = new TH1F( "h_ele_matchingObjectZ_matched", "Efficiency vs matching SC z", nbinxyz,-25,25);
242 
243  //==================================================
244  // caractéristique particule
245  //==================================================
246 
247  h_ele_vertexPt = new TH1F( "h_ele_vertexPt","ele transverse momentum",nbinpt,0.,ptmax);
248  h_ele_Et = new TH1F( "h_ele_Et", "ele SC transverse energy", nbinpt,0.,ptmax);
249  h_ele_vertexEta = new TH1F( "h_ele_vertexEta","ele momentum eta",nbineta,etamin,etamax);
250  h_ele_vertexPhi = new TH1F( "h_ele_vertexPhi","ele momentum #phi",nbinphi,phimin,phimax);
251  h_ele_vertexX = new TH1F( "h_ele_vertexX","ele vertex x",nbinxyz,-0.1,0.1 );
252  h_ele_vertexY = new TH1F( "h_ele_vertexY","ele vertex y",nbinxyz,-0.1,0.1 );
253  h_ele_vertexZ = new TH1F( "h_ele_vertexZ","ele vertex z",nbinxyz,-25, 25 );
254  h_ele_vertexTIP = new TH1F( "h_ele_vertexTIP","ele transverse impact parameter (wrt bs)",90,0.,0.15);
255  h_ele_charge = new TH1F( "h_ele_charge","ele charge",5,-2.,2.);
256 
257  h_ele_charge->GetXaxis()-> SetTitle("charge");
258  h_ele_charge->GetYaxis()-> SetTitle("Events");
259 
260  h_ele_vertexPt->GetXaxis()-> SetTitle("p_{T vertex} (GeV/c)");
261  h_ele_vertexPt->GetYaxis()-> SetTitle("Events");
262 
263  h_ele_Et->GetXaxis()-> SetTitle("E_{T} (GeV)");
264  h_ele_Et->GetYaxis()-> SetTitle("Events");
265 
266  h_ele_vertexEta->GetXaxis()-> SetTitle("#eta");
267  h_ele_vertexEta->GetYaxis()-> SetTitle("Events");
268  h_ele_vertexPhi->GetXaxis()-> SetTitle("#phi (rad)");
269  h_ele_vertexPhi->GetYaxis()-> SetTitle("Events");
270 
271  h_ele_vertexX-> GetXaxis()-> SetTitle("x (cm)");
272  h_ele_vertexX-> GetYaxis()-> SetTitle("Events");
273  h_ele_vertexY-> GetXaxis()-> SetTitle("y (cm)");
274  h_ele_vertexY-> GetYaxis()-> SetTitle("Events");
275  h_ele_vertexZ-> GetXaxis()-> SetTitle("z (cm)");
276  h_ele_vertexZ-> GetYaxis()-> SetTitle("Events");
277 
278  h_ele_vertexTIP-> GetXaxis()-> SetTitle("TIP (cm)");
279  h_ele_vertexTIP-> GetYaxis()-> SetTitle("Events");
280 
281  //==================================================
282  // # rec electrons
283  //==================================================
284 
285  histNum_= new TH1F("h_recEleNum","# rec electrons",20, 0.,20.);
286 
287  histNum_-> GetXaxis()-> SetTitle("N_{ele}");
288  histNum_-> GetYaxis()-> SetTitle("Events");
289 
290  //==================================================
291  // SuperClusters
292  //==================================================
293 
294  histSclEn_ = new TH1F("h_scl_energy","ele supercluster energy",nbinp,0.,pmax);
295  histSclEt_ = new TH1F("h_scl_et","ele supercluster transverse energy",nbinpt,0.,ptmax);
296  histSclEta_ = new TH1F("h_scl_eta","ele supercluster eta",nbineta,etamin,etamax);
297  histSclPhi_ = new TH1F("h_scl_phi","ele supercluster phi",nbinphi,phimin,phimax);
298  histSclSigEtaEta_ = new TH1F("h_scl_sigetaeta","ele supercluster sigma eta eta",100,0.,0.05);
299 
300  //==================================================
301  // electron track
302  //==================================================
303 
304  h_ele_ambiguousTracks = new TH1F( "h_ele_ambiguousTracks", "ele # ambiguous tracks", 5,0.,5.);
305  h_ele_ambiguousTracksVsEta = new TH2F( "h_ele_ambiguousTracksVsEta","ele # ambiguous tracks vs eta", nbineta2D,etamin,etamax,5,0.,5.);
306  h_ele_ambiguousTracksVsPhi = new TH2F( "h_ele_ambiguousTracksVsPhi", "ele # ambiguous tracks vs phi", nbinphi2D,phimin,phimax,5,0.,5.);
307  h_ele_ambiguousTracksVsPt = new TH2F( "h_ele_ambiguousTracksVsPt", "ele # ambiguous tracks vs pt", nbinpt2D,0.,ptmax,5,0.,5.);
308  h_ele_foundHits = new TH1F( "h_ele_foundHits", "ele track # found hits", nbinfhits,0.,fhitsmax);
309  h_ele_foundHitsVsEta = new TH2F( "h_ele_foundHitsVsEta", "ele track # found hits vs eta", nbineta2D,etamin,etamax,nbinfhits,0.,fhitsmax);
310  h_ele_foundHitsVsPhi = new TH2F( "h_ele_foundHitsVsPhi", "ele track # found hits vs phi", nbinphi2D,phimin,phimax,nbinfhits,0.,fhitsmax);
311  h_ele_foundHitsVsPt = new TH2F( "h_ele_foundHitsVsPt", "ele track # found hits vs pt", nbinpt2D,0.,ptmax,nbinfhits,0.,fhitsmax);
312  h_ele_lostHits = new TH1F( "h_ele_lostHits", "ele track # lost hits", 5,0.,5.);
313  h_ele_lostHitsVsEta = new TH2F( "h_ele_lostHitsVsEta", "ele track # lost hits vs eta", nbineta2D,etamin,etamax,nbinlhits,0.,lhitsmax);
314  h_ele_lostHitsVsPhi = new TH2F( "h_ele_lostHitsVsPhi", "ele track # lost hits vs eta", nbinphi2D,phimin,phimax,nbinlhits,0.,lhitsmax);
315  h_ele_lostHitsVsPt = new TH2F( "h_ele_lostHitsVsPt", "ele track # lost hits vs eta", nbinpt2D,0.,ptmax,nbinlhits,0.,lhitsmax);
316  h_ele_chi2 = new TH1F( "h_ele_chi2", "ele track #chi^{2}", 100,0.,15.);
317  h_ele_chi2VsEta = new TH2F( "h_ele_chi2VsEta", "ele track #chi^{2} vs eta", nbineta2D,etamin,etamax,50,0.,15.);
318  h_ele_chi2VsPhi = new TH2F( "h_ele_chi2VsPhi", "ele track #chi^{2} vs phi", nbinphi2D,phimin,phimax,50,0.,15.);
319  h_ele_chi2VsPt = new TH2F( "h_ele_chi2VsPt", "ele track #chi^{2} vs pt", nbinpt2D,0.,ptmax,50,0.,15.);
320 
321  h_ele_foundHits->GetXaxis()-> SetTitle("N_{hits}");
322  h_ele_foundHits->GetYaxis()-> SetTitle("Events");
323  h_ele_lostHits->GetXaxis()-> SetTitle("N_{lost hits}");
324  h_ele_lostHits->GetYaxis()-> SetTitle("Events");
325  h_ele_chi2->GetXaxis()-> SetTitle("#Chi^{2}");
326  h_ele_chi2->GetYaxis()-> SetTitle("Events");
327 
328  //==================================================
329  // electron matching and ID
330  //==================================================
331 
332  h_ele_EoP = new TH1F( "h_ele_EoP", "ele E/P_{vertex}", nbineop,0.,eopmax);
333 // h_ele_EoPout = new TH1F( "h_ele_EoPout", "ele E/P_{out}", nbineop,0.,eopmax);
334  h_ele_EeleOPout = new TH1F( "h_ele_EeleOPout", "ele E_{ele}/P_{out}", nbineop,0.,eopmax);
335  h_ele_dEtaSc_propVtx = new TH1F( "h_ele_dEtaSc_propVtx", "ele #eta_{sc} - #eta_{tr}, prop from vertex", nbindetamatch,detamatchmin,detamatchmax);
336  h_ele_dPhiSc_propVtx = new TH1F( "h_ele_dPhiSc_propVtx", "ele #phi_{sc} - #phi_{tr}, prop from vertex", nbindphimatch,dphimatchmin,dphimatchmax);
337  h_ele_dEtaCl_propOut = new TH1F( "h_ele_dEtaCl_propOut", "ele #eta_{cl} - #eta_{tr}, prop from outermost", nbindetamatch,detamatchmin,detamatchmax);
338  h_ele_dPhiCl_propOut = new TH1F( "h_ele_dPhiCl_propOut", "ele #phi_{cl} - #phi_{tr}, prop from outermost", nbindphimatch,dphimatchmin,dphimatchmax);
339  h_ele_dEtaEleCl_propOut = new TH1F( "h_ele_dEtaEleCl_propOut", "ele #eta_{EleCl} - #eta_{tr}, prop from outermost", nbindetamatch,detamatchmin,detamatchmax);
340  h_ele_dPhiEleCl_propOut = new TH1F( "h_ele_dPhiEleCl_propOut", "ele #phi_{EleCl} - #phi_{tr}, prop from outermost", nbindphimatch,dphimatchmin,dphimatchmax);
341  h_ele_HoE = new TH1F("h_ele_HoE", "ele hadronic energy / em energy", nbinhoe, hoemin, hoemax) ;
342  h_ele_outerP = new TH1F( "h_ele_outerP", "ele track outer p, mean", nbinp,0.,pmax);
343  h_ele_outerP_mode = new TH1F( "h_ele_outerP_mode", "ele track outer p, mode", nbinp,0.,pmax);
344  h_ele_outerPt = new TH1F( "h_ele_outerPt", "ele track outer p_{T}, mean", nbinpt,0.,ptmax);
345  h_ele_outerPt_mode = new TH1F( "h_ele_outerPt_mode", "ele track outer p_{T}, mode", nbinpt,0.,ptmax);
346 
347  h_ele_PinMnPout = new TH1F( "h_ele_PinMnPout", "ele track inner p - outer p, mean" ,nbinp,0.,200.);
348  h_ele_PinMnPout_mode = new TH1F( "h_ele_PinMnPout_mode", "ele track inner p - outer p, mode" ,nbinp,0.,100.);
349 
350  h_ele_mva = new TH1F( "h_ele_mva","ele identification mva",100,-1.,1.);
351  h_ele_provenance = new TH1F( "h_ele_provenance","ele provenance",5,-2.,3.);
352 
353  h_ele_PinMnPout->GetXaxis()-> SetTitle("P_{vertex} - P_{out} (GeV/c)");
354  h_ele_PinMnPout->GetYaxis()-> SetTitle("Events");
355  h_ele_PinMnPout_mode->GetXaxis()-> SetTitle("P_{vertex} - P_{out}, mode (GeV/c)");
356  h_ele_PinMnPout_mode->GetYaxis()-> SetTitle("Events");
357 
358  h_ele_outerP->GetXaxis()-> SetTitle("P_{out} (GeV/c)");
359  h_ele_outerP->GetYaxis()-> SetTitle("Events");
360  h_ele_outerP_mode->GetXaxis()-> SetTitle("P_{out} (GeV/c)");
361  h_ele_outerP_mode->GetYaxis()-> SetTitle("Events");
362 
363  h_ele_outerPt->GetXaxis()-> SetTitle("P_{T out} (GeV/c)");
364  h_ele_outerPt->GetYaxis()-> SetTitle("Events");
365  h_ele_outerPt_mode->GetXaxis()-> SetTitle("P_{T out} (GeV/c)");
366  h_ele_outerPt_mode->GetYaxis()-> SetTitle("Events");
367 
368  h_ele_EoP->GetXaxis()-> SetTitle("E/P_{vertex}");
369  h_ele_EoP->GetYaxis()-> SetTitle("Events");
370 
371 // h_ele_EoPout->GetXaxis()-> SetTitle("E_{seed}/P_{out}");
372 // h_ele_EoPout->GetYaxis()-> SetTitle("Events");
373  h_ele_EeleOPout->GetXaxis()-> SetTitle("E_{ele}/P_{out}");
374  h_ele_EeleOPout->GetYaxis()-> SetTitle("Events");
375 
376  h_ele_dEtaSc_propVtx-> GetXaxis()-> SetTitle("#eta_{sc} - #eta_{tr}");
377  h_ele_dEtaSc_propVtx-> GetYaxis()-> SetTitle("Events");
378  h_ele_dEtaCl_propOut-> GetXaxis()-> SetTitle("#eta_{seedcl} - #eta_{tr}");
379  h_ele_dEtaCl_propOut-> GetYaxis()-> SetTitle("Events");
380  h_ele_dEtaEleCl_propOut-> GetXaxis()-> SetTitle("#eta_{elecl} - #eta_{tr}");
381  h_ele_dEtaEleCl_propOut-> GetYaxis()-> SetTitle("Events");
382  h_ele_dPhiSc_propVtx-> GetXaxis()-> SetTitle("#phi_{sc} - #phi_{tr} (rad)");
383  h_ele_dPhiSc_propVtx-> GetYaxis()-> SetTitle("Events");
384  h_ele_dPhiCl_propOut-> GetXaxis()-> SetTitle("#phi_{seedcl} - #phi_{tr} (rad)");
385  h_ele_dPhiCl_propOut-> GetYaxis()-> SetTitle("Events");
386  h_ele_dPhiEleCl_propOut-> GetXaxis()-> SetTitle("#phi_{elecl} - #phi_{tr} (rad)");
387  h_ele_dPhiEleCl_propOut-> GetYaxis()-> SetTitle("Events");
388  h_ele_HoE-> GetXaxis()-> SetTitle("H/E") ;
389  h_ele_HoE-> GetYaxis()-> SetTitle("Events") ;
390 
391  //==================================================
392  // isolation
393  //==================================================
394 
395  h_ele_tkSumPt_dr03 = new TH1F("h_ele_tkSumPt_dr03","tk isolation sum, dR=0.3",100,0.0,20.);
396  h_ele_ecalRecHitSumEt_dr03= new TH1F("h_ele_ecalRecHitSumEt_dr03","ecal isolation sum, dR=0.3",100,0.0,20.);
397  h_ele_hcalDepth1TowerSumEt_dr03= new TH1F("h_ele_hcalDepth1TowerSumEt_dr03","hcal depth1 isolation sum, dR=0.3",100,0.0,20.);
398  h_ele_hcalDepth2TowerSumEt_dr03= new TH1F("h_ele_hcalDepth2TowerSumEt_dr03","hcal depth2 isolation sum, dR=0.3",100,0.0,20.);
399  h_ele_tkSumPt_dr04= new TH1F("h_ele_tkSumPt_dr04","hcal isolation sum",100,0.0,20.);
400  h_ele_ecalRecHitSumEt_dr04= new TH1F("h_ele_ecalRecHitSumEt_dr04","ecal isolation sum, dR=0.4",100,0.0,20.);
401  h_ele_hcalDepth1TowerSumEt_dr04= new TH1F("h_ele_hcalDepth1TowerSumEt_dr04","hcal depth1 isolation sum, dR=0.4",100,0.0,20.);
402  h_ele_hcalDepth2TowerSumEt_dr04= new TH1F("h_ele_hcalDepth2TowerSumEt_dr04","hcal depth2 isolation sum, dR=0.4",100,0.0,20.);
403 
404  //==================================================
405  // T&P
406  //==================================================
407  h_ele_mee_os = new TH1F( "h_ele_mee_os", "ele pairs invariant mass, opposite sign", nbinmee, meemin, meemax );
408 
409 
410  //==================================================
411  // OBSOLETE
412  //==================================================
413 
414  // h_ele_PtoPtmatchingObject_matched = new TH1F( "h_ele_PtoPtmatchingObject_matched", "ele trans momentum / matching SC trans energy", nbinpoptrue,poptruemin,poptruemax);
415  // h_ele_PtoPtmatchingObject_barrel_matched = new TH1F( "h_ele_PtoPmatchingObject_barrel_matched", "ele trans momentum / matching SC trans energy, barrel",nbinpoptrue,poptruemin,poptruemax);
416  // h_ele_PtoPtmatchingObject_endcaps_matched = new TH1F( "h_ele_PtoPmatchingObject_endcaps_matched", "ele trans momentum / matching SC trans energy, endcaps",nbinpoptrue,poptruemin,poptruemax);
417  // h_ele_PoPmatchingObject_matched = new TH1F( "h_ele_PoPmatchingObject_matched", "ele momentum / matching SC energy", nbinpoptrue,poptruemin,poptruemax);
418  // h_ele_PoPmatchingObject_barrel_matched = new TH1F( "h_ele_PoPmatchingObject_barrel_matched", "ele momentum / matching SC energy, barrel",nbinpoptrue,poptruemin,poptruemax);
419  // h_ele_PoPmatchingObject_endcaps_matched = new TH1F( "h_ele_PoPmatchingObject_endcaps_matched", "ele momentum / matching SC energy, endcaps",nbinpoptrue,poptruemin,poptruemax);
420  // // h_ele_PtoPtmatchingObject_matched = new TH1F( "h_ele_PtoPtmatchingObject_matched", "ele trans momentum / matching SC trans energy", nbinpoptrue,poptruemin,poptruemax);
421  // h_ele_EtaMnEtamatchingObject_matched = new TH1F( "h_ele_EtaMnEtamatchingObject_matched", "ele momentum eta - matching SC eta",nbindeta,detamin,detamax);
422  // h_ele_PhiMnPhimatchingObject_matched = new TH1F( "h_ele_PhiMnPhimatchingObject_matched", "ele momentum phi - matching SC phi",nbindphi,dphimin,dphimax);
423  // h_ele_PhiMnPhimatchingObject2_matched = new TH1F( "h_ele_PhiMnPhimatchingObject2_matched", "ele momentum phi - matching SC phi",nbindphimatch2D,dphimatchmin,dphimatchmax);
424 
425  // h_ele_PoPmatchingObject_matched->GetXaxis()-> SetTitle("P/E_{SC}");
426  // h_ele_PoPmatchingObject_matched->GetYaxis()-> SetTitle("Events");
427  // h_ele_PoPmatchingObject_barrel_matched->GetXaxis()-> SetTitle("P/E_{SC}");
428  // h_ele_PoPmatchingObject_barrel_matched->GetYaxis()-> SetTitle("Events");
429  // h_ele_PoPmatchingObject_endcaps_matched->GetXaxis()-> SetTitle("P/E_{SC}");
430  // h_ele_PoPmatchingObject_endcaps_matched->GetYaxis()-> SetTitle("Events");
431  // h_ele_PtoPtmatchingObject_matched->GetXaxis()-> SetTitle("P_{T}/E_{T}^{SC}");
432  // h_ele_PtoPtmatchingObject_matched->GetYaxis()-> SetTitle("Events");
433  // h_ele_PtoPtmatchingObject_barrel_matched->GetXaxis()-> SetTitle("P_{T}/E_{T}^{SC}");
434  // h_ele_PtoPtmatchingObject_barrel_matched->GetYaxis()-> SetTitle("Events");
435  // h_ele_PtoPtmatchingObject_endcaps_matched->GetXaxis()-> SetTitle("P_{T}/E_{T}^{SC}");
436  // h_ele_PtoPtmatchingObject_endcaps_matched->GetYaxis()-> SetTitle("Events");
437  //
438  // h_ele_EtaMnEtamatchingObject_matched->GetXaxis()-> SetTitle("#eta_{rec} - #eta_{SC}");
439  // h_ele_EtaMnEtamatchingObject_matched->GetYaxis()-> SetTitle("Events");
440  // h_ele_PhiMnPhimatchingObject_matched->GetXaxis()-> SetTitle("#phi_{rec} - #phi_{SC} (rad)");
441  // h_ele_PhiMnPhimatchingObject_matched->GetYaxis()-> SetTitle("Events");
442  // h_ele_EtaMnEtamatchingObject_matched->GetXaxis()-> SetTitle("#eta_{rec} - #eta_{SC}");
443  // h_ele_EtaMnEtamatchingObject_matched->GetYaxis()-> SetTitle("Events");
444  // h_ele_PhiMnPhimatchingObject_matched->GetXaxis()-> SetTitle("#phi_{rec} - #phi_{SC} (rad)");
445  // h_ele_PhiMnPhimatchingObject_matched->GetYaxis()-> SetTitle("Events");
446  }
447 
448 
449 void
451 
452  histfile_->cd();
453  std::cout << "efficiency calculation " << std::endl;
454 
455  // efficiency vs pt
456  TH1F *h_ele_ptEff = (TH1F*)h_ele_matchingObjectPt_matched->Clone("h_ele_ptEff");
457  h_ele_ptEff->Reset();
458  h_ele_ptEff->Divide(h_ele_matchingObjectPt_matched,h_matchingObjectPt,1,1,"b");
459  h_ele_ptEff->GetXaxis()->SetTitle("p_{T} (GeV/c)");
460  h_ele_ptEff->GetYaxis()->SetTitle("Efficiency");
461 
462  // efficiency vs eta
463  TH1F *h_ele_etaEff = (TH1F*)h_ele_matchingObjectEta_matched->Clone("h_ele_etaEff");
464  h_ele_etaEff->Reset();
465  h_ele_etaEff->Divide(h_ele_matchingObjectEta_matched,h_matchingObjectEta,1,1,"b");
466  h_ele_etaEff->Print();
467  h_ele_etaEff->GetXaxis()->SetTitle("#eta");
468  h_ele_etaEff->GetYaxis()->SetTitle("Efficiency");
469 
470  // efficiency vs |eta|
471  TH1F *h_ele_absetaEff = (TH1F*)h_ele_matchingObjectAbsEta_matched->Clone("h_ele_absetaEff");
472  h_ele_absetaEff->Reset();
473  h_ele_absetaEff->Divide(h_ele_matchingObjectAbsEta_matched,h_matchingObjectAbsEta,1,1,"b");
474  h_ele_absetaEff->GetXaxis()->SetTitle("|#eta|");
475  h_ele_absetaEff->GetYaxis()->SetTitle("Efficiency");
476 
477  // efficiency vs phi
478  TH1F *h_ele_phiEff = (TH1F*)h_ele_matchingObjectPhi_matched->Clone("h_ele_phiEff");
479  h_ele_phiEff->Reset();
480  h_ele_phiEff->Divide(h_ele_matchingObjectPhi_matched,h_matchingObjectPhi,1,1,"b");
481  h_ele_phiEff->GetXaxis()->SetTitle("#phi (rad)");
482  h_ele_phiEff->GetYaxis()->SetTitle("Efficiency");
483 
484  // efficiency vs z
485  TH1F *h_ele_zEff = (TH1F*)h_ele_matchingObjectZ_matched->Clone("h_ele_zEff");
486  h_ele_zEff->Reset();
487  h_ele_zEff->Divide(h_ele_matchingObjectZ_matched,h_matchingObjectZ,1,1,"b");
488  h_ele_zEff->Print();
489  h_ele_zEff->GetXaxis()->SetTitle("z (cm)");
490  h_ele_zEff->GetYaxis()->SetTitle("Efficiency");
491 
492 
493 
494  // classes
495 
496 
497  // fbrem
498 
499  //profiles from 2D histos
500 
501  // mc truth
502 
503  h_matchingObjectNum->Write();
504 
505  // rec event
506 
507  histNum_->Write();
508 
509  // mc
510  h_matchingObjectEta->Write();
511  h_matchingObjectAbsEta->Write();
512  h_matchingObjectP->Write();
513  h_matchingObjectPt->Write();
514  h_matchingObjectPhi->Write();
515  h_matchingObjectZ->Write();
516 
517 
518 
519  // matched electrons
520  h_ele_charge->Write();
521 
522  //h_ele_vertexP->Write();
523  h_ele_vertexPt->Write();
524  h_ele_vertexEta->Write();
525  h_ele_vertexPhi->Write();
526  h_ele_vertexX->Write();
527  h_ele_vertexY ->Write();
528  h_ele_vertexZ->Write();
529 
530  h_ele_vertexTIP->Write();
531 
532  h_ele_Et->Write();
533 
539 
540 // h_ele_PoPmatchingObject_matched->Write();
541 // h_ele_PtoPtmatchingObject_matched->Write();
542 // h_ele_PoPmatchingObject_barrel_matched ->Write();
543 // h_ele_PoPmatchingObject_endcaps_matched->Write();
544 // h_ele_PtoPtmatchingObject_barrel_matched ->Write();
545 // h_ele_PtoPtmatchingObject_endcaps_matched->Write();
546 // h_ele_EtaMnEtamatchingObject_matched->Write();
547 // h_ele_PhiMnPhimatchingObject_matched ->Write();
548 // h_ele_PhiMnPhimatchingObject2_matched ->Write();
549 
550 
551  // matched electron, superclusters
552  histSclEn_->Write();
553  histSclEt_->Write();
554  histSclEta_->Write();
555  histSclPhi_->Write();
556  histSclSigEtaEta_->Write();
557 
558  // matched electron, gsf tracks
559  h_ele_ambiguousTracks->Write();
562  h_ele_ambiguousTracksVsPt->Write();
563 
564  h_ele_foundHits->Write();
565  h_ele_foundHitsVsEta->Write();
566  h_ele_foundHitsVsPhi->Write();
567  h_ele_foundHitsVsPt->Write();
568 
569  h_ele_lostHits->Write();
570  h_ele_lostHitsVsEta->Write();
571  h_ele_lostHitsVsPhi->Write();
572  h_ele_lostHitsVsPt->Write();
573 
574  h_ele_chi2 ->Write();
575  h_ele_chi2VsEta ->Write();
576  h_ele_chi2VsPhi ->Write();
577  h_ele_chi2VsPt->Write();
578 
579  h_ele_PinMnPout->Write();
580  h_ele_PinMnPout_mode->Write();
581  h_ele_outerP ->Write();
582  h_ele_outerP_mode->Write();
583  h_ele_outerPt->Write();
584  h_ele_outerPt_mode ->Write();
585 
586  // matched electrons, matching
587  h_ele_EoP ->Write();
588 // h_ele_EoPout->Write();
589  h_ele_EeleOPout->Write();
590  h_ele_dEtaSc_propVtx->Write();
591  h_ele_dPhiSc_propVtx->Write();
592  h_ele_dEtaCl_propOut->Write();
593  h_ele_dPhiCl_propOut->Write();
594  h_ele_dEtaEleCl_propOut->Write();
595  h_ele_dPhiEleCl_propOut->Write();
596  h_ele_HoE->Write();
597 
598 
599 
600  h_ele_mee_os-> GetXaxis()-> SetTitle("m_{e^{+}e^{-}} (GeV/c^{2})");
601  h_ele_mee_os-> GetYaxis()-> SetTitle("Events");
602  h_ele_mee_os->Write();
603 
604  // classes
605 
606  // fbrem
607 
608  // Eff
609  h_ele_etaEff->Write();
610  h_ele_zEff->Write();
611  h_ele_phiEff->Write();
612  h_ele_absetaEff->Write();
613  h_ele_ptEff->Write();
614 
615 
616  // e/g et pflow electrons
617  h_ele_mva->Write();
618  h_ele_provenance->Write();
619 
620  // isolation
621  h_ele_tkSumPt_dr03->GetXaxis()->SetTitle("TkIsoSum, cone 0.3 (GeV/c)");
622  h_ele_tkSumPt_dr03->GetYaxis()->SetTitle("Events");
623  h_ele_ecalRecHitSumEt_dr03->GetXaxis()->SetTitle("EcalIsoSum, cone 0.3 (GeV)");
624  h_ele_ecalRecHitSumEt_dr03->GetYaxis()->SetTitle("Events");
625  h_ele_hcalDepth1TowerSumEt_dr03->GetXaxis()->SetTitle("Hcal1IsoSum, cone 0.3 (GeV)");
626  h_ele_hcalDepth1TowerSumEt_dr03->GetYaxis()->SetTitle("Events");
627  h_ele_hcalDepth2TowerSumEt_dr03->GetXaxis()->SetTitle("Hcal2IsoSum, cone 0.3 (GeV)");
628  h_ele_hcalDepth2TowerSumEt_dr03->GetYaxis()->SetTitle("Events");
629  h_ele_tkSumPt_dr04->GetXaxis()->SetTitle("TkIsoSum, cone 0.4 (GeV/c)");
630  h_ele_tkSumPt_dr04->GetYaxis()->SetTitle("Events");
631  h_ele_ecalRecHitSumEt_dr04->GetXaxis()->SetTitle("EcalIsoSum, cone 0.4 (GeV)");
632  h_ele_ecalRecHitSumEt_dr04->GetYaxis()->SetTitle("Events");
633  h_ele_hcalDepth1TowerSumEt_dr04->GetXaxis()->SetTitle("Hcal1IsoSum, cone 0.4 (GeV)");
634  h_ele_hcalDepth1TowerSumEt_dr04->GetYaxis()->SetTitle("Events");
635  h_ele_hcalDepth2TowerSumEt_dr04->GetXaxis()->SetTitle("Hcal2IsoSum, cone 0.4 (GeV)");
636  h_ele_hcalDepth2TowerSumEt_dr04->GetYaxis()->SetTitle("Events");
637 
638  h_ele_tkSumPt_dr03->Write();
642  h_ele_tkSumPt_dr04->Write();
646 
647  }
648 
649 
650 void
652  {
653  edm::LogInfo("DQMAnalyzer::analyze")<<"Treating event "<<iEvent.id() ;
654  nEvents_++ ;
655  if (!trigger(iEvent)) return ;
656  nAfterTrigger_++ ;
657  edm::LogInfo("DQMAnalyzer::analyze")<<"Trigger OK" ;
659  iEvent.getByLabel(electronCollection_,gsfElectrons);
660  edm::LogInfo("DQMAnalyzer::analyze")<<"Event has "<<gsfElectrons.product()->size()<<" electrons" ;
662  iEvent.getByLabel(matchingObjectCollection_,recoClusters);
663  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
664  iEvent.getByLabel(beamSpot_, recoBeamSpotHandle);
665  const reco::BeamSpot bs = *recoBeamSpotHandle;
666  histNum_->Fill((*gsfElectrons).size());
667 
668  // selected rec electrons
669  reco::GsfElectronCollection::const_iterator gsfIter ;
670  for
671  ( gsfIter=gsfElectrons->begin() ;
672  gsfIter!=gsfElectrons->end();
673  gsfIter++ )
674  {
675  // vertex TIP
676  double vertexTIP =
677  (gsfIter->vertex().x()-bs.position().x()) * (gsfIter->vertex().x()-bs.position().x()) +
678  (gsfIter->vertex().y()-bs.position().y()) * (gsfIter->vertex().y()-bs.position().y()) ;
679  vertexTIP = sqrt(vertexTIP) ;
680 
681  // select electrons
682  if (!selected(gsfIter,vertexTIP)) continue ;
683 
684  // electron related distributions
685  h_ele_charge->Fill( gsfIter->charge() );
686  //h_ele_vertexP->Fill( gsfIter->p() );
687  h_ele_vertexPt->Fill( gsfIter->pt() );
688  h_ele_Et->Fill( gsfIter->superCluster()->energy()/cosh( gsfIter->superCluster()->eta()) );
689  h_ele_vertexEta->Fill( gsfIter->eta() );
690  h_ele_vertexPhi->Fill( gsfIter->phi() );
691  h_ele_vertexX->Fill( gsfIter->vertex().x() );
692  h_ele_vertexY->Fill( gsfIter->vertex().y() );
693  h_ele_vertexZ->Fill( gsfIter->vertex().z() );
694  h_ele_vertexTIP->Fill( vertexTIP );
695 
696  // supercluster related distributions
697  reco::SuperClusterRef sclRef = gsfIter->superCluster() ;
698  // ALREADY DONE IN GSF ELECTRON CORE
699  // if (!gsfIter->ecalDrivenSeed()&&gsfIter->trackerDrivenSeed())
700  // sclRef = gsfIter->pflowSuperCluster() ;
701  histSclEn_->Fill(sclRef->energy());
702  double R=TMath::Sqrt(sclRef->x()*sclRef->x() + sclRef->y()*sclRef->y() +sclRef->z()*sclRef->z());
703  double Rt=TMath::Sqrt(sclRef->x()*sclRef->x() + sclRef->y()*sclRef->y());
704  histSclEt_->Fill(sclRef->energy()*(Rt/R));
705  histSclEta_->Fill(sclRef->eta());
706  histSclPhi_->Fill(sclRef->phi());
707  histSclSigEtaEta_->Fill(gsfIter->scSigmaEtaEta());
708 
709  // track related distributions
710  h_ele_ambiguousTracks->Fill( gsfIter->ambiguousGsfTracksSize() );
711  h_ele_ambiguousTracksVsEta->Fill( gsfIter->eta(), gsfIter->ambiguousGsfTracksSize() );
712  h_ele_ambiguousTracksVsPhi->Fill( gsfIter->phi(), gsfIter->ambiguousGsfTracksSize() );
713  h_ele_ambiguousTracksVsPt->Fill( gsfIter->pt(), gsfIter->ambiguousGsfTracksSize() );
714  if (!readAOD_)
715  { // track extra does not exist in AOD
716  h_ele_foundHits->Fill( gsfIter->gsfTrack()->numberOfValidHits() );
717  h_ele_foundHitsVsEta->Fill( gsfIter->eta(), gsfIter->gsfTrack()->numberOfValidHits() );
718  h_ele_foundHitsVsPhi->Fill( gsfIter->phi(), gsfIter->gsfTrack()->numberOfValidHits() );
719  h_ele_foundHitsVsPt->Fill( gsfIter->pt(), gsfIter->gsfTrack()->numberOfValidHits() );
720  h_ele_lostHits->Fill( gsfIter->gsfTrack()->numberOfLostHits() );
721  h_ele_lostHitsVsEta->Fill( gsfIter->eta(), gsfIter->gsfTrack()->numberOfLostHits() );
722  h_ele_lostHitsVsPhi->Fill( gsfIter->phi(), gsfIter->gsfTrack()->numberOfLostHits() );
723  h_ele_lostHitsVsPt->Fill( gsfIter->pt(), gsfIter->gsfTrack()->numberOfLostHits() );
724  h_ele_chi2->Fill( gsfIter->gsfTrack()->normalizedChi2() );
725  h_ele_chi2VsEta->Fill( gsfIter->eta(), gsfIter->gsfTrack()->normalizedChi2() );
726  h_ele_chi2VsPhi->Fill( gsfIter->phi(), gsfIter->gsfTrack()->normalizedChi2() );
727  h_ele_chi2VsPt->Fill( gsfIter->pt(), gsfIter->gsfTrack()->normalizedChi2() );
728  }
729 
730  // from gsf track interface, hence using mean
731  if (!readAOD_)
732  { // track extra does not exist in AOD
733  h_ele_PinMnPout->Fill( gsfIter->gsfTrack()->innerMomentum().R() - gsfIter->gsfTrack()->outerMomentum().R() );
734  h_ele_outerP->Fill( gsfIter->gsfTrack()->outerMomentum().R() );
735  h_ele_outerPt->Fill( gsfIter->gsfTrack()->outerMomentum().Rho() );
736  }
737 
738  // from electron interface, hence using mode
739  h_ele_PinMnPout_mode->Fill( gsfIter->trackMomentumAtVtx().R() - gsfIter->trackMomentumOut().R() );
740  h_ele_outerP_mode->Fill( gsfIter->trackMomentumOut().R() );
741  h_ele_outerPt_mode->Fill( gsfIter->trackMomentumOut().Rho() );
742 
743  /*
744  if (!readAOD_) { // track extra does not exist in AOD
745  edm::RefToBase<TrajectorySeed> seed = gsfIter->gsfTrack()->extra()->seedRef();
746  ElectronSeedRef elseed=seed.castTo<ElectronSeedRef>();
747  h_ele_seed_dphi2_-> Fill(elseed->dPhi2());
748  h_ele_seed_dphi2VsEta_-> Fill(gsfIter->eta(), elseed->dPhi2());
749  h_ele_seed_dphi2VsPt_-> Fill(gsfIter->pt(), elseed->dPhi2()) ;
750  h_ele_seed_drz2_-> Fill(elseed->dRz2());
751  h_ele_seed_drz2VsEta_-> Fill(gsfIter->eta(), elseed->dRz2());
752  h_ele_seed_drz2VsPt_-> Fill(gsfIter->pt(), elseed->dRz2());
753  h_ele_seed_subdet2_-> Fill(elseed->subDet2());
754  }
755  */
756 
757  // match distributions
758  h_ele_EoP->Fill( gsfIter->eSuperClusterOverP() );
759  h_ele_EeleOPout->Fill( gsfIter->eEleClusterOverPout() );
760  h_ele_dEtaSc_propVtx->Fill(gsfIter->deltaEtaSuperClusterTrackAtVtx());
761  h_ele_dPhiSc_propVtx->Fill(gsfIter->deltaPhiSuperClusterTrackAtVtx());
762  h_ele_dEtaCl_propOut->Fill(gsfIter->deltaEtaSeedClusterTrackAtCalo());
763  h_ele_dPhiCl_propOut->Fill(gsfIter->deltaPhiSeedClusterTrackAtCalo());
764  h_ele_dEtaEleCl_propOut->Fill(gsfIter->deltaEtaEleClusterTrackAtCalo());
765  h_ele_dPhiEleCl_propOut->Fill(gsfIter->deltaPhiEleClusterTrackAtCalo());
766  h_ele_HoE->Fill(gsfIter->hadronicOverEm());
767 
768  //classes
769 
770  //fbrem
771 
772  h_ele_mva->Fill(gsfIter->mva()) ;
773  if (gsfIter->ecalDrivenSeed()) h_ele_provenance->Fill(1.) ;
774  if (gsfIter->trackerDrivenSeed()) h_ele_provenance->Fill(-1.) ;
775  if (gsfIter->trackerDrivenSeed()||gsfIter->ecalDrivenSeed()) h_ele_provenance->Fill(0.);
776  if (gsfIter->trackerDrivenSeed()&&!gsfIter->ecalDrivenSeed()) h_ele_provenance->Fill(-2.);
777  if (!gsfIter->trackerDrivenSeed()&&gsfIter->ecalDrivenSeed()) h_ele_provenance->Fill(2.);
778 
779  h_ele_tkSumPt_dr03->Fill(gsfIter->dr03TkSumPt());
780  h_ele_ecalRecHitSumEt_dr03->Fill(gsfIter->dr03EcalRecHitSumEt());
781  h_ele_hcalDepth1TowerSumEt_dr03->Fill(gsfIter->dr03HcalDepth1TowerSumEt());
782  h_ele_hcalDepth2TowerSumEt_dr03->Fill(gsfIter->dr03HcalDepth2TowerSumEt());
783  h_ele_tkSumPt_dr04->Fill(gsfIter->dr04TkSumPt());
784  h_ele_ecalRecHitSumEt_dr04->Fill(gsfIter->dr04EcalRecHitSumEt());
785  h_ele_hcalDepth1TowerSumEt_dr04->Fill(gsfIter->dr04HcalDepth1TowerSumEt());
786  h_ele_hcalDepth2TowerSumEt_dr04->Fill(gsfIter->dr04HcalDepth2TowerSumEt());
787  }
788 
789  // association matching object-reco electrons
790  int matchingObjectNum=0 ;
791  reco::SuperClusterCollection::const_iterator moIter ;
792  for
793  ( moIter=recoClusters->begin() ;
794  moIter!=recoClusters->end() ;
795  moIter++ )
796  {
797  // number of matching objects
798  matchingObjectNum++;
799 
800  if
801  ( moIter->energy()/cosh(moIter->eta())>maxPtMatchingObject_ ||
802  fabs(moIter->eta())> maxAbsEtaMatchingObject_ )
803  { continue ; }
804 
805  // suppress the endcaps
806  //if (fabs(moIter->eta()) > 1.5) continue;
807  // select central z
808  //if ( fabs((*mcIter)->production_vertex()->position().z())>50.) continue;
809 
810  h_matchingObjectEta->Fill( moIter->eta() );
811  h_matchingObjectAbsEta->Fill( fabs(moIter->eta()) );
812  h_matchingObjectP->Fill( moIter->energy() );
813  h_matchingObjectPt->Fill( moIter->energy()/cosh(moIter->eta()) );
814  h_matchingObjectPhi->Fill( moIter->phi() );
815  h_matchingObjectZ->Fill( moIter->z() );
816 
817  // find best matched electron
818  bool okGsfFound = false;
819  double gsfOkRatio = 999999.;
820  reco::GsfElectron bestGsfElectron ;
821  reco::GsfElectronCollection::const_iterator gsfIter ;
822  for
823  ( gsfIter=gsfElectrons->begin() ;
824  gsfIter!=gsfElectrons->end() ;
825  gsfIter++ )
826  {
827  double vertexTIP =
828  (gsfIter->vertex().x()-bs.position().x()) * (gsfIter->vertex().x()-bs.position().x()) +
829  (gsfIter->vertex().y()-bs.position().y()) * (gsfIter->vertex().y()-bs.position().y()) ;
830  vertexTIP = sqrt(vertexTIP) ;
831 
832  // select electrons
833  if (!selected(gsfIter,vertexTIP)) continue ;
834 
835  if (Selection_ >= 4)
836  {
837  reco::GsfElectronCollection::const_iterator gsfIter2 ;
838  for
839  ( gsfIter2=gsfIter+1 ;
840  gsfIter2!=gsfElectrons->end() ;
841  gsfIter2++ )
842  {
843  math::XYZTLorentzVector p12 = (*gsfIter).p4()+(*gsfIter2).p4() ;
844  float mee2 = p12.Dot(p12) ;
845  bool opsign = (gsfIter->charge()*gsfIter2->charge()<0.) ;
846  float invMass = sqrt(mee2) ;
847 
848  if (TPchecksign_ && !opsign) break ;
849 
850  // conditions Tag
851  if(TAGcheckclass_ && (gsfIter->classification()==GsfElectron::SHOWERING || gsfIter->isGap())) break;
852 
853  // conditions Probe
854  if(PROBEetcut_ && (gsfIter2->superCluster()->energy()/cosh(gsfIter2->superCluster()->eta())<minEt_)) continue;
855  if(PROBEcheckclass_ && (gsfIter2->classification()==GsfElectron::SHOWERING || gsfIter2->isGap())) continue;
856 
857  if( invMass < massLow_ || invMass > massHigh_ ) continue ;
858 
859  h_ele_mee_os->Fill(invMass) ;
860  bestGsfElectron =* gsfIter2 ;
861  okGsfFound = true ;
862  }
863  }
864  else
865  {
866  reco::GsfElectronCollection::const_iterator gsfIter2 ;
867  for
868  ( gsfIter2=gsfIter+1;
869  gsfIter2!=gsfElectrons->end() ;
870  gsfIter2++ )
871  {
872  math::XYZTLorentzVector p12 = (*gsfIter).p4()+(*gsfIter2).p4() ;
873  float mee2 = p12.Dot(p12) ;
874  //bool opsign = (gsfIter->charge()*gsfIter2->charge()<0.) ;
875  float invMass = sqrt(mee2) ;
876  h_ele_mee_os->Fill(invMass) ;
877  }
878 
879  // matching with a cone in eta phi
880  if ( matchingCondition_ == "Cone" )
881  {
882  double dphi = gsfIter->phi()-moIter->phi() ;
883  if (fabs(dphi)>CLHEP::pi)
884  { dphi = dphi < 0? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi ; }
885  double deltaR = sqrt(std::pow((moIter->eta()-gsfIter->eta()),2) + std::pow(dphi,2)) ;
886  if ( deltaR < deltaR_ )
887  {
888  //if ( (genPc->pdg_id() == 11) && (gsfIter->charge() < 0.) || (genPc->pdg_id() == -11) &&
889  //(gsfIter->charge() > 0.) ){
890  double tmpGsfRatio = gsfIter->p()/moIter->energy();
891  if ( fabs(tmpGsfRatio-1) < fabs(gsfOkRatio-1) && Selection_ != 4 )
892  {
893  gsfOkRatio = tmpGsfRatio;
894  bestGsfElectron=*gsfIter;
895  okGsfFound = true;
896  }
897  //}
898  }
899  }
900  }
901  } // loop over rec ele to look for the best one
902 
903  // analysis when the matching object is matched by a rec electron
904  if (okGsfFound)
905  {
906  // generated distributions for matched electrons
907  h_ele_matchingObjectPt_matched->Fill( moIter->energy()/cosh(moIter->eta()) );
908  h_ele_matchingObjectPhi_matched->Fill( moIter->phi() );
909  h_ele_matchingObjectAbsEta_matched->Fill( fabs(moIter->eta()) );
910  h_ele_matchingObjectEta_matched->Fill( moIter->eta() );
911  h_ele_matchingObjectZ_matched->Fill( moIter->z() );
912 
913 // OBSOLETE
914  // // comparison electron vs matching object
915 // h_ele_EtaMnEtamatchingObject_matched->Fill( bestGsfElectron.eta()-moIter->eta());
916 //
917 // h_ele_PhiMnPhimatchingObject_matched->Fill( bestGsfElectron.phi()-moIter->phi());
918 // h_ele_PhiMnPhimatchingObject2_matched->Fill( bestGsfElectron.phi()-moIter->phi());
919 //
920 // h_ele_PoPmatchingObject_matched->Fill( bestGsfElectron.p()/moIter->energy());
921 // h_ele_PtoPtmatchingObject_matched->Fill( bestGsfElectron.pt()/moIter->energy()/cosh(moIter->eta()));
922 //
923 // if (bestGsfElectron.isEB()) h_ele_PoPmatchingObject_barrel_matched->Fill( bestGsfElectron.p()/moIter->energy());
924 // if (bestGsfElectron.isEE()) h_ele_PoPmatchingObject_endcaps_matched->Fill( bestGsfElectron.p()/moIter->energy());
925 // if (bestGsfElectron.isEB()) h_ele_PtoPtmatchingObject_barrel_matched->Fill( bestGsfElectron.pt()/moIter->energy()/cosh(moIter->eta()));
926 // if (bestGsfElectron.isEE()) h_ele_PtoPtmatchingObject_endcaps_matched->Fill( bestGsfElectron.pt()/moIter->energy()/cosh(moIter->eta()));
927 
928  reco::SuperClusterRef sclRef = bestGsfElectron.superCluster() ;
929 
930  // add here distributions for matched electrons as for all electrons
931  //..
932  } // gsf electron found
933 
934  } // loop overmatching object
935 
936  h_matchingObjectNum->Fill(matchingObjectNum) ;
937 
938  }
939 
941  {
942  // retreive TriggerResults from the event
944  e.getByLabel(triggerResults_,triggerResults) ;
945 
946  bool accept = false ;
947 
948  if (triggerResults.isValid())
949  {
950  //std::cout << "TriggerResults found, number of HLT paths: " << triggerResults->size() << std::endl;
951 
952  // get trigger names
953  const edm::TriggerNames & triggerNames = e.triggerNames(*triggerResults);
954  if (nEvents_==1)
955  {
956  for (unsigned int i=0; i<triggerNames.size(); i++)
957  {
958 // std::cout << "trigger path= " << triggerNames.triggerName(i) << std::endl;
959  }
960  }
961 
962  unsigned int n = HLTPathsByName_.size() ;
963  for (unsigned int i=0; i!=n; i++)
964  {
966  }
967 
968  // empty input vectors (n==0) means any trigger paths
969  if (n==0)
970  {
971  n=triggerResults->size() ;
972  HLTPathsByName_.resize(n) ;
973  HLTPathsByIndex_.resize(n) ;
974  for ( unsigned int i=0 ; i!=n ; i++)
975  {
976  HLTPathsByName_[i]=triggerNames.triggerName(i) ;
977  HLTPathsByIndex_[i]=i ;
978  }
979  }
980 
981 // if (nEvents_==1)
982 // {
983 // if (n>0)
984 // {
985 // std::cout << "HLT trigger paths requested: index, name and valididty:" << std::endl;
986 // for (unsigned int i=0; i!=n; i++)
987 // {
988 // bool validity = HLTPathsByIndex_[i]<triggerResults->size();
989 // std::cout
990 // << " " << HLTPathsByIndex_[i]
991 // << " " << HLTPathsByName_[i]
992 // << " " << validity << std::endl;
993 // }
994 // }
995 // }
996 
997  // count number of requested HLT paths which have fired
998  unsigned int fired=0 ;
999  for ( unsigned int i=0 ; i!=n ; i++ )
1000  {
1001  if (HLTPathsByIndex_[i]<triggerResults->size())
1002  {
1003  if (triggerResults->accept(HLTPathsByIndex_[i]))
1004  {
1005  fired++ ;
1006  //std::cout << "Fired HLT path= " << HLTPathsByName_[i] << std::endl ;
1007  accept = true ;
1008  }
1009  }
1010  }
1011 
1012  }
1013 
1014  return accept ;
1015  }
1016 
1017 bool DQMAnalyzer::selected( const reco::GsfElectronCollection::const_iterator & gsfIter , double vertexTIP )
1018  {
1019  if ((Selection_>0)&&generalCut(gsfIter)) return false ;
1020  if ((Selection_>=1)&&etCut(gsfIter)) return false ;
1021  if ((Selection_>=2)&&isolationCut(gsfIter,vertexTIP)) return false ;
1022  if ((Selection_>=3)&&idCut(gsfIter)) return false ;
1023  return true ;
1024  }
1025 
1026 bool DQMAnalyzer::generalCut( const reco::GsfElectronCollection::const_iterator & gsfIter)
1027  {
1028  if (fabs(gsfIter->eta())>maxAbsEta_) return true ;
1029  if (gsfIter->pt()<minPt_) return true ;
1030 
1031  if (gsfIter->isEB() && isEE_) return true ;
1032  if (gsfIter->isEE() && isEB_) return true ;
1033  if (gsfIter->isEBEEGap() && isNotEBEEGap_) return true ;
1034 
1035  if (gsfIter->ecalDrivenSeed() && isTrackerDriven_) return true ;
1036  if (gsfIter->trackerDrivenSeed() && isEcalDriven_) return true ;
1037 
1038  return false ;
1039  }
1040 
1041 bool DQMAnalyzer::etCut( const reco::GsfElectronCollection::const_iterator & gsfIter )
1042  {
1043  if (gsfIter->superCluster()->energy()/cosh(gsfIter->superCluster()->eta())<minEt_) return true ;
1044 
1045  return false ;
1046  }
1047 
1048 bool DQMAnalyzer::isolationCut( const reco::GsfElectronCollection::const_iterator & gsfIter, double vertexTIP )
1049  {
1050  if (gsfIter->isEB() && vertexTIP > tipMaxBarrel_) return true ;
1051  if (gsfIter->isEE() && vertexTIP > tipMaxEndcaps_) return true ;
1052 
1053  if (gsfIter->dr03TkSumPt() > tkIso03Max_) return true ;
1054  if (gsfIter->isEB() && gsfIter->dr03HcalDepth1TowerSumEt() > hcalIso03Depth1MaxBarrel_) return true ;
1055  if (gsfIter->isEE() && gsfIter->dr03HcalDepth1TowerSumEt() > hcalIso03Depth1MaxEndcaps_) return true ;
1056  if (gsfIter->isEE() && gsfIter->dr03HcalDepth2TowerSumEt() > hcalIso03Depth2MaxEndcaps_) return true ;
1057  if (gsfIter->isEB() && gsfIter->dr03EcalRecHitSumEt() > ecalIso03MaxBarrel_) return true ;
1058  if (gsfIter->isEE() && gsfIter->dr03EcalRecHitSumEt() > ecalIso03MaxEndcaps_) return true ;
1059 
1060  return false ;
1061  }
1062 
1063 bool DQMAnalyzer::idCut( const reco::GsfElectronCollection::const_iterator & gsfIter )
1064  {
1065  if (gsfIter->isEB() && gsfIter->eSuperClusterOverP() < eOverPMinBarrel_) return true ;
1066  if (gsfIter->isEB() && gsfIter->eSuperClusterOverP() > eOverPMaxBarrel_) return true ;
1067  if (gsfIter->isEE() && gsfIter->eSuperClusterOverP() < eOverPMinEndcaps_) return true ;
1068  if (gsfIter->isEE() && gsfIter->eSuperClusterOverP() > eOverPMaxEndcaps_) return true ;
1069  if (gsfIter->isEB() && fabs(gsfIter->deltaEtaSuperClusterTrackAtVtx()) < dEtaMinBarrel_) return true ;
1070  if (gsfIter->isEB() && fabs(gsfIter->deltaEtaSuperClusterTrackAtVtx()) > dEtaMaxBarrel_) return true ;
1071  if (gsfIter->isEE() && fabs(gsfIter->deltaEtaSuperClusterTrackAtVtx()) < dEtaMinEndcaps_) return true ;
1072  if (gsfIter->isEE() && fabs(gsfIter->deltaEtaSuperClusterTrackAtVtx()) > dEtaMaxEndcaps_) return true ;
1073  if (gsfIter->isEB() && fabs(gsfIter->deltaPhiSuperClusterTrackAtVtx()) < dPhiMinBarrel_) return true ;
1074  if (gsfIter->isEB() && fabs(gsfIter->deltaPhiSuperClusterTrackAtVtx()) > dPhiMaxBarrel_) return true ;
1075  if (gsfIter->isEE() && fabs(gsfIter->deltaPhiSuperClusterTrackAtVtx()) < dPhiMinEndcaps_) return true ;
1076  if (gsfIter->isEE() && fabs(gsfIter->deltaPhiSuperClusterTrackAtVtx()) > dPhiMaxEndcaps_) return true ;
1077  if (gsfIter->isEB() && gsfIter->scSigmaIEtaIEta() < sigIetaIetaMinBarrel_) return true ;
1078  if (gsfIter->isEB() && gsfIter->scSigmaIEtaIEta() > sigIetaIetaMaxBarrel_) return true ;
1079  if (gsfIter->isEE() && gsfIter->scSigmaIEtaIEta() < sigIetaIetaMinEndcaps_) return true ;
1080  if (gsfIter->isEE() && gsfIter->scSigmaIEtaIEta() > sigIetaIetaMaxEndcaps_) return true ;
1081  if (gsfIter->isEB() && gsfIter->hadronicOverEm() > hadronicOverEmMaxBarrel_) return true ;
1082  if (gsfIter->isEE() && gsfIter->hadronicOverEm() > hadronicOverEmMaxEndcaps_) return true ;
1083 
1084  return false ;
1085  }
1086 
bool isEcalDriven_
Definition: DQMAnalyzer.h:85
TH1F * histNum_
Definition: DQMAnalyzer.h:197
type
Definition: HCALResponse.h:21
double hcalIso03Depth2MaxEndcaps_
Definition: DQMAnalyzer.h:111
bool trigger(const edm::Event &e)
Definition: DQMAnalyzer.cc:940
double minEt_
Definition: DQMAnalyzer.h:79
double fhitsmax
Definition: DQMAnalyzer.h:129
T getParameter(std::string const &) const
TH1F * h_matchingObjectAbsEta
Definition: DQMAnalyzer.h:173
TFile * histfile_
Definition: DQMAnalyzer.h:158
double dEtaMinBarrel_
Definition: DQMAnalyzer.h:91
int i
Definition: DBlmapReader.cc:9
double lhitsmax
Definition: DQMAnalyzer.h:130
edm::InputTag beamSpot_
Definition: DQMAnalyzer.h:59
virtual ~DQMAnalyzer()
Definition: DQMAnalyzer.cc:178
double hoemin
Definition: DQMAnalyzer.h:134
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:207
double eOverPMinBarrel_
Definition: DQMAnalyzer.h:87
double etamin
Definition: DQMAnalyzer.h:120
double dEtaMaxEndcaps_
Definition: DQMAnalyzer.h:94
edm::InputTag matchingObjectCollection_
Definition: DQMAnalyzer.h:58
TH1F * h_ele_provenance
Definition: DQMAnalyzer.h:249
double ptmax
Definition: DQMAnalyzer.h:122
double sigIetaIetaMinEndcaps_
Definition: DQMAnalyzer.h:101
TH1F * h_ele_mva
Definition: DQMAnalyzer.h:248
double dPhiMinBarrel_
Definition: DQMAnalyzer.h:95
TH1F * h_matchingObjectEta
Definition: DQMAnalyzer.h:172
TH2F * h_ele_ambiguousTracksVsEta
Definition: DQMAnalyzer.h:206
double maxAbsEtaMatchingObject_
Definition: DQMAnalyzer.h:66
int nbindetamatch
Definition: DQMAnalyzer.h:127
TH1F * h_ele_Et
Definition: DQMAnalyzer.h:187
TH1F * h_ele_dEtaSc_propVtx
Definition: DQMAnalyzer.h:231
virtual void beginJob()
Definition: DQMAnalyzer.cc:188
TH1F * h_ele_ecalRecHitSumEt_dr04
Definition: DQMAnalyzer.h:256
TH2F * h_ele_chi2VsPhi
Definition: DQMAnalyzer.h:225
TH1F * h_ele_dEtaEleCl_propOut
Definition: DQMAnalyzer.h:235
TH1F * h_ele_dPhiSc_propVtx
Definition: DQMAnalyzer.h:232
double hcalIso03Depth1MaxBarrel_
Definition: DQMAnalyzer.h:109
TH1F * h_ele_ecalRecHitSumEt_dr03
Definition: DQMAnalyzer.h:252
TH1F * h_ele_vertexPhi
Definition: DQMAnalyzer.h:190
TH1F * h_ele_tkSumPt_dr03
Definition: DQMAnalyzer.h:251
double etamax
Definition: DQMAnalyzer.h:120
double poptruemin
Definition: DQMAnalyzer.h:132
bool generalCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
double dphimatchmax
Definition: DQMAnalyzer.h:128
double massHigh_
Definition: DQMAnalyzer.h:72
double deltaR_
Definition: DQMAnalyzer.h:67
TH1F * h_matchingObjectP
Definition: DQMAnalyzer.h:174
TH1F * h_ele_matchingObjectAbsEta_matched
Definition: DQMAnalyzer.h:180
TH1F * h_ele_outerPt_mode
Definition: DQMAnalyzer.h:243
double maxPtMatchingObject_
Definition: DQMAnalyzer.h:65
bool readAOD_
Definition: DQMAnalyzer.h:62
double phimin
Definition: DQMAnalyzer.h:121
double detamatchmax
Definition: DQMAnalyzer.h:127
Strings::size_type size() const
Definition: TriggerNames.cc:39
TH1F * h_ele_vertexX
Definition: DQMAnalyzer.h:191
double poptruemax
Definition: DQMAnalyzer.h:132
double detamax
Definition: DQMAnalyzer.h:125
TH1F * histSclSigEtaEta_
Definition: DQMAnalyzer.h:203
double sigIetaIetaMaxBarrel_
Definition: DQMAnalyzer.h:100
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:22
bool PROBEetcut_
Definition: DQMAnalyzer.h:75
uint16_t size_type
TH1F * h_ele_outerP_mode
Definition: DQMAnalyzer.h:241
TH1F * h_ele_hcalDepth1TowerSumEt_dr03
Definition: DQMAnalyzer.h:253
double hadronicOverEmMaxBarrel_
Definition: DQMAnalyzer.h:103
double phimax
Definition: DQMAnalyzer.h:121
double hcalIso03Depth1MaxEndcaps_
Definition: DQMAnalyzer.h:110
TH1F * h_ele_hcalDepth1TowerSumEt_dr04
Definition: DQMAnalyzer.h:257
bool selected(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP)
bool isTrackerDriven_
Definition: DQMAnalyzer.h:86
double sigIetaIetaMaxEndcaps_
Definition: DQMAnalyzer.h:102
double dPhiMaxBarrel_
Definition: DQMAnalyzer.h:96
TH1F * h_ele_lostHits
Definition: DQMAnalyzer.h:215
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:30
TH2F * h_ele_lostHitsVsEta
Definition: DQMAnalyzer.h:218
double dphimin
Definition: DQMAnalyzer.h:126
unsigned int nAfterTrigger_
Definition: DQMAnalyzer.h:151
int iEvent
Definition: GenABIO.cc:243
TH1F * h_ele_vertexEta
Definition: DQMAnalyzer.h:188
double eOverPMinEndcaps_
Definition: DQMAnalyzer.h:89
TH1F * h_ele_vertexZ
Definition: DQMAnalyzer.h:193
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
std::vector< unsigned int > HLTPathsByIndex_
Definition: DQMAnalyzer.h:152
double pmax
Definition: DQMAnalyzer.h:123
T sqrt(T t)
Definition: SSEVec.h:48
TH2F * h_ele_lostHitsVsPhi
Definition: DQMAnalyzer.h:219
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:168
TH1F * h_ele_mee_os
Definition: DQMAnalyzer.h:260
double massLow_
Definition: DQMAnalyzer.h:71
double eOverPMaxBarrel_
Definition: DQMAnalyzer.h:88
bool isNotEBEEGap_
Definition: DQMAnalyzer.h:84
bool isolationCut(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP)
bool PROBEcheckclass_
Definition: DQMAnalyzer.h:76
double dphimatchmin
Definition: DQMAnalyzer.h:128
TH2F * h_ele_ambiguousTracksVsPhi
Definition: DQMAnalyzer.h:207
std::string outputFile_
Definition: DQMAnalyzer.h:56
TH1F * h_ele_vertexY
Definition: DQMAnalyzer.h:192
bool TAGcheckclass_
Definition: DQMAnalyzer.h:74
TH1F * histSclEta_
Definition: DQMAnalyzer.h:201
TH1F * h_matchingObjectPhi
Definition: DQMAnalyzer.h:176
bool idCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
double tkIso03Max_
Definition: DQMAnalyzer.h:108
double maxAbsEta_
Definition: DQMAnalyzer.h:81
TH1F * histSclEt_
Definition: DQMAnalyzer.h:200
TH1F * h_ele_matchingObjectZ_matched
Definition: DQMAnalyzer.h:183
TH1F * h_ele_foundHits
Definition: DQMAnalyzer.h:209
TH1F * h_ele_PinMnPout_mode
Definition: DQMAnalyzer.h:246
int nbindetamatch2D
Definition: DQMAnalyzer.h:127
int nbindphimatch2D
Definition: DQMAnalyzer.h:128
bool isValid() const
Definition: HandleBase.h:76
double eopmaxsht
Definition: DQMAnalyzer.h:124
TH2F * h_ele_chi2VsPt
Definition: DQMAnalyzer.h:226
TH1F * h_ele_dPhiEleCl_propOut
Definition: DQMAnalyzer.h:236
TH1F * h_matchingObjectZ
Definition: DQMAnalyzer.h:177
TH1F * histSclPhi_
Definition: DQMAnalyzer.h:202
TH1F * h_ele_matchingObjectPhi_matched
Definition: DQMAnalyzer.h:182
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
Definition: DQMAnalyzer.cc:651
bool etCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
TH1F * h_ele_hcalDepth2TowerSumEt_dr03
Definition: DQMAnalyzer.h:254
tuple conf
Definition: dbtoconf.py:185
TH2F * h_ele_foundHitsVsPhi
Definition: DQMAnalyzer.h:213
double hadronicOverEmMaxEndcaps_
Definition: DQMAnalyzer.h:104
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
double tipMaxEndcaps_
Definition: DQMAnalyzer.h:107
double eOverPMaxEndcaps_
Definition: DQMAnalyzer.h:90
double meemin
Definition: DQMAnalyzer.h:133
TH2F * h_ele_foundHitsVsPt
Definition: DQMAnalyzer.h:214
TH1F * h_ele_outerP
Definition: DQMAnalyzer.h:240
TH1F * h_ele_outerPt
Definition: DQMAnalyzer.h:242
double meemax
Definition: DQMAnalyzer.h:133
std::vector< std::string > HLTPathsByName_
Definition: DQMAnalyzer.h:117
TH2F * h_ele_ambiguousTracksVsPt
Definition: DQMAnalyzer.h:208
std::string matchingCondition_
Definition: DQMAnalyzer.h:60
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:27
double sigIetaIetaMinBarrel_
Definition: DQMAnalyzer.h:99
TH1F * h_ele_EoP
Definition: DQMAnalyzer.h:228
double detamin
Definition: DQMAnalyzer.h:125
TH1F * h_ele_charge
Definition: DQMAnalyzer.h:195
TH1F * h_ele_tkSumPt_dr04
Definition: DQMAnalyzer.h:255
TH1F * h_ele_matchingObjectPt_matched
Definition: DQMAnalyzer.h:181
double detamatchmin
Definition: DQMAnalyzer.h:127
double minPt_
Definition: DQMAnalyzer.h:80
TH1F * h_ele_vertexPt
Definition: DQMAnalyzer.h:186
T const * product() const
Definition: Handle.h:74
edm::InputTag electronCollection_
Definition: DQMAnalyzer.h:57
double ecalIso03MaxEndcaps_
Definition: DQMAnalyzer.h:113
TH1F * h_ele_dEtaCl_propOut
Definition: DQMAnalyzer.h:233
std::string const & label() const
Definition: InputTag.h:42
double hoemax
Definition: DQMAnalyzer.h:134
edm::EventID id() const
Definition: EventBase.h:56
TH2F * h_ele_chi2VsEta
Definition: DQMAnalyzer.h:224
TH1F * h_matchingObjectPt
Definition: DQMAnalyzer.h:175
int nbindphimatch
Definition: DQMAnalyzer.h:128
TH1F * h_ele_EeleOPout
Definition: DQMAnalyzer.h:230
TH1F * h_ele_vertexTIP
Definition: DQMAnalyzer.h:194
edm::InputTag triggerResults_
Definition: DQMAnalyzer.h:116
TH1F * histSclEn_
Definition: DQMAnalyzer.h:199
TH1F * h_ele_dPhiCl_propOut
Definition: DQMAnalyzer.h:234
double dPhiMinEndcaps_
Definition: DQMAnalyzer.h:97
TH1F * h_ele_HoE
Definition: DQMAnalyzer.h:239
TH2F * h_ele_lostHitsVsPt
Definition: DQMAnalyzer.h:220
TH1F * h_ele_chi2
Definition: DQMAnalyzer.h:221
TH1F * h_ele_matchingObjectEta_matched
Definition: DQMAnalyzer.h:179
tuple cout
Definition: gather_cfg.py:121
double dEtaMinEndcaps_
Definition: DQMAnalyzer.h:93
const Point & position() const
position
Definition: BeamSpot.h:63
double dphimax
Definition: DQMAnalyzer.h:126
TH1F * h_matchingObjectNum
Definition: DQMAnalyzer.h:170
double eopmax
Definition: DQMAnalyzer.h:124
double pi
bool TPchecksign_
Definition: DQMAnalyzer.h:73
TH1F * h_ele_ambiguousTracks
Definition: DQMAnalyzer.h:205
unsigned int nEvents_
Definition: DQMAnalyzer.h:142
TH2F * h_ele_foundHitsVsEta
Definition: DQMAnalyzer.h:212
double dPhiMaxEndcaps_
Definition: DQMAnalyzer.h:98
double dEtaMaxBarrel_
Definition: DQMAnalyzer.h:92
DQMAnalyzer(const edm::ParameterSet &conf)
Definition: DQMAnalyzer.cc:58
TH1F * h_ele_hcalDepth2TowerSumEt_dr04
Definition: DQMAnalyzer.h:258
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
double mvaMin_
Definition: DQMAnalyzer.h:105
virtual void endJob()
Definition: DQMAnalyzer.cc:450
double tipMaxBarrel_
Definition: DQMAnalyzer.h:106
double ecalIso03MaxBarrel_
Definition: DQMAnalyzer.h:112
TH1F * h_ele_PinMnPout
Definition: DQMAnalyzer.h:245
int Selection_
Definition: DQMAnalyzer.h:70