CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TkConvValidator.cc
Go to the documentation of this file.
1 #include <iostream>
2 //
5 //
7 
8 //
12 //
18 //
22 //
29 //
33 //
36 #include "CLHEP/Units/GlobalPhysicalConstants.h"
38 //
48 
49 //
74 
75 //
84 
86 
87 //
88 //
89 #include "TFile.h"
90 #include "TH1.h"
91 #include "TH2.h"
92 #include "TTree.h"
93 #include "TVector3.h"
94 #include "TProfile.h"
95 //
106 using namespace std;
107 
108 
110  {
111 
112  fName_ = pset.getUntrackedParameter<std::string>("Name");
113  verbosity_ = pset.getUntrackedParameter<int>("Verbosity");
114  parameters_ = pset;
115 
116  photonCollectionProducer_ = pset.getParameter<std::string>("phoProducer");
117  photonCollection_ = pset.getParameter<std::string>("photonCollection");
118 
119  conversionCollectionProducer_ = pset.getParameter<std::string>("convProducer");
120  conversionCollection_ = pset.getParameter<std::string>("conversionCollection");
121  // conversionTrackProducer_ = pset.getParameter<std::string>("trackProducer");
122  dqmpath_ = pset.getParameter<std::string>("dqmpath");
123  minPhoEtCut_ = pset.getParameter<double>("minPhoEtCut");
124  generalTracksOnly_ = pset.getParameter<bool>("generalTracksOnly");
125  arbitratedMerged_ = pset.getParameter<bool>("arbitratedMerged");
126  arbitratedEcalSeeded_ = pset.getParameter<bool>("arbitratedEcalSeeded");
127  ecalalgotracks_ = pset.getParameter<bool>("ecalalgotracks");
128  highPurity_ = pset.getParameter<bool>("highPurity");
129  minProb_ = pset.getParameter<double>("minProb");
130  maxHitsBeforeVtx_ = pset.getParameter<uint>("maxHitsBeforeVtx");
131  minLxy_ = pset.getParameter<double>("minLxy");
132  isRunCentrally_= pset.getParameter<bool>("isRunCentrally");
133  }
134 
135 
136 
137 
138 
140 
141 
142 
143 
145 
146  nEvt_=0;
147  nEntry_=0;
148  nRecConv_=0;
149  nRecConvAss_=0;
150  nRecConvAssWithEcal_=0;
151 
152  nInvalidPCA_=0;
153 
154  dbe_ = 0;
156 
157 
158  double etMin = parameters_.getParameter<double>("etMin");
159  double etMax = parameters_.getParameter<double>("etMax");
160  int etBin = parameters_.getParameter<int>("etBin");
161 
162 
163  double resMin = parameters_.getParameter<double>("resMin");
164  double resMax = parameters_.getParameter<double>("resMax");
165  int resBin = parameters_.getParameter<int>("resBin");
166 
167  double etaMin = parameters_.getParameter<double>("etaMin");
168  double etaMax = parameters_.getParameter<double>("etaMax");
169  int etaBin = parameters_.getParameter<int>("etaBin");
170  int etaBin2 = parameters_.getParameter<int>("etaBin2");
171 
172 
173  double phiMin = parameters_.getParameter<double>("phiMin");
174  double phiMax = parameters_.getParameter<double>("phiMax");
175  int phiBin = parameters_.getParameter<int>("phiBin");
176 
177 
178  double rMin = parameters_.getParameter<double>("rMin");
179  double rMax = parameters_.getParameter<double>("rMax");
180  int rBin = parameters_.getParameter<int>("rBin");
181 
182  double zMin = parameters_.getParameter<double>("zMin");
183  double zMax = parameters_.getParameter<double>("zMax");
184  int zBin = parameters_.getParameter<int>("zBin");
185 
186  double dPhiTracksMin = parameters_.getParameter<double>("dPhiTracksMin");
187  double dPhiTracksMax = parameters_.getParameter<double>("dPhiTracksMax");
188  int dPhiTracksBin = parameters_.getParameter<int>("dPhiTracksBin");
189 
190  double eoverpMin = parameters_.getParameter<double>("eoverpMin");
191  double eoverpMax = parameters_.getParameter<double>("eoverpMax");
192  int eoverpBin = parameters_.getParameter<int>("eoverpBin");
193 
194 
195  // double dEtaTracksMin = parameters_.getParameter<double>("dEtaTracksMin"); // unused
196  // double dEtaTracksMax = parameters_.getParameter<double>("dEtaTracksMax"); // unused
197  // int dEtaTracksBin = parameters_.getParameter<int>("dEtaTracksBin"); // unused
198 
199  double dCotTracksMin = parameters_.getParameter<double>("dCotTracksMin");
200  double dCotTracksMax = parameters_.getParameter<double>("dCotTracksMax");
201  int dCotTracksBin = parameters_.getParameter<int>("dCotTracksBin");
202 
203 
204  double chi2Min = parameters_.getParameter<double>("chi2Min");
205  double chi2Max = parameters_.getParameter<double>("chi2Max");
206 
207 
208  double rMinForXray = parameters_.getParameter<double>("rMinForXray");
209  double rMaxForXray = parameters_.getParameter<double>("rMaxForXray");
210  int rBinForXray = parameters_.getParameter<int>("rBinForXray");
211  double zMinForXray = parameters_.getParameter<double>("zMinForXray");
212  double zMaxForXray = parameters_.getParameter<double>("zMaxForXray");
213  int zBinForXray = parameters_.getParameter<int>("zBinForXray");
214  int zBin2ForXray = parameters_.getParameter<int>("zBin2ForXray");
215 
216  minPhoPtForEffic = parameters_.getParameter<double>("minPhoPtForEffic");
217  maxPhoEtaForEffic = parameters_.getParameter<double>("maxPhoEtaForEffic");
218  maxPhoZForEffic = parameters_.getParameter<double>("maxPhoZForEffic");
219  maxPhoRForEffic = parameters_.getParameter<double>("maxPhoRForEffic");
220  minPhoPtForPurity = parameters_.getParameter<double>("minPhoPtForPurity");
221  maxPhoEtaForPurity = parameters_.getParameter<double>("maxPhoEtaForPurity");
222  maxPhoZForPurity = parameters_.getParameter<double>("maxPhoZForPurity");
223  maxPhoRForPurity = parameters_.getParameter<double>("maxPhoRForPurity");
224 
225  if (dbe_) {
226 
228  // SC from reco photons
229 
230  //TString simfolder = TString(
231  std::string simpath = dqmpath_ + "SimulationInfo";
232  dbe_->setCurrentFolder(simpath);
233  //
234  // simulation information about conversions
236  std::string histname = "nOfSimConversions";
237  h_nSimConv_[0] = dbe_->book1D(histname,"# of Sim conversions per event ",20,-0.5,19.5);
239  histname = "h_AllSimConvEta";
240  h_AllSimConv_[0] = dbe_->book1D(histname," All conversions: simulated #eta",etaBin2,etaMin,etaMax);
241  histname = "h_AllSimConvPhi";
242  h_AllSimConv_[1] = dbe_->book1D(histname," All conversions: simulated #phi",phiBin,phiMin,phiMax);
243  histname = "h_AllSimConvR";
244  h_AllSimConv_[2] = dbe_->book1D(histname," All conversions: simulated R",rBin,rMin,rMax);
245  histname = "h_AllSimConvZ";
246  h_AllSimConv_[3] = dbe_->book1D(histname," All conversions: simulated Z",zBin,zMin,zMax);
247  histname = "h_AllSimConvEt";
248  h_AllSimConv_[4] = dbe_->book1D(histname," All conversions: simulated Et",etBin,etMin,etMax);
249  //
250  histname = "nOfVisSimConversions";
251  h_nSimConv_[1] = dbe_->book1D(histname,"# of Sim conversions per event ",20,-0.5,19.5);
252  histname = "h_VisSimConvEta";
253  h_VisSimConv_[0] = dbe_->book1D(histname," All vis conversions: simulated #eta",etaBin2,etaMin, etaMax);
254  histname = "h_VisSimConvPhi";
255  h_VisSimConv_[1] = dbe_->book1D(histname," All vis conversions: simulated #phi",phiBin,phiMin, phiMax);
256  histname = "h_VisSimConvR";
257  h_VisSimConv_[2] = dbe_->book1D(histname," All vis conversions: simulated R",rBin,rMin,rMax);
258  histname = "h_VisSimConvZ";
259  h_VisSimConv_[3] = dbe_->book1D(histname," All vis conversions: simulated Z",zBin,zMin, zMax);
260  histname = "h_VisSimConvEt";
261  h_VisSimConv_[4] = dbe_->book1D(histname," All vis conversions: simulated Et",etBin,etMin, etMax);
262 
263  //
264  histname = "h_SimConvTwoMTracksEta";
265  h_SimConvTwoMTracks_[0] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks: simulated #eta",etaBin2,etaMin, etaMax);
266  histname = "h_SimConvTwoMTracksPhi";
267  h_SimConvTwoMTracks_[1] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks: simulated #phi",phiBin,phiMin, phiMax);
268  histname = "h_SimConvTwoMTracksR";
269  h_SimConvTwoMTracks_[2] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks: simulated R",rBin,rMin, rMax);
270  histname = "h_SimConvTwoMTracksZ";
271  h_SimConvTwoMTracks_[3] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks: simulated Z",zBin,zMin, zMax);
272  histname = "h_SimConvTwoMTracksEt";
273  h_SimConvTwoMTracks_[4] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks: simulated Et",etBin,etMin, etMax);
274  //
275  histname = "h_SimConvTwoTracksEta";
276  h_SimConvTwoTracks_[0] = dbe_->book1D(histname," All vis conversions with 2 reco tracks: simulated #eta",etaBin2,etaMin, etaMax);
277  histname = "h_SimConvTwoTracksPhi";
278  h_SimConvTwoTracks_[1] = dbe_->book1D(histname," All vis conversions with 2 reco tracks: simulated #phi",phiBin,phiMin, phiMax);
279  histname = "h_SimConvTwoTracksR";
280  h_SimConvTwoTracks_[2] = dbe_->book1D(histname," All vis conversions with 2 reco tracks: simulated R",rBin,rMin, rMax);
281  histname = "h_SimConvTwoTracksZ";
282  h_SimConvTwoTracks_[3] = dbe_->book1D(histname," All vis conversions with 2 reco tracks: simulated Z",zBin,zMin, zMax);
283  histname = "h_SimConvTwoTracksEt";
284  h_SimConvTwoTracks_[4] = dbe_->book1D(histname," All vis conversions with 2 reco tracks: simulated Et",etBin,etMin, etMax);
285  //
286  histname = "h_SimConvTwoMTracksEtaAndVtxPGT0";
287  h_SimConvTwoMTracksAndVtxPGT0_[0] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks + vertex: simulated #eta",etaBin2,etaMin, etaMax);
288  histname = "h_SimConvTwoMTracksPhiAndVtxPGT0";
289  h_SimConvTwoMTracksAndVtxPGT0_[1] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks + vertex: simulated #phi",phiBin,phiMin, phiMax);
290  histname = "h_SimConvTwoMTracksRAndVtxPGT0";
291  h_SimConvTwoMTracksAndVtxPGT0_[2] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks + vertex: simulated R",rBin,rMin, rMax);
292  histname = "h_SimConvTwoMTracksZAndVtxPGT0";
293  h_SimConvTwoMTracksAndVtxPGT0_[3] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks + vertex: simulated Z",zBin,zMin, zMax);
294  histname = "h_SimConvTwoMTracksEtAndVtxPGT0";
295  h_SimConvTwoMTracksAndVtxPGT0_[4] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks + vertex: simulated Et",etBin,etMin, etMax);
296 
297  //
298  histname = "h_SimConvTwoMTracksEtaAndVtxPGT0005";
299  h_SimConvTwoMTracksAndVtxPGT0005_[0] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks + vertex: simulated #eta",etaBin2,etaMin, etaMax);
300  histname = "h_SimConvTwoMTracksPhiAndVtxPGT0005";
301  h_SimConvTwoMTracksAndVtxPGT0005_[1] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks + vertex: simulated #phi",phiBin,phiMin, phiMax);
302  histname = "h_SimConvTwoMTracksRAndVtxPGT0005";
303  h_SimConvTwoMTracksAndVtxPGT0005_[2] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks + vertex: simulated R",rBin,rMin, rMax);
304  histname = "h_SimConvTwoMTracksZAndVtxPGT0005";
305  h_SimConvTwoMTracksAndVtxPGT0005_[3] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks + vertex: simulated Z",zBin,zMin, zMax);
306  histname = "h_SimConvTwoMTracksEtAndVtxPGT0005";
307  h_SimConvTwoMTracksAndVtxPGT0005_[4] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks + vertex: simulated Et",etBin,etMin, etMax);
308 
309  histname = "h_SimRecConvTwoMTracksEta";
310  h_SimRecConvTwoMTracks_[0] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks: simulated #eta",etaBin2,etaMin, etaMax);
311  histname = "h_SimRecConvTwoMTracksPhi";
312  h_SimRecConvTwoMTracks_[1] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks: simulated #phi",phiBin,phiMin, phiMax);
313  histname = "h_SimRecConvTwoMTracksR";
314  h_SimRecConvTwoMTracks_[2] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks: simulated R",rBin,rMin, rMax);
315  histname = "h_SimRecConvTwoMTracksZ";
316  h_SimRecConvTwoMTracks_[3] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks: simulated Z",zBin,zMin, zMax);
317  histname = "h_SimRecConvTwoMTracksEt";
318  h_SimRecConvTwoMTracks_[4] = dbe_->book1D(histname," All vis conversions with 2 reco-matching tracks: simulated Et",etBin,etMin, etMax);
319  //
320 
321 
322  h_SimConvEtaPix_[0] = dbe_->book1D("simConvEtaPix"," sim converted Photon Eta: Pix ",etaBin,etaMin, etaMax) ;
323  h_simTkPt_ = dbe_->book1D("simTkPt","Sim conversion tracks pt ",etBin*3,0.,etMax);
324  h_simTkEta_ = dbe_->book1D("simTkEta","Sim conversion tracks eta ",etaBin,etaMin,etaMax);
325 
326  h_simConvVtxRvsZ_[0] = dbe_->book2D("simConvVtxRvsZAll"," Photon Sim conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
327  h_simConvVtxRvsZ_[1] = dbe_->book2D("simConvVtxRvsZBarrel"," Photon Sim conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
328  h_simConvVtxRvsZ_[2] = dbe_->book2D("simConvVtxRvsZEndcap"," Photon Sim conversion vtx position",zBin2ForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
329  h_simConvVtxRvsZ_[3] = dbe_->book2D("simConvVtxRvsZBarrel2"," Photon Sim conversion vtx position when reco R<4cm",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
330  h_simConvVtxYvsX_ = dbe_->book2D("simConvVtxYvsXTrkBarrel"," Photon Sim conversion vtx position, (x,y) eta<1 ",100, -80., 80., 100, -80., 80.);
331 
332  std::string convpath = dqmpath_ + "ConversionInfo";
333  dbe_->setCurrentFolder(convpath);
334 
335  histname="nConv";
336  h_nConv_[0][0] = dbe_->book1D(histname+"All","Number Of Conversions per isolated candidates per events: All Ecal ",10,-0.5, 9.5);
337  h_nConv_[0][1] = dbe_->book1D(histname+"Barrel","Number Of Conversions per isolated candidates per events: Ecal Barrel ",10,-0.5, 9.5);
338  h_nConv_[0][2] = dbe_->book1D(histname+"Endcap","Number Of Conversions per isolated candidates per events: Ecal Endcap ",10,-0.5, 9.5);
339  h_nConv_[1][0] = dbe_->book1D(histname+"All_Ass","Number Of associated Conversions per isolated candidates per events: All Ecal ",10,-0.5, 9.5);
340 
341  h_convEta_[0][0] = dbe_->book1D("convEta"," converted Photon Eta ",etaBin,etaMin, etaMax) ;
342  h_convEtaMatchSC_[0][0] = dbe_->book1D("convEtaMatchSC"," converted Photon Eta when SC is matched ",etaBin,etaMin, etaMax) ;
343  h_convEta2_[0][0] = dbe_->book1D("convEta2"," converted Photon Eta ",etaBin2,etaMin, etaMax) ;
344  h_convPhi_[0][0] = dbe_->book1D("convPhi"," converted Photon Phi ",phiBin,phiMin,phiMax) ;
345  h_convR_[0][0] = dbe_->book1D("convR"," converted photon R",rBin,rMin, rMax);
346  h_convZ_[0][0] = dbe_->book1D("convZ"," converted photon Z",zBin,zMin, zMax);
347  h_convPt_[0][0] = dbe_->book1D("convPt"," conversions Transverse Energy: all eta ", etBin,etMin, etMax);
348 
349  h_convEta_[1][0] = dbe_->book1D("convEtaAss2"," Matched converted Photon Eta ",etaBin2,etaMin, etaMax) ;
350  h_convEta_[1][1] = dbe_->book1D("convEtaAss"," Matched converted Photon Eta ",etaBin,etaMin, etaMax) ;
351  h_convEtaMatchSC_[1][0] = dbe_->book1D("convEtaMatchSCAss"," converted Photon Eta when SC is matched ",etaBin,etaMin, etaMax) ;
352  h_convPhi_[1][0] = dbe_->book1D("convPhiAss"," Matched converted Photon Phi ",phiBin,phiMin,phiMax) ;
353  h_convR_[1][0] = dbe_->book1D("convRAss"," Matched converted photon R",rBin,rMin, rMax);
354  h_convZ_[1][0] = dbe_->book1D("convZAss"," Matched converted photon Z",zBin,zMin, zMax);
355  h_convPt_[1][0] = dbe_->book1D("convPtAss","Matched conversions Transverse Energy: all eta ", etBin,etMin, etMax);
356 
357  h_convEta_[2][0] = dbe_->book1D("convEtaFake2"," Fake converted Photon Eta ",etaBin2,etaMin, etaMax) ;
358  h_convEta_[2][1] = dbe_->book1D("convEtaFake"," Fake converted Photon Eta ",etaBin,etaMin, etaMax) ;
359  h_convEtaMatchSC_[2][0] = dbe_->book1D("convEtaMatchSCFake"," converted Photon Eta when SC is matched ",etaBin,etaMin, etaMax) ;
360  h_convPhi_[2][0] = dbe_->book1D("convPhiFake"," Fake converted Photon Phi ",phiBin,phiMin,phiMax) ;
361  h_convR_[2][0] = dbe_->book1D("convRFake"," Fake converted photon R",rBin,rMin, rMax);
362  h_convZ_[2][0] = dbe_->book1D("convZFake"," Fake converted photon Z",zBin,zMin, zMax);
363  h_convPt_[2][0] = dbe_->book1D("convPtFake","Fake conversions Transverse Energy: all eta ", etBin,etMin, etMax);
364 
365  h_convRplot_ = dbe_->book1D("convRplot"," converted photon R",600, 0.,120.);
366  h_convZplot_ = dbe_->book1D("convZplot"," converted photon Z",320,-160.,160.);
367 
368  histname = "convSCdPhi";
369  h_convSCdPhi_[0][0] = dbe_->book1D(histname+"All","dPhi between SC and conversion",100, -0.1,0.1);
370  h_convSCdPhi_[0][1] = dbe_->book1D(histname+"Barrel"," dPhi between SC and conversion: Barrel",100, -0.1,0.1);
371  h_convSCdPhi_[0][2] = dbe_->book1D(histname+"Endcap"," dPhi between SC and conversion: Endcap",100, -0.1,0.1);
372  h_convSCdPhi_[1][0] = dbe_->book1D(histname+"All_Ass","dPhi between SC and conversion",100, -0.1,0.1);
373  h_convSCdPhi_[1][1] = dbe_->book1D(histname+"Barrel_Ass"," dPhi between SC and conversion: Barrel",100, -0.1,0.1);
374  h_convSCdPhi_[1][2] = dbe_->book1D(histname+"Endcap_Ass"," dPhi between SC and conversion: Endcap",100, -0.1,0.1);
375  h_convSCdPhi_[2][0] = dbe_->book1D(histname+"All_Fakes","dPhi between SC and conversion",100, -0.1,0.1);
376  h_convSCdPhi_[2][1] = dbe_->book1D(histname+"Barrel_Fakes"," dPhi between SC and conversion: Barrel",100, -0.1,0.1);
377  h_convSCdPhi_[2][2] = dbe_->book1D(histname+"Endcap_Fakes"," dPhi between SC and conversion: Endcap",100, -0.1,0.1);
378  histname = "convSCdEta";
379  h_convSCdEta_[0][0] = dbe_->book1D(histname+"All"," dEta between SC and conversion",100, -0.1,0.1);
380  h_convSCdEta_[0][1] = dbe_->book1D(histname+"Barrel"," dEta between SC and conversion: Barrel",100, -0.1,0.1);
381  h_convSCdEta_[0][2] = dbe_->book1D(histname+"Endcap"," dEta between SC and conversion: Endcap",100, -0.1,0.1);
382  h_convSCdEta_[1][0] = dbe_->book1D(histname+"All_Ass"," dEta between SC and conversion",100, -0.1,0.1);
383  h_convSCdEta_[1][1] = dbe_->book1D(histname+"Barrel_Ass"," dEta between SC and conversion: Barrel",100, -0.1,0.1);
384  h_convSCdEta_[1][2] = dbe_->book1D(histname+"Endcap_Ass"," dEta between SC and conversion: Endcap",100, -0.1,0.1);
385  h_convSCdEta_[2][0] = dbe_->book1D(histname+"All_Fakes"," dEta between SC and conversion",100, -0.1,0.1);
386  h_convSCdEta_[2][1] = dbe_->book1D(histname+"Barrel_Fakes"," dEta between SC and conversion: Barrel",100, -0.1,0.1);
387  h_convSCdEta_[2][2] = dbe_->book1D(histname+"Endcap_Fakes"," dEta between SC and conversion: Endcap",100, -0.1,0.1);
388 
389  histname = "convPtRes";
390  h_convPtRes_[0] = dbe_->book1D(histname+"All"," Conversion Pt rec/true : All ecal ", resBin,resMin, resMax);
391  h_convPtRes_[1] = dbe_->book1D(histname+"Barrel"," Conversion Pt rec/true : Barrel ",resBin,resMin, resMax);
392  h_convPtRes_[2] = dbe_->book1D(histname+"Endcap"," Conversion Pt rec/true : Endcap ",resBin,resMin, resMax);
393 
394 
395  histname="hInvMass";
396  h_invMass_[0][0]= dbe_->book1D(histname+"All_AllTracks"," Photons:Tracks from conversion: Pair invariant mass: all Ecal ",100, 0., 1.5);
397  h_invMass_[0][1]= dbe_->book1D(histname+"Barrel_AllTracks"," Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ",100, 0., 1.5);
398  h_invMass_[0][2]= dbe_->book1D(histname+"Endcap_AllTracks"," Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ",100, 0., 1.5);
399  //
400  h_invMass_[1][0]= dbe_->book1D(histname+"All_AssTracks"," Photons:Tracks from conversion: Pair invariant mass: all Ecal ",100, 0., 1.5);
401  h_invMass_[1][1]= dbe_->book1D(histname+"Barrel_AssTracks"," Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ",100, 0., 1.5);
402  h_invMass_[1][2]= dbe_->book1D(histname+"Endcap_AssTracks"," Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ",100, 0., 1.5);
403  //
404  h_invMass_[2][0]= dbe_->book1D(histname+"All_FakeTracks"," Photons:Tracks from conversion: Pair invariant mass: all Ecal ",100, 0., 1.5);
405  h_invMass_[2][1]= dbe_->book1D(histname+"Barrel_FakeTracks"," Photons:Tracks from conversion: Pair invariant mass: Barrel Ecal ",100, 0., 1.5);
406  h_invMass_[2][2]= dbe_->book1D(histname+"Endcap_FaleTracks"," Photons:Tracks from conversion: Pair invariant mass: Endcap Ecal ",100, 0., 1.5);
407 
408 
409 
410  histname="hDPhiTracksAtVtx";
411  h_DPhiTracksAtVtx_[0][0] =dbe_->book1D(histname+"All", " Photons:Tracks from conversions: #delta#phi Tracks at vertex: all Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
412  h_DPhiTracksAtVtx_[0][1] =dbe_->book1D(histname+"Barrel", " Photons:Tracks from conversions: #delta#phi Tracks at vertex: Barrel Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
413  h_DPhiTracksAtVtx_[0][2] =dbe_->book1D(histname+"Endcap", " Photons:Tracks from conversions: #delta#phi Tracks at vertex: Endcap Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
414  h_DPhiTracksAtVtx_[1][0] =dbe_->book1D(histname+"All_Ass", " Photons:Tracks from conversions: #delta#phi Tracks at vertex: all Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
415  h_DPhiTracksAtVtx_[1][1] =dbe_->book1D(histname+"Barrel_Ass", " Photons:Tracks from conversions: #delta#phi Tracks at vertex: Barrel Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
416  h_DPhiTracksAtVtx_[1][2] =dbe_->book1D(histname+"Endcap_Ass", " Photons:Tracks from conversions: #delta#phi Tracks at vertex: Endcap Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
417  h_DPhiTracksAtVtx_[2][0] =dbe_->book1D(histname+"All_Fakes", " Photons:Tracks from conversions: #delta#phi Tracks at vertex: all Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
418  h_DPhiTracksAtVtx_[2][1] =dbe_->book1D(histname+"Barrel_Fakes", " Photons:Tracks from conversions: #delta#phi Tracks at vertex: Barrel Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
419  h_DPhiTracksAtVtx_[2][2] =dbe_->book1D(histname+"Endcap_Fakes", " Photons:Tracks from conversions: #delta#phi Tracks at vertex: Endcap Ecal",dPhiTracksBin,dPhiTracksMin,dPhiTracksMax);
420 
421 
422 
423  histname="hDPhiTracksAtVtxVsEta";
424  h2_DPhiTracksAtVtxVsEta_ = dbe_->book2D(histname+"All"," Photons:Tracks from conversions: #delta#phi Tracks at vertex vs #eta",etaBin2,etaMin, etaMax,100, -0.5, 0.5);
425  histname="pDPhiTracksAtVtxVsEta";
426  p_DPhiTracksAtVtxVsEta_ = dbe_->bookProfile(histname+"All"," Photons:Tracks from conversions: #delta#phi Tracks at vertex vs #eta ",etaBin2,etaMin, etaMax, 100, -0.5, 0.5,"");
427 
428  histname="hDPhiTracksAtVtxVsR";
429  h2_DPhiTracksAtVtxVsR_ = dbe_->book2D(histname+"All"," Photons:Tracks from conversions: #delta#phi Tracks at vertex vs R",rBin,rMin, rMax,100, -0.5, 0.5);
430  histname="pDPhiTracksAtVtxVsR";
431  p_DPhiTracksAtVtxVsR_ = dbe_->bookProfile(histname+"All"," Photons:Tracks from conversions: #delta#phi Tracks at vertex vs R ",rBin,rMin, rMax,100, -0.5, 0.5,"");
432 
433 
434  histname="hDCotTracks";
435  h_DCotTracks_[0][0]= dbe_->book1D(histname+"All"," Photons:Tracks from conversions #delta cotg(#Theta) Tracks: all Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
436  h_DCotTracks_[0][1]= dbe_->book1D(histname+"Barrel"," Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Barrel Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
437  h_DCotTracks_[0][2]= dbe_->book1D(histname+"Endcap"," Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Endcap Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
438  h_DCotTracks_[1][0]= dbe_->book1D(histname+"All_Ass"," Photons:Tracks from conversions #delta cotg(#Theta) Tracks: all Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
439  h_DCotTracks_[1][1]= dbe_->book1D(histname+"Barrel_Ass"," Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Barrel Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
440  h_DCotTracks_[1][2]= dbe_->book1D(histname+"Endcap_Ass"," Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Endcap Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
441  h_DCotTracks_[2][0]= dbe_->book1D(histname+"All_Fakes"," Photons:Tracks from conversions #delta cotg(#Theta) Tracks: all Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
442  h_DCotTracks_[2][1]= dbe_->book1D(histname+"Barrel_Fakes"," Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Barrel Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
443  h_DCotTracks_[2][2]= dbe_->book1D(histname+"Endcap_Fakes"," Photons:Tracks from conversions #delta cotg(#Theta) Tracks: Endcap Ecal ",dCotTracksBin,dCotTracksMin,dCotTracksMax);
444 
445 
446  histname="hDCotTracksVsEta";
447  h2_DCotTracksVsEta_ = dbe_->book2D(histname+"All"," Photons:Tracks from conversions: #delta cotg(#Theta) Tracks vs #eta",etaBin2,etaMin, etaMax,100, -0.2, 0.2);
448  histname="pDCotTracksVsEta";
449  p_DCotTracksVsEta_ = dbe_->bookProfile(histname+"All"," Photons:Tracks from conversions: #delta cotg(#Theta) Tracks vs #eta ",etaBin2,etaMin, etaMax, 100, -0.2, 0.2,"");
450 
451  histname="hDCotTracksVsR";
452  h2_DCotTracksVsR_ = dbe_->book2D(histname+"All"," Photons:Tracks from conversions: #delta cotg(#Theta) Tracks at vertex vs R",rBin,rMin, rMax,100, -0.2, 0.2);
453  histname="pDCotTracksVsR";
454  p_DCotTracksVsR_ = dbe_->bookProfile(histname+"All"," Photons:Tracks from conversions: #delta cotg(#Theta) Tracks at vertex vs R ",rBin,rMin, rMax,100, -0.2, 0.2,"");
455 
456 
457  histname="hDistMinAppTracks";
458  h_distMinAppTracks_[0][0]= dbe_->book1D(histname+"All"," Photons:Tracks from conversions Min Approach Dist Tracks: all Ecal ",120, -0.5, 1.0);
459  h_distMinAppTracks_[0][1]= dbe_->book1D(histname+"Barrel"," Photons:Tracks from conversions Min Approach Dist Tracks: Barrel Ecal ",120, -0.5, 1.0);
460  h_distMinAppTracks_[0][2]= dbe_->book1D(histname+"Endcap"," Photons:Tracks from conversions Min Approach Dist Tracks: Endcap Ecal ",120, -0.5, 1.0);
461  h_distMinAppTracks_[1][0]= dbe_->book1D(histname+"All_Ass"," Photons:Tracks from conversions Min Approach Dist Tracks: all Ecal ",120, -0.5, 1.0);
462  h_distMinAppTracks_[1][1]= dbe_->book1D(histname+"Barrel_Ass"," Photons:Tracks from conversions Min Approach Dist Tracks: Barrel Ecal ",120, -0.5, 1.0);
463  h_distMinAppTracks_[1][2]= dbe_->book1D(histname+"Endcap_Ass"," Photons:Tracks from conversions Min Approach Dist Tracks: Endcap Ecal ",120, -0.5, 1.0);
464  h_distMinAppTracks_[2][0]= dbe_->book1D(histname+"All_Fakes"," Photons:Tracks from conversions Min Approach Dist Tracks: all Ecal ",120, -0.5, 1.0);
465  h_distMinAppTracks_[2][1]= dbe_->book1D(histname+"Barrel_Fakes"," Photons:Tracks from conversions Min Approach Dist Tracks: Barrel Ecal ",120, -0.5, 1.0);
466  h_distMinAppTracks_[2][2]= dbe_->book1D(histname+"Endcap_Fakes"," Photons:Tracks from conversions Min Approach Dist Tracks: Endcap Ecal ",120, -0.5, 1.0);
467 
468 
469  h_convVtxRvsZ_[0] = dbe_->book2D("convVtxRvsZAll"," Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
470  h_convVtxRvsZ_[1] = dbe_->book2D("convVtxRvsZBarrel"," Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
471  h_convVtxRvsZ_[2] = dbe_->book2D("convVtxRvsZEndcap"," Photon Reco conversion vtx position",zBin2ForXray, zMinForXray, zMaxForXray, rBinForXray, rMinForXray, rMaxForXray);
472  h_convVtxYvsX_ = dbe_->book2D("convVtxYvsXTrkBarrel"," Photon Reco conversion vtx position, (x,y) eta<1 ", 1000, -60., 60., 1000, -60., 60.);
474  h_convVtxRvsZ_zoom_[0] = dbe_->book2D("convVtxRvsZBarrelZoom1"," Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, -10., 40.);
475  h_convVtxRvsZ_zoom_[1] = dbe_->book2D("convVtxRvsZBarrelZoom2"," Photon Reco conversion vtx position",zBinForXray, zMinForXray, zMaxForXray, rBinForXray, -10., 20.);
476  h_convVtxYvsX_zoom_[0] = dbe_->book2D("convVtxYvsXTrkBarrelZoom1"," Photon Reco conversion vtx position, (x,y) eta<1 ",100, -40., 40., 100, -40., 40.);
477  h_convVtxYvsX_zoom_[1] = dbe_->book2D("convVtxYvsXTrkBarrelZoom2"," Photon Reco conversion vtx position, (x,y) eta<1 ",100, -20., 20., 100, -20., 20.);
478 
479  h_convVtxdR_ = dbe_->book1D("convVtxdR"," Photon Reco conversion vtx dR",100, -10.,10.);
480  h_convVtxdX_ = dbe_->book1D("convVtxdX"," Photon Reco conversion vtx dX",100, -10.,10.);
481  h_convVtxdY_ = dbe_->book1D("convVtxdY"," Photon Reco conversion vtx dY",100, -10.,10.);
482  h_convVtxdZ_ = dbe_->book1D("convVtxdZ"," Photon Reco conversion vtx dZ",100, -20.,20.);
483 
484  h_convVtxdPhi_ = dbe_->book1D("convVtxdPhi"," Photon Reco conversion vtx dPhi",100, -0.01,0.01);
485  h_convVtxdEta_ = dbe_->book1D("convVtxdEta"," Photon Reco conversion vtx dEta",100, -0.5,0.5);
486 
487  h_convVtxdR_barrel_ = dbe_->book1D("convVtxdR_barrel"," Photon Reco conversion vtx dR, |eta|<=1.2",100, -10.,10.);
488  h_convVtxdX_barrel_ = dbe_->book1D("convVtxdX_barrel"," Photon Reco conversion vtx dX, |eta|<=1.2",100, -10.,10.);
489  h_convVtxdY_barrel_ = dbe_->book1D("convVtxdY_barrel"," Photon Reco conversion vtx dY, |eta|<=1.2 ",100, -10.,10.);
490  h_convVtxdZ_barrel_ = dbe_->book1D("convVtxdZ_barrel"," Photon Reco conversion vtx dZ, |eta|<=1.2,",100, -20.,20.);
491 
492  h_convVtxdR_endcap_ = dbe_->book1D("convVtxdR_endcap"," Photon Reco conversion vtx dR, |eta|>1.2 ",100, -10.,10.);
493  h_convVtxdX_endcap_ = dbe_->book1D("convVtxdX_endcap"," Photon Reco conversion vtx dX, |eta|>1.2",100, -10.,10.);
494  h_convVtxdY_endcap_ = dbe_->book1D("convVtxdY_endcap"," Photon Reco conversion vtx dY, |eta|>1.2",100, -10.,10.);
495  h_convVtxdZ_endcap_ = dbe_->book1D("convVtxdZ_endcap"," Photon Reco conversion vtx dZ, |eta|>1.2",100, -20.,20.);
496 
497 
498 
499  h2_convVtxdRVsR_ = dbe_->book2D("h2ConvVtxdRVsR"," Conversion vtx dR vsR" ,rBin,rMin, rMax,100, -20.,20.);
500  h2_convVtxdRVsEta_ = dbe_->book2D("h2ConvVtxdRVsEta","Conversion vtx dR vs Eta" ,etaBin2,etaMin, etaMax,100, -20.,20.);
501 
502  p_convVtxdRVsR_ = dbe_->bookProfile("pConvVtxdRVsR"," Conversion vtx dR vsR" ,rBin,rMin, rMax ,100, -20.,20., "");
503  p_convVtxdRVsEta_ = dbe_->bookProfile("pConvVtxdRVsEta","Conversion vtx dR vs Eta" ,etaBin2,etaMin, etaMax, 100, -20.,20., "");
504  p_convVtxdXVsX_ = dbe_->bookProfile("pConvVtxdXVsX","Conversion vtx dX vs X" ,120,-60, 60 ,100, -20.,20., "");
505  p_convVtxdYVsY_ = dbe_->bookProfile("pConvVtxdYVsY","Conversion vtx dY vs Y" ,120,-60, 60 ,100, -20.,20., "");
506  p_convVtxdZVsZ_ = dbe_->bookProfile("pConvVtxdZVsZ","Conversion vtx dZ vs Z" ,zBin,zMin,zMax ,100, -20.,20., "");
507 
508  p_convVtxdZVsR_ = dbe_->bookProfile("pConvVtxdZVsR","Conversion vtx dZ vs R" ,rBin,rMin,rMax ,100, -20.,20., "");
509  p2_convVtxdRVsRZ_ = dbe_->bookProfile2D("p2ConvVtxdRVsRZ","Conversion vtx dR vs RZ" ,zBin,zMin, zMax,rBin,rMin,rMax,100, 0.,20.,"s");
510  p2_convVtxdZVsRZ_ = dbe_->bookProfile2D("p2ConvVtxdZVsRZ","Conversion vtx dZ vs RZ" ,zBin,zMin, zMax,rBin,rMin,rMax,100, 0.,20.,"s");
511 
512 
513  histname="EoverPtracks";
514  h_EoverPTracks_[0][0] = dbe_->book1D(histname+"All"," photons conversion E/p: all Ecal ", eoverpBin, eoverpMin, eoverpMax );
515  h_EoverPTracks_[0][1] = dbe_->book1D(histname+"Barrel"," photons conversion E/p: Barrel Ecal", eoverpBin, eoverpMin, eoverpMax);
516  h_EoverPTracks_[0][2] = dbe_->book1D(histname+"Endcap"," photons conversion E/p: Endcap Ecal ", eoverpBin, eoverpMin, eoverpMax);
517  h_EoverPTracks_[1][0] = dbe_->book1D(histname+"All_Ass"," photons conversion E/p: all Ecal ", eoverpBin, eoverpMin, eoverpMax);
518  h_EoverPTracks_[1][1] = dbe_->book1D(histname+"Barrel_Ass"," photons conversion E/p: Barrel Ecal", eoverpBin, eoverpMin, eoverpMax);
519  h_EoverPTracks_[1][2] = dbe_->book1D(histname+"Endcap_Ass"," photons conversion E/p: Endcap Ecal ", eoverpBin, eoverpMin, eoverpMax);
520  h_EoverPTracks_[2][0] = dbe_->book1D(histname+"All_Fakes"," photons conversion E/p: all Ecal ", eoverpBin, eoverpMin, eoverpMax);
521  h_EoverPTracks_[2][1] = dbe_->book1D(histname+"Barrel_Fakes"," photons conversion E/p: Barrel Ecal", eoverpBin, eoverpMin, eoverpMax);
522  h_EoverPTracks_[2][2] = dbe_->book1D(histname+"Endcap_Fakes"," photons conversion E/p: Endcap Ecal ", eoverpBin, eoverpMin, eoverpMax);
523 
524 
525  h2_convVtxRrecVsTrue_ = dbe_->book2D("h2ConvVtxRrecVsTrue","Photon Reco conversion vtx R rec vs true" ,rBin,rMin, rMax,rBin,rMin, rMax);
526 
527  histname="vtxChi2Prob";
528  h_vtxChi2Prob_[0][0] = dbe_->book1D(histname+"All","vertex #chi^{2} all", 100, 0., 1.);
529  h_vtxChi2Prob_[0][1] = dbe_->book1D(histname+"Barrel","vertex #chi^{2} barrel", 100, 0., 1.);
530  h_vtxChi2Prob_[0][2] = dbe_->book1D(histname+"Endcap","vertex #chi^{2} endcap", 100, 0., 1.);
531  h_vtxChi2Prob_[1][0] = dbe_->book1D(histname+"All_Ass","vertex #chi^{2} all", 100, 0., 1.);
532  h_vtxChi2Prob_[1][1] = dbe_->book1D(histname+"Barrel_Ass","vertex #chi^{2} barrel", 100, 0., 1.);
533  h_vtxChi2Prob_[1][2] = dbe_->book1D(histname+"Endcap_Ass","vertex #chi^{2} endcap", 100, 0., 1.);
534  h_vtxChi2Prob_[2][0] = dbe_->book1D(histname+"All_Fakes","vertex #chi^{2} all", 100, 0., 1.);
535  h_vtxChi2Prob_[2][1] = dbe_->book1D(histname+"Barrel_Fakes","vertex #chi^{2} barrel", 100, 0., 1.);
536  h_vtxChi2Prob_[2][2] = dbe_->book1D(histname+"Endcap_Fakes","vertex #chi^{2} endcap", 100, 0., 1.);
537 
538 
539  h_zPVFromTracks_[1] = dbe_->book1D("zPVFromTracks"," Photons: PV z from conversion tracks",100, -25., 25.);
540  h_dzPVFromTracks_[1] = dbe_->book1D("dzPVFromTracks"," Photons: PV Z_rec - Z_true from conversion tracks",100, -5., 5.);
541  h2_dzPVVsR_ = dbe_->book2D("h2dzPVVsR","Photon Reco conversions: dz(PV) vs R" ,rBin,rMin, rMax,100, -3.,3.);
542  p_dzPVVsR_ = dbe_->bookProfile("pdzPVVsR","Photon Reco conversions: dz(PV) vs R" ,rBin,rMin, rMax, 100, -3.,3.,"");
543 
544 
545  histname="lxybs";
546  h_lxybs_[0][0] = dbe_->book1D(histname+"All","vertex #chi^{2} all", 200, -100., 100.);
547  h_lxybs_[0][1] = dbe_->book1D(histname+"Barrel","vertex #chi^{2} barrel", 200, -100., 100.);
548  h_lxybs_[0][2] = dbe_->book1D(histname+"Endcap","vertex #chi^{2} endcap", 200, -100., 100.);
549  h_lxybs_[1][0] = dbe_->book1D(histname+"All_Ass","vertex #chi^{2} all", 200, -100., 100.);
550  h_lxybs_[1][1] = dbe_->book1D(histname+"Barrel_Ass","vertex #chi^{2} barrel", 200, -100., 100.);
551  h_lxybs_[1][2] = dbe_->book1D(histname+"Endcap_Ass","vertex #chi^{2} endcap", 200, -100., 100.);
552  h_lxybs_[2][0] = dbe_->book1D(histname+"All_Fakes","vertex #chi^{2} all", 200, -100., 100.);
553  h_lxybs_[2][1] = dbe_->book1D(histname+"Barrel_Fakes","vertex #chi^{2} barrel", 200, -100., 100.);
554  h_lxybs_[2][2] = dbe_->book1D(histname+"Endcap_Fakes","vertex #chi^{2} endcap", 200, -100., 100.);
555 
556  histname="maxNHitsBeforeVtx";
557  h_maxNHitsBeforeVtx_[0][0] = dbe_->book1D(histname+"All","vertex #chi^{2} all", 16, -0.5, 15.5);
558  h_maxNHitsBeforeVtx_[0][1] = dbe_->book1D(histname+"Barrel","vertex #chi^{2} barrel", 16, -0.5, 15.5);
559  h_maxNHitsBeforeVtx_[0][2] = dbe_->book1D(histname+"Endcap","vertex #chi^{2} endcap", 16, -0.5, 15.5);
560  h_maxNHitsBeforeVtx_[1][0] = dbe_->book1D(histname+"All_Ass","vertex #chi^{2} all", 16, -0.5, 15.5);
561  h_maxNHitsBeforeVtx_[1][1] = dbe_->book1D(histname+"Barrel_Ass","vertex #chi^{2} barrel", 16, -0.5, 15.5);
562  h_maxNHitsBeforeVtx_[1][2] = dbe_->book1D(histname+"Endcap_Ass","vertex #chi^{2} endcap", 16, -0.5, 15.5);
563  h_maxNHitsBeforeVtx_[2][0] = dbe_->book1D(histname+"All_Fakes","vertex #chi^{2} all", 16, -0.5, 15.5);
564  h_maxNHitsBeforeVtx_[2][1] = dbe_->book1D(histname+"Barrel_Fakes","vertex #chi^{2} barrel", 16, -0.5, 15.5);
565  h_maxNHitsBeforeVtx_[2][2] = dbe_->book1D(histname+"Endcap_Fakes","vertex #chi^{2} endcap", 16, -0.5, 15.5);
566 
567  histname="leadNHitsBeforeVtx";
568  h_leadNHitsBeforeVtx_[0][0] = dbe_->book1D(histname+"All","vertex #chi^{2} all", 16, -0.5, 15.5);
569  h_leadNHitsBeforeVtx_[0][1] = dbe_->book1D(histname+"Barrel","vertex #chi^{2} barrel", 16, -0.5, 15.5);
570  h_leadNHitsBeforeVtx_[0][2] = dbe_->book1D(histname+"Endcap","vertex #chi^{2} endcap", 16, -0.5, 15.5);
571  h_leadNHitsBeforeVtx_[1][0] = dbe_->book1D(histname+"All_Ass","vertex #chi^{2} all", 16, -0.5, 15.5);
572  h_leadNHitsBeforeVtx_[1][1] = dbe_->book1D(histname+"Barrel_Ass","vertex #chi^{2} barrel", 16, -0.5, 15.5);
573  h_leadNHitsBeforeVtx_[1][2] = dbe_->book1D(histname+"Endcap_Ass","vertex #chi^{2} endcap", 16, -0.5, 15.5);
574  h_leadNHitsBeforeVtx_[2][0] = dbe_->book1D(histname+"All_Fakes","vertex #chi^{2} all", 16, -0.5, 15.5);
575  h_leadNHitsBeforeVtx_[2][1] = dbe_->book1D(histname+"Barrel_Fakes","vertex #chi^{2} barrel", 16, -0.5, 15.5);
576  h_leadNHitsBeforeVtx_[2][2] = dbe_->book1D(histname+"Endcap_Fakes","vertex #chi^{2} endcap", 16, -0.5, 15.5);
577 
578  histname="trailNHitsBeforeVtx";
579  h_trailNHitsBeforeVtx_[0][0] = dbe_->book1D(histname+"All","vertex #chi^{2} all", 16, -0.5, 15.5);
580  h_trailNHitsBeforeVtx_[0][1] = dbe_->book1D(histname+"Barrel","vertex #chi^{2} barrel", 16, -0.5, 15.5);
581  h_trailNHitsBeforeVtx_[0][2] = dbe_->book1D(histname+"Endcap","vertex #chi^{2} endcap", 16, -0.5, 15.5);
582  h_trailNHitsBeforeVtx_[1][0] = dbe_->book1D(histname+"All_Ass","vertex #chi^{2} all", 16, -0.5, 15.5);
583  h_trailNHitsBeforeVtx_[1][1] = dbe_->book1D(histname+"Barrel_Ass","vertex #chi^{2} barrel", 16, -0.5, 15.5);
584  h_trailNHitsBeforeVtx_[1][2] = dbe_->book1D(histname+"Endcap_Ass","vertex #chi^{2} endcap", 16, -0.5, 15.5);
585  h_trailNHitsBeforeVtx_[2][0] = dbe_->book1D(histname+"All_Fakes","vertex #chi^{2} all", 16, -0.5, 15.5);
586  h_trailNHitsBeforeVtx_[2][1] = dbe_->book1D(histname+"Barrel_Fakes","vertex #chi^{2} barrel", 16, -0.5, 15.5);
587  h_trailNHitsBeforeVtx_[2][2] = dbe_->book1D(histname+"Endcap_Fakes","vertex #chi^{2} endcap", 16, -0.5, 15.5);
588 
589  histname="sumNHitsBeforeVtx";
590  h_sumNHitsBeforeVtx_[0][0] = dbe_->book1D(histname+"All","vertex #chi^{2} all", 16, -0.5, 15.5);
591  h_sumNHitsBeforeVtx_[0][1] = dbe_->book1D(histname+"Barrel","vertex #chi^{2} barrel", 16, -0.5, 15.5);
592  h_sumNHitsBeforeVtx_[0][2] = dbe_->book1D(histname+"Endcap","vertex #chi^{2} endcap", 16, -0.5, 15.5);
593  h_sumNHitsBeforeVtx_[1][0] = dbe_->book1D(histname+"All_Ass","vertex #chi^{2} all", 16, -0.5, 15.5);
594  h_sumNHitsBeforeVtx_[1][1] = dbe_->book1D(histname+"Barrel_Ass","vertex #chi^{2} barrel", 16, -0.5, 15.5);
595  h_sumNHitsBeforeVtx_[1][2] = dbe_->book1D(histname+"Endcap_Ass","vertex #chi^{2} endcap", 16, -0.5, 15.5);
596  h_sumNHitsBeforeVtx_[2][0] = dbe_->book1D(histname+"All_Fakes","vertex #chi^{2} all", 16, -0.5, 15.5);
597  h_sumNHitsBeforeVtx_[2][1] = dbe_->book1D(histname+"Barrel_Fakes","vertex #chi^{2} barrel", 16, -0.5, 15.5);
598  h_sumNHitsBeforeVtx_[2][2] = dbe_->book1D(histname+"Endcap_Fakes","vertex #chi^{2} endcap", 16, -0.5, 15.5);
599 
600  histname="maxDlClosestHitToVtx";
601  h_maxDlClosestHitToVtx_[0][0] = dbe_->book1D(histname+"All","vertex #chi^{2} all", 100, -10., 10.);
602  h_maxDlClosestHitToVtx_[0][1] = dbe_->book1D(histname+"Barrel","vertex #chi^{2} barrel", 100, -10., 10.);
603  h_maxDlClosestHitToVtx_[0][2] = dbe_->book1D(histname+"Endcap","vertex #chi^{2} endcap", 100, -10., 10.);
604  h_maxDlClosestHitToVtx_[1][0] = dbe_->book1D(histname+"All_Ass","vertex #chi^{2} all", 100, -10., 10.);
605  h_maxDlClosestHitToVtx_[1][1] = dbe_->book1D(histname+"Barrel_Ass","vertex #chi^{2} barrel", 100, -10., 10.);
606  h_maxDlClosestHitToVtx_[1][2] = dbe_->book1D(histname+"Endcap_Ass","vertex #chi^{2} endcap", 100, -10., 10.);
607  h_maxDlClosestHitToVtx_[2][0] = dbe_->book1D(histname+"All_Fakes","vertex #chi^{2} all", 100, -10., 10.);
608  h_maxDlClosestHitToVtx_[2][1] = dbe_->book1D(histname+"Barrel_Fakes","vertex #chi^{2} barrel", 100, -10., 10.);
609  h_maxDlClosestHitToVtx_[2][2] = dbe_->book1D(histname+"Endcap_Fakes","vertex #chi^{2} endcap", 100, -10., 10.);
610 
611  histname="maxDlClosestHitToVtxSig";
612  h_maxDlClosestHitToVtxSig_[0][0] = dbe_->book1D(histname+"All","vertex #chi^{2} all", 100, -8., 8.);
613  h_maxDlClosestHitToVtxSig_[0][1] = dbe_->book1D(histname+"Barrel","vertex #chi^{2} barrel", 100, -8., 8.);
614  h_maxDlClosestHitToVtxSig_[0][2] = dbe_->book1D(histname+"Endcap","vertex #chi^{2} endcap", 100, -8., 8.);
615  h_maxDlClosestHitToVtxSig_[1][0] = dbe_->book1D(histname+"All_Ass","vertex #chi^{2} all", 100, -8., 8.);
616  h_maxDlClosestHitToVtxSig_[1][1] = dbe_->book1D(histname+"Barrel_Ass","vertex #chi^{2} barrel", 100, -8., 8.);
617  h_maxDlClosestHitToVtxSig_[1][2] = dbe_->book1D(histname+"Endcap_Ass","vertex #chi^{2} endcap", 100, -8., 8.);
618  h_maxDlClosestHitToVtxSig_[2][0] = dbe_->book1D(histname+"All_Fakes","vertex #chi^{2} all", 100, -8., 8.);
619  h_maxDlClosestHitToVtxSig_[2][1] = dbe_->book1D(histname+"Barrel_Fakes","vertex #chi^{2} barrel", 100, -8., 8.);
620  h_maxDlClosestHitToVtxSig_[2][2] = dbe_->book1D(histname+"Endcap_Fakes","vertex #chi^{2} endcap", 100, -8., 8.);
621 
622  histname="deltaExpectedHitsInner";
623  h_deltaExpectedHitsInner_[0][0] = dbe_->book1D(histname+"All","vertex #chi^{2} all", 31, -15.5, 15.5);
624  h_deltaExpectedHitsInner_[0][1] = dbe_->book1D(histname+"Barrel","vertex #chi^{2} barrel", 31, -15.5, 15.5);
625  h_deltaExpectedHitsInner_[0][2] = dbe_->book1D(histname+"Endcap","vertex #chi^{2} endcap", 31, -15.5, 15.5);
626  h_deltaExpectedHitsInner_[1][0] = dbe_->book1D(histname+"All_Ass","vertex #chi^{2} all", 31, -15.5, 15.5);
627  h_deltaExpectedHitsInner_[1][1] = dbe_->book1D(histname+"Barrel_Ass","vertex #chi^{2} barrel", 31, -15.5, 15.5);
628  h_deltaExpectedHitsInner_[1][2] = dbe_->book1D(histname+"Endcap_Ass","vertex #chi^{2} endcap", 31, -15.5, 15.5);
629  h_deltaExpectedHitsInner_[2][0] = dbe_->book1D(histname+"All_Fakes","vertex #chi^{2} all", 31, -15.5, 15.5);
630  h_deltaExpectedHitsInner_[2][1] = dbe_->book1D(histname+"Barrel_Fakes","vertex #chi^{2} barrel", 31, -15.5, 15.5);
631  h_deltaExpectedHitsInner_[2][2] = dbe_->book1D(histname+"Endcap_Fakes","vertex #chi^{2} endcap", 31, -15.5, 15.5);
632 
633  histname="leadExpectedHitsInner";
634  h_leadExpectedHitsInner_[0][0] = dbe_->book1D(histname+"All","vertex #chi^{2} all", 16, -0.5, 15.5);
635  h_leadExpectedHitsInner_[0][1] = dbe_->book1D(histname+"Barrel","vertex #chi^{2} barrel", 16, -0.5, 15.5);
636  h_leadExpectedHitsInner_[0][2] = dbe_->book1D(histname+"Endcap","vertex #chi^{2} endcap", 16, -0.5, 15.5);
637  h_leadExpectedHitsInner_[1][0] = dbe_->book1D(histname+"All_Ass","vertex #chi^{2} all", 16, -0.5, 15.5);
638  h_leadExpectedHitsInner_[1][1] = dbe_->book1D(histname+"Barrel_Ass","vertex #chi^{2} barrel", 16, -0.5, 15.5);
639  h_leadExpectedHitsInner_[1][2] = dbe_->book1D(histname+"Endcap_Ass","vertex #chi^{2} endcap", 16, -0.5, 15.5);
640  h_leadExpectedHitsInner_[2][0] = dbe_->book1D(histname+"All_Fakes","vertex #chi^{2} all", 16, -0.5, 15.5);
641  h_leadExpectedHitsInner_[2][1] = dbe_->book1D(histname+"Barrel_Fakes","vertex #chi^{2} barrel", 16, -0.5, 15.5);
642  h_leadExpectedHitsInner_[2][2] = dbe_->book1D(histname+"Endcap_Fakes","vertex #chi^{2} endcap", 16, -0.5, 15.5);
643 
644  histname="nSharedHits";
645  h_nSharedHits_[0][0] = dbe_->book1D(histname+"All","vertex #chi^{2} all", 16, -0.5, 15.5);
646  h_nSharedHits_[0][1] = dbe_->book1D(histname+"Barrel","vertex #chi^{2} barrel", 16, -0.5, 15.5);
647  h_nSharedHits_[0][2] = dbe_->book1D(histname+"Endcap","vertex #chi^{2} endcap", 16, -0.5, 15.5);
648  h_nSharedHits_[1][0] = dbe_->book1D(histname+"All_Ass","vertex #chi^{2} all", 16, -0.5, 15.5);
649  h_nSharedHits_[1][1] = dbe_->book1D(histname+"Barrel_Ass","vertex #chi^{2} barrel", 16, -0.5, 15.5);
650  h_nSharedHits_[1][2] = dbe_->book1D(histname+"Endcap_Ass","vertex #chi^{2} endcap", 16, -0.5, 15.5);
651  h_nSharedHits_[2][0] = dbe_->book1D(histname+"All_Fakes","vertex #chi^{2} all", 16, -0.5, 15.5);
652  h_nSharedHits_[2][1] = dbe_->book1D(histname+"Barrel_Fakes","vertex #chi^{2} barrel", 16, -0.5, 15.5);
653  h_nSharedHits_[2][2] = dbe_->book1D(histname+"Endcap_Fakes","vertex #chi^{2} endcap", 16, -0.5, 15.5);
654 
656  histname="nHits";
657  nHits_[0] = dbe_->book2D(histname+"AllTracks","Photons:Tracks from conversions: # of hits all tracks",etaBin,etaMin, etaMax,30,0., 30.);
658  nHits_[1] = dbe_->book2D(histname+"AllTracks_Ass","Photons:Tracks from conversions: # of hits all tracks ass",etaBin,etaMin, etaMax,30,0., 30.);
659  nHits_[2] = dbe_->book2D(histname+"AllTracks_Fakes","Photons:Tracks from conversions: # of hits all tracks fakes",etaBin,etaMin, etaMax,30,0., 30.);
660 
661 
662  histname="nHitsVsEta";
663  nHitsVsEta_[0] = dbe_->book2D(histname+"AllTracks","Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax,30,0., 30.);
664  nHitsVsEta_[1] = dbe_->book2D(histname+"AllTracks_Ass","Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax,30,0., 30.);
665  nHitsVsEta_[2] = dbe_->book2D(histname+"AllTracks_Fakes","Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax,30,0., 30.);
666  histname="h_nHitsVsEta";
667  p_nHitsVsEta_[0] = dbe_->bookProfile(histname+"AllTracks","Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax, 30,-0.5, 29.5,"");
668  p_nHitsVsEta_[1] = dbe_->bookProfile(histname+"AllTracks_Ass","Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax, 30,-0.5, 29.5,"");
669  p_nHitsVsEta_[2] = dbe_->bookProfile(histname+"AllTracks_Fakes","Photons:Tracks from conversions: # of hits vs #eta all tracks",etaBin,etaMin, etaMax, 30,-0.5, 29.5,"");
670 
671 
672  histname="nHitsVsR";
673  nHitsVsR_[0] = dbe_->book2D(histname+"AllTracks","Photons:Tracks from conversions: # of hits vs radius all tracks" ,rBin,rMin, rMax,30,0., 30.);
674  nHitsVsR_[1] = dbe_->book2D(histname+"AllTracks_Ass","Photons:Tracks from conversions: # of hits vs radius all tracks" ,rBin,rMin, rMax,30,0., 30.);
675  nHitsVsR_[2] = dbe_->book2D(histname+"AllTracks_Fakes","Photons:Tracks from conversions: # of hits vs radius all tracks" ,rBin,rMin, rMax,30,0., 30.);
676 
677  histname="h_nHitsVsR";
678  p_nHitsVsR_[0] = dbe_->bookProfile(histname+"AllTracks","Photons:Tracks from conversions: # of hits vs radius all tracks",rBin,rMin, rMax, 30,-0.5, 29.5,"");
679  p_nHitsVsR_[1] = dbe_->bookProfile(histname+"AllTracks_Ass","Photons:Tracks from conversions: # of hits vs radius all tracks",rBin,rMin, rMax, 30,-0.5, 29.5,"");
680  p_nHitsVsR_[2] = dbe_->bookProfile(histname+"AllTracks_Fakes","Photons:Tracks from conversions: # of hits vs radius all tracks",rBin,rMin, rMax, 30,-0.5, 29.5,"");
681 
682  histname="tkChi2";
683  h_tkChi2_[0] = dbe_->book1D(histname+"AllTracks","Photons:Tracks from conversions: #chi^{2} of all tracks", 100, chi2Min, chi2Max);
684  h_tkChi2_[1] = dbe_->book1D(histname+"AllTracks_Ass","Photons:Tracks from conversions: #chi^{2} of all tracks", 100, chi2Min, chi2Max);
685  h_tkChi2_[2] = dbe_->book1D(histname+"AllTracks_Fakes","Photons:Tracks from conversions: #chi^{2} of all tracks", 100, chi2Min, chi2Max);
686 
687  histname="tkChi2Large";
688  h_tkChi2Large_[0] = dbe_->book1D(histname+"AllTracks","Photons:Tracks from conversions: #chi^{2} of all tracks", 1000, 0., 5000.0);
689  h_tkChi2Large_[1] = dbe_->book1D(histname+"AllTracks_Ass","Photons:Tracks from conversions: #chi^{2} of all tracks", 1000, 0., 5000.0);
690  h_tkChi2Large_[2] = dbe_->book1D(histname+"AllTracks_Fakes","Photons:Tracks from conversions: #chi^{2} of all tracks", 1000, 0., 5000.0);
691 
692 
693  histname="h2Chi2VsEta";
694  h2_Chi2VsEta_[0]=dbe_->book2D(histname+"All"," Reco Track #chi^{2} vs #eta: All ",etaBin2,etaMin, etaMax,100, chi2Min, chi2Max);
695  h2_Chi2VsEta_[1]=dbe_->book2D(histname+"All_Ass"," Reco Track #chi^{2} vs #eta: All ",etaBin2,etaMin, etaMax,100, chi2Min, chi2Max);
696  h2_Chi2VsEta_[2]=dbe_->book2D(histname+"All_Fakes"," Reco Track #chi^{2} vs #eta: All ",etaBin2,etaMin, etaMax,100, chi2Min, chi2Max);
697  histname="pChi2VsEta";
698  p_Chi2VsEta_[0]=dbe_->bookProfile(histname+"All"," Reco Track #chi^{2} vs #eta : All ",etaBin2,etaMin, etaMax, 100, chi2Min, chi2Max,"");
699  p_Chi2VsEta_[1]=dbe_->bookProfile(histname+"All_Ass"," Reco Track #chi^{2} vs #eta : All ",etaBin2,etaMin, etaMax, 100, chi2Min, chi2Max,"");
700  p_Chi2VsEta_[2]=dbe_->bookProfile(histname+"All_Fakes"," Reco Track #chi^{2} vs #eta : All ",etaBin2,etaMin, etaMax, 100, chi2Min, chi2Max,"");
701 
702  histname="h2Chi2VsR";
703  h2_Chi2VsR_[0]=dbe_->book2D(histname+"All"," Reco Track #chi^{2} vs R: All ",rBin,rMin, rMax,100,chi2Min, chi2Max);
704  h2_Chi2VsR_[1]=dbe_->book2D(histname+"All_Ass"," Reco Track #chi^{2} vs R: All ",rBin,rMin, rMax,100,chi2Min, chi2Max);
705  h2_Chi2VsR_[2]=dbe_->book2D(histname+"All_Fakes"," Reco Track #chi^{2} vs R: All ",rBin,rMin, rMax,100,chi2Min, chi2Max);
706  histname="pChi2VsR";
707  p_Chi2VsR_[0]=dbe_->bookProfile(histname+"All"," Reco Track #chi^{2} vas R : All ",rBin,rMin,rMax, 100,chi2Min, chi2Max,"");
708  p_Chi2VsR_[1]=dbe_->bookProfile(histname+"All_Ass"," Reco Track #chi^{2} vas R : All ",rBin,rMin,rMax, 100,chi2Min, chi2Max,"");
709  p_Chi2VsR_[2]=dbe_->bookProfile(histname+"All_Fakes"," Reco Track #chi^{2} vas R : All ",rBin,rMin,rMax, 100,chi2Min, chi2Max,"");
710 
711  histname="hTkD0";
712  h_TkD0_[0]=dbe_->book1D(histname+"All"," Reco Track D0*q: All ",200,-0.1,60);
713  h_TkD0_[1]=dbe_->book1D(histname+"All_Ass"," Reco Track D0*q: Barrel ",200,-0.1,60);
714  h_TkD0_[2]=dbe_->book1D(histname+"All_Fakes"," Reco Track D0*q: Endcap ",200,-0.1,60);
715 
716 
717 
718  histname="hTkPtPull";
719  h_TkPtPull_[0]=dbe_->book1D(histname+"All"," Reco Track Pt pull: All ",100, -20., 10.);
720  histname="hTkPtPull";
721  h_TkPtPull_[1]=dbe_->book1D(histname+"Barrel"," Reco Track Pt pull: Barrel ",100, -20., 10.);
722  histname="hTkPtPull";
723  h_TkPtPull_[2]=dbe_->book1D(histname+"Endcap"," Reco Track Pt pull: Endcap ",100, -20., 10.);
724 
725  histname="h2TkPtPullEta";
726  h2_TkPtPull_[0]=dbe_->book2D(histname+"All"," Reco Track Pt pull: All ",etaBin2,etaMin, etaMax,100, -20., 10.);
727  histname="pTkPtPullEta";
728  p_TkPtPull_[0]=dbe_->bookProfile(histname+"All"," Reco Track Pt pull: All ",etaBin2,etaMin, etaMax, 100, -20., 10., " ");
729 
730 
731  histname="PtRecVsPtSim";
732  h2_PtRecVsPtSim_[0]=dbe_->book2D(histname+"All", "Pt Rec vs Pt sim: All ", etBin,etMin,etMax,etBin,etMin, etMax);
733  h2_PtRecVsPtSim_[1]=dbe_->book2D(histname+"Barrel", "Pt Rec vs Pt sim: Barrel ", etBin,etMin,etMax,etBin,etMin, etMax);
734  h2_PtRecVsPtSim_[2]=dbe_->book2D(histname+"Endcap", "Pt Rec vs Pt sim: Endcap ", etBin,etMin,etMax,etBin,etMin, etMax);
735 
736  histname="photonPtRecVsPtSim";
737  h2_photonPtRecVsPtSim_=dbe_->book2D(histname+"All", "Pt Rec vs Pt sim: All ", etBin,etMin,etMax,etBin,etMin, etMax);
738 
739  histname="nHitsBeforeVtx";
740  h_nHitsBeforeVtx_[0]=dbe_->book1D(histname+"All", "Pt Rec vs Pt sim: All ", 16, -0.5, 15.5);
741  h_nHitsBeforeVtx_[1]=dbe_->book1D(histname+"Barrel", "Pt Rec vs Pt sim: Barrel ", 16, -0.5, 15.5);
742  h_nHitsBeforeVtx_[2]=dbe_->book1D(histname+"Endcap", "Pt Rec vs Pt sim: Endcap ", 16, -0.5, 15.5);
743 
744  histname="dlClosestHitToVtx";
745  h_dlClosestHitToVtx_[0]=dbe_->book1D(histname+"All", "Pt Rec vs Pt sim: All ", 100, -10., 10.);
746  h_dlClosestHitToVtx_[1]=dbe_->book1D(histname+"Barrel", "Pt Rec vs Pt sim: Barrel ", 100, -10., 10.);
747  h_dlClosestHitToVtx_[2]=dbe_->book1D(histname+"Endcap", "Pt Rec vs Pt sim: Endcap ", 100, -10., 10.);
748 
749  histname="dlClosestHitToVtxSig";
750  h_dlClosestHitToVtxSig_[0]=dbe_->book1D(histname+"All", "Pt Rec vs Pt sim: All ", 100, -8., 8.);
751  h_dlClosestHitToVtxSig_[1]=dbe_->book1D(histname+"Barrel", "Pt Rec vs Pt sim: Barrel ", 100, -8., 8.);
752  h_dlClosestHitToVtxSig_[2]=dbe_->book1D(histname+"Endcap", "Pt Rec vs Pt sim: Endcap ", 100, -8., 8.);
753 
754  h_match_= dbe_->book1D("h_match"," ", 3, -0.5,2.5);
755 
756 
757  } // if DQM
758 
759 
760 
761 }
762 
763 
764 
765  void TkConvValidator::beginRun (edm::Run const & r, edm::EventSetup const & theEventSetup) {
766 
767  //get magnetic field
768  edm::LogInfo("ConvertedPhotonProducer") << " get magnetic field" << "\n";
769  theEventSetup.get<IdealMagneticFieldRecord>().get(theMF_);
770 
771 
772  edm::ESHandle<TrackAssociatorBase> theHitsAssociator;
773  theEventSetup.get<TrackAssociatorRecord>().get("trackAssociatorByHitsForConversionValidation",theHitsAssociator);
774  theTrackAssociator_ = (TrackAssociatorBase *) theHitsAssociator.product();
775 
776 
777 
778 
779  thePhotonMCTruthFinder_ = new PhotonMCTruthFinder();
780 
781 }
782 
783 void TkConvValidator::endRun (edm::Run& r, edm::EventSetup const & theEventSetup) {
784 
785  delete thePhotonMCTruthFinder_;
786 
787 }
788 
789 
790 
792 
793  using namespace edm;
794  // const float etaPhiDistance=0.01;
795  // Fiducial region
796  // const float TRK_BARL =0.9;
797  const float BARL = 1.4442; // DAQ TDR p.290
798  // const float END_LO = 1.566; // unused
799  const float END_HI = 2.5;
800  // Electron mass
801  // const Float_t mElec= 0.000511; // unused
802 
803 
804  nEvt_++;
805  LogInfo("TkConvValidator") << "TkConvValidator Analyzing event number: " << e.id() << " Global Counter " << nEvt_ <<"\n";
806  // std::cout << "TkConvValidator Analyzing event number: " << e.id() << " Global Counter " << nEvt_ <<"\n";
807 
808 
809  // get the geometry from the event setup:
810  esup.get<CaloGeometryRecord>().get(theCaloGeom_);
811 
812 
813  // Transform Track into TransientTrack (needed by the Vertex fitter)
815  esup.get<TransientTrackRecord>().get("TransientTrackBuilder",theTTB);
816 
817 
820  e.getByLabel(conversionCollectionProducer_, conversionCollection_ , convHandle);
821  const reco::ConversionCollection convCollection = *(convHandle.product());
822  if (!convHandle.isValid()) {
823  edm::LogError("ConversionsProducer") << "Error! Can't get the collection "<< std::endl;
824  return;
825  }
826 
828  Handle<reco::PhotonCollection> photonHandle;
829  e.getByLabel(photonCollectionProducer_, photonCollection_ , photonHandle);
830  const reco::PhotonCollection photonCollection = *(photonHandle.product());
831  if (!photonHandle.isValid()) {
832  edm::LogError("PhotonProducer") << "Error! Can't get the Photon collection "<< std::endl;
833  return;
834  }
835 
836 
837  // offline Primary vertex
840  e.getByLabel("offlinePrimaryVertices", vertexHandle);
841  if (!vertexHandle.isValid()) {
842  edm::LogError("TrackerOnlyConversionProducer") << "Error! Can't get the product primary Vertex Collection "<< "\n";
843  } else {
844  vertexCollection = *(vertexHandle.product());
845  }
846  reco::Vertex the_pvtx;
847  bool valid_pvtx = false;
848  if (!vertexCollection.empty()){
849  the_pvtx = *(vertexCollection.begin());
850  //asking for one good vertex
851  if (the_pvtx.isValid() && fabs(the_pvtx.position().z())<=15 && the_pvtx.position().Rho()<=2){
852  valid_pvtx = true;
853  }
854  }
855 
857  e.getByLabel("offlineBeamSpot", bsHandle);
858  if (!bsHandle.isValid()) {
859  edm::LogError("TrackerOnlyConversionProducer") << "Error! Can't get the product primary Vertex Collection "<< "\n";
860  return;
861  }
862  const reco::BeamSpot &thebs = *bsHandle.product();
863 
864  //get tracker geometry for hits positions
867  const TrackerGeometry* trackerGeom = tracker.product();
868 
869 
870 
872  //get simtrack info
873  std::vector<SimTrack> theSimTracks;
874  std::vector<SimVertex> theSimVertices;
875 
878  e.getByLabel("g4SimHits",SimTk);
879  e.getByLabel("g4SimHits",SimVtx);
880 
881  bool useTP= parameters_.getParameter<bool>("useTP");
882  TrackingParticleCollection tpForEfficiency;
883  TrackingParticleCollection tpForFakeRate;
885  edm::Handle<TrackingParticleCollection> TPHandleForFakeRate;
886  if ( useTP) {
887  e.getByLabel("tpSelecForEfficiency",TPHandleForEff);
888  tpForEfficiency = *(TPHandleForEff.product());
889  e.getByLabel("tpSelecForFakeRate",TPHandleForFakeRate);
890  tpForFakeRate = *(TPHandleForFakeRate.product());
891  }
892 
893 
894 
895  theSimTracks.insert(theSimTracks.end(),SimTk->begin(),SimTk->end());
896  theSimVertices.insert(theSimVertices.end(),SimVtx->begin(),SimVtx->end());
897  std::vector<PhotonMCTruth> mcPhotons=thePhotonMCTruthFinder_->find (theSimTracks, theSimVertices);
898 
900  e.getByLabel("generator",hepMC);
901  // const HepMC::GenEvent *myGenEvent = hepMC->GetEvent(); // unused
902 
903 
904  // get generated jets
906  e.getByLabel("iterativeCone5GenJets","",GenJetsHandle);
907  reco::GenJetCollection genJetCollection = *(GenJetsHandle.product());
908 
909  ConversionHitChecker hitChecker;
910 
911  // ################ SIM to RECO ######################### //
912  std::map<const reco::Track*,TrackingParticleRef> myAss;
913  std::map<const reco::Track*,TrackingParticleRef>::const_iterator itAss;
914 
915  for ( std::vector<PhotonMCTruth>::const_iterator mcPho=mcPhotons.begin(); mcPho !=mcPhotons.end(); mcPho++) {
916 
917  mcConvPt_= (*mcPho).fourMomentum().et();
918  float mcPhi= (*mcPho).fourMomentum().phi();
919  mcPhi_= phiNormalization(mcPhi);
920  mcEta_= (*mcPho).fourMomentum().pseudoRapidity();
921  mcEta_ = etaTransformation(mcEta_, (*mcPho).primaryVertex().z() );
922  mcConvR_= (*mcPho).vertex().perp();
923  mcConvX_= (*mcPho).vertex().x();
924  mcConvY_= (*mcPho).vertex().y();
925  mcConvZ_= (*mcPho).vertex().z();
926  mcConvEta_= (*mcPho).vertex().eta();
927  mcConvPhi_= (*mcPho).vertex().phi();
928 
929  if ( fabs(mcEta_) > END_HI ) continue;
930 
931  if (mcConvPt_<minPhoPtForEffic) continue;
932  if (fabs(mcEta_)>maxPhoEtaForEffic) continue;
933  if (fabs(mcConvZ_)>maxPhoZForEffic) continue;
934  if (mcConvR_>maxPhoRForEffic) continue;
936 
937  bool goodSimConversion=false;
938  bool visibleConversion=false;
939  bool visibleConversionsWithTwoSimTracks=false;
940  if ( (*mcPho).isAConversion() == 1 ) {
941  nSimConv_[0]++;
942  h_AllSimConv_[0]->Fill( mcEta_ ) ;
943  h_AllSimConv_[1]->Fill( mcPhi_ );
944  h_AllSimConv_[2]->Fill( mcConvR_ );
945  h_AllSimConv_[3]->Fill( mcConvZ_ );
946  h_AllSimConv_[4]->Fill( (*mcPho).fourMomentum().et());
947 
948  if ( mcConvR_ <15) h_SimConvEtaPix_[0]->Fill( mcEta_ ) ;
949 
950  if ( ( fabs(mcEta_) <= BARL && mcConvR_ <85 ) ||
951  ( fabs(mcEta_) > BARL && fabs(mcEta_) <=END_HI && fabs( (*mcPho).vertex().z() ) < 210 ) ) visibleConversion=true;
952 
953  theConvTP_.clear();
954  // std::cout << " TkConvValidator TrackingParticles TrackingParticleCollection size "<< trackingParticles.size() << "\n";
955  //duplicated TP collections for two associations
956  for(size_t i = 0; i < tpForEfficiency.size(); ++i){
957  TrackingParticleRef tp (TPHandleForEff,i);
958  if ( fabs( tp->vx() - (*mcPho).vertex().x() ) < 0.0001 &&
959  fabs( tp->vy() - (*mcPho).vertex().y() ) < 0.0001 &&
960  fabs( tp->vz() - (*mcPho).vertex().z() ) < 0.0001) {
961  theConvTP_.push_back( tp );
962  }
963  }
964  //std::cout << " TkConvValidator theConvTP_ size " << theConvTP_.size() << std::endl;
965 
966  if ( theConvTP_.size() == 2 ) visibleConversionsWithTwoSimTracks=true;
967  goodSimConversion=false;
968 
969  if ( visibleConversion && visibleConversionsWithTwoSimTracks ) goodSimConversion=true;
970  if ( goodSimConversion ) {
971  nSimConv_[1]++;
972  h_VisSimConv_[0]->Fill( mcEta_ ) ;
973  h_VisSimConv_[1]->Fill( mcPhi_ );
974  h_VisSimConv_[2]->Fill( mcConvR_ );
975  h_VisSimConv_[3]->Fill( mcConvZ_ );
976  h_VisSimConv_[4]->Fill( (*mcPho).fourMomentum().et());
977 
978  }
979 
980  for ( edm::RefVector<TrackingParticleCollection>::iterator iTrk=theConvTP_.begin(); iTrk!=theConvTP_.end(); ++iTrk) {
981  h_simTkPt_ -> Fill ( (*iTrk)->pt() );
982  h_simTkEta_ -> Fill ( (*iTrk)->eta() );
983  }
984 
985 
986  }
987 
988  if ( ! (visibleConversion && visibleConversionsWithTwoSimTracks ) ) continue;
989 
990  h_simConvVtxRvsZ_[0] ->Fill ( fabs (mcConvZ_), mcConvR_ ) ;
991  if ( fabs(mcEta_) <=1.) {
992  h_simConvVtxRvsZ_[1] ->Fill ( fabs (mcConvZ_), mcConvR_ ) ;
993  h_simConvVtxYvsX_ ->Fill ( mcConvX_, mcConvY_ ) ;
994  }
995  else
996  h_simConvVtxRvsZ_[2] ->Fill ( fabs (mcConvZ_), mcConvR_ ) ;
997 
998  //std::cout << " TkConvValidator theConvTP_ size " << theConvTP_.size() << std::endl;
999  for ( edm::RefVector<TrackingParticleCollection>::iterator iTP= theConvTP_.begin(); iTP!=theConvTP_.end(); iTP++)
1000  {
1001  // std::cout << " SIM to RECO TP vertex " << (*iTP)->vx() << " " << (*iTP)->vy() << " " << (*iTP)->vz() << " pt " << (*iTP)->pt() << std::endl;
1002  }
1003 
1004  bool recomatch = false;
1005  float chi2Prob = 0.;
1007  // cout << " size of conversions " << convHandle->size() << endl;
1008  for (reco::ConversionCollection::const_iterator conv = convHandle->begin();conv!=convHandle->end();++conv) {
1009 
1010  const reco::Conversion aConv = (*conv);
1011  if ( arbitratedMerged_ && !aConv.quality(reco::Conversion::arbitratedMerged) ) continue;
1012  if ( generalTracksOnly_ && !aConv.quality(reco::Conversion::generalTracksOnly) ) continue;
1013  if ( arbitratedEcalSeeded_ && !aConv.quality(reco::Conversion::arbitratedEcalSeeded) ) continue;
1014 
1015 
1016  if ( highPurity_ && !aConv.quality(reco::Conversion::highPurity) ) continue;
1017 
1018  //problematic?
1019  std::vector<edm::RefToBase<reco::Track> > tracks = aConv.tracks();
1020 
1021 
1022  const reco::Vertex& vtx = aConv.conversionVertex();
1023  //requires two tracks and a valid vertex
1024  if (tracks.size() !=2 || !(vtx.isValid())) continue;
1025 
1026 
1027  if (ChiSquaredProbability( aConv.conversionVertex().chi2(), aConv.conversionVertex().ndof() ) <= minProb_) continue;
1028  if (aConv.nHitsBeforeVtx().size()>1 && max(aConv.nHitsBeforeVtx().at(0),aConv.nHitsBeforeVtx().at(1)) > maxHitsBeforeVtx_ ) continue;
1029 
1030 
1031  //compute transverse decay length with respect to beamspot
1032  math::XYZVectorF themom = aConv.refittedPairMomentum();
1033  double dbsx = aConv.conversionVertex().x() - thebs.x0();
1034  double dbsy = aConv.conversionVertex().y() - thebs.y0();
1035  double lxy = (themom.x()*dbsx + themom.y()*dbsy)/themom.rho();
1036 
1037  if (lxy<minLxy_) continue;
1038 
1039  // bool phoIsInBarrel=false; // unused
1040  // bool phoIsInEndcap=false; // unused
1041  RefToBase<reco::Track> tfrb1 = aConv.tracks().front();
1042  RefToBase<reco::Track> tfrb2 = aConv.tracks().back();
1043 
1044  if ( ecalalgotracks_ && ( !(tfrb1->algo()==15 || tfrb1->algo()==16) || !(tfrb2->algo()==15 || tfrb2->algo()==16) ) ) continue;
1045 
1046 
1047  //reco::TrackRef tk1 = aConv.tracks().front();
1048  //reco::TrackRef tk2 = aConv.tracks().back();
1049  //std::cout << "SIM to RECO conversion track pt " << tk1->pt() << " " << tk2->pt() << endl;
1050  //
1051  //Use two RefToBaseVector and do two association actions to avoid that if two tracks from different collection
1053  tc1.push_back(tfrb1);
1054  tc2.push_back(tfrb2);
1055  bool isAssociated = false;
1056  reco::SimToRecoCollection q1 = theTrackAssociator_->associateSimToReco(tc1,theConvTP_,&e);
1057  reco::SimToRecoCollection q2 = theTrackAssociator_->associateSimToReco(tc2,theConvTP_,&e);
1058  //try {
1059  std::vector<std::pair<RefToBase<reco::Track>, double> > trackV1, trackV2;
1060 
1061  int tp_1 = 0, tp_2 = 1;//the index of associated tp in theConvTP_ for two tracks
1062  if (q1.find(theConvTP_[0])!=q1.end()){
1063  trackV1 = (std::vector<std::pair<RefToBase<reco::Track>, double> >) q1[theConvTP_[0]];
1064  } else if (q1.find(theConvTP_[1])!=q1.end()){
1065  trackV1 = (std::vector<std::pair<RefToBase<reco::Track>, double> >) q1[theConvTP_[1]];
1066  tp_1 = 1;
1067  }
1068  if (q2.find(theConvTP_[1])!=q2.end()){
1069  trackV2 = (std::vector<std::pair<RefToBase<reco::Track>, double> >) q2[theConvTP_[1]];
1070  } else if (q2.find(theConvTP_[0])!=q2.end()){
1071  trackV2 = (std::vector<std::pair<RefToBase<reco::Track>, double> >) q2[theConvTP_[0]];
1072  tp_2 = 0;
1073  }
1074  if (!(trackV1.size()&&trackV2.size()))
1075  continue;
1076  if (tp_1 == tp_2) continue;
1077 
1078  edm::RefToBase<reco::Track> tr1 = trackV1.front().first;
1079  edm::RefToBase<reco::Track> tr2 = trackV2.front().first;
1080  //std::cout << "associated tp1 " <<theConvTP_[0]->pt() << " to track with pT=" << tr1->pt() << " " << (tr1.get())->pt() << endl;
1081  //std::cout << "associated tp2 " <<theConvTP_[1]->pt() << " to track with pT=" << tr2->pt() << " " << (tr2.get())->pt() << endl;
1082  myAss.insert( std::make_pair (tr1.get(),theConvTP_[tp_1] ) );
1083  myAss.insert( std::make_pair (tr2.get(),theConvTP_[tp_2]) );
1084 
1085  //} catch (Exception event) {
1086  //cout << "continue: " << event.what() << endl;
1087  // continue;
1088  //}
1089 
1090 
1091  isAssociated = true;
1092  recomatch = true;
1093  chi2Prob = ChiSquaredProbability( aConv.conversionVertex().chi2(), aConv.conversionVertex().ndof() );
1094 
1095  if (isAssociated) {
1096  h_SimRecConvTwoMTracks_[0]->Fill( mcEta_ ) ;
1097  h_SimRecConvTwoMTracks_[1]->Fill( mcPhi_ );
1098  h_SimRecConvTwoMTracks_[2]->Fill( mcConvR_ );
1099  h_SimRecConvTwoMTracks_[3]->Fill( mcConvZ_ );
1100  h_SimRecConvTwoMTracks_[4]->Fill( (*mcPho).fourMomentum().et());
1101  }
1102 
1103  // break;
1104  } // loop over reco conversions
1105  if (recomatch) {
1107  h_SimConvTwoMTracks_[0]->Fill( mcEta_ ) ;
1108  h_SimConvTwoMTracks_[1]->Fill( mcPhi_ );
1109  h_SimConvTwoMTracks_[2]->Fill( mcConvR_ );
1110  h_SimConvTwoMTracks_[3]->Fill( mcConvZ_ );
1111  h_SimConvTwoMTracks_[4]->Fill( (*mcPho).fourMomentum().et());
1112 
1113 
1114  if ( chi2Prob > 0) {
1115  h_SimConvTwoMTracksAndVtxPGT0_[0]->Fill( mcEta_ ) ;
1116  h_SimConvTwoMTracksAndVtxPGT0_[1]->Fill( mcPhi_ );
1117  h_SimConvTwoMTracksAndVtxPGT0_[2]->Fill( mcConvR_ );
1118  h_SimConvTwoMTracksAndVtxPGT0_[3]->Fill( mcConvZ_ );
1119  h_SimConvTwoMTracksAndVtxPGT0_[4]->Fill( (*mcPho).fourMomentum().et());
1120  }
1121  if ( chi2Prob > 0.0005) {
1122  h_SimConvTwoMTracksAndVtxPGT0005_[0]->Fill( mcEta_ ) ;
1123  h_SimConvTwoMTracksAndVtxPGT0005_[1]->Fill( mcPhi_ );
1124  h_SimConvTwoMTracksAndVtxPGT0005_[2]->Fill( mcConvR_ );
1125  h_SimConvTwoMTracksAndVtxPGT0005_[3]->Fill( mcConvZ_ );
1126  h_SimConvTwoMTracksAndVtxPGT0005_[4]->Fill( (*mcPho).fourMomentum().et());
1127 
1128  }
1129  }
1130 
1131  } //End loop over simulated conversions
1132 
1133 
1134  // ########################### RECO to SIM ############################## //
1135 
1136  for (reco::ConversionCollection::const_iterator conv = convHandle->begin();conv!=convHandle->end();++conv) {
1137  const reco::Conversion aConv = (*conv);
1138  if ( arbitratedMerged_ && !aConv.quality(reco::Conversion::arbitratedMerged) ) continue;
1139  if ( generalTracksOnly_ && !aConv.quality(reco::Conversion::generalTracksOnly) ) continue;
1140  if ( arbitratedEcalSeeded_ && !aConv.quality(reco::Conversion::arbitratedEcalSeeded) ) continue;
1141 
1142 
1143  if ( highPurity_ && !aConv.quality(reco::Conversion::highPurity) ) continue;
1144 
1145  //problematic?
1146  std::vector<edm::RefToBase<reco::Track> > tracks = aConv.tracks();
1147 
1148  const reco::Vertex& vtx = aConv.conversionVertex();
1149  //requires two tracks and a valid vertex
1150  if (tracks.size() !=2 || !(vtx.isValid())) continue;
1151  //if (tracks.size() !=2) continue;
1152 
1153 
1154  if (ChiSquaredProbability( aConv.conversionVertex().chi2(), aConv.conversionVertex().ndof() ) <= minProb_) continue;
1155  if (aConv.nHitsBeforeVtx().size()>1 && max(aConv.nHitsBeforeVtx().at(0),aConv.nHitsBeforeVtx().at(1)) > maxHitsBeforeVtx_ ) continue;
1156 
1157  //compute transverse decay length with respect to beamspot
1158  math::XYZVectorF themom = aConv.refittedPairMomentum();
1159  double dbsx = aConv.conversionVertex().x() - thebs.x0();
1160  double dbsy = aConv.conversionVertex().y() - thebs.y0();
1161  double lxy = (themom.x()*dbsx + themom.y()*dbsy)/themom.rho();
1162 
1163  if (lxy<minLxy_) continue;
1164 
1165  bool phoIsInBarrel=false;
1166  bool phoIsInEndcap=false;
1167  RefToBase<reco::Track> tk1 = aConv.tracks().front();
1168  RefToBase<reco::Track> tk2 = aConv.tracks().back();
1170  tc1.push_back(tk1);
1171  tc2.push_back(tk2);
1172 
1173  if ( ecalalgotracks_ && ( !(tk1->algo()==15 || tk1->algo()==16) || !(tk2->algo()==15 || tk2->algo()==16) ) ) continue;
1174 
1175 
1176  //std::cout << " RECO to SIM conversion track pt " << tk1->pt() << " " << tk2->pt() << endl;
1177  const reco::Track refTk1 = aConv.conversionVertex().refittedTracks().front();
1178  const reco::Track refTk2 = aConv.conversionVertex().refittedTracks().back();
1179 
1180  //TODO replace it with phi at vertex
1181  float dPhiTracksAtVtx = aConv.dPhiTracksAtVtx();
1182  // override with the phi calculated at the vertex
1183  math::XYZVector p1AtVtx= recalculateMomentumAtFittedVertex ( (*theMF_), *trackerGeom, tk1, aConv.conversionVertex() );
1184  math::XYZVector p2AtVtx= recalculateMomentumAtFittedVertex ( (*theMF_), *trackerGeom, tk2, aConv.conversionVertex() );
1185  if ( sqrt(p1AtVtx.perp2()) > sqrt(p2AtVtx.perp2()) )
1186  dPhiTracksAtVtx = p1AtVtx.phi() - p2AtVtx.phi();
1187  else
1188  dPhiTracksAtVtx = p2AtVtx.phi() - p1AtVtx.phi();
1189 
1190 
1191  math::XYZVectorF refittedMom = aConv.refittedPairMomentum();
1192 
1193 
1194  if (fabs(refittedMom.eta())< 1.479 ) {
1195  phoIsInBarrel=true;
1196  } else {
1197  phoIsInEndcap=true;
1198  }
1199 
1200  nRecConv_++;
1201 
1202  // check matching with reco photon
1203  double Mindeltaeta = 999999;
1204  double Mindeltaphi = 999999;
1205  bool matchConvSC=false;
1206  reco::PhotonCollection::const_iterator iMatchingSC;
1207  for( reco::PhotonCollection::const_iterator iPho = photonCollection.begin(); iPho != photonCollection.end(); iPho++) {
1208  reco::Photon aPho = reco::Photon(*iPho);
1209  const double deltaphi= reco::deltaPhi( aConv.refittedPairMomentum().phi(), aPho.superCluster()->position().phi());
1210  double ConvEta = etaTransformation(aConv.refittedPairMomentum().eta(),aConv.zOfPrimaryVertexFromTracks());
1211  double deltaeta = abs( aPho.superCluster()->position().eta() -ConvEta);
1212  if (abs(deltaeta)<abs(Mindeltaeta) && abs(deltaphi)<abs(Mindeltaphi)) {
1213  Mindeltaphi=abs(deltaphi);
1214  Mindeltaeta=abs(deltaeta);
1215  iMatchingSC = iPho ;
1216  }
1217  }
1218  if (abs(Mindeltaeta)<0.1 && abs(Mindeltaphi)<0.1) {
1219  matchConvSC=true;
1220  }
1221 
1222 
1224  int match =0;
1225  float invM=aConv.pairInvariantMass();
1226  float chi2Prob = ChiSquaredProbability( aConv.conversionVertex().chi2(), aConv.conversionVertex().ndof() );
1227  uint maxNHitsBeforeVtx = aConv.nHitsBeforeVtx().size()>1 ? max(aConv.nHitsBeforeVtx().at(0),aConv.nHitsBeforeVtx().at(1)) : 0;
1228  uint sumNHitsBeforeVtx = aConv.nHitsBeforeVtx().size()>1 ? aConv.nHitsBeforeVtx().at(0) + aConv.nHitsBeforeVtx().at(1) : 0;
1229  float maxDlClosestHitToVtx = aConv.dlClosestHitToVtx().size()>1 ? max(aConv.dlClosestHitToVtx().at(0).value(),aConv.dlClosestHitToVtx().at(1).value()) : 0;
1230  float maxDlClosestHitToVtxSig = aConv.dlClosestHitToVtx().size()>1 ? max(aConv.dlClosestHitToVtx().at(0).value()/aConv.dlClosestHitToVtx().at(0).error(),aConv.dlClosestHitToVtx().at(1).value()/aConv.dlClosestHitToVtx().at(1).error()) : 0;
1231 
1232  int ilead = 0, itrail = 1;
1233  if (tk2->pt() > tk1->pt()) {
1234  ilead = 1;
1235  itrail = 0;
1236  }
1237  RefToBase<reco::Track> tklead = aConv.tracks().at(ilead);
1238  RefToBase<reco::Track> tktrail = aConv.tracks().at(itrail);
1239 
1240  int deltaExpectedHitsInner = tklead->trackerExpectedHitsInner().numberOfHits() - tktrail->trackerExpectedHitsInner().numberOfHits();
1241  int leadExpectedHitsInner = tklead->trackerExpectedHitsInner().numberOfHits();
1242  uint leadNHitsBeforeVtx = aConv.nHitsBeforeVtx().size()>1 ? aConv.nHitsBeforeVtx().at(ilead) : 0;
1243  uint trailNHitsBeforeVtx = aConv.nHitsBeforeVtx().size()>1 ? aConv.nHitsBeforeVtx().at(itrail) : 0;
1244 
1245 
1246  h_convEta_[match][0]->Fill( refittedMom.eta() );
1247  h_convEta2_[match][0]->Fill( refittedMom.eta() );
1248 
1249  h_convPhi_[match][0]->Fill( refittedMom.phi() );
1250  h_convR_[match][0]->Fill( sqrt(aConv.conversionVertex().position().perp2()) );
1251  h_convRplot_->Fill( sqrt(aConv.conversionVertex().position().perp2()) );
1252  h_convZ_[match][0]->Fill( aConv.conversionVertex().position().z() );
1253  h_convZplot_->Fill( aConv.conversionVertex().position().z() );
1254  h_convPt_[match][0]->Fill( sqrt(refittedMom.perp2()) );
1255  h_invMass_[match][0] ->Fill( invM);
1256  h_vtxChi2Prob_[match][0] ->Fill (chi2Prob);
1257  h_lxybs_[match][0] ->Fill (lxy);
1258  h_maxNHitsBeforeVtx_[match][0] ->Fill (maxNHitsBeforeVtx);
1259  h_leadNHitsBeforeVtx_[match][0] ->Fill (leadNHitsBeforeVtx);
1260  h_trailNHitsBeforeVtx_[match][0] ->Fill (trailNHitsBeforeVtx);
1261  h_sumNHitsBeforeVtx_[match][0] ->Fill (sumNHitsBeforeVtx);
1262  h_deltaExpectedHitsInner_[match][0] ->Fill (deltaExpectedHitsInner);
1263  h_leadExpectedHitsInner_[match][0] ->Fill (leadExpectedHitsInner);
1264  h_maxDlClosestHitToVtx_[match][0] ->Fill (maxDlClosestHitToVtx);
1265  h_maxDlClosestHitToVtxSig_[match][0] ->Fill (maxDlClosestHitToVtxSig);
1266  h_nSharedHits_[match][0] ->Fill (aConv.nSharedHits());
1267 
1268 
1269  if ( matchConvSC ) {
1270  h_convEtaMatchSC_[match][0]->Fill( refittedMom.eta() );
1271  h_EoverPTracks_[match][0] ->Fill (iMatchingSC->superCluster()->energy()/sqrt(refittedMom.mag2()));
1272  h_convSCdPhi_[match][0]->Fill( iMatchingSC->superCluster()->position().phi() - refittedMom.phi() );
1273  double ConvEta = etaTransformation(aConv.refittedPairMomentum().eta(),aConv.zOfPrimaryVertexFromTracks());
1274  h_convSCdEta_[match][0]->Fill( iMatchingSC->superCluster()->position().eta() - ConvEta );
1275  }
1276 
1277  h_distMinAppTracks_[match][0] ->Fill (aConv.distOfMinimumApproach());
1278  h_DPhiTracksAtVtx_[match][0]->Fill( dPhiTracksAtVtx);
1279  h2_DPhiTracksAtVtxVsEta_->Fill( mcEta_, dPhiTracksAtVtx);
1280  h2_DPhiTracksAtVtxVsR_->Fill( mcConvR_, dPhiTracksAtVtx);
1281  p_DPhiTracksAtVtxVsEta_->Fill( mcEta_, dPhiTracksAtVtx);
1282  p_DPhiTracksAtVtxVsR_->Fill( mcConvR_, dPhiTracksAtVtx);
1283 
1284  h_DCotTracks_[match][0] ->Fill ( aConv.pairCotThetaSeparation() );
1285  h2_DCotTracksVsEta_->Fill( mcEta_, aConv.pairCotThetaSeparation() );
1286  h2_DCotTracksVsR_->Fill( mcConvR_, aConv.pairCotThetaSeparation() );
1287  p_DCotTracksVsEta_->Fill( mcEta_, aConv.pairCotThetaSeparation() );
1288  p_DCotTracksVsR_->Fill( mcConvR_, aConv.pairCotThetaSeparation() );
1289 
1290  if ( phoIsInBarrel ) {
1291  h_invMass_[match][1] ->Fill(invM);
1292  h_vtxChi2Prob_[match][1] ->Fill (chi2Prob);
1293  h_distMinAppTracks_[match][1] ->Fill (aConv.distOfMinimumApproach());
1294  h_DPhiTracksAtVtx_[match][1]->Fill( dPhiTracksAtVtx);
1295  h_DCotTracks_[match][1] ->Fill ( aConv.pairCotThetaSeparation() );
1296  h_lxybs_[match][1] ->Fill (lxy);
1297  h_maxNHitsBeforeVtx_[match][1] ->Fill (maxNHitsBeforeVtx);
1298  h_leadNHitsBeforeVtx_[match][1] ->Fill (leadNHitsBeforeVtx);
1299  h_trailNHitsBeforeVtx_[match][1] ->Fill (trailNHitsBeforeVtx);
1300  h_sumNHitsBeforeVtx_[match][1] ->Fill (sumNHitsBeforeVtx);
1301  h_deltaExpectedHitsInner_[match][1] ->Fill (deltaExpectedHitsInner);
1302  h_leadExpectedHitsInner_[match][1] ->Fill (leadExpectedHitsInner);
1303  h_maxDlClosestHitToVtx_[match][1] ->Fill (maxDlClosestHitToVtx);
1304  h_maxDlClosestHitToVtxSig_[match][1] ->Fill (maxDlClosestHitToVtxSig);
1305  h_nSharedHits_[match][1] ->Fill (aConv.nSharedHits());
1306 
1307  /*
1308  if ( aConv.caloCluster().size() ) {
1309  h_convSCdPhi_[match][1]->Fill( aConv.caloCluster()[0]->phi() - refittedMom.phi() );
1310  double ConvEta = etaTransformation(aConv.refittedPairMomentum().eta(),aConv.zOfPrimaryVertexFromTracks());
1311  h_convSCdEta_[match][1]->Fill( aConv.caloCluster()[0]->eta() - ConvEta );
1312  }
1313  */
1314 
1315  if ( matchConvSC ) {
1316  h_EoverPTracks_[match][1] -> Fill(iMatchingSC->superCluster()->energy()/sqrt(refittedMom.mag2()));
1317  h_convSCdPhi_[match][1]->Fill( iMatchingSC->superCluster()->position().phi() - refittedMom.phi() );
1318  double ConvEta = etaTransformation(aConv.refittedPairMomentum().eta(),aConv.zOfPrimaryVertexFromTracks());
1319  h_convSCdEta_[match][1]->Fill( iMatchingSC->superCluster()->position().eta() - ConvEta );
1320  }
1321  }
1322 
1323 
1324  if ( phoIsInEndcap ) {
1325  h_invMass_[match][2] ->Fill(invM);
1326  h_vtxChi2Prob_[match][2] ->Fill (chi2Prob);
1327  h_distMinAppTracks_[match][2] ->Fill (aConv.distOfMinimumApproach());
1328  h_DPhiTracksAtVtx_[match][2]->Fill( dPhiTracksAtVtx);
1329  h_DCotTracks_[match][2] ->Fill ( aConv.pairCotThetaSeparation() );
1330  h_lxybs_[match][2] ->Fill (lxy);
1331  h_maxNHitsBeforeVtx_[match][2] ->Fill (maxNHitsBeforeVtx);
1332  h_leadNHitsBeforeVtx_[match][2] ->Fill (leadNHitsBeforeVtx);
1333  h_trailNHitsBeforeVtx_[match][2] ->Fill (trailNHitsBeforeVtx);
1334  h_sumNHitsBeforeVtx_[match][2] ->Fill (sumNHitsBeforeVtx);
1335  h_deltaExpectedHitsInner_[match][2] ->Fill (deltaExpectedHitsInner);
1336  h_leadExpectedHitsInner_[match][2] ->Fill (leadExpectedHitsInner);
1337  h_maxDlClosestHitToVtx_[match][2] ->Fill (maxDlClosestHitToVtx);
1338  h_maxDlClosestHitToVtxSig_[match][2] ->Fill (maxDlClosestHitToVtxSig);
1339  h_nSharedHits_[match][2] ->Fill (aConv.nSharedHits());
1340  if ( matchConvSC ) {
1341  h_EoverPTracks_[match][2] ->Fill (iMatchingSC->superCluster()->energy()/sqrt(refittedMom.mag2()));
1342  h_convSCdPhi_[match][2]->Fill( iMatchingSC->superCluster()->position().phi() - refittedMom.phi() );
1343  double ConvEta = etaTransformation(aConv.refittedPairMomentum().eta(),aConv.zOfPrimaryVertexFromTracks());
1344  h_convSCdEta_[match][2]->Fill( iMatchingSC->superCluster()->position().eta() - ConvEta );
1345 
1346  }
1347  }
1348 
1349  h_convVtxRvsZ_[0] ->Fill ( fabs (aConv.conversionVertex().position().z() ), sqrt(aConv.conversionVertex().position().perp2()) ) ;
1350  h_convVtxYvsX_ ->Fill ( aConv.conversionVertex().position().x(), aConv.conversionVertex().position().y() );
1351  h_convVtxYvsX_zoom_[0] ->Fill ( aConv.conversionVertex().position().x(), aConv.conversionVertex().position().y() );
1352  h_convVtxYvsX_zoom_[1] ->Fill ( aConv.conversionVertex().position().x(), aConv.conversionVertex().position().y() );
1353 
1354 
1355  // quantities per track: all conversions
1356  for (unsigned int i=0; i<tracks.size(); i++) {
1357  double d0;
1358  if (valid_pvtx){
1359  d0 = - tracks[i]->dxy(the_pvtx.position());
1360  } else {
1361  d0 = tracks[i]->d0();
1362  }
1363  h_TkD0_[match]->Fill ( d0* tracks[i]->charge() );
1364  h_nHitsBeforeVtx_[match]->Fill ( aConv.nHitsBeforeVtx().size()>1 ? aConv.nHitsBeforeVtx().at(i) : 0 );
1365  h_dlClosestHitToVtx_[match]->Fill ( aConv.dlClosestHitToVtx().size()>1 ? aConv.dlClosestHitToVtx().at(i).value() : 0 );
1366  h_dlClosestHitToVtxSig_[match]->Fill ( aConv.dlClosestHitToVtx().size()>1 ? aConv.dlClosestHitToVtx().at(i).value()/aConv.dlClosestHitToVtx().at(i).error() : 0 );
1367 
1368  nHitsVsEta_[match] ->Fill (mcEta_, float(tracks[i]->numberOfValidHits()) );
1369  nHitsVsR_[match] ->Fill (mcConvR_, float(tracks[i]->numberOfValidHits()) );
1370  p_nHitsVsEta_[match] ->Fill (mcEta_, float(tracks[i]->numberOfValidHits()) -0.0001);
1371  p_nHitsVsR_[match] ->Fill (mcConvR_, float(tracks[i]->numberOfValidHits()) -0.0001);
1372  h_tkChi2_[match] ->Fill (tracks[i]->normalizedChi2() );
1373  h_tkChi2Large_[match] ->Fill (tracks[i]->normalizedChi2() );
1374  h2_Chi2VsEta_[match] ->Fill( mcEta_, tracks[i]->normalizedChi2() );
1375  h2_Chi2VsR_[match] ->Fill( mcConvR_, tracks[i]->normalizedChi2() );
1376  p_Chi2VsEta_[match] ->Fill( mcEta_, tracks[i]->normalizedChi2() );
1377  p_Chi2VsR_[match] ->Fill( mcConvR_, tracks[i]->normalizedChi2() );
1378 
1379  }
1380 
1381  bool associated = false;
1382  float mcConvPt_= -99999999;
1383  // float mcPhi= 0; // unused
1384  float simPV_Z=0;
1385  for ( std::vector<PhotonMCTruth>::const_iterator mcPho=mcPhotons.begin(); mcPho !=mcPhotons.end(); mcPho++) {
1386  mcConvPt_= (*mcPho).fourMomentum().et();
1387  float mcPhi= (*mcPho).fourMomentum().phi();
1388  simPV_Z = (*mcPho).primaryVertex().z();
1389  mcPhi_= phiNormalization(mcPhi);
1390  mcEta_= (*mcPho).fourMomentum().pseudoRapidity();
1391  mcEta_ = etaTransformation(mcEta_, (*mcPho).primaryVertex().z() );
1392  mcConvR_= (*mcPho).vertex().perp();
1393  mcConvX_= (*mcPho).vertex().x();
1394  mcConvY_= (*mcPho).vertex().y();
1395  mcConvZ_= (*mcPho).vertex().z();
1396  mcConvEta_= (*mcPho).vertex().eta();
1397  mcConvPhi_= (*mcPho).vertex().phi();
1398  if ( fabs(mcEta_) > END_HI ) continue;
1399  if (mcConvPt_<minPhoPtForPurity) continue;
1400  if (fabs(mcEta_)>maxPhoEtaForPurity) continue;
1401  if (fabs(mcConvZ_)>maxPhoZForPurity) continue;
1402  if (mcConvR_>maxPhoRForEffic) continue;
1403 
1404  if ( (*mcPho).isAConversion() != 1 ) continue;
1405  if (!( ( fabs(mcEta_) <= BARL && mcConvR_ <85 ) ||
1406  ( fabs(mcEta_) > BARL && fabs(mcEta_) <=END_HI && fabs( (*mcPho).vertex().z() ) < 210 ) ) )
1407  continue;
1408 
1409 
1410  theConvTP_.clear();
1411  for(size_t i = 0; i < tpForFakeRate.size(); ++i){
1412  TrackingParticleRef tp (TPHandleForFakeRate,i);
1413  if ( fabs( tp->vx() - (*mcPho).vertex().x() ) < 0.0001 &&
1414  fabs( tp->vy() - (*mcPho).vertex().y() ) < 0.0001 &&
1415  fabs( tp->vz() - (*mcPho).vertex().z() ) < 0.0001) {
1416  theConvTP_.push_back( tp );
1417 
1418 
1419  }
1420  }
1421 
1422  if ( theConvTP_.size() < 2 ) continue;
1423 
1424  //associated = false;
1425  reco::RecoToSimCollection p1 = theTrackAssociator_->associateRecoToSim(tc1,theConvTP_,&e);
1426  reco::RecoToSimCollection p2 = theTrackAssociator_->associateRecoToSim(tc2,theConvTP_,&e);
1427  try{
1428  std::vector<std::pair<TrackingParticleRef, double> > tp1 = p1[tk1];
1429  std::vector<std::pair<TrackingParticleRef, double> > tp2 = p2[tk2];
1430  if (!(tp1.size()&&tp2.size())){
1431  tp1 = p1[tk2];
1432  tp2 = p2[tk1];
1433  }
1434  if (tp1.size()&&tp2.size()) {
1435  TrackingParticleRef tpr1 = tp1.front().first;
1436  TrackingParticleRef tpr2 = tp2.front().first;
1437  if (abs(tpr1->pdgId())==11&&abs(tpr2->pdgId())==11&& tpr1->pdgId()*tpr2->pdgId()<0) {
1438  if ( (tpr1->parentVertex()->sourceTracks_end()-tpr1->parentVertex()->sourceTracks_begin()==1) &&
1439  (tpr2->parentVertex()->sourceTracks_end()-tpr2->parentVertex()->sourceTracks_begin()==1)) {
1440  if (tpr1->parentVertex().key()==tpr2->parentVertex().key() && ((*tpr1->parentVertex()->sourceTracks_begin())->pdgId()==22)) {
1441  mcConvR_ = sqrt(tpr1->parentVertex()->position().Perp2());
1442  mcConvZ_ = tpr1->parentVertex()->position().z();
1443  mcConvX_ = tpr1->parentVertex()->position().x();
1444  mcConvY_ = tpr1->parentVertex()->position().y();
1445  mcConvEta_ = tpr1->parentVertex()->position().eta();
1446  mcConvPhi_ = tpr1->parentVertex()->position().phi();
1447  mcConvPt_ = sqrt((*tpr1->parentVertex()->sourceTracks_begin())->momentum().Perp2());
1448  //std::cout << " Reco to Sim mcconvpt " << mcConvPt_ << std::endl;
1449  //cout << "associated track1 to " << tpr1->pdgId() << " with p=" << tpr1->p4() << " with pT=" << tpr1->pt() << endl;
1450  //cout << "associated track2 to " << tpr2->pdgId() << " with p=" << tpr2->p4() << " with pT=" << tpr2->pt() << endl;
1451  associated = true;
1452  break;
1453  }
1454  }
1455  }
1456  }
1457  } catch (Exception event) {
1458  //cout << "do not continue: " << event.what() << endl;
1459  //continue;
1460  }
1461 
1462  }// end loop on sim photons
1463 
1464 
1465  if (0) {
1466  theConvTP_.clear();
1467  for(size_t i = 0; i < tpForFakeRate.size(); ++i){
1468  TrackingParticleRef tp (TPHandleForFakeRate,i);
1469  theConvTP_.push_back( tp );
1470  }
1471  reco::RecoToSimCollection p1incl = theTrackAssociator_->associateRecoToSim(tc1,theConvTP_,&e);
1472  reco::RecoToSimCollection p2incl = theTrackAssociator_->associateRecoToSim(tc2,theConvTP_,&e);
1473 
1474 
1475  for ( std::vector<PhotonMCTruth>::const_iterator mcPho=mcPhotons.begin(); mcPho !=mcPhotons.end(); mcPho++) {
1476  mcConvPt_= (*mcPho).fourMomentum().et();
1477  float mcPhi= (*mcPho).fourMomentum().phi();
1478  simPV_Z = (*mcPho).primaryVertex().z();
1479  mcPhi_= phiNormalization(mcPhi);
1480  mcEta_= (*mcPho).fourMomentum().pseudoRapidity();
1481  mcEta_ = etaTransformation(mcEta_, (*mcPho).primaryVertex().z() );
1482  mcConvR_= (*mcPho).vertex().perp();
1483  mcConvX_= (*mcPho).vertex().x();
1484  mcConvY_= (*mcPho).vertex().y();
1485  mcConvZ_= (*mcPho).vertex().z();
1486  mcConvEta_= (*mcPho).vertex().eta();
1487  mcConvPhi_= (*mcPho).vertex().phi();
1488  if ( fabs(mcEta_) > END_HI ) continue;
1489  if (mcConvPt_<minPhoPtForPurity) continue;
1490  if (fabs(mcEta_)>maxPhoEtaForPurity) continue;
1491  if (fabs(mcConvZ_)>maxPhoZForPurity) continue;
1492  if (mcConvR_>maxPhoRForEffic) continue;
1493 
1494  if ( (*mcPho).isAConversion() != 1 ) continue;
1495  if (!( ( fabs(mcEta_) <= BARL && mcConvR_ <85 ) ||
1496  ( fabs(mcEta_) > BARL && fabs(mcEta_) <=END_HI && fabs( (*mcPho).vertex().z() ) < 210 ) ) )
1497  continue;
1498 
1499 
1500  theConvTP_.clear();
1501  for(size_t i = 0; i < tpForFakeRate.size(); ++i){
1502  TrackingParticleRef tp (TPHandleForFakeRate,i);
1503  if ( fabs( tp->vx() - (*mcPho).vertex().x() ) < 0.0001 &&
1504  fabs( tp->vy() - (*mcPho).vertex().y() ) < 0.0001 &&
1505  fabs( tp->vz() - (*mcPho).vertex().z() ) < 0.0001) {
1506  theConvTP_.push_back( tp );
1507 
1508 
1509  }
1510  }
1511 
1512  if ( theConvTP_.size() < 2 ) continue;
1513 
1514  //associated = false;
1515  reco::RecoToSimCollection p1 = theTrackAssociator_->associateRecoToSim(tc1,theConvTP_,&e);
1516  reco::RecoToSimCollection p2 = theTrackAssociator_->associateRecoToSim(tc2,theConvTP_,&e);
1517 
1518 
1519 
1520 
1521 
1522  if ( (p1incl.size() && p2incl.size()) && (p1.size() || p2.size()) ) { // associated = true;
1523  try{
1524  std::vector<std::pair<TrackingParticleRef, double> > tp1 = p1incl[tk1];
1525  std::vector<std::pair<TrackingParticleRef, double> > tp2 = p2incl[tk2];
1526  if (!(tp1.size()&&tp2.size())){
1527  tp1 = p1[tk2];
1528  tp2 = p2[tk1];
1529  }
1530  if (tp1.size()&&tp2.size()) {
1531  TrackingParticleRef tpr1 = tp1.front().first;
1532  TrackingParticleRef tpr2 = tp2.front().first;
1533  if (abs(tpr1->pdgId())==11&&abs(tpr2->pdgId())==11 && tpr1->pdgId()*tpr2->pdgId()<0) {
1534  if ( ((tpr1->parentVertex()->sourceTracks_end()-tpr1->parentVertex()->sourceTracks_begin()>=1) && (*tpr1->parentVertex()->sourceTracks_begin())->pdgId()==22) &&
1535  ((tpr2->parentVertex()->sourceTracks_end()-tpr2->parentVertex()->sourceTracks_begin()>=1) && (*tpr2->parentVertex()->sourceTracks_begin())->pdgId()==22) ) {
1536 
1537  // if ( fabs(tpr1->vx() - tpr2->vx()) < 0.1 && fabs(tpr1->vy() - tpr2->vy()) < 0.1 && fabs(tpr1->vz() - tpr2->vz()) < 0.1) {
1538  //if (((*tpr1->parentVertex()->sourceTracks_begin())->pdgId()==22) || ((*tpr2->parentVertex()->sourceTracks_begin())->pdgId()==22)) {
1539 // mcConvR_ = sqrt(tpr1->parentVertex()->position().Perp2());
1540 // mcConvZ_ = tpr1->parentVertex()->position().z();
1541 // mcConvX_ = tpr1->parentVertex()->position().x();
1542 // mcConvY_ = tpr1->parentVertex()->position().y();
1543 // mcConvEta_ = tpr1->parentVertex()->position().eta();
1544 // mcConvPhi_ = tpr1->parentVertex()->position().phi();
1545 // mcConvPt_ = sqrt((*tpr1->parentVertex()->sourceTracks_begin())->momentum().Perp2());
1546  //std::cout << " Reco to Sim mcconvpt " << mcConvPt_ << std::endl;
1547  //cout << "associated track1 to " << tpr1->pdgId() << " with p=" << tpr1->p4() << " with pT=" << tpr1->pt() << endl;
1548  //cout << "associated track2 to " << tpr2->pdgId() << " with p=" << tpr2->p4() << " with pT=" << tpr2->pt() << endl;
1549  associated = true;
1550  break;
1551  //}
1552  //}
1553  }
1554  }
1555  }
1556  } catch (Exception event) {
1557  //cout << "do not continue: " << event.what() << endl;
1558  //continue;
1559  }
1560 
1561  }
1562 
1563  }
1564  }
1565 
1566  if ( associated ) match=1;
1567  else
1568  match=2;
1569 
1570  h_match_->Fill(float(match));
1572  if ( match == 1) nRecConvAss_++;
1573  h_convEta_[match][0]->Fill( refittedMom.eta() );
1574  h_convEta_[match][1]->Fill( refittedMom.eta() );
1575  if (matchConvSC) h_convEtaMatchSC_[match][0]->Fill( refittedMom.eta() );
1576  h_convPhi_[match][0]->Fill( refittedMom.phi() );
1577  h_convR_[match][0]->Fill( sqrt(aConv.conversionVertex().position().perp2()) );
1578  h_convZ_[match][0]->Fill( aConv.conversionVertex().position().z() );
1579  h_convPt_[match][0]->Fill( sqrt(refittedMom.perp2()) );
1580  h_invMass_[match][0] ->Fill( invM);
1581  h_vtxChi2Prob_[match][0] ->Fill (chi2Prob);
1582  h_DPhiTracksAtVtx_[match][0]->Fill( dPhiTracksAtVtx);
1583  h_DCotTracks_[match][0] ->Fill ( aConv.pairCotThetaSeparation() );
1584  h_distMinAppTracks_[match][0] ->Fill (aConv.distOfMinimumApproach());
1585  h_lxybs_[match][0] ->Fill (lxy);
1586  h_maxNHitsBeforeVtx_[match][0] ->Fill (maxNHitsBeforeVtx);
1587  h_leadNHitsBeforeVtx_[match][0] ->Fill (leadNHitsBeforeVtx);
1588  h_trailNHitsBeforeVtx_[match][0] ->Fill (trailNHitsBeforeVtx);
1589  h_sumNHitsBeforeVtx_[match][0] ->Fill (sumNHitsBeforeVtx);
1590  h_deltaExpectedHitsInner_[match][0] ->Fill (deltaExpectedHitsInner);
1591  h_leadExpectedHitsInner_[match][0] ->Fill (leadExpectedHitsInner);
1592  h_maxDlClosestHitToVtx_[match][0] ->Fill (maxDlClosestHitToVtx);
1593  h_maxDlClosestHitToVtxSig_[match][0] ->Fill (maxDlClosestHitToVtxSig);
1594  h_nSharedHits_[match][0] ->Fill (aConv.nSharedHits());
1595  if ( matchConvSC ) {
1596  //h_EoverPTracks_[match][0] ->Fill (aConv.EoverPrefittedTracks());
1597  h_EoverPTracks_[match][0] ->Fill (iMatchingSC->superCluster()->energy()/sqrt(refittedMom.mag2()));
1598  h_convSCdPhi_[match][0]->Fill( iMatchingSC->superCluster()->position().phi() - refittedMom.phi() );
1599  double ConvEta = etaTransformation(aConv.refittedPairMomentum().eta(),aConv.zOfPrimaryVertexFromTracks());
1600  h_convSCdEta_[match][0]->Fill( iMatchingSC->superCluster()->position().eta() - ConvEta );
1601 
1602  }
1603  if ( match==1) {
1604  h2_photonPtRecVsPtSim_->Fill ( mcConvPt_, sqrt(refittedMom.perp2()) );
1605  h_convPtRes_[0]->Fill ( sqrt(refittedMom.perp2())/mcConvPt_);
1606  }
1607 
1608  if ( phoIsInBarrel ) {
1609  h_invMass_[match][1] ->Fill(invM);
1610  h_vtxChi2Prob_[match][1] ->Fill (chi2Prob);
1611  h_DPhiTracksAtVtx_[match][1]->Fill( dPhiTracksAtVtx);
1612  h_DCotTracks_[match][1] ->Fill ( aConv.pairCotThetaSeparation() );
1613  h_distMinAppTracks_[match][1] ->Fill (aConv.distOfMinimumApproach());
1614  h_lxybs_[match][1] ->Fill (lxy);
1615  h_maxNHitsBeforeVtx_[match][1] ->Fill (maxNHitsBeforeVtx);
1616  h_leadNHitsBeforeVtx_[match][1] ->Fill (leadNHitsBeforeVtx);
1617  h_trailNHitsBeforeVtx_[match][1] ->Fill (trailNHitsBeforeVtx);
1618  h_sumNHitsBeforeVtx_[match][1] ->Fill (sumNHitsBeforeVtx);
1619  h_deltaExpectedHitsInner_[match][1] ->Fill (deltaExpectedHitsInner);
1620  h_leadExpectedHitsInner_[match][1] ->Fill (leadExpectedHitsInner);
1621  h_maxDlClosestHitToVtx_[match][1] ->Fill (maxDlClosestHitToVtx);
1622  h_maxDlClosestHitToVtxSig_[match][1] ->Fill (maxDlClosestHitToVtxSig);
1623  h_nSharedHits_[match][1] ->Fill (aConv.nSharedHits());
1624  if ( matchConvSC ) {
1625  // h_EoverPTracks_[match][1] ->Fill (aConv.EoverPrefittedTracks());
1626  h_EoverPTracks_[match][1] ->Fill (iMatchingSC->superCluster()->energy()/sqrt(refittedMom.mag2()));
1627  h_convSCdPhi_[match][1]->Fill( iMatchingSC->superCluster()->position().phi() - refittedMom.phi() );
1628  double ConvEta = etaTransformation(aConv.refittedPairMomentum().eta(),aConv.zOfPrimaryVertexFromTracks());
1629  h_convSCdEta_[match][1]->Fill( iMatchingSC->superCluster()->position().eta() - ConvEta );
1630 
1631  }
1632  if ( match==1) h_convPtRes_[1]->Fill ( sqrt(refittedMom.perp2())/mcConvPt_);
1633  }
1634 
1635 
1636  if ( phoIsInEndcap ) {
1637  h_invMass_[match][2] ->Fill(invM);
1638  h_vtxChi2Prob_[match][2] ->Fill (chi2Prob);
1639  h_DPhiTracksAtVtx_[match][2]->Fill( dPhiTracksAtVtx);
1640  h_DCotTracks_[match][2] ->Fill ( aConv.pairCotThetaSeparation() );
1641  h_distMinAppTracks_[match][2] ->Fill (aConv.distOfMinimumApproach());
1642  h_lxybs_[match][2] ->Fill (lxy);
1643  h_maxNHitsBeforeVtx_[match][2] ->Fill (maxNHitsBeforeVtx);
1644  h_leadNHitsBeforeVtx_[match][2] ->Fill (leadNHitsBeforeVtx);
1645  h_trailNHitsBeforeVtx_[match][2] ->Fill (trailNHitsBeforeVtx);
1646  h_sumNHitsBeforeVtx_[match][2] ->Fill (sumNHitsBeforeVtx);
1647  h_deltaExpectedHitsInner_[match][2] ->Fill (deltaExpectedHitsInner);
1648  h_leadExpectedHitsInner_[match][2] ->Fill (leadExpectedHitsInner);
1649  h_maxDlClosestHitToVtx_[match][2] ->Fill (maxDlClosestHitToVtx);
1650  h_maxDlClosestHitToVtxSig_[match][2] ->Fill (maxDlClosestHitToVtxSig);
1651  h_nSharedHits_[match][2] ->Fill (aConv.nSharedHits());
1652  if ( matchConvSC ) {
1653  // h_EoverPTracks_[match][2] ->Fill (aConv.EoverPrefittedTracks());
1654  h_EoverPTracks_[match][2] ->Fill (iMatchingSC->superCluster()->energy()/sqrt(refittedMom.mag2()));
1655  h_convSCdPhi_[match][2]->Fill( iMatchingSC->superCluster()->position().phi() - refittedMom.phi() );
1656  double ConvEta = etaTransformation(aConv.refittedPairMomentum().eta(),aConv.zOfPrimaryVertexFromTracks());
1657  h_convSCdEta_[match][2]->Fill( iMatchingSC->superCluster()->position().eta() - ConvEta );
1658  }
1659  if ( match==1) h_convPtRes_[2]->Fill ( sqrt(refittedMom.perp2())/mcConvPt_);
1660  }
1661 
1662 
1663  if ( match == 1 ) {
1664  h_convVtxdX_ ->Fill ( aConv.conversionVertex().position().x() - mcConvX_);
1665  h_convVtxdY_ ->Fill ( aConv.conversionVertex().position().y() - mcConvY_);
1666  h_convVtxdZ_ ->Fill ( aConv.conversionVertex().position().z() - mcConvZ_);
1667  h_convVtxdR_ ->Fill ( sqrt(aConv.conversionVertex().position().perp2()) - mcConvR_);
1668  h_convVtxdPhi_ ->Fill ( aConv.conversionVertex().position().phi() - mcConvPhi_);
1669  h_convVtxdEta_ ->Fill ( aConv.conversionVertex().position().eta() - mcConvEta_);
1670  h2_convVtxdRVsR_ ->Fill (mcConvR_, sqrt(aConv.conversionVertex().position().perp2()) - mcConvR_ );
1671  h2_convVtxdRVsEta_ ->Fill (mcEta_, sqrt(aConv.conversionVertex().position().perp2()) - mcConvR_ );
1672  p_convVtxdRVsR_ ->Fill (mcConvR_, sqrt(aConv.conversionVertex().position().perp2()) - mcConvR_ );
1673  p_convVtxdRVsEta_ ->Fill (mcEta_, sqrt(aConv.conversionVertex().position().perp2()) - mcConvR_ );
1674  p_convVtxdXVsX_ ->Fill (mcConvX_, aConv.conversionVertex().position().x() - mcConvX_ );
1675  p_convVtxdYVsY_ ->Fill (mcConvY_, aConv.conversionVertex().position().y() - mcConvY_ );
1676  p_convVtxdZVsZ_ ->Fill (mcConvZ_, aConv.conversionVertex().position().z() - mcConvZ_ );
1677  p_convVtxdZVsR_ ->Fill (mcConvR_, aConv.conversionVertex().position().z() - mcConvZ_ );
1678 
1679  float dR=sqrt(aConv.conversionVertex().position().perp2()) - mcConvR_;
1680  float dZ=aConv.conversionVertex().position().z() - mcConvZ_;
1681  p2_convVtxdRVsRZ_ ->Fill (mcConvZ_,mcConvR_, dR );
1682  p2_convVtxdZVsRZ_ ->Fill (mcConvZ_,mcConvR_, dZ );
1683 
1684 
1685 
1686 
1687  h2_convVtxRrecVsTrue_ -> Fill (mcConvR_, sqrt(aConv.conversionVertex().position().perp2()) );
1688 
1689 
1690  h_zPVFromTracks_[match]->Fill ( aConv.zOfPrimaryVertexFromTracks() );
1691  h_dzPVFromTracks_[match]->Fill ( aConv.zOfPrimaryVertexFromTracks() - simPV_Z );
1692  h2_dzPVVsR_ ->Fill(mcConvR_, aConv.zOfPrimaryVertexFromTracks() - simPV_Z );
1693  p_dzPVVsR_ ->Fill(mcConvR_, aConv.zOfPrimaryVertexFromTracks() - simPV_Z );
1694 
1695  if ( phoIsInBarrel ) {
1696  h_convVtxdX_barrel_ ->Fill ( aConv.conversionVertex().position().x() - mcConvX_);
1697  h_convVtxdY_barrel_ ->Fill ( aConv.conversionVertex().position().y() - mcConvY_);
1698  h_convVtxdZ_barrel_ ->Fill ( aConv.conversionVertex().position().z() - mcConvZ_);
1699  h_convVtxdR_barrel_ ->Fill ( sqrt(aConv.conversionVertex().position().perp2()) - mcConvR_);
1700 
1701  }
1702  if ( phoIsInEndcap ) {
1703  h_convVtxdX_endcap_ ->Fill ( aConv.conversionVertex().position().x() - mcConvX_);
1704  h_convVtxdY_endcap_ ->Fill ( aConv.conversionVertex().position().y() - mcConvY_);
1705  h_convVtxdZ_endcap_ ->Fill ( aConv.conversionVertex().position().z() - mcConvZ_);
1706  h_convVtxdR_endcap_ ->Fill ( sqrt(aConv.conversionVertex().position().perp2()) - mcConvR_);
1707 
1708  }
1709 
1710 
1711  }
1712 
1714  for (unsigned int i=0; i<tracks.size(); i++) {
1715  //std::cout << " Loop over tracks pt " << tracks[i]->pt() << std::endl;
1716  RefToBase<reco::Track> tfrb(aConv.tracks()[i] );
1717  itAss= myAss.find( tfrb.get() );
1718 
1719  nHitsVsEta_[match] ->Fill (mcEta_, float(tracks[i]->numberOfValidHits()) );
1720  nHitsVsR_[match] ->Fill (mcConvR_, float(tracks[i]->numberOfValidHits()) );
1721  p_nHitsVsEta_[match] ->Fill (mcEta_, float(tracks[i]->numberOfValidHits()) -0.0001);
1722  p_nHitsVsR_[match] ->Fill (mcConvR_, float(tracks[i]->numberOfValidHits()) -0.0001);
1723  h_tkChi2_[match] ->Fill (tracks[i]->normalizedChi2() );
1724  h_tkChi2Large_[match] ->Fill (tracks[i]->normalizedChi2() );
1725  h2_Chi2VsEta_[match] ->Fill( mcEta_, tracks[i]->normalizedChi2() );
1726  h2_Chi2VsR_[match] ->Fill( mcConvR_, tracks[i]->normalizedChi2() );
1727  p_Chi2VsEta_[match] ->Fill( mcEta_, tracks[i]->normalizedChi2() );
1728  p_Chi2VsR_[match] ->Fill( mcConvR_, tracks[i]->normalizedChi2() );
1729  double d0;
1730  if (valid_pvtx){
1731  d0 = - tracks[i]->dxy(the_pvtx.position());
1732  } else {
1733  d0 = tracks[i]->d0();
1734  }
1735  h_TkD0_[match]->Fill (d0* tracks[i]->charge() );
1736  h_nHitsBeforeVtx_[match]->Fill ( aConv.nHitsBeforeVtx().size()>1 ? aConv.nHitsBeforeVtx().at(i) : 0 );
1737  h_dlClosestHitToVtx_[match]->Fill ( aConv.dlClosestHitToVtx().size()>1 ? aConv.dlClosestHitToVtx().at(i).value() : 0 );
1738  h_dlClosestHitToVtxSig_[match]->Fill ( aConv.dlClosestHitToVtx().size()>1 ? aConv.dlClosestHitToVtx().at(i).value()/aConv.dlClosestHitToVtx().at(i).error() : 0 );
1739 
1740 
1741  if ( itAss == myAss.end() ) continue;
1742  reco::Track refTrack= aConv.conversionVertex().refittedTracks()[i];
1743 
1744  float simPt = sqrt( ((*itAss).second)->momentum().perp2() );
1745  float recPt = refTrack.pt();
1746  float ptres= recPt - simPt ;
1747  //float pterror = aConv.tracks()[i]->ptError();
1748  float pterror = aConv.conversionVertex().refittedTracks()[i].ptError();
1749  h2_PtRecVsPtSim_[0]->Fill ( simPt, recPt);
1750  h_TkPtPull_[0] ->Fill(ptres/pterror);
1751  h2_TkPtPull_[0] ->Fill(mcEta_, ptres/pterror);
1752 
1753  if ( phoIsInBarrel ) {
1754  h_TkPtPull_[1] ->Fill(ptres/pterror);
1755  h2_PtRecVsPtSim_[1]->Fill ( simPt, recPt);
1756  }
1757  if ( phoIsInEndcap ) {
1758  h_TkPtPull_[2] ->Fill(ptres/pterror);
1759  h2_PtRecVsPtSim_[2]->Fill ( simPt, recPt);
1760  }
1761  } // end loop over track
1762 
1763 
1764 
1765  } // loop over reco conversions
1766 
1767 
1768  h_nConv_[0][0]->Fill (float(nRecConv_));
1769  h_nConv_[1][0]->Fill (float(nRecConvAss_));
1770 
1771 
1772 
1773 }
1774 
1775 
1776 
1777 
1778 
1780 
1781 
1782  std::string outputFileName = parameters_.getParameter<std::string>("OutputFileName");
1783  if ( ! isRunCentrally_ ) {
1784  dbe_->save(outputFileName);
1785  }
1786 
1787  edm::LogInfo("TkConvValidator") << "Analyzed " << nEvt_ << "\n";
1788  // std::cout << "::endJob Analyzed " << nEvt_ << " events " << " with total " << nPho_ << " Photons " << "\n";
1789  // std::cout << "TkConvValidator::endJob Analyzed " << nEvt_ << " events " << "\n";
1790 
1791  return ;
1792 }
1793 
1794 
1796 
1800  SimpleCylinderBounds( sqrt(vtx.position().perp2())-0.001,
1801  sqrt(vtx.position().perp2())+0.001,
1802  -fabs(vtx.position().z()),
1803  fabs(vtx.position().z()))));
1804 
1805  ReferenceCountingPointer<BoundDisk> theDisk_(new BoundDisk( Surface::PositionType( 0, 0, vtx.position().z()), rot,
1806  SimpleDiskBounds( 0, sqrt(vtx.position().perp2()), -0.001, 0.001)));
1807 
1808 
1809  const TrajectoryStateOnSurface myTSOS = trajectoryStateTransform::innerStateOnSurface(*tk, trackerGeom, &mf);
1810  PropagatorWithMaterial propag( anyDirection, 0.000511, &mf );
1811  TrajectoryStateOnSurface stateAtVtx;
1812  stateAtVtx = propag.propagate(myTSOS, *theBarrel_);
1813  if (!stateAtVtx.isValid() ) {
1814  stateAtVtx = propag.propagate(myTSOS, *theDisk_);
1815  }
1816  if (stateAtVtx.isValid()){
1817  return math::XYZVector ( double(stateAtVtx.globalMomentum().x()), double(stateAtVtx.globalMomentum().y()), double(stateAtVtx.globalMomentum().z()));
1818  } else {
1819  return math::XYZVector(0.,0.,0.);
1820  }
1821 
1822 
1823 
1824 }
1825 
1826 
1828 {
1829  //---Definitions
1830  const float PI = 3.1415927;
1831  const float TWOPI = 2.0*PI;
1832 
1833 
1834  if(phi > PI) {phi = phi - TWOPI;}
1835  if(phi < -PI) {phi = phi + TWOPI;}
1836 
1837  // cout << " Float_t PHInormalization out " << PHI << endl;
1838  return phi;
1839 
1840 }
1841 
1842 
1843 float TkConvValidator::etaTransformation( float EtaParticle , float Zvertex) {
1844 
1845  //---Definitions
1846  const float PI = 3.1415927;
1847 
1848  //---Definitions for ECAL
1849  const float R_ECAL = 136.5;
1850  const float Z_Endcap = 328.0;
1851  const float etaBarrelEndcap = 1.479;
1852 
1853  //---ETA correction
1854 
1855  float Theta = 0.0 ;
1856  float ZEcal = R_ECAL*sinh(EtaParticle)+Zvertex;
1857 
1858  if(ZEcal != 0.0) Theta = atan(R_ECAL/ZEcal);
1859  if(Theta<0.0) Theta = Theta+PI ;
1860  float ETA = - log(tan(0.5*Theta));
1861 
1862  if( fabs(ETA) > etaBarrelEndcap )
1863  {
1864  float Zend = Z_Endcap ;
1865  if(EtaParticle<0.0 ) Zend = -Zend ;
1866  float Zlen = Zend - Zvertex ;
1867  float RR = Zlen/sinh(EtaParticle);
1868  Theta = atan(RR/Zend);
1869  if(Theta<0.0) Theta = Theta+PI ;
1870  ETA = - log(tan(0.5*Theta));
1871  }
1872  //---Return the result
1873  return ETA;
1874  //---end
1875 }
1876 
1877 
const reco::Vertex & conversionVertex() const
returns the reco conversion vertex
Definition: Conversion.h:101
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
virtual void endRun(edm::Run &r, edm::EventSetup const &es)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
std::vector< TrackingParticle > TrackingParticleCollection
TrajectoryStateOnSurface innerStateOnSurface(const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field)
#define PI
const_iterator end() const
last iterator over the map (read only)
static HepMC::IO_HEPEVT conv
bool quality(ConversionQuality q) const
Definition: Conversion.h:185
double y() const
y coordinate
Definition: Vertex.h:97
math::XYZVector recalculateMomentumAtFittedVertex(const MagneticField &mf, const TrackerGeometry &trackerGeom, const edm::RefToBase< reco::Track > &tk, const reco::Vertex &vtx)
bool isValid() const
Tells whether the vertex is valid.
Definition: Vertex.h:61
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:2113
std::vector< GenJet > GenJetCollection
collection of GenJet objects
const std::vector< Measurement1DFloat > & dlClosestHitToVtx() const
Vector of signed decay length with uncertainty from nearest hit on track to the conversion vtx positi...
Definition: Conversion.h:167
const_iterator find(const key_type &k) const
find element with specified reference key
T y() const
Definition: PV3DBase.h:62
virtual void analyze(const edm::Event &, const edm::EventSetup &)
double zOfPrimaryVertexFromTracks(const math::XYZPoint &myBeamSpot=math::XYZPoint()) const
Definition: Conversion.h:149
double distOfMinimumApproach() const
Definition: Conversion.h:129
#define abs(x)
Definition: mlp_lapack.h:159
double pairCotThetaSeparation() const
Delta cot(Theta) where Theta is the angle in the (y,z) plane between the two tracks. Original tracks are used.
Definition: Conversion.cc:223
reco::SuperClusterRef superCluster() const
Ref to SuperCluster.
Definition: Photon.cc:59
#define TWOPI
EgammaCoreTools.
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
const std::vector< Track > & refittedTracks() const
Returns the container of refitted tracks.
Definition: Vertex.h:136
double pairInvariantMass() const
if nTracks=2 returns the pair invariant mass. Original tracks are used here
Definition: Conversion.cc:204
const Point & position() const
position
Definition: Vertex.h:93
double charge(const std::vector< uint8_t > &Ampls)
tuple vertexCollection
math::XYZVectorF refittedPairMomentum() const
Conversion tracks momentum from the tracks refitted with vertex constraint.
Definition: Conversion.cc:262
double q2[4]
Definition: TauolaWrapper.h:88
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
Definition: ConversionFwd.h:9
virtual ~TkConvValidator()
TrackAlgorithm algo() const
Definition: TrackBase.h:332
std::vector< edm::RefToBase< reco::Track > > tracks() const
vector of track to base references
Definition: Conversion.cc:180
#define ETA
float etaTransformation(float a, float b)
float phiNormalization(float &a)
const T & max(const T &a, const T &b)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
T sqrt(T t)
Definition: SSEVec.h:46
double pt() const
track transverse momentum
Definition: TrackBase.h:131
T z() const
Definition: PV3DBase.h:63
tuple result
Definition: query.py:137
TkConvValidator(const edm::ParameterSet &)
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
int numberOfHits() const
Definition: HitPattern.cc:213
double chi2() const
chi-squares
Definition: Vertex.h:82
float ChiSquaredProbability(double chiSquared, double nrDOF)
const HitPattern & trackerExpectedHitsInner() const
Access the hit pattern counting (in the Tracker) the number of expected crossed layers before the fir...
Definition: TrackBase.h:225
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1031
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float > > XYZVectorF
spatial vector with cartesian internal representation
Definition: Vector3D.h:18
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
double p2[4]
Definition: TauolaWrapper.h:90
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
DQMStore * dbe_
double ndof() const
Definition: Vertex.h:89
bool etMin(const PFCandidate &cand, double cut)
virtual TrajectoryStateOnSurface propagate(const TrajectoryStateOnSurface &tsos, const Plane &plane) const
double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:12
double x() const
x coordinate
Definition: Vertex.h:95
uint8_t nSharedHits() const
number of shared hits btw the two track
Definition: Conversion.h:169
size_type size() const
map size
double q1[4]
Definition: TauolaWrapper.h:87
tuple tracks
Definition: testEve_cfg.py:39
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
const T & get() const
Definition: EventSetup.h:55
key_type key() const
Accessor for product key.
Definition: Ref.h:266
T const * product() const
Definition: ESHandle.h:62
virtual void endJob()
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
static const float etaBarrelEndcap
static const float Z_Endcap
edm::EventID id() const
Definition: EventBase.h:56
double p1[4]
Definition: TauolaWrapper.h:89
GlobalVector globalMomentum() const
void push_back(const RefToBase< T > &)
const std::vector< uint8_t > & nHitsBeforeVtx() const
Vector of the number of hits before the vertex along each track trajector.
Definition: Conversion.h:165
static const float R_ECAL
double recPt
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:6
virtual void beginJob()
virtual void beginRun(edm::Run const &r, edm::EventSetup const &theEventSetup)
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:845
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:121
T x() const
Definition: PV3DBase.h:61
value_type const * get() const
Definition: RefToBase.h:212
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
double dPhiTracksAtVtx() const
Definition: Conversion.cc:328
Definition: Run.h:33
Definition: DDAxes.h:10
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1175