CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MTVHistoProducerAlgoForTracker.cc
Go to the documentation of this file.
5 
10 
12 
13 #include "TMath.h"
14 #include <TF1.h>
15 
16 using namespace std;
17 
19  //parameters for _vs_eta plots
20  minEta = pset.getParameter<double>("minEta");
21  maxEta = pset.getParameter<double>("maxEta");
22  nintEta = pset.getParameter<int>("nintEta");
23  useFabsEta = pset.getParameter<bool>("useFabsEta");
24 
25  //parameters for _vs_pt plots
26  minPt = pset.getParameter<double>("minPt");
27  maxPt = pset.getParameter<double>("maxPt");
28  nintPt = pset.getParameter<int>("nintPt");
29  useInvPt = pset.getParameter<bool>("useInvPt");
30  useLogPt = pset.getUntrackedParameter<bool>("useLogPt",false);
31 
32  //parameters for _vs_Hit plots
33  minHit = pset.getParameter<double>("minHit");
34  maxHit = pset.getParameter<double>("maxHit");
35  nintHit = pset.getParameter<int>("nintHit");
36 
37  //parameters for _vs_phi plots
38  minPhi = pset.getParameter<double>("minPhi");
39  maxPhi = pset.getParameter<double>("maxPhi");
40  nintPhi = pset.getParameter<int>("nintPhi");
41 
42  //parameters for _vs_Dxy plots
43  minDxy = pset.getParameter<double>("minDxy");
44  maxDxy = pset.getParameter<double>("maxDxy");
45  nintDxy = pset.getParameter<int>("nintDxy");
46 
47  //parameters for _vs_Dz plots
48  minDz = pset.getParameter<double>("minDz");
49  maxDz = pset.getParameter<double>("maxDz");
50  nintDz = pset.getParameter<int>("nintDz");
51 
52  //parameters for _vs_ProductionVertexTransvPosition plots
53  minVertpos = pset.getParameter<double>("minVertpos");
54  maxVertpos = pset.getParameter<double>("maxVertpos");
55  nintVertpos = pset.getParameter<int>("nintVertpos");
56 
57  //parameters for _vs_ProductionVertexZPosition plots
58  minZpos = pset.getParameter<double>("minZpos");
59  maxZpos = pset.getParameter<double>("maxZpos");
60  nintZpos = pset.getParameter<int>("nintZpos");
61 
62  //parameters for dE/dx plots
63  minDeDx = pset.getParameter<double>("minDeDx");
64  maxDeDx = pset.getParameter<double>("maxDeDx");
65  nintDeDx = pset.getParameter<int>("nintDeDx");
66 
67  //parameters for Pileup plots
68  minVertcount = pset.getParameter<double>("minVertcount");
69  maxVertcount = pset.getParameter<double>("maxVertcount");
70  nintVertcount = pset.getParameter<int>("nintVertcount");
71 
72  //parameters for resolution plots
73  ptRes_rangeMin = pset.getParameter<double>("ptRes_rangeMin");
74  ptRes_rangeMax = pset.getParameter<double>("ptRes_rangeMax");
75  ptRes_nbin = pset.getParameter<int>("ptRes_nbin");
76 
77  phiRes_rangeMin = pset.getParameter<double>("phiRes_rangeMin");
78  phiRes_rangeMax = pset.getParameter<double>("phiRes_rangeMax");
79  phiRes_nbin = pset.getParameter<int>("phiRes_nbin");
80 
81  cotThetaRes_rangeMin = pset.getParameter<double>("cotThetaRes_rangeMin");
82  cotThetaRes_rangeMax = pset.getParameter<double>("cotThetaRes_rangeMax");
83  cotThetaRes_nbin = pset.getParameter<int>("cotThetaRes_nbin");
84 
85  dxyRes_rangeMin = pset.getParameter<double>("dxyRes_rangeMin");
86  dxyRes_rangeMax = pset.getParameter<double>("dxyRes_rangeMax");
87  dxyRes_nbin = pset.getParameter<int>("dxyRes_nbin");
88 
89  dzRes_rangeMin = pset.getParameter<double>("dzRes_rangeMin");
90  dzRes_rangeMax = pset.getParameter<double>("dzRes_rangeMax");
91  dzRes_nbin = pset.getParameter<int>("dzRes_nbin");
92 
93 
94  //--- tracking particle selectors for efficiency measurements
95  using namespace edm;
96 
97  ParameterSet generalTpSelectorPSet = pset.getParameter<ParameterSet>("generalTpSelector");
98  ParameterSet TpSelectorForEfficiencyVsEtaPSet = pset.getParameter<ParameterSet>("TpSelectorForEfficiencyVsEta");
99  ParameterSet TpSelectorForEfficiencyVsPhiPSet = pset.getParameter<ParameterSet>("TpSelectorForEfficiencyVsPhi");
100  ParameterSet TpSelectorForEfficiencyVsPtPSet = pset.getParameter<ParameterSet>("TpSelectorForEfficiencyVsPt");
101  ParameterSet TpSelectorForEfficiencyVsVTXRPSet = pset.getParameter<ParameterSet>("TpSelectorForEfficiencyVsVTXR");
102  ParameterSet TpSelectorForEfficiencyVsVTXZPSet = pset.getParameter<ParameterSet>("TpSelectorForEfficiencyVsVTXZ");
103 
104  ParameterSet TpSelectorForEfficiencyVsConPSet = TpSelectorForEfficiencyVsEtaPSet;
105  Entry name("signalOnly",false,true);
106  TpSelectorForEfficiencyVsConPSet.insert(true,"signalOnly",name);
107 
108  using namespace reco::modules;
116 
117  // fix for the LogScale by Ryan
118  if(useLogPt){
119  maxPt=log10(maxPt);
120  if(minPt > 0){
121  minPt=log10(minPt);
122  }
123  else{
124  edm::LogWarning("MultiTrackValidator")
125  << "minPt = "
126  << minPt << " <= 0 out of range while requesting log scale. Using minPt = 0.1.";
127  minPt=log10(0.1);
128  }
129  }
130 
131 }
132 
134  delete generalTpSelector;
140 }
141 
142 
144  std::vector<double> etaintervalsv;
145  std::vector<double> phiintervalsv;
146  std::vector<double> pTintervalsv;
147  std::vector<double> dxyintervalsv;
148  std::vector<double> dzintervalsv;
149  std::vector<double> vertposintervalsv;
150  std::vector<double> zposintervalsv;
151  std::vector<double> vertcountintervalsv;
152 
153  std::vector<int> totSIMveta,totASSveta,totASS2veta,totloopveta,totmisidveta,totASS2vetaSig,totRECveta;
154  std::vector<int> totSIMvpT,totASSvpT,totASS2vpT,totRECvpT,totloopvpT,totmisidvpT;
155  std::vector<int> totSIMv_hit,totASSv_hit,totASS2v_hit,totRECv_hit,totloopv_hit,totmisidv_hit;
156  std::vector<int> totSIMv_phi,totASSv_phi,totASS2v_phi,totRECv_phi,totloopv_phi,totmisidv_phi;
157  std::vector<int> totSIMv_dxy,totASSv_dxy,totASS2v_dxy,totRECv_dxy,totloopv_dxy,totmisidv_dxy;
158  std::vector<int> totSIMv_dz,totASSv_dz,totASS2v_dz,totRECv_dz,totloopv_dz,totmisidv_dz;
159 
160  std::vector<int> totSIMv_vertpos,totASSv_vertpos,totSIMv_zpos,totASSv_zpos;
161  std::vector<int> totSIMv_vertcount,totASSv_vertcount,totRECv_vertcount,totASS2v_vertcount;
162  std::vector<int> totRECv_algo;
163 
164  double step=(maxEta-minEta)/nintEta;
165  //std::ostringstream title,name; ///BM, what is this?
166  etaintervalsv.push_back(minEta);
167  for (int k=1;k<nintEta+1;k++) {
168  double d=minEta+k*step;
169  etaintervalsv.push_back(d);
170  totSIMveta.push_back(0);
171  totASSveta.push_back(0);
172  totASS2veta.push_back(0);
173  totloopveta.push_back(0);
174  totmisidveta.push_back(0);
175  totASS2vetaSig.push_back(0);
176  totRECveta.push_back(0);
177  }
178  etaintervals.push_back(etaintervalsv);
179  totSIMeta.push_back(totSIMveta);
180  totCONeta.push_back(totASSveta);
181  totASSeta.push_back(totASSveta);
182  totASS2eta.push_back(totASS2veta);
183  totloopeta.push_back(totloopveta);
184  totmisideta.push_back(totmisidveta);
185  totASS2etaSig.push_back(totASS2vetaSig);
186  totRECeta.push_back(totRECveta);
187  totFOMT_eta.push_back(totASSveta);
188 
189  totASS2_itpu_eta_entire.push_back(totASS2veta);
190  totASS2_itpu_eta_entire_signal.push_back(totASS2vetaSig);
191  totASS2_ootpu_eta_entire.push_back(totASS2veta);
192 
193  for (size_t i = 0; i < 15; i++) {
194  totRECv_algo.push_back(0);
195  }
196  totREC_algo.push_back(totRECv_algo);
197 
198  double stepPt = (maxPt-minPt)/nintPt;
199  pTintervalsv.push_back(minPt);
200  for (int k=1;k<nintPt+1;k++) {
201  double d=0;
202  if(useLogPt)d=pow(10,minPt+k*stepPt);
203  else d=minPt+k*stepPt;
204  pTintervalsv.push_back(d);
205  totSIMvpT.push_back(0);
206  totASSvpT.push_back(0);
207  totASS2vpT.push_back(0);
208  totRECvpT.push_back(0);
209  totloopvpT.push_back(0);
210  totmisidvpT.push_back(0);
211  }
212  pTintervals.push_back(pTintervalsv);
213  totSIMpT.push_back(totSIMvpT);
214  totASSpT.push_back(totASSvpT);
215  totASS2pT.push_back(totASS2vpT);
216  totRECpT.push_back(totRECvpT);
217  totlooppT.push_back(totloopvpT);
218  totmisidpT.push_back(totmisidvpT);
219 
220  for (int k=1;k<nintHit+1;k++) {
221  totSIMv_hit.push_back(0);
222  totASSv_hit.push_back(0);
223  totASS2v_hit.push_back(0);
224  totRECv_hit.push_back(0);
225  totloopv_hit.push_back(0);
226  totmisidv_hit.push_back(0);
227  }
228  totSIM_hit.push_back(totSIMv_hit);
229  totASS_hit.push_back(totASSv_hit);
230  totASS2_hit.push_back(totASS2v_hit);
231  totREC_hit.push_back(totRECv_hit);
232  totloop_hit.push_back(totloopv_hit);
233  totmisid_hit.push_back(totmisidv_hit);
234 
235  double stepPhi = (maxPhi-minPhi)/nintPhi;
236  phiintervalsv.push_back(minPhi);
237  for (int k=1;k<nintPhi+1;k++) {
238  double d=minPhi+k*stepPhi;
239  phiintervalsv.push_back(d);
240  totSIMv_phi.push_back(0);
241  totASSv_phi.push_back(0);
242  totASS2v_phi.push_back(0);
243  totRECv_phi.push_back(0);
244  totloopv_phi.push_back(0);
245  totmisidv_phi.push_back(0);
246  }
247  phiintervals.push_back(phiintervalsv);
248  totSIM_phi.push_back(totSIMv_phi);
249  totASS_phi.push_back(totASSv_phi);
250  totASS2_phi.push_back(totASS2v_phi);
251  totREC_phi.push_back(totRECv_phi);
252  totloop_phi.push_back(totloopv_phi);
253  totmisid_phi.push_back(totmisidv_phi);
254 
255  double stepDxy = (maxDxy-minDxy)/nintDxy;
256  dxyintervalsv.push_back(minDxy);
257  for (int k=1;k<nintDxy+1;k++) {
258  double d=minDxy+k*stepDxy;
259  dxyintervalsv.push_back(d);
260  totSIMv_dxy.push_back(0);
261  totASSv_dxy.push_back(0);
262  totASS2v_dxy.push_back(0);
263  totRECv_dxy.push_back(0);
264  totloopv_dxy.push_back(0);
265  totmisidv_dxy.push_back(0);
266  }
267  dxyintervals.push_back(dxyintervalsv);
268  totSIM_dxy.push_back(totSIMv_dxy);
269  totASS_dxy.push_back(totASSv_dxy);
270  totASS2_dxy.push_back(totASS2v_dxy);
271  totREC_dxy.push_back(totRECv_dxy);
272  totloop_dxy.push_back(totloopv_dxy);
273  totmisid_dxy.push_back(totmisidv_dxy);
274 
275 
276  double stepDz = (maxDz-minDz)/nintDz;
277  dzintervalsv.push_back(minDz);
278  for (int k=1;k<nintDz+1;k++) {
279  double d=minDz+k*stepDz;
280  dzintervalsv.push_back(d);
281  totSIMv_dz.push_back(0);
282  totASSv_dz.push_back(0);
283  totASS2v_dz.push_back(0);
284  totRECv_dz.push_back(0);
285  totloopv_dz.push_back(0);
286  totmisidv_dz.push_back(0);
287  }
288  dzintervals.push_back(dzintervalsv);
289  totSIM_dz.push_back(totSIMv_dz);
290  totASS_dz.push_back(totASSv_dz);
291  totASS2_dz.push_back(totASS2v_dz);
292  totREC_dz.push_back(totRECv_dz);
293  totloop_dz.push_back(totloopv_dz);
294  totmisid_dz.push_back(totmisidv_dz);
295 
296  double stepVertpos = (maxVertpos-minVertpos)/nintVertpos;
297  vertposintervalsv.push_back(minVertpos);
298  for (int k=1;k<nintVertpos+1;k++) {
299  double d=minVertpos+k*stepVertpos;
300  vertposintervalsv.push_back(d);
301  totSIMv_vertpos.push_back(0);
302  totASSv_vertpos.push_back(0);
303  }
304  vertposintervals.push_back(vertposintervalsv);
305  totSIM_vertpos.push_back(totSIMv_vertpos);
306  totASS_vertpos.push_back(totASSv_vertpos);
307 
308  double stepZpos = (maxZpos-minZpos)/nintZpos;
309  zposintervalsv.push_back(minZpos);
310  for (int k=1;k<nintZpos+1;k++) {
311  double d=minZpos+k*stepZpos;
312  zposintervalsv.push_back(d);
313  totSIMv_zpos.push_back(0);
314  totASSv_zpos.push_back(0);
315  }
316  zposintervals.push_back(zposintervalsv);
317  totSIM_zpos.push_back(totSIMv_zpos);
318  totCONzpos.push_back(totSIMv_zpos);
319  totASS_zpos.push_back(totASSv_zpos);
320  totSIM_vertz_entire.push_back(totSIMv_zpos);
321  totASS_vertz_entire.push_back(totASSv_zpos);
322  totSIM_vertz_barrel.push_back(totSIMv_zpos);
323  totASS_vertz_barrel.push_back(totASSv_zpos);
324  totSIM_vertz_fwdpos.push_back(totSIMv_zpos);
325  totASS_vertz_fwdpos.push_back(totASSv_zpos);
326  totSIM_vertz_fwdneg.push_back(totSIMv_zpos);
327  totASS_vertz_fwdneg.push_back(totASSv_zpos);
328 
329  double stepVertcount=(maxVertcount-minVertcount)/nintVertcount;
330  vertcountintervalsv.push_back(minVertcount);
331  for (int k=1;k<nintVertcount+1;k++) {
332  double d=minVertcount+k*stepVertcount;
333  vertcountintervalsv.push_back(d);
334  totSIMv_vertcount.push_back(0);
335  totASSv_vertcount.push_back(0);
336  totASS2v_vertcount.push_back(0);
337  totRECv_vertcount.push_back(0);
338  }
339  vertcountintervals.push_back(vertcountintervalsv);
340  totSIM_vertcount_entire.push_back(totSIMv_vertcount);
341  totCONvertcount.push_back(totSIMv_vertcount);
342  totASS_vertcount_entire.push_back(totASSv_vertcount);
343  totASS2_vertcount_entire.push_back(totASS2v_vertcount);
344  totASS2_vertcount_entire_signal.push_back(totASS2v_vertcount);
345  totREC_vertcount_entire.push_back(totRECv_vertcount);
346  totSIM_vertcount_barrel.push_back(totSIMv_vertcount);
347  totASS_vertcount_barrel.push_back(totASSv_vertcount);
348  totASS2_vertcount_barrel.push_back(totASS2v_vertcount);
349  totREC_vertcount_barrel.push_back(totRECv_vertcount);
350  totSIM_vertcount_fwdpos.push_back(totSIMv_vertcount);
351  totASS_vertcount_fwdpos.push_back(totASSv_vertcount);
352  totASS2_vertcount_fwdpos.push_back(totASS2v_vertcount);
353  totREC_vertcount_fwdpos.push_back(totRECv_vertcount);
354  totSIM_vertcount_fwdneg.push_back(totSIMv_vertcount);
355  totASS_vertcount_fwdneg.push_back(totASSv_vertcount);
356  totASS2_vertcount_fwdneg.push_back(totASS2v_vertcount);
357  totREC_vertcount_fwdneg.push_back(totRECv_vertcount);
358  totFOMT_vertcount.push_back(totASSv_vertcount);
359 
360  totASS2_itpu_vertcount_entire.push_back(totASS2v_vertcount);
361  totASS2_itpu_vertcount_entire_signal.push_back(totASS2v_vertcount);
362 
363  totASS2_ootpu_entire.push_back(totASS2v_vertcount);
364  totREC_ootpu_entire.push_back(totRECv_vertcount);
365  totASS2_ootpu_barrel.push_back(totASS2v_vertcount);
366  totREC_ootpu_barrel.push_back(totRECv_vertcount);
367  totASS2_ootpu_fwdpos.push_back(totASS2v_vertcount);
368  totREC_ootpu_fwdpos.push_back(totRECv_vertcount);
369  totASS2_ootpu_fwdneg.push_back(totASS2v_vertcount);
370  totREC_ootpu_fwdneg.push_back(totRECv_vertcount);
371 
372 }
373 
375  h_ptSIM.push_back( dbe_->book1D("ptSIM", "generated p_{t}", 5500, 0, 110 ) );
376  h_etaSIM.push_back( dbe_->book1D("etaSIM", "generated pseudorapidity", 500, -2.5, 2.5 ) );
377  h_tracksSIM.push_back( dbe_->book1D("tracksSIM","number of simulated tracks",200,-0.5,99.5) );
378  h_vertposSIM.push_back( dbe_->book1D("vertposSIM","Transverse position of sim vertices",100,0.,120.) );
379  h_bunchxSIM.push_back( dbe_->book1D("bunchxSIM", "bunch crossing", 22, -5, 5 ) );
380 }
381 
382 
384  h_tracks.push_back( dbe_->book1D("tracks","number of reconstructed tracks",401,-0.5,400.5) );
385  h_fakes.push_back( dbe_->book1D("fakes","number of fake reco tracks",101,-0.5,100.5) );
386  h_charge.push_back( dbe_->book1D("charge","charge",3,-1.5,1.5) );
387 
388  h_hits.push_back( dbe_->book1D("hits", "number of hits per track", nintHit,minHit,maxHit ) );
389  h_losthits.push_back( dbe_->book1D("losthits", "number of lost hits per track", nintHit,minHit,maxHit) );
390  h_nchi2.push_back( dbe_->book1D("chi2", "normalized #chi^{2}", 200, 0, 20 ) );
391  h_nchi2_prob.push_back( dbe_->book1D("chi2_prob", "normalized #chi^{2} probability",100,0,1));
392 
393  h_algo.push_back( dbe_->book1D("h_algo","Tracks by algo",15,0.0,15.0) );
394 
396  h_recoeta.push_back( dbe_->book1D("num_reco_eta","N of reco track vs eta",nintEta,minEta,maxEta) );
397  h_assoceta.push_back( dbe_->book1D("num_assoc(simToReco)_eta","N of associated tracks (simToReco) vs eta",nintEta,minEta,maxEta) );
398  h_assoc2eta.push_back( dbe_->book1D("num_assoc(recoToSim)_eta","N of associated (recoToSim) tracks vs eta",nintEta,minEta,maxEta) );
399  h_simuleta.push_back( dbe_->book1D("num_simul_eta","N of simulated tracks vs eta",nintEta,minEta,maxEta) );
400  h_loopereta.push_back( dbe_->book1D("num_duplicate_eta","N of associated (recoToSim) duplicate tracks vs eta",nintEta,minEta,maxEta) );
401  h_misideta.push_back( dbe_->book1D("num_chargemisid_eta","N of associated (recoToSim) charge misIDed tracks vs eta",nintEta,minEta,maxEta) );
402  h_recopT.push_back( dbe_->book1D("num_reco_pT","N of reco track vs pT",nintPt,minPt,maxPt) );
403  h_assocpT.push_back( dbe_->book1D("num_assoc(simToReco)_pT","N of associated tracks (simToReco) vs pT",nintPt,minPt,maxPt) );
404  h_assoc2pT.push_back( dbe_->book1D("num_assoc(recoToSim)_pT","N of associated (recoToSim) tracks vs pT",nintPt,minPt,maxPt) );
405  h_simulpT.push_back( dbe_->book1D("num_simul_pT","N of simulated tracks vs pT",nintPt,minPt,maxPt) );
406  h_looperpT.push_back( dbe_->book1D("num_duplicate_pT","N of associated (recoToSim) duplicate tracks vs pT",nintPt,minPt,maxPt) );
407  h_misidpT.push_back( dbe_->book1D("num_chargemisid_pT","N of associated (recoToSim) charge misIDed tracks vs pT",nintPt,minPt,maxPt) );
408  //
409  h_recohit.push_back( dbe_->book1D("num_reco_hit","N of reco track vs hit",nintHit,minHit,maxHit) );
410  h_assochit.push_back( dbe_->book1D("num_assoc(simToReco)_hit","N of associated tracks (simToReco) vs hit",nintHit,minHit,maxHit) );
411  h_assoc2hit.push_back( dbe_->book1D("num_assoc(recoToSim)_hit","N of associated (recoToSim) tracks vs hit",nintHit,minHit,maxHit) );
412  h_simulhit.push_back( dbe_->book1D("num_simul_hit","N of simulated tracks vs hit",nintHit,minHit,maxHit) );
413  h_looperhit.push_back( dbe_->book1D("num_duplicate_hit","N of associated (recoToSim) duplicate tracks vs hit",nintHit,minHit,maxHit) );
414  h_misidhit.push_back( dbe_->book1D("num_chargemisid_hit","N of associated (recoToSim) charge misIDed tracks vs hit",nintHit,minHit,maxHit) );
415  //
416  h_recophi.push_back( dbe_->book1D("num_reco_phi","N of reco track vs phi",nintPhi,minPhi,maxPhi) );
417  h_assocphi.push_back( dbe_->book1D("num_assoc(simToReco)_phi","N of associated tracks (simToReco) vs phi",nintPhi,minPhi,maxPhi) );
418  h_assoc2phi.push_back( dbe_->book1D("num_assoc(recoToSim)_phi","N of associated (recoToSim) tracks vs phi",nintPhi,minPhi,maxPhi) );
419  h_simulphi.push_back( dbe_->book1D("num_simul_phi","N of simulated tracks vs phi",nintPhi,minPhi,maxPhi) );
420  h_looperphi.push_back( dbe_->book1D("num_duplicate_phi","N of associated (recoToSim) duplicate tracks vs phi",nintPhi,minPhi,maxPhi) );
421  h_misidphi.push_back( dbe_->book1D("num_chargemisid_phi","N of associated (recoToSim) charge misIDed tracks vs phi",nintPhi,minPhi,maxPhi) );
422 
423  h_recodxy.push_back( dbe_->book1D("num_reco_dxy","N of reco track vs dxy",nintDxy,minDxy,maxDxy) );
424  h_assocdxy.push_back( dbe_->book1D("num_assoc(simToReco)_dxy","N of associated tracks (simToReco) vs dxy",nintDxy,minDxy,maxDxy) );
425  h_assoc2dxy.push_back( dbe_->book1D("num_assoc(recoToSim)_dxy","N of associated (recoToSim) tracks vs dxy",nintDxy,minDxy,maxDxy) );
426  h_simuldxy.push_back( dbe_->book1D("num_simul_dxy","N of simulated tracks vs dxy",nintDxy,minDxy,maxDxy) );
427  h_looperdxy.push_back( dbe_->book1D("num_duplicate_dxy","N of associated (recoToSim) looper tracks vs dxy",nintDxy,minDxy,maxDxy) );
428  h_misiddxy.push_back( dbe_->book1D("num_chargemisid_dxy","N of associated (recoToSim) charge misIDed tracks vs dxy",nintDxy,minDxy,maxDxy) );
429 
430  h_recodz.push_back( dbe_->book1D("num_reco_dz","N of reco track vs dz",nintDz,minDz,maxDz) );
431  h_assocdz.push_back( dbe_->book1D("num_assoc(simToReco)_dz","N of associated tracks (simToReco) vs dz",nintDz,minDz,maxDz) );
432  h_assoc2dz.push_back( dbe_->book1D("num_assoc(recoToSim)_dz","N of associated (recoToSim) tracks vs dz",nintDz,minDz,maxDz) );
433  h_simuldz.push_back( dbe_->book1D("num_simul_dz","N of simulated tracks vs dz",nintDz,minDz,maxDz) );
434  h_looperdz.push_back( dbe_->book1D("num_duplicate_dz","N of associated (recoToSim) looper tracks vs dz",nintDz,minDz,maxDz) );
435  h_misiddz.push_back( dbe_->book1D("num_chargemisid_versus_dz","N of associated (recoToSim) charge misIDed tracks vs dz",nintDz,minDz,maxDz) );
436 
437  h_assocvertpos.push_back( dbe_->book1D("num_assoc(simToReco)_vertpos",
438  "N of associated tracks (simToReco) vs transverse vert position",
440  h_simulvertpos.push_back( dbe_->book1D("num_simul_vertpos","N of simulated tracks vs transverse vert position",
442 
443  h_assoczpos.push_back( dbe_->book1D("num_assoc(simToReco)_zpos","N of associated tracks (simToReco) vs z vert position",
445  h_simulzpos.push_back( dbe_->book1D("num_simul_zpos","N of simulated tracks vs z vert position",nintZpos,minZpos,maxZpos) );
446 
447 
448  h_reco_vertcount_entire.push_back( dbe_->book1D("num_reco_vertcount_entire","N of reco tracks vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
449  h_assoc_vertcount_entire.push_back( dbe_->book1D("num_assoc(simToReco)_vertcount_entire","N of associated tracks (simToReco) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
450  h_assoc2_vertcount_entire.push_back( dbe_->book1D("num_assoc(recoToSim)_vertcount_entire","N of associated (recoToSim) tracks vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
451  h_simul_vertcount_entire.push_back( dbe_->book1D("num_simul_vertcount_entire","N of simulated tracks vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
452 
453  h_reco_vertcount_barrel.push_back( dbe_->book1D("num_reco_vertcount_barrel","N of reco tracks in barrel vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
454  h_assoc_vertcount_barrel.push_back( dbe_->book1D("num_assoc(simToReco)_vertcount_barrel","N of associated tracks (simToReco) in barrel vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
455  h_assoc2_vertcount_barrel.push_back( dbe_->book1D("num_assoc(recoToSim)_vertcount_barrel","N of associated (recoToSim) tracks in barrel vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
456  h_simul_vertcount_barrel.push_back( dbe_->book1D("num_simul_vertcount_barrel","N of simulated tracks in barrel vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
457 
458  h_reco_vertcount_fwdpos.push_back( dbe_->book1D("num_reco_vertcount_fwdpos","N of reco tracks in endcap(+) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
459  h_assoc_vertcount_fwdpos.push_back( dbe_->book1D("num_assoc(simToReco)_vertcount_fwdpos","N of associated tracks (simToReco) in endcap(+) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
460  h_assoc2_vertcount_fwdpos.push_back( dbe_->book1D("num_assoc(recoToSim)_vertcount_fwdpos","N of associated (recoToSim) tracks in endcap(+) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
461  h_simul_vertcount_fwdpos.push_back( dbe_->book1D("num_simul_vertcount_fwdpos","N of simulated tracks in endcap(+) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
462 
463  h_reco_vertcount_fwdneg.push_back( dbe_->book1D("num_reco_vertcount_fwdneg","N of reco tracks in endcap(-) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
464  h_assoc_vertcount_fwdneg.push_back( dbe_->book1D("num_assoc(simToReco)_vertcount_fwdneg","N of associated tracks (simToReco) in endcap(-) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
465  h_assoc2_vertcount_fwdneg.push_back( dbe_->book1D("num_assoc(recoToSim)_vertcount_fwdneg","N of associated (recoToSim) tracks in endcap(-) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
466  h_simul_vertcount_fwdneg.push_back( dbe_->book1D("num_simul_vertcount_fwdneg","N of simulated tracks in endcap(-) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
467 
468  h_assoc_vertz_entire.push_back( dbe_->book1D("num_assoc(simToReco)_vertz_entire","N of associated tracks (simToReco) in entire vs z of primary intercation vertex",nintZpos,minZpos,maxZpos) );
469  h_simul_vertz_entire.push_back( dbe_->book1D("num_simul_vertz_entire","N of simulated tracks in entire vs N of pileup vertices",nintZpos,minZpos,maxZpos) );
470 
471  h_assoc_vertz_barrel.push_back( dbe_->book1D("num_assoc(simToReco)_vertz_barrel","N of associated tracks (simToReco) in barrel vs z of primary intercation vertex",nintZpos,minZpos,maxZpos) );
472  h_simul_vertz_barrel.push_back( dbe_->book1D("num_simul_vertz_barrel","N of simulated tracks in barrel vs N of pileup vertices",nintZpos,minZpos,maxZpos) );
473 
474  h_assoc_vertz_fwdpos.push_back( dbe_->book1D("num_assoc(simToReco)_vertz_fwdpos","N of associated tracks (simToReco) in endcap(+) vs z of primary interaction vertex",nintZpos,minZpos,maxZpos) );
475  h_simul_vertz_fwdpos.push_back( dbe_->book1D("num_simul_vertz_fwdpos","N of simulated tracks in endcap(+) vs z of primary interaction vertex",nintZpos,minZpos,maxZpos) );
476 
477  h_assoc_vertz_fwdneg.push_back( dbe_->book1D("num_assoc(simToReco)_vertz_fwdneg","N of associated tracks (simToReco) in endcap(-) vs N of pileup vertices",nintZpos,minZpos,maxZpos) );
478  h_simul_vertz_fwdneg.push_back( dbe_->book1D("num_simul_vertz_fwdneg","N of simulated tracks in endcap(-) vs z of primary interaction vertex",nintZpos,minZpos,maxZpos) );
479 /*
480  h_assoc2_itpu_eta.push_back( dbe_->book1D("num_assoc(recoToSim)_itpu_eta_entire","N of associated tracks (simToReco) from in time pileup vs eta",nintEta,minEta,maxEta) );
481  h_assoc2_itpu_sig_eta.push_back( dbe_->book1D("num_assoc(recoToSim)_itpu_eta_entire_signal","N of associated tracks (simToReco) from in time pileup vs eta",nintEta,minEta,maxEta) );
482  h_assoc2_itpu_vertcount.push_back( dbe_->book1D("num_assoc(recoToSim)_itpu_vertcount_entire","N of associated tracks (simToReco) from in time pileup vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
483  h_assoc2_itpu_sig_vertcount.push_back( dbe_->book1D("num_assoc(recoToSim)_itpu_vertcount_entire_signal","N of associated tracks (simToReco) from in time pileup vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );*/
484 
485  h_reco_ootpu_eta.push_back( dbe_->book1D("num_reco_ootpu_eta_entire","N of reco tracks vs eta",nintEta,minEta,maxEta) );
486  h_reco_ootpu_vertcount.push_back( dbe_->book1D("num_reco_ootpu_vertcount_entire","N of reco tracks vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
487 
488  h_assoc2_ootpu_entire.push_back( dbe_->book1D("num_assoc(recoToSim)_ootpu_eta_entire","N of associated tracks (simToReco) from out of time pileup vs eta",nintEta,minEta,maxEta) );
489  h_assoc2_ootpu_vertcount.push_back( dbe_->book1D("num_assoc(recoToSim)_ootpu_vertcount_entire","N of associated tracks (simToReco) from out of time pileup vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
490 
491  h_reco_ootpu_entire.push_back( dbe_->book1D("num_reco_ootpu_entire","N of reco tracks vs z of primary interaction vertex",nintVertcount,minVertcount,maxVertcount) );
492  h_assoc2_ootpu_barrel.push_back( dbe_->book1D("num_assoc(recoToSim)_ootpu_barrel","N of associated tracks (simToReco) from out of time pileup in barrel vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
493  h_reco_ootpu_barrel.push_back( dbe_->book1D("num_reco_ootpu_barrel","N of reco tracks in barrel vs z of primary interaction vertex",nintVertcount,minVertcount,maxVertcount) );
494  h_assoc2_ootpu_fwdpos.push_back( dbe_->book1D("num_assoc(recoToSim)_ootpu_fwdpos","N of associated tracks (simToReco) from out of time pileup in endcap(+) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
495  h_reco_ootpu_fwdpos.push_back( dbe_->book1D("num_reco_ootpu_fwdpos","N of reco tracks in endcap(+) vs z of primary interaction vertex",nintVertcount,minVertcount,maxVertcount) );
496  h_assoc2_ootpu_fwdneg.push_back( dbe_->book1D("num_assoc(recoToSim)_ootpu_fwdneg","N of associated tracks (simToReco) from out of time pileup in endcap(-) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
497  h_reco_ootpu_fwdneg.push_back( dbe_->book1D("num_reco_ootpu_fwdneg","N of reco tracks in endcap(-) vs z of primary interaction vertex",nintVertcount,minVertcount,maxVertcount) );
498 
499 
501 
502  h_eta.push_back( dbe_->book1D("eta", "pseudorapidity residue", 1000, -0.1, 0.1 ) );
503  h_pt.push_back( dbe_->book1D("pullPt", "pull of p_{t}", 100, -10, 10 ) );
504  h_pullTheta.push_back( dbe_->book1D("pullTheta","pull of #theta parameter",250,-25,25) );
505  h_pullPhi.push_back( dbe_->book1D("pullPhi","pull of #phi parameter",250,-25,25) );
506  h_pullDxy.push_back( dbe_->book1D("pullDxy","pull of dxy parameter",250,-25,25) );
507  h_pullDz.push_back( dbe_->book1D("pullDz","pull of dz parameter",250,-25,25) );
508  h_pullQoverp.push_back( dbe_->book1D("pullQoverp","pull of qoverp parameter",250,-25,25) );
509 
510  /* TO BE FIXED -----------
511  if (associators[ww]=="TrackAssociatorByChi2"){
512  h_assochi2.push_back( dbe_->book1D("assocChi2","track association #chi^{2}",1000000,0,100000) );
513  h_assochi2_prob.push_back(dbe_->book1D("assocChi2_prob","probability of association #chi^{2}",100,0,1));
514  } else if (associators[ww]=="quickTrackAssociatorByHits"){
515  h_assocFraction.push_back( dbe_->book1D("assocFraction","fraction of shared hits",200,0,2) );
516  h_assocSharedHit.push_back(dbe_->book1D("assocSharedHit","number of shared hits",20,0,20));
517  }
518  */
519  h_assocFraction.push_back( dbe_->book1D("assocFraction","fraction of shared hits",200,0,2) );
520  h_assocSharedHit.push_back(dbe_->book1D("assocSharedHit","number of shared hits",41,-0.5,40.5));
521  // ----------------------
522 
523  chi2_vs_nhits.push_back( dbe_->book2D("chi2_vs_nhits","#chi^{2} vs nhits",25,0,25,100,0,10) );
524 
525  etares_vs_eta.push_back( dbe_->book2D("etares_vs_eta","etaresidue vs eta",nintEta,minEta,maxEta,200,-0.1,0.1) );
526  nrec_vs_nsim.push_back( dbe_->book2D("nrec_vs_nsim","nrec vs nsim",401,-0.5,400.5,401,-0.5,400.5) );
527 
528  chi2_vs_eta.push_back( dbe_->book2D("chi2_vs_eta","chi2_vs_eta",nintEta,minEta,maxEta, 200, 0, 20 ));
529  chi2_vs_phi.push_back( dbe_->book2D("chi2_vs_phi","#chi^{2} vs #phi",nintPhi,minPhi,maxPhi, 200, 0, 20 ) );
530 
531  nhits_vs_eta.push_back( dbe_->book2D("nhits_vs_eta","nhits vs eta",nintEta,minEta,maxEta,nintHit,minHit,maxHit) );
532  nPXBhits_vs_eta.push_back( dbe_->book2D("nPXBhits_vs_eta","# PXB its vs eta",nintEta,minEta,maxEta,nintHit,minHit,maxHit) );
533  nPXFhits_vs_eta.push_back( dbe_->book2D("nPXFhits_vs_eta","# PXF hits vs eta",nintEta,minEta,maxEta,nintHit,minHit,maxHit) );
534  nTIBhits_vs_eta.push_back( dbe_->book2D("nTIBhits_vs_eta","# TIB hits vs eta",nintEta,minEta,maxEta,nintHit,minHit,maxHit) );
535  nTIDhits_vs_eta.push_back( dbe_->book2D("nTIDhits_vs_eta","# TID hits vs eta",nintEta,minEta,maxEta,nintHit,minHit,maxHit) );
536  nTOBhits_vs_eta.push_back( dbe_->book2D("nTOBhits_vs_eta","# TOB hits vs eta",nintEta,minEta,maxEta,nintHit,minHit,maxHit) );
537  nTEChits_vs_eta.push_back( dbe_->book2D("nTEChits_vs_eta","# TEC hits vs eta",nintEta,minEta,maxEta,nintHit,minHit,maxHit) );
538 
539  nLayersWithMeas_vs_eta.push_back( dbe_->book2D("nLayersWithMeas_vs_eta","# Layers with measurement vs eta",
541  nPXLlayersWithMeas_vs_eta.push_back( dbe_->book2D("nPXLlayersWithMeas_vs_eta","# PXL Layers with measurement vs eta",
543  nSTRIPlayersWithMeas_vs_eta.push_back( dbe_->book2D("nSTRIPlayersWithMeas_vs_eta","# STRIP Layers with measurement vs eta",
545  nSTRIPlayersWith1dMeas_vs_eta.push_back( dbe_->book2D("nSTRIPlayersWith1dMeas_vs_eta","# STRIP Layers with 1D measurement vs eta",
547  nSTRIPlayersWith2dMeas_vs_eta.push_back( dbe_->book2D("nSTRIPlayersWith2dMeas_vs_eta","# STRIP Layers with 2D measurement vs eta",
549 
550  nhits_vs_phi.push_back( dbe_->book2D("nhits_vs_phi","#hits vs #phi",nintPhi,minPhi,maxPhi,nintHit,minHit,maxHit) );
551 
552  nlosthits_vs_eta.push_back( dbe_->book2D("nlosthits_vs_eta","nlosthits vs eta",nintEta,minEta,maxEta,nintHit,minHit,maxHit) );
553 
554  //resolution of track parameters
555  // dPt/Pt cotTheta Phi TIP LIP
556  // log10(pt)<0.5 100,0.1 240,0.08 100,0.015 100,0.1000 150,0.3000
557  // 0.5<log10(pt)<1.5 100,0.1 120,0.01 100,0.003 100,0.0100 150,0.0500
558  // >1.5 100,0.3 100,0.005 100,0.0008 100,0.0060 120,0.0300
559 
560  ptres_vs_eta.push_back(dbe_->book2D("ptres_vs_eta","ptres_vs_eta",
562 
563  ptres_vs_phi.push_back( dbe_->book2D("ptres_vs_phi","p_{t} res vs #phi",
565 
566  ptres_vs_pt.push_back(dbe_->book2D("ptres_vs_pt","ptres_vs_pt",nintPt,minPt,maxPt, ptRes_nbin, ptRes_rangeMin, ptRes_rangeMax));
567 
568  cotThetares_vs_eta.push_back(dbe_->book2D("cotThetares_vs_eta","cotThetares_vs_eta",
570 
571 
572  cotThetares_vs_pt.push_back(dbe_->book2D("cotThetares_vs_pt","cotThetares_vs_pt",
574 
575 
576  phires_vs_eta.push_back(dbe_->book2D("phires_vs_eta","phires_vs_eta",
578 
579  phires_vs_pt.push_back(dbe_->book2D("phires_vs_pt","phires_vs_pt",
581 
582  phires_vs_phi.push_back(dbe_->book2D("phires_vs_phi","#phi res vs #phi",
584 
585  dxyres_vs_eta.push_back(dbe_->book2D("dxyres_vs_eta","dxyres_vs_eta",
587 
588  dxyres_vs_pt.push_back( dbe_->book2D("dxyres_vs_pt","dxyres_vs_pt",
590 
591  dzres_vs_eta.push_back(dbe_->book2D("dzres_vs_eta","dzres_vs_eta",
593 
594  dzres_vs_pt.push_back(dbe_->book2D("dzres_vs_pt","dzres_vs_pt",nintPt,minPt,maxPt,dzRes_nbin, dzRes_rangeMin, dzRes_rangeMax));
595 
596  ptmean_vs_eta_phi.push_back(dbe_->bookProfile2D("ptmean_vs_eta_phi","mean p_{t} vs #eta and #phi",
597  nintPhi,minPhi,maxPhi,nintEta,minEta,maxEta,1000,0,1000));
598  phimean_vs_eta_phi.push_back(dbe_->bookProfile2D("phimean_vs_eta_phi","mean #phi vs #eta and #phi",
600 
601  //pulls of track params vs eta: to be used with fitslicesytool
602  dxypull_vs_eta.push_back(dbe_->book2D("dxypull_vs_eta","dxypull_vs_eta",nintEta,minEta,maxEta,100,-10,10));
603  ptpull_vs_eta.push_back(dbe_->book2D("ptpull_vs_eta","ptpull_vs_eta",nintEta,minEta,maxEta,100,-10,10));
604  dzpull_vs_eta.push_back(dbe_->book2D("dzpull_vs_eta","dzpull_vs_eta",nintEta,minEta,maxEta,100,-10,10));
605  phipull_vs_eta.push_back(dbe_->book2D("phipull_vs_eta","phipull_vs_eta",nintEta,minEta,maxEta,100,-10,10));
606  thetapull_vs_eta.push_back(dbe_->book2D("thetapull_vs_eta","thetapull_vs_eta",nintEta,minEta,maxEta,100,-10,10));
607 
608  // h_ptshiftetamean.push_back( dbe_->book1D("h_ptshifteta_Mean","<#deltapT/pT>[%] vs #eta",nintEta,minEta,maxEta) );
609 
610 
611  //pulls of track params vs phi
612  ptpull_vs_phi.push_back(dbe_->book2D("ptpull_vs_phi","p_{t} pull vs #phi",nintPhi,minPhi,maxPhi,100,-10,10));
613  phipull_vs_phi.push_back(dbe_->book2D("phipull_vs_phi","#phi pull vs #phi",nintPhi,minPhi,maxPhi,100,-10,10));
614  thetapull_vs_phi.push_back(dbe_->book2D("thetapull_vs_phi","#theta pull vs #phi",nintPhi,minPhi,maxPhi,100,-10,10));
615 
616 
617  nrecHit_vs_nsimHit_sim2rec.push_back( dbe_->book2D("nrecHit_vs_nsimHit_sim2rec","nrecHit vs nsimHit (Sim2RecAssoc)",
619  nrecHit_vs_nsimHit_rec2sim.push_back( dbe_->book2D("nrecHit_vs_nsimHit_rec2sim","nrecHit vs nsimHit (Rec2simAssoc)",
621 
622  // dE/dx stuff
623  // FIXME: it would be nice to have an array
624  h_dedx_estim1.push_back( dbe_->book1D("h_dedx_estim1","dE/dx estimator 1",nintDeDx,minDeDx,maxDeDx) );
625  h_dedx_estim2.push_back( dbe_->book1D("h_dedx_estim2","dE/dx estimator 2",nintDeDx,minDeDx,maxDeDx) );
626  h_dedx_nom1.push_back( dbe_->book1D("h_dedx_nom1","dE/dx number of measurements",nintHit,minHit,maxHit) );
627  h_dedx_nom2.push_back( dbe_->book1D("h_dedx_nom2","dE/dx number of measurements",nintHit,minHit,maxHit) );
628  h_dedx_sat1.push_back( dbe_->book1D("h_dedx_sat1","dE/dx number of measurements with saturation",nintHit,minHit,maxHit) );
629  h_dedx_sat2.push_back( dbe_->book1D("h_dedx_sat2","dE/dx number of measurements with saturation",nintHit,minHit,maxHit) );
630 
631  // PU special stuff
632  h_con_eta.push_back( dbe_->book1D("num_con_eta","N of PU tracks vs eta",nintEta,minEta,maxEta) );
633  h_con_vertcount.push_back( dbe_->book1D("num_con_vertcount","N of PU tracks vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
634  h_con_zpos.push_back( dbe_->book1D("num_con_zpos","N of PU tracks vs z of primary interaction vertex",nintZpos,minZpos,maxZpos) );
635 
636 
637  if(useLogPt){
638  BinLogX(dzres_vs_pt.back()->getTH2F());
639  BinLogX(dxyres_vs_pt.back()->getTH2F());
640  BinLogX(phires_vs_pt.back()->getTH2F());
641  BinLogX(cotThetares_vs_pt.back()->getTH2F());
642  BinLogX(ptres_vs_pt.back()->getTH2F());
643  BinLogX(h_looperpT.back()->getTH1F());
644  BinLogX(h_misidpT.back()->getTH1F());
645  BinLogX(h_recopT.back()->getTH1F());
646  BinLogX(h_assocpT.back()->getTH1F());
647  BinLogX(h_assoc2pT.back()->getTH1F());
648  BinLogX(h_simulpT.back()->getTH1F());
649  }
650 }
651 
653  h_effic.push_back( dbe_->book1D("effic","efficiency vs #eta",nintEta,minEta,maxEta) );
654  h_efficPt.push_back( dbe_->book1D("efficPt","efficiency vs pT",nintPt,minPt,maxPt) );
655  h_effic_vs_hit.push_back( dbe_->book1D("effic_vs_hit","effic vs hit",nintHit,minHit,maxHit) );
656  h_effic_vs_phi.push_back( dbe_->book1D("effic_vs_phi","effic vs phi",nintPhi,minPhi,maxPhi) );
657  h_effic_vs_dxy.push_back( dbe_->book1D("effic_vs_dxy","effic vs dxy",nintDxy,minDxy,maxDxy) );
658  h_effic_vs_dz.push_back( dbe_->book1D("effic_vs_dz","effic vs dz",nintDz,minDz,maxDz) );
659  h_effic_vs_vertpos.push_back( dbe_->book1D("effic_vs_vertpos","effic vs vertpos",nintVertpos,minVertpos,maxVertpos) );
660  h_effic_vs_zpos.push_back( dbe_->book1D("effic_vs_zpos","effic vs zpos",nintZpos,minZpos,maxZpos) );
661  h_effic_vertcount_entire.push_back( dbe_->book1D("effic_vertcount_entire","efficiency vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
662  h_effic_vertcount_barrel.push_back( dbe_->book1D("effic_vertcount_barrel","efficiency in barrel vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
663  h_effic_vertcount_fwdpos.push_back( dbe_->book1D("effic_vertcount_fwdpos","efficiency in endcap(+) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
664  h_effic_vertcount_fwdneg.push_back( dbe_->book1D("effic_vertcount_fwdneg","efficiency in endcap(-) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
665  h_effic_vertz_entire.push_back( dbe_->book1D("effic_vertz_entire","efficiency vs z of primary interaction vertex",nintZpos,minZpos,maxZpos) );
666  h_effic_vertz_barrel.push_back( dbe_->book1D("effic_vertz_barrel","efficiency in barrel vs z of primary interaction vertex",nintZpos,minZpos,maxZpos) );
667  h_effic_vertz_fwdpos.push_back( dbe_->book1D("effic_vertz_fwdpos","efficiency in endcap(+) vs z of primary interaction vertex",nintZpos,minZpos,maxZpos) );
668  h_effic_vertz_fwdneg.push_back( dbe_->book1D("effic_vertz_fwdneg","efficiency in endcap(-) vs z of primary interaction vertex",nintZpos,minZpos,maxZpos) );
669 
670  h_looprate.push_back( dbe_->book1D("duplicatesRate","loop rate vs #eta",nintEta,minEta,maxEta) );
671  h_misidrate.push_back( dbe_->book1D("chargeMisIdRate","misid rate vs #eta",nintEta,minEta,maxEta) );
672  h_fakerate.push_back( dbe_->book1D("fakerate","fake rate vs #eta",nintEta,minEta,maxEta) );
673  h_loopratepT.push_back( dbe_->book1D("duplicatesRate_Pt","loop rate vs pT",nintPt,minPt,maxPt) );
674  h_misidratepT.push_back( dbe_->book1D("chargeMisIdRate_Pt","misid rate vs pT",nintPt,minPt,maxPt) );
675  h_fakeratePt.push_back( dbe_->book1D("fakeratePt","fake rate vs pT",nintPt,minPt,maxPt) );
676  h_loopratehit.push_back( dbe_->book1D("duplicatesRate_hit","loop rate vs hit",nintHit,minHit,maxHit) );
677  h_misidratehit.push_back( dbe_->book1D("chargeMisIdRate_hit","misid rate vs hit",nintHit,minHit,maxHit) );
678  h_fake_vs_hit.push_back( dbe_->book1D("fakerate_vs_hit","fake rate vs hit",nintHit,minHit,maxHit) );
679  h_loopratephi.push_back( dbe_->book1D("duplicatesRate_phi","loop rate vs #phi",nintPhi,minPhi,maxPhi) );
680  h_misidratephi.push_back( dbe_->book1D("chargeMisIdRate_phi","misid rate vs #phi",nintPhi,minPhi,maxPhi) );
681  h_fake_vs_phi.push_back( dbe_->book1D("fakerate_vs_phi","fake vs #phi",nintPhi,minPhi,maxPhi) );
682  h_loopratedxy.push_back( dbe_->book1D("duplicatesRate_dxy","loop rate vs dxy",nintDxy,minDxy,maxDxy) );
683  h_misidratedxy.push_back( dbe_->book1D("chargeMisIdRate_dxy","misid rate vs dxy",nintDxy,minDxy,maxDxy) );
684  h_fake_vs_dxy.push_back( dbe_->book1D("fakerate_vs_dxy","fake rate vs dxy",nintDxy,minDxy,maxDxy) );
685  h_loopratedz.push_back( dbe_->book1D("duplicatesRate_dz","loop rate vs dz",nintDz,minDz,maxDz) );
686  h_misidratedz.push_back( dbe_->book1D("chargeMisIdRate_dz","misid rate vs dz",nintDz,minDz,maxDz) );
687  h_fake_vs_dz.push_back( dbe_->book1D("fakerate_vs_dz","fake vs dz",nintDz,minDz,maxDz) );
688  h_fakerate_vertcount_entire.push_back( dbe_->book1D("fakerate_vertcount_entire","fake rate vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
689  h_fakerate_vertcount_barrel.push_back( dbe_->book1D("fakerate_vertcount_barrel","fake rate in barrel vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
690  h_fakerate_vertcount_fwdpos.push_back( dbe_->book1D("fakerate_vertcount_fwdpos","fake rate in endcap(+) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
691  h_fakerate_vertcount_fwdneg.push_back( dbe_->book1D("fakerate_vertcount_fwdneg","fake rate in endcap(-) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
692  h_fakerate_ootpu_entire.push_back( dbe_->book1D("fakerate_ootpu_eta_entire","Out of time pileup fake rate vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
693  h_fakerate_ootpu_barrel.push_back( dbe_->book1D("fakerate_ootpu_barrel","Out of time pileup fake rate in barrel vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
694  h_fakerate_ootpu_fwdpos.push_back( dbe_->book1D("fakerate_ootpu_fwdpos","Out of time pileup fake rate in endcap(+) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
695  h_fakerate_ootpu_fwdneg.push_back( dbe_->book1D("fakerate_ootpu_fwdneg","Out of time pileup fake rate in endcap(-) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
696 
697  h_fomt_eta.push_back( dbe_->book1D("fomt","fraction of misreconstructed tracks vs #eta",nintEta,minEta,maxEta) );
698  h_fomt_sig_eta.push_back( dbe_->book1D("fomt_signal","fraction of misreconstructed tracks vs #eta",nintEta,minEta,maxEta) );
699  h_fomt_vertcount.push_back( dbe_->book1D("fomt_vertcount","fraction of misreconstructed tracks vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
700  h_fomt_sig_vertcount.push_back( dbe_->book1D("fomt_vertcount_signal","fraction of misreconstructed tracks vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
701  h_fomt_ootpu_eta.push_back( dbe_->book1D("fomt_ootpu_eta","Out of time pileup fraction of misreconstructed tracks vs #eta",nintEta,minEta,maxEta) );
702  h_fomt_ootpu_vertcount.push_back( dbe_->book1D("fomt_ootpu_vertcount","Out of time pileup fraction of misreconstructed tracks vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
703  h_fomt_itpu_eta.push_back( dbe_->book1D("fomt_itpu_eta","In time pileup fraction of misreconstructed tracks vs eta",nintEta,minEta,maxEta) );
704  h_fomt_itpu_vertcount.push_back( dbe_->book1D("fomt_itpu_vertcount","In time pileup fraction of misreconstructed tracks vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
705 
706  h_effic_PU_eta.push_back( dbe_->book1D("effic_PU_eta","PU efficiency vs #eta",nintEta,minEta,maxEta) );
707  h_effic_PU_vertcount.push_back( dbe_->book1D("effic_PU_vertcount","PU efficiency s N of pileup vertices",nintVertcount,minVertcount,maxVertcount) );
708  h_effic_PU_zpos.push_back( dbe_->book1D("effic_PU_zpos","PU efficiency vs z of primary interaction vertex",nintZpos,minZpos,maxZpos) );
709 
710  h_chi2meanhitsh.push_back( dbe_->bookProfile("chi2mean_vs_nhits","mean #chi^{2} vs nhits",25,0,25,100,0,10) );
711  h_chi2meanh.push_back( dbe_->bookProfile("chi2mean","mean #chi^{2} vs #eta",nintEta,minEta,maxEta, 200, 0, 20) );
712  h_chi2mean_vs_phi.push_back( dbe_->bookProfile("chi2mean_vs_phi","mean of #chi^{2} vs #phi",nintPhi,minPhi,maxPhi, 200, 0, 20) );
713 
714  h_hits_eta.push_back( dbe_->bookProfile("hits_eta","mean #hits vs eta",nintEta,minEta,maxEta,nintHit,minHit,maxHit) );
715  h_PXBhits_eta.push_back( dbe_->bookProfile("PXBhits_eta","mean # PXB hits vs eta",nintEta,minEta,maxEta,nintHit,minHit,maxHit) );
716  h_PXFhits_eta.push_back( dbe_->bookProfile("PXFhits_eta","mean # PXF hits vs eta",nintEta,minEta,maxEta,nintHit,minHit,maxHit) );
717  h_TIBhits_eta.push_back( dbe_->bookProfile("TIBhits_eta","mean # TIB hits vs eta",nintEta,minEta,maxEta,nintHit,minHit,maxHit) );
718  h_TIDhits_eta.push_back( dbe_->bookProfile("TIDhits_eta","mean # TID hits vs eta",nintEta,minEta,maxEta,nintHit,minHit,maxHit) );
719  h_TOBhits_eta.push_back( dbe_->bookProfile("TOBhits_eta","mean # TOB hits vs eta",nintEta,minEta,maxEta,nintHit,minHit,maxHit) );
720  h_TEChits_eta.push_back( dbe_->bookProfile("TEChits_eta","mean # TEC hits vs eta",nintEta,minEta,maxEta,nintHit,minHit,maxHit) );
721 
722  h_LayersWithMeas_eta.push_back(dbe_->bookProfile("LayersWithMeas_eta","mean # LayersWithMeas vs eta",
724  h_PXLlayersWithMeas_eta.push_back(dbe_->bookProfile("PXLlayersWith2dMeas_eta","mean # PXLlayersWithMeas vs eta",
726  h_STRIPlayersWithMeas_eta.push_back(dbe_->bookProfile("STRIPlayersWithMeas_eta","mean # STRIPlayersWithMeas vs eta",
728  h_STRIPlayersWith1dMeas_eta.push_back(dbe_->bookProfile("STRIPlayersWith1dMeas_eta","mean # STRIPlayersWith1dMeas vs eta",
730  h_STRIPlayersWith2dMeas_eta.push_back(dbe_->bookProfile("STRIPlayersWith2dMeas_eta","mean # STRIPlayersWith2dMeas vs eta",
732  h_hits_phi.push_back( dbe_->bookProfile("hits_phi","mean #hits vs #phi",nintPhi,minPhi,maxPhi, nintHit,minHit,maxHit) );
733  h_losthits_eta.push_back( dbe_->bookProfile("losthits_eta","losthits_eta",nintEta,minEta,maxEta,nintHit,minHit,maxHit) );
734 
735  h_ptrmsh.push_back( dbe_->book1D("ptres_vs_eta_Sigma","#sigma(#deltap_{t}/p_{t}) vs #eta",nintEta,minEta,maxEta) );
736  h_ptmeanhPhi.push_back( dbe_->book1D("ptres_vs_phi_Mean","mean of p_{t} resolution vs #phi",nintPhi,minPhi,maxPhi));
737  h_ptrmshPhi.push_back( dbe_->book1D("ptres_vs_phi_Sigma","#sigma(#deltap_{t}/p_{t}) vs #phi",nintPhi,minPhi,maxPhi) );
738  h_ptmeanhPt.push_back( dbe_->book1D("ptres_vs_pt_Mean","mean of p_{t} resolution vs p_{t}",nintPt,minPt,maxPt));
739  h_ptrmshPt.push_back( dbe_->book1D("ptres_vs_pt_Sigma","#sigma(#deltap_{t}/p_{t}) vs pT",nintPt,minPt,maxPt) );
740  h_cotThetameanh.push_back( dbe_->book1D("cotThetares_vs_eta_Mean","#sigma(cot(#theta)) vs #eta Mean",nintEta,minEta,maxEta) );
741  h_cotThetarmsh.push_back( dbe_->book1D("cotThetares_vs_eta_Sigma","#sigma(cot(#theta)) vs #eta Sigma",nintEta,minEta,maxEta) );
742  h_cotThetameanhPt.push_back( dbe_->book1D("cotThetares_vs_pt_Mean","#sigma(cot(#theta)) vs pT Mean",nintPt,minPt,maxPt) );
743  h_cotThetarmshPt.push_back( dbe_->book1D("cotThetares_vs_pt_Sigma","#sigma(cot(#theta)) vs pT Sigma",nintPt,minPt,maxPt) );
744  h_phimeanh.push_back(dbe_->book1D("phires_vs_eta_Mean","mean of #phi res vs #eta",nintEta,minEta,maxEta));
745  h_phirmsh.push_back( dbe_->book1D("phires_vs_eta_Sigma","#sigma(#delta#phi) vs #eta",nintEta,minEta,maxEta) );
746  h_phimeanhPt.push_back(dbe_->book1D("phires_vs_pt_Mean","mean of #phi res vs pT",nintPt,minPt,maxPt));
747  h_phirmshPt.push_back( dbe_->book1D("phires_vs_pt_Sigma","#sigma(#delta#phi) vs pT",nintPt,minPt,maxPt) );
748  h_phimeanhPhi.push_back(dbe_->book1D("phires_vs_phi_Mean","mean of #phi res vs #phi",nintPhi,minPhi,maxPhi));
749  h_phirmshPhi.push_back( dbe_->book1D("phires_vs_phi_Sigma","#sigma(#delta#phi) vs #phi",nintPhi,minPhi,maxPhi) );
750  h_dxymeanh.push_back( dbe_->book1D("dxyres_vs_eta_Mean","mean of dxyres vs #eta",nintEta,minEta,maxEta) );
751  h_dxyrmsh.push_back( dbe_->book1D("dxyres_vs_eta_Sigma","#sigma(#deltadxy) vs #eta",nintEta,minEta,maxEta) );
752  h_dxymeanhPt.push_back( dbe_->book1D("dxyres_vs_pt_Mean","mean of dxyres vs pT",nintPt,minPt,maxPt) );
753  h_dxyrmshPt.push_back( dbe_->book1D("dxyres_vs_pt_Sigma","#sigmadxy vs pT",nintPt,minPt,maxPt) );
754  h_dzmeanh.push_back( dbe_->book1D("dzres_vs_eta_Mean","mean of dzres vs #eta",nintEta,minEta,maxEta) );
755  h_dzrmsh.push_back( dbe_->book1D("dzres_vs_eta_Sigma","#sigma(#deltadz) vs #eta",nintEta,minEta,maxEta) );
756  h_dzmeanhPt.push_back( dbe_->book1D("dzres_vs_pt_Mean","mean of dzres vs pT",nintPt,minPt,maxPt) );
757  h_dzrmshPt.push_back( dbe_->book1D("dzres_vs_pt_Sigma","#sigma(#deltadz vs pT",nintPt,minPt,maxPt) );
758  h_dxypulletamean.push_back( dbe_->book1D("h_dxypulleta_Mean","mean of dxy pull vs #eta",nintEta,minEta,maxEta) );
759  h_ptpulletamean.push_back( dbe_->book1D("h_ptpulleta_Mean","mean of p_{t} pull vs #eta",nintEta,minEta,maxEta) );
760  h_dzpulletamean.push_back( dbe_->book1D("h_dzpulleta_Mean","mean of dz pull vs #eta",nintEta,minEta,maxEta) );
761  h_phipulletamean.push_back( dbe_->book1D("h_phipulleta_Mean","mean of #phi pull vs #eta",nintEta,minEta,maxEta) );
762  h_thetapulletamean.push_back( dbe_->book1D("h_thetapulleta_Mean","mean of #theta pull vs #eta",nintEta,minEta,maxEta) );
763  h_dxypulleta.push_back( dbe_->book1D("h_dxypulleta_Sigma","#sigma of dxy pull vs #eta",nintEta,minEta,maxEta) );
764  h_ptpulleta.push_back( dbe_->book1D("h_ptpulleta_Sigma","#sigma of p_{t} pull vs #eta",nintEta,minEta,maxEta) );
765  h_dzpulleta.push_back( dbe_->book1D("h_dzpulleta_Sigma","#sigma of dz pull vs #eta",nintEta,minEta,maxEta) );
766  h_phipulleta.push_back( dbe_->book1D("h_phipulleta_Sigma","#sigma of #phi pull vs #eta",nintEta,minEta,maxEta) );
767  h_thetapulleta.push_back( dbe_->book1D("h_thetapulleta_Sigma","#sigma of #theta pull vs #eta",nintEta,minEta,maxEta) );
768  h_ptshifteta.push_back( dbe_->book1D("ptres_vs_eta_Mean","<#deltapT/pT>[%] vs #eta",nintEta,minEta,maxEta) );
769  h_ptpullphimean.push_back( dbe_->book1D("h_ptpullphi_Mean","mean of p_{t} pull vs #phi",nintPhi,minPhi,maxPhi) );
770  h_phipullphimean.push_back( dbe_->book1D("h_phipullphi_Mean","mean of #phi pull vs #phi",nintPhi,minPhi,maxPhi) );
771  h_thetapullphimean.push_back( dbe_->book1D("h_thetapullphi_Mean","mean of #theta pull vs #phi",nintPhi,minPhi,maxPhi) );
772  h_ptpullphi.push_back( dbe_->book1D("h_ptpullphi_Sigma","#sigma of p_{t} pull vs #phi",nintPhi,minPhi,maxPhi) );
773  h_phipullphi.push_back( dbe_->book1D("h_phipullphi_Sigma","#sigma of #phi pull vs #phi",nintPhi,minPhi,maxPhi) );
774  h_thetapullphi.push_back( dbe_->book1D("h_thetapullphi_Sigma","#sigma of #theta pull vs #phi",nintPhi,minPhi,maxPhi) );
775 
776  if(useLogPt){
777  BinLogX(h_dzmeanhPt.back()->getTH1F());
778  BinLogX(h_dzrmshPt.back()->getTH1F());
779  BinLogX(h_dxymeanhPt.back()->getTH1F());
780  BinLogX(h_dxyrmshPt.back()->getTH1F());
781  BinLogX(h_phimeanhPt.back()->getTH1F());
782  BinLogX(h_phirmshPt.back()->getTH1F());
783  BinLogX(h_cotThetameanhPt.back()->getTH1F());
784  BinLogX(h_cotThetarmshPt.back()->getTH1F());
785  BinLogX(h_ptmeanhPt.back()->getTH1F());
786  BinLogX(h_ptrmshPt.back()->getTH1F());
787  BinLogX(h_efficPt.back()->getTH1F());
788  BinLogX(h_fakeratePt.back()->getTH1F());
789  BinLogX(h_loopratepT.back()->getTH1F());
790  BinLogX(h_misidratepT.back()->getTH1F());
791  }
792 }
793 
795  ParticleBase::Vector momentumTP,
796  ParticleBase::Point vertexTP,
797  int bx){
798  h_ptSIM[count]->Fill(sqrt(momentumTP.perp2()));
799  h_etaSIM[count]->Fill(momentumTP.eta());
800  h_vertposSIM[count]->Fill(sqrt(vertexTP.perp2()));
801  h_bunchxSIM[count]->Fill(bx);
802 }
803 
804 
805 
806 // TO BE FIXED USING PLAIN HISTOGRAMS INSTEAD OF RE-IMPLEMENTATION OF HISTOGRAMS (i.d. vectors<int/double>)
808  const TrackingParticle& tp,
809  ParticleBase::Vector momentumTP,
810  ParticleBase::Point vertexTP,
811  double dxySim, double dzSim, int nSimHits,
812  const reco::Track* track,
813  int numVertices, double vertz){
814  bool isMatched = track;
815 
816  if((*TpSelectorForEfficiencyVsEta)(tp)){
817  //effic vs hits
818  int nSimHitsInBounds = std::min((int)nSimHits,int(maxHit-1));
819  totSIM_hit[count][nSimHitsInBounds]++;
820  if(isMatched) {
821  totASS_hit[count][nSimHitsInBounds]++;
822  nrecHit_vs_nsimHit_sim2rec[count]->Fill( track->numberOfValidHits(),nSimHits);
823  }
824 
825  //effic vs eta
826  for (unsigned int f=0; f<etaintervals[count].size()-1; f++){
827  if (getEta(momentumTP.eta())>etaintervals[count][f]&&
828  getEta(momentumTP.eta())<etaintervals[count][f+1]) {
829  totSIMeta[count][f]++;
830  if (isMatched) {
831  totASSeta[count][f]++;
832  }
833  }
834 
835  } // END for (unsigned int f=0; f<etaintervals[w].size()-1; f++){
836 
837  //effic vs num pileup vertices
838  for (unsigned int f=0; f<vertcountintervals[count].size()-1; f++){
839  if (numVertices == vertcountintervals[count][f]) {
841  if (isMatched) {
843  }
844  }
845  if (numVertices == vertcountintervals[count][f] && momentumTP.eta() <= 0.9 && momentumTP.eta() >= -0.9) {
847  if (isMatched) {
849  }
850  }
851  if (numVertices == vertcountintervals[count][f] && momentumTP.eta() > 0.9) {
853  if (isMatched) {
855  }
856  }
857  if (numVertices == vertcountintervals[count][f] && momentumTP.eta() < -0.9) {
859  if (isMatched) {
861  }
862  }
863  }
864 
865  }
866 
867  if((*TpSelectorForEfficiencyVsPhi)(tp)){
868  for (unsigned int f=0; f<phiintervals[count].size()-1; f++){
869  if (momentumTP.phi() > phiintervals[count][f]&&
870  momentumTP.phi() <phiintervals[count][f+1]) {
871  totSIM_phi[count][f]++;
872  if (isMatched) {
873  totASS_phi[count][f]++;
874  }
875  }
876  } // END for (unsigned int f=0; f<phiintervals[count].size()-1; f++){
877  }
878 
879  if((*TpSelectorForEfficiencyVsPt)(tp)){
880  for (unsigned int f=0; f<pTintervals[count].size()-1; f++){
881  if (getPt(sqrt(momentumTP.perp2()))>pTintervals[count][f]&&
882  getPt(sqrt(momentumTP.perp2()))<pTintervals[count][f+1]) {
883  totSIMpT[count][f]++;
884  if (isMatched) {
885  totASSpT[count][f]++;
886  }
887  }
888  } // END for (unsigned int f=0; f<pTintervals[count].size()-1; f++){
889  }
890 
892  for (unsigned int f=0; f<dxyintervals[count].size()-1; f++){
893  if (dxySim>dxyintervals[count][f]&&
894  dxySim<dxyintervals[count][f+1]) {
895  totSIM_dxy[count][f]++;
896  if (isMatched) {
897  totASS_dxy[count][f]++;
898  }
899  }
900  } // END for (unsigned int f=0; f<dxyintervals[count].size()-1; f++){
901 
902  for (unsigned int f=0; f<vertposintervals[count].size()-1; f++){
903  if (sqrt(vertexTP.perp2())>vertposintervals[count][f]&&
904  sqrt(vertexTP.perp2())<vertposintervals[count][f+1]) {
905  totSIM_vertpos[count][f]++;
906  if (isMatched) {
907  totASS_vertpos[count][f]++;
908  }
909  }
910  } // END for (unsigned int f=0; f<vertposintervals[count].size()-1; f++){
911  }
912 
914  for (unsigned int f=0; f<dzintervals[count].size()-1; f++){
915  if (dzSim>dzintervals[count][f]&&
916  dzSim<dzintervals[count][f+1]) {
917  totSIM_dz[count][f]++;
918  if (isMatched) {
919  totASS_dz[count][f]++;
920  }
921  }
922  } // END for (unsigned int f=0; f<dzintervals[count].size()-1; f++){
923 
924 
925  for (unsigned int f=0; f<zposintervals[count].size()-1; f++){
926  if (vertexTP.z()>zposintervals[count][f]&&vertexTP.z()<zposintervals[count][f+1]) {
927  totSIM_zpos[count][f]++;
928  if (isMatched) totASS_zpos[count][f]++;
929  }
930  if (vertz>zposintervals[count][f]&&vertz<zposintervals[count][f+1]) {
932  if (isMatched) totASS_vertz_entire[count][f]++;
933  }
934  if (vertz>zposintervals[count][f]&&vertz<zposintervals[count][f+1] && fabs(momentumTP.eta())<0.9) {
936  if (isMatched) totASS_vertz_barrel[count][f]++;
937  }
938  if (vertz>zposintervals[count][f]&&vertz<zposintervals[count][f+1] && momentumTP.eta()>0.9) {
940  if (isMatched) totASS_vertz_fwdpos[count][f]++;
941  }
942  if (vertz>zposintervals[count][f]&&vertz<zposintervals[count][f+1] && momentumTP.eta()<-0.9) {
944  if (isMatched) totASS_vertz_fwdneg[count][f]++;
945  }
946  } // END for (unsigned int f=0; f<zposintervals[count].size()-1; f++){
947  }
948 
949  //Special investigations for PU
950  if(((*TpSelectorForEfficiencyVsCon)(tp)) && (!((*TpSelectorForEfficiencyVsEta)(tp)))){
951 
952  //efficPU vs eta
953  for (unsigned int f=0; f<etaintervals[count].size()-1; f++){
954  if (getEta(momentumTP.eta())>etaintervals[count][f]&&
955  getEta(momentumTP.eta())<etaintervals[count][f+1]) {
956  totCONeta[count][f]++;
957  }
958  } // END for (unsigned int f=0; f<etaintervals[w].size()-1; f++){
959 
960  //efficPU vs num pileup vertices
961  for (unsigned int f=0; f<vertcountintervals[count].size()-1; f++){
962  if (numVertices == vertcountintervals[count][f]) {
963  totCONvertcount[count][f]++;
964  }
965  } // END for (unsigned int f=0; f<vertcountintervals[count].size()-1; f++){
966 
967  for (unsigned int f=0; f<zposintervals[count].size()-1; f++){
968  if (vertexTP.z()>zposintervals[count][f]&&vertexTP.z()<zposintervals[count][f+1]) {
969  totCONzpos[count][f]++;
970  }
971  } // END for (unsigned int f=0; f<zposintervals[count].size()-1; f++){
972 
973  }
974 
975 }
976 
977 // dE/dx
979 //void MTVHistoProducerAlgoForTracker::fill_dedx_recoTrack_histos(reco::TrackRef trackref, std::vector< edm::ValueMap<reco::DeDxData> > v_dEdx) {
980  double dedx;
981  int nom;
982  int sat;
984  for (unsigned int i=0; i<v_dEdx.size(); i++) {
985  dEdxTrack = v_dEdx.at(i);
986  dedx = dEdxTrack[trackref].dEdx();
987  nom = dEdxTrack[trackref].numberOfMeasurements();
988  sat = dEdxTrack[trackref].numberOfSaturatedMeasurements();
989  if (i==0) {
990  h_dedx_estim1[count]->Fill(dedx);
991  h_dedx_nom1[count]->Fill(nom);
992  h_dedx_sat1[count]->Fill(sat);
993  } else if (i==1) {
994  h_dedx_estim2[count]->Fill(dedx);
995  h_dedx_nom2[count]->Fill(nom);
996  h_dedx_sat2[count]->Fill(sat);
997  }
998  }
999 }
1000 
1001 
1002 // TO BE FIXED USING PLAIN HISTOGRAMS INSTEAD OF RE-IMPLEMENTATION OF HISTOGRAMS (i.d. vectors<int/double>)
1004  const reco::Track& track,
1005  math::XYZPoint bsPosition,
1006  bool isMatched,
1007  bool isSigMatched,
1008  bool isChargeMatched,
1009  int numAssocRecoTracks,
1010  int numVertices,
1011  int tpbunchcrossing, int nSimHits,
1012  double sharedFraction){
1013 
1014  //Fill track algo histogram
1015 
1016  if (track.algo()>=4 && track.algo()<=14) totREC_algo[count][track.algo()-4]++;
1017  int sharedHits = sharedFraction * track.numberOfValidHits();
1018 
1019  //Compute fake rate vs eta
1020  for (unsigned int f=0; f<etaintervals[count].size()-1; f++){
1021  if (getEta(track.momentum().eta())>etaintervals[count][f]&&
1022  getEta(track.momentum().eta())<etaintervals[count][f+1]) {
1023  totRECeta[count][f]++;
1024  if (isMatched) {
1025  totASS2eta[count][f]++;
1026  if (!isChargeMatched) totmisideta[count][f]++;
1027  if (numAssocRecoTracks>1) totloopeta[count][f]++;
1028  if (tpbunchcrossing==0) totASS2_itpu_eta_entire[count][f]++;
1029  if (tpbunchcrossing!=0) totASS2_ootpu_eta_entire[count][f]++;
1030  nrecHit_vs_nsimHit_rec2sim[count]->Fill( track.numberOfValidHits(),nSimHits);
1031  h_assocFraction[count]->Fill( sharedFraction);
1032  h_assocSharedHit[count]->Fill( sharedHits);
1033  }
1034  if (isSigMatched) {
1035  totASS2etaSig[count][f]++;
1036  if (tpbunchcrossing==0) totASS2_itpu_eta_entire_signal[count][f]++;
1037  }
1038  }
1039  } // End for (unsigned int f=0; f<etaintervals[count].size()-1; f++){
1040 
1041  for (unsigned int f=0; f<phiintervals[count].size()-1; f++){
1042  if (track.momentum().phi()>phiintervals[count][f]&&
1043  track.momentum().phi()<phiintervals[count][f+1]) {
1044  totREC_phi[count][f]++;
1045  if (isMatched) {
1046  totASS2_phi[count][f]++;
1047  if (!isChargeMatched) totmisid_phi[count][f]++;
1048  if (numAssocRecoTracks>1) totloop_phi[count][f]++;
1049  }
1050  }
1051  } // End for (unsigned int f=0; f<phiintervals[count].size()-1; f++){
1052 
1053 
1054  for (unsigned int f=0; f<pTintervals[count].size()-1; f++){
1055  if (getPt(sqrt(track.momentum().perp2()))>pTintervals[count][f]&&
1056  getPt(sqrt(track.momentum().perp2()))<pTintervals[count][f+1]) {
1057  totRECpT[count][f]++;
1058  if (isMatched) {
1059  totASS2pT[count][f]++;
1060  if (!isChargeMatched) totmisidpT[count][f]++;
1061  if (numAssocRecoTracks>1) totlooppT[count][f]++;
1062  }
1063  }
1064  } // End for (unsigned int f=0; f<pTintervals[count].size()-1; f++){
1065 
1066  for (unsigned int f=0; f<dxyintervals[count].size()-1; f++){
1067  if (track.dxy(bsPosition)>dxyintervals[count][f]&&
1068  track.dxy(bsPosition)<dxyintervals[count][f+1]) {
1069  totREC_dxy[count][f]++;
1070  if (isMatched) {
1071  totASS2_dxy[count][f]++;
1072  if (!isChargeMatched) totmisid_dxy[count][f]++;
1073  if (numAssocRecoTracks>1) totloop_dxy[count][f]++;
1074  }
1075  }
1076  } // End for (unsigned int f=0; f<dxyintervals[count].size()-1; f++){
1077 
1078  for (unsigned int f=0; f<dzintervals[count].size()-1; f++){
1079  if (track.dz(bsPosition)>dzintervals[count][f]&&
1080  track.dz(bsPosition)<dzintervals[count][f+1]) {
1081  totREC_dz[count][f]++;
1082  if (isMatched) {
1083  totASS2_dz[count][f]++;
1084  if (!isChargeMatched) totmisid_dz[count][f]++;
1085  if (numAssocRecoTracks>1) totloop_dz[count][f]++;
1086  }
1087  }
1088  } // End for (unsigned int f=0; f<dzintervals[count].size()-1; f++){
1089 
1090  int tmp = std::min((int)track.found(),int(maxHit-1));
1091  totREC_hit[count][tmp]++;
1092  if (isMatched) {
1093  totASS2_hit[count][tmp]++;
1094  if (!isChargeMatched) totmisid_hit[count][tmp]++;
1095  if (numAssocRecoTracks>1) totloop_hit[count][tmp]++;
1096  }
1097 
1098  for (unsigned int f=0; f<vertcountintervals[count].size()-1; f++){
1099  if (numVertices == vertcountintervals[count][f]) {
1102  if (isMatched) {
1104  if (tpbunchcrossing==0) totASS2_itpu_vertcount_entire[count][f]++;
1105  if (tpbunchcrossing!=0) totASS2_ootpu_entire[count][f]++;
1106  }
1107  if (isSigMatched) {
1109  if (tpbunchcrossing==0) totASS2_itpu_vertcount_entire_signal[count][f]++;
1110  }
1111  }
1112  if (numVertices == vertcountintervals[count][f] && track.eta() <= 0.9 && track.eta() >= -0.9) {
1115  if (isMatched) {
1117  if (isMatched && tpbunchcrossing!=0) totASS2_ootpu_barrel[count][f]++;
1118  }
1119  }
1120  if (numVertices == vertcountintervals[count][f] && track.eta() > 0.9) {
1123  if (isMatched) {
1125  if (isMatched && tpbunchcrossing!=0) totASS2_ootpu_fwdpos[count][f]++;
1126  }
1127  }
1128  if (numVertices == vertcountintervals[count][f] && track.eta() < -0.9) {
1131  if (isMatched) {
1133  if (isMatched && tpbunchcrossing!=0) totASS2_ootpu_fwdneg[count][f]++;
1134  }
1135  }
1136 
1137  }
1138 
1139 }
1140 
1141 
1143  const reco::Track& track){
1144  //nchi2 and hits global distributions
1145  h_nchi2[count]->Fill(track.normalizedChi2());
1146  h_nchi2_prob[count]->Fill(TMath::Prob(track.chi2(),(int)track.ndof()));
1147  h_hits[count]->Fill(track.numberOfValidHits());
1148  h_losthits[count]->Fill(track.numberOfLostHits());
1149  chi2_vs_nhits[count]->Fill(track.numberOfValidHits(),track.normalizedChi2());
1150  h_charge[count]->Fill( track.charge() );
1151 
1152  //chi2 and #hit vs eta: fill 2D histos
1153  chi2_vs_eta[count]->Fill(getEta(track.eta()),track.normalizedChi2());
1154  nhits_vs_eta[count]->Fill(getEta(track.eta()),track.numberOfValidHits());
1163  int LayersAll = track.hitPattern().stripLayersWithMeasurement();
1164  int Layers2D = track.hitPattern().numberOfValidStripLayersWithMonoAndStereo();
1165  int Layers1D = LayersAll - Layers2D;
1166  nSTRIPlayersWithMeas_vs_eta[count]->Fill(getEta(track.eta()),LayersAll);
1167  nSTRIPlayersWith1dMeas_vs_eta[count]->Fill(getEta(track.eta()),Layers1D);
1168  nSTRIPlayersWith2dMeas_vs_eta[count]->Fill(getEta(track.eta()),Layers2D);
1169 
1170  nlosthits_vs_eta[count]->Fill(getEta(track.eta()),track.numberOfLostHits());
1171 }
1172 
1173 
1174 void MTVHistoProducerAlgoForTracker::fill_trackBased_histos(int count, int assTracks, int numRecoTracks, int numSimTracks){
1175 
1176  h_tracks[count]->Fill(assTracks);
1177  h_fakes[count]->Fill(numRecoTracks-assTracks);
1178  nrec_vs_nsim[count]->Fill(numRecoTracks,numSimTracks);
1179 
1180 }
1181 
1182 
1183 
1185  ParticleBase::Vector momentumTP,
1186  ParticleBase::Point vertexTP,
1187  int chargeTP,
1188  const reco::Track& track,
1189  math::XYZPoint bsPosition){
1190 
1191  // evaluation of TP parameters
1192  double qoverpSim = chargeTP/sqrt(momentumTP.x()*momentumTP.x()+momentumTP.y()*momentumTP.y()+momentumTP.z()*momentumTP.z());
1193  double lambdaSim = M_PI/2-momentumTP.theta();
1194  double phiSim = momentumTP.phi();
1195  double dxySim = (-vertexTP.x()*sin(momentumTP.phi())+vertexTP.y()*cos(momentumTP.phi()));
1196  double dzSim = vertexTP.z() - (vertexTP.x()*momentumTP.x()+vertexTP.y()*momentumTP.y())/sqrt(momentumTP.perp2())
1197  * momentumTP.z()/sqrt(momentumTP.perp2());
1198 
1199 
1200  // reco::Track::ParameterVector rParameters = track.parameters(); // UNUSED
1201 
1202  double qoverpRec(0);
1203  double qoverpErrorRec(0);
1204  double ptRec(0);
1205  double ptErrorRec(0);
1206  double lambdaRec(0);
1207  double lambdaErrorRec(0);
1208  double phiRec(0);
1209  double phiErrorRec(0);
1210 
1211  /* TO BE FIXED LATER -----------
1212  //loop to decide whether to take gsfTrack (utilisation of mode-function) or common track
1213  const GsfTrack* gsfTrack(0);
1214  if(useGsf){
1215  gsfTrack = dynamic_cast<const GsfTrack*>(&(*track));
1216  if (gsfTrack==0) edm::LogInfo("TrackValidator") << "Trying to access mode for a non-GsfTrack";
1217  }
1218 
1219  if (gsfTrack) {
1220  // get values from mode
1221  getRecoMomentum(*gsfTrack, ptRec, ptErrorRec, qoverpRec, qoverpErrorRec,
1222  lambdaRec,lambdaErrorRec, phiRec, phiErrorRec);
1223  }
1224 
1225  else {
1226  // get values from track (without mode)
1227  getRecoMomentum(*track, ptRec, ptErrorRec, qoverpRec, qoverpErrorRec,
1228  lambdaRec,lambdaErrorRec, phiRec, phiErrorRec);
1229  }
1230  */
1231  getRecoMomentum(track, ptRec, ptErrorRec, qoverpRec, qoverpErrorRec,
1232  lambdaRec,lambdaErrorRec, phiRec, phiErrorRec);
1233  // -------------
1234 
1235  double ptError = ptErrorRec;
1236  double ptres=ptRec-sqrt(momentumTP.perp2());
1237  double etares=track.eta()-momentumTP.Eta();
1238 
1239 
1240  double dxyRec = track.dxy(bsPosition);
1241  double dzRec = track.dz(bsPosition);
1242 
1243  // eta residue; pt, k, theta, phi, dxy, dz pulls
1244  double qoverpPull=(qoverpRec-qoverpSim)/qoverpErrorRec;
1245  double thetaPull=(lambdaRec-lambdaSim)/lambdaErrorRec;
1246  double phiPull=(phiRec-phiSim)/phiErrorRec;
1247  double dxyPull=(dxyRec-dxySim)/track.dxyError();
1248  double dzPull=(dzRec-dzSim)/track.dzError();
1249 
1250  double contrib_Qoverp = ((qoverpRec-qoverpSim)/qoverpErrorRec)*
1251  ((qoverpRec-qoverpSim)/qoverpErrorRec)/5;
1252  double contrib_dxy = ((dxyRec-dxySim)/track.dxyError())*((dxyRec-dxySim)/track.dxyError())/5;
1253  double contrib_dz = ((dzRec-dzSim)/track.dzError())*((dzRec-dzSim)/track.dzError())/5;
1254  double contrib_theta = ((lambdaRec-lambdaSim)/lambdaErrorRec)*
1255  ((lambdaRec-lambdaSim)/lambdaErrorRec)/5;
1256  double contrib_phi = ((phiRec-phiSim)/phiErrorRec)*
1257  ((phiRec-phiSim)/phiErrorRec)/5;
1258 
1259  LogTrace("TrackValidatorTEST")
1260  //<< "assocChi2=" << tp.begin()->second << "\n"
1261  << "" << "\n"
1262  << "ptREC=" << ptRec << "\n" << "etaREC=" << track.eta() << "\n" << "qoverpREC=" << qoverpRec << "\n"
1263  << "dxyREC=" << dxyRec << "\n" << "dzREC=" << dzRec << "\n"
1264  << "thetaREC=" << track.theta() << "\n" << "phiREC=" << phiRec << "\n"
1265  << "" << "\n"
1266  << "qoverpError()=" << qoverpErrorRec << "\n" << "dxyError()=" << track.dxyError() << "\n"<< "dzError()="
1267  << track.dzError() << "\n"
1268  << "thetaError()=" << lambdaErrorRec << "\n" << "phiError()=" << phiErrorRec << "\n"
1269  << "" << "\n"
1270  << "ptSIM=" << sqrt(momentumTP.perp2()) << "\n"<< "etaSIM=" << momentumTP.Eta() << "\n"<< "qoverpSIM=" << qoverpSim << "\n"
1271  << "dxySIM=" << dxySim << "\n"<< "dzSIM=" << dzSim << "\n" << "thetaSIM=" << M_PI/2-lambdaSim << "\n"
1272  << "phiSIM=" << phiSim << "\n"
1273  << "" << "\n"
1274  << "contrib_Qoverp=" << contrib_Qoverp << "\n"<< "contrib_dxy=" << contrib_dxy << "\n"<< "contrib_dz=" << contrib_dz << "\n"
1275  << "contrib_theta=" << contrib_theta << "\n"<< "contrib_phi=" << contrib_phi << "\n"
1276  << "" << "\n"
1277  <<"chi2PULL="<<contrib_Qoverp+contrib_dxy+contrib_dz+contrib_theta+contrib_phi<<"\n";
1278 
1279  h_pullQoverp[count]->Fill(qoverpPull);
1280  h_pullTheta[count]->Fill(thetaPull);
1281  h_pullPhi[count]->Fill(phiPull);
1282  h_pullDxy[count]->Fill(dxyPull);
1283  h_pullDz[count]->Fill(dzPull);
1284 
1285 
1286  h_pt[count]->Fill(ptres/ptError);
1287  h_eta[count]->Fill(etares);
1288  etares_vs_eta[count]->Fill(getEta(track.eta()),etares);
1289 
1290 
1291 
1292  //resolution of track params: fill 2D histos
1293  dxyres_vs_eta[count]->Fill(getEta(track.eta()),dxyRec-dxySim);
1294  ptres_vs_eta[count]->Fill(getEta(track.eta()),(ptRec-sqrt(momentumTP.perp2()))/ptRec);
1295  dzres_vs_eta[count]->Fill(getEta(track.eta()),dzRec-dzSim);
1296  phires_vs_eta[count]->Fill(getEta(track.eta()),phiRec-phiSim);
1297  cotThetares_vs_eta[count]->Fill(getEta(track.eta()),1/tan(M_PI*0.5-lambdaRec)-1/tan(M_PI*0.5-lambdaSim));
1298 
1299  //same as before but vs pT
1300  dxyres_vs_pt[count]->Fill(getPt(ptRec),dxyRec-dxySim);
1301  ptres_vs_pt[count]->Fill(getPt(ptRec),(ptRec-sqrt(momentumTP.perp2()))/ptRec);
1302  dzres_vs_pt[count]->Fill(getPt(ptRec),dzRec-dzSim);
1303  phires_vs_pt[count]->Fill(getPt(ptRec),phiRec-phiSim);
1304  cotThetares_vs_pt[count]->Fill(getPt(ptRec),1/tan(M_PI*0.5-lambdaRec)-1/tan(M_PI*0.5-lambdaSim));
1305 
1306  //pulls of track params vs eta: fill 2D histos
1307  dxypull_vs_eta[count]->Fill(getEta(track.eta()),dxyPull);
1308  ptpull_vs_eta[count]->Fill(getEta(track.eta()),ptres/ptError);
1309  dzpull_vs_eta[count]->Fill(getEta(track.eta()),dzPull);
1310  phipull_vs_eta[count]->Fill(getEta(track.eta()),phiPull);
1311  thetapull_vs_eta[count]->Fill(getEta(track.eta()),thetaPull);
1312 
1313  //plots vs phi
1314  nhits_vs_phi[count]->Fill(phiRec,track.numberOfValidHits());
1315  chi2_vs_phi[count]->Fill(phiRec,track.normalizedChi2());
1316  ptmean_vs_eta_phi[count]->Fill(phiRec,getEta(track.eta()),ptRec);
1317  phimean_vs_eta_phi[count]->Fill(phiRec,getEta(track.eta()),phiRec);
1318  ptres_vs_phi[count]->Fill(phiRec,(ptRec-sqrt(momentumTP.perp2()))/ptRec);
1319  phires_vs_phi[count]->Fill(phiRec,phiRec-phiSim);
1320  ptpull_vs_phi[count]->Fill(phiRec,ptres/ptError);
1321  phipull_vs_phi[count]->Fill(phiRec,phiPull);
1322  thetapull_vs_phi[count]->Fill(phiRec,thetaPull);
1323 
1324 
1325 }
1326 
1327 
1328 
1329 void
1330 MTVHistoProducerAlgoForTracker::getRecoMomentum (const reco::Track& track, double& pt, double& ptError,
1331  double& qoverp, double& qoverpError, double& lambda,double& lambdaError,
1332  double& phi, double& phiError ) const {
1333  pt = track.pt();
1334  ptError = track.ptError();
1335  qoverp = track.qoverp();
1336  qoverpError = track.qoverpError();
1337  lambda = track.lambda();
1338  lambdaError = track.lambdaError();
1339  phi = track.phi();
1340  phiError = track.phiError();
1341  // cout <<"test1" << endl;
1342 
1343 
1344 
1345 }
1346 
1347 void
1348 MTVHistoProducerAlgoForTracker::getRecoMomentum (const reco::GsfTrack& gsfTrack, double& pt, double& ptError,
1349  double& qoverp, double& qoverpError, double& lambda,double& lambdaError,
1350  double& phi, double& phiError ) const {
1351 
1352  pt = gsfTrack.ptMode();
1353  ptError = gsfTrack.ptModeError();
1354  qoverp = gsfTrack.qoverpMode();
1355  qoverpError = gsfTrack.qoverpModeError();
1356  lambda = gsfTrack.lambdaMode();
1357  lambdaError = gsfTrack.lambdaModeError();
1358  phi = gsfTrack.phiMode();
1359  phiError = gsfTrack.phiModeError();
1360  // cout <<"test2" << endl;
1361 
1362 }
1363 
1364 double
1366  if (useFabsEta) return fabs(eta);
1367  else return eta;
1368 }
1369 
1370 double
1372  if (useInvPt && pt!=0) return 1/pt;
1373  else return pt;
1374 }
1375 
1376 
1378  //resolution of track params: get sigma from 2D histos
1379  FitSlicesYTool fsyt_dxy(dxyres_vs_eta[counter]);
1380  fsyt_dxy.getFittedSigmaWithError(h_dxyrmsh[counter]);
1381  fsyt_dxy.getFittedMeanWithError(h_dxymeanh[counter]);
1382  FitSlicesYTool fsyt_dxyPt(dxyres_vs_pt[counter]);
1383  fsyt_dxyPt.getFittedSigmaWithError(h_dxyrmshPt[counter]);
1384  fsyt_dxyPt.getFittedMeanWithError(h_dxymeanhPt[counter]);
1385  FitSlicesYTool fsyt_pt(ptres_vs_eta[counter]);
1386  fsyt_pt.getFittedSigmaWithError(h_ptrmsh[counter]);
1387  fsyt_pt.getFittedMeanWithError(h_ptshifteta[counter]);
1388  FitSlicesYTool fsyt_ptPt(ptres_vs_pt[counter]);
1389  fsyt_ptPt.getFittedSigmaWithError(h_ptrmshPt[counter]);
1390  fsyt_ptPt.getFittedMeanWithError(h_ptmeanhPt[counter]);
1391  FitSlicesYTool fsyt_ptPhi(ptres_vs_phi[counter]);
1392  fsyt_ptPhi.getFittedSigmaWithError(h_ptrmshPhi[counter]);
1393  fsyt_ptPhi.getFittedMeanWithError(h_ptmeanhPhi[counter]);
1394  FitSlicesYTool fsyt_dz(dzres_vs_eta[counter]);
1395  fsyt_dz.getFittedSigmaWithError(h_dzrmsh[counter]);
1396  fsyt_dz.getFittedMeanWithError(h_dzmeanh[counter]);
1397  FitSlicesYTool fsyt_dzPt(dzres_vs_pt[counter]);
1398  fsyt_dzPt.getFittedSigmaWithError(h_dzrmshPt[counter]);
1399  fsyt_dzPt.getFittedMeanWithError(h_dzmeanhPt[counter]);
1400  FitSlicesYTool fsyt_phi(phires_vs_eta[counter]);
1401  fsyt_phi.getFittedSigmaWithError(h_phirmsh[counter]);
1402  fsyt_phi.getFittedMeanWithError(h_phimeanh[counter]);
1403  FitSlicesYTool fsyt_phiPt(phires_vs_pt[counter]);
1404  fsyt_phiPt.getFittedSigmaWithError(h_phirmshPt[counter]);
1405  fsyt_phiPt.getFittedMeanWithError(h_phimeanhPt[counter]);
1406  FitSlicesYTool fsyt_phiPhi(phires_vs_phi[counter]);
1407  fsyt_phiPhi.getFittedSigmaWithError(h_phirmshPhi[counter]);
1408  fsyt_phiPhi.getFittedMeanWithError(h_phimeanhPhi[counter]);
1409  FitSlicesYTool fsyt_cotTheta(cotThetares_vs_eta[counter]);
1410  fsyt_cotTheta.getFittedSigmaWithError(h_cotThetarmsh[counter]);
1411  fsyt_cotTheta.getFittedMeanWithError(h_cotThetameanh[counter]);
1412  FitSlicesYTool fsyt_cotThetaPt(cotThetares_vs_pt[counter]);
1413  fsyt_cotThetaPt.getFittedSigmaWithError(h_cotThetarmshPt[counter]);
1414  fsyt_cotThetaPt.getFittedMeanWithError(h_cotThetameanhPt[counter]);
1415 
1416  //pulls of track params vs eta: get sigma from 2D histos
1417  FitSlicesYTool fsyt_dxyp(dxypull_vs_eta[counter]);
1418  fsyt_dxyp.getFittedSigmaWithError(h_dxypulleta[counter]);
1419  fsyt_dxyp.getFittedMeanWithError(h_dxypulletamean[counter]);
1420  FitSlicesYTool fsyt_ptp(ptpull_vs_eta[counter]);
1421  fsyt_ptp.getFittedSigmaWithError(h_ptpulleta[counter]);
1422  fsyt_ptp.getFittedMeanWithError(h_ptpulletamean[counter]);
1423  FitSlicesYTool fsyt_dzp(dzpull_vs_eta[counter]);
1424  fsyt_dzp.getFittedSigmaWithError(h_dzpulleta[counter]);
1425  fsyt_dzp.getFittedMeanWithError(h_dzpulletamean[counter]);
1426  FitSlicesYTool fsyt_phip(phipull_vs_eta[counter]);
1427  fsyt_phip.getFittedSigmaWithError(h_phipulleta[counter]);
1428  fsyt_phip.getFittedMeanWithError(h_phipulletamean[counter]);
1429  FitSlicesYTool fsyt_thetap(thetapull_vs_eta[counter]);
1430  fsyt_thetap.getFittedSigmaWithError(h_thetapulleta[counter]);
1431  fsyt_thetap.getFittedMeanWithError(h_thetapulletamean[counter]);
1432  //vs phi
1433  FitSlicesYTool fsyt_ptpPhi(ptpull_vs_phi[counter]);
1434  fsyt_ptpPhi.getFittedSigmaWithError(h_ptpullphi[counter]);
1435  fsyt_ptpPhi.getFittedMeanWithError(h_ptpullphimean[counter]);
1436  FitSlicesYTool fsyt_phipPhi(phipull_vs_phi[counter]);
1437  fsyt_phipPhi.getFittedSigmaWithError(h_phipullphi[counter]);
1438  fsyt_phipPhi.getFittedMeanWithError(h_phipullphimean[counter]);
1439  FitSlicesYTool fsyt_thetapPhi(thetapull_vs_phi[counter]);
1440  fsyt_thetapPhi.getFittedSigmaWithError(h_thetapullphi[counter]);
1441  fsyt_thetapPhi.getFittedMeanWithError(h_thetapullphimean[counter]);
1442 
1443  //effic&fake;
1444  for (unsigned int ite = 0;ite<totASSeta[counter].size();ite++) totFOMT_eta[counter][ite]=totASS2eta[counter][ite]-totASS2etaSig[counter][ite];
1445  for (unsigned int ite = 0;ite<totASS2_vertcount_entire[counter].size();ite++)
1446  totFOMT_vertcount[counter][ite]=totASS2_vertcount_entire[counter][ite]-totASS2_vertcount_entire_signal[counter][ite];
1447  for (unsigned int ite = 0;ite<totASS2_itpu_eta_entire[counter].size();ite++) totASS2_itpu_eta_entire[counter][ite]-=totASS2_itpu_eta_entire_signal[counter][ite];
1448  for (unsigned int ite = 0;ite<totASS2_itpu_vertcount_entire[counter].size();ite++) totASS2_itpu_vertcount_entire[counter][ite]-=totASS2_itpu_vertcount_entire_signal[counter][ite];
1449 
1450  fillPlotFromVectors(h_effic[counter],totASSeta[counter],totSIMeta[counter],"effic");
1451  fillPlotFromVectors(h_fakerate[counter],totASS2eta[counter],totRECeta[counter],"fakerate");
1452  fillPlotFromVectors(h_looprate[counter],totloopeta[counter],totRECeta[counter],"effic");
1453  fillPlotFromVectors(h_misidrate[counter],totmisideta[counter],totRECeta[counter],"effic");
1454  fillPlotFromVectors(h_efficPt[counter],totASSpT[counter],totSIMpT[counter],"effic");
1455  fillPlotFromVectors(h_fakeratePt[counter],totASS2pT[counter],totRECpT[counter],"fakerate");
1456  fillPlotFromVectors(h_loopratepT[counter],totlooppT[counter],totRECpT[counter],"effic");
1457  fillPlotFromVectors(h_misidratepT[counter],totmisidpT[counter],totRECpT[counter],"effic");
1458  fillPlotFromVectors(h_effic_vs_hit[counter],totASS_hit[counter],totSIM_hit[counter],"effic");
1459  fillPlotFromVectors(h_fake_vs_hit[counter],totASS2_hit[counter],totREC_hit[counter],"fakerate");
1460  fillPlotFromVectors(h_loopratehit[counter],totloop_hit[counter],totREC_hit[counter],"effic");
1461  fillPlotFromVectors(h_misidratehit[counter],totmisid_hit[counter],totREC_hit[counter],"effic");
1462  fillPlotFromVectors(h_effic_vs_phi[counter],totASS_phi[counter],totSIM_phi[counter],"effic");
1463  fillPlotFromVectors(h_fake_vs_phi[counter],totASS2_phi[counter],totREC_phi[counter],"fakerate");
1464  fillPlotFromVectors(h_loopratephi[counter],totloop_phi[counter],totREC_phi[counter],"effic");
1465  fillPlotFromVectors(h_misidratephi[counter],totmisid_phi[counter],totREC_phi[counter],"effic");
1466  fillPlotFromVectors(h_effic_vs_dxy[counter],totASS_dxy[counter],totSIM_dxy[counter],"effic");
1467  fillPlotFromVectors(h_fake_vs_dxy[counter],totASS2_dxy[counter],totREC_dxy[counter],"fakerate");
1468  fillPlotFromVectors(h_loopratedxy[counter],totloop_dxy[counter],totREC_dxy[counter],"effic");
1469  fillPlotFromVectors(h_misidratedxy[counter],totmisid_dxy[counter],totREC_dxy[counter],"effic");
1470  fillPlotFromVectors(h_effic_vs_dz[counter],totASS_dz[counter],totSIM_dz[counter],"effic");
1471  fillPlotFromVectors(h_fake_vs_dz[counter],totASS2_dz[counter],totREC_dz[counter],"fakerate");
1472  fillPlotFromVectors(h_loopratedz[counter],totloop_dz[counter],totREC_dz[counter],"effic");
1473  fillPlotFromVectors(h_misidratedz[counter],totmisid_dz[counter],totREC_dz[counter],"effic");
1474  fillPlotFromVectors(h_effic_vs_vertpos[counter],totASS_vertpos[counter],totSIM_vertpos[counter],"effic");
1475  fillPlotFromVectors(h_effic_vs_zpos[counter],totASS_zpos[counter],totSIM_zpos[counter],"effic");
1492 
1493  fillPlotFromVectors(h_fomt_eta[counter],totFOMT_eta[counter],totASS2etaSig[counter],"pileup");
1495  fillPlotFromVectors(h_fomt_sig_eta[counter],totASS2etaSig[counter],totRECeta[counter],"fakerate");
1497  fillPlotFromVectors(h_fomt_itpu_eta[counter],totASS2_itpu_eta_entire[counter],totRECeta[counter],"effic");
1499  fillPlotFromVectors(h_fomt_ootpu_eta[counter],totASS2_ootpu_eta_entire[counter],totRECeta[counter],"effic");
1501 
1502  fillPlotFromVectors(h_effic_PU_eta[counter],totASSeta[counter],totCONeta[counter],"pileup");
1504  fillPlotFromVectors(h_effic_PU_zpos[counter],totASS_zpos[counter],totCONzpos[counter],"pileup");
1505 
1506 }
1507 
1509  //chi2 and #hit vs eta: get mean from 2D histos
1510  doProfileX(chi2_vs_eta[counter],h_chi2meanh[counter]);
1511  doProfileX(nhits_vs_eta[counter],h_hits_eta[counter]);
1512  doProfileX(nPXBhits_vs_eta[counter],h_PXBhits_eta[counter]);
1513  doProfileX(nPXFhits_vs_eta[counter],h_PXFhits_eta[counter]);
1514  doProfileX(nTIBhits_vs_eta[counter],h_TIBhits_eta[counter]);
1515  doProfileX(nTIDhits_vs_eta[counter],h_TIDhits_eta[counter]);
1516  doProfileX(nTOBhits_vs_eta[counter],h_TOBhits_eta[counter]);
1517  doProfileX(nTEChits_vs_eta[counter],h_TEChits_eta[counter]);
1518 
1524 
1525 
1526 
1527  doProfileX(nlosthits_vs_eta[counter],h_losthits_eta[counter]);
1528  //vs phi
1529  doProfileX(chi2_vs_nhits[counter],h_chi2meanhitsh[counter]);
1530  // doProfileX(ptres_vs_eta[counter],h_ptresmean_vs_eta[counter]);
1531  // doProfileX(phires_vs_eta[counter],h_phiresmean_vs_eta[counter]);
1532  doProfileX(chi2_vs_phi[counter],h_chi2mean_vs_phi[counter]);
1533  doProfileX(nhits_vs_phi[counter],h_hits_phi[counter]);
1534  // doProfileX(ptres_vs_phi[counter],h_ptresmean_vs_phi[counter]);
1535  // doProfileX(phires_vs_phi[counter],h_phiresmean_vs_phi[counter]);
1536 }
1537 
1539  fillPlotFromVector(h_algo[counter],totREC_algo[counter]);
1540 
1541  fillPlotFromVector(h_recoeta[counter],totRECeta[counter]);
1542  fillPlotFromVector(h_simuleta[counter],totSIMeta[counter]);
1543  fillPlotFromVector(h_assoceta[counter],totASSeta[counter]);
1544  fillPlotFromVector(h_assoc2eta[counter],totASS2eta[counter]);
1545  fillPlotFromVector(h_loopereta[counter],totloopeta[counter]);
1546  fillPlotFromVector(h_misideta[counter],totmisideta[counter]);
1547 
1548  fillPlotFromVector(h_recopT[counter],totRECpT[counter]);
1549  fillPlotFromVector(h_simulpT[counter],totSIMpT[counter]);
1550  fillPlotFromVector(h_assocpT[counter],totASSpT[counter]);
1551  fillPlotFromVector(h_assoc2pT[counter],totASS2pT[counter]);
1552  fillPlotFromVector(h_looperpT[counter],totlooppT[counter]);
1553  fillPlotFromVector(h_misidpT[counter],totmisidpT[counter]);
1554 
1555  fillPlotFromVector(h_recohit[counter],totREC_hit[counter]);
1556  fillPlotFromVector(h_simulhit[counter],totSIM_hit[counter]);
1557  fillPlotFromVector(h_assochit[counter],totASS_hit[counter]);
1558  fillPlotFromVector(h_assoc2hit[counter],totASS2_hit[counter]);
1559  fillPlotFromVector(h_looperhit[counter],totloop_hit[counter]);
1560  fillPlotFromVector(h_misidhit[counter],totmisid_hit[counter]);
1561 
1562  fillPlotFromVector(h_recophi[counter],totREC_phi[counter]);
1563  fillPlotFromVector(h_simulphi[counter],totSIM_phi[counter]);
1564  fillPlotFromVector(h_assocphi[counter],totASS_phi[counter]);
1565  fillPlotFromVector(h_assoc2phi[counter],totASS2_phi[counter]);
1566  fillPlotFromVector(h_looperphi[counter],totloop_phi[counter]);
1567  fillPlotFromVector(h_misidphi[counter],totmisid_phi[counter]);
1568 
1569  fillPlotFromVector(h_recodxy[counter],totREC_dxy[counter]);
1570  fillPlotFromVector(h_simuldxy[counter],totSIM_dxy[counter]);
1571  fillPlotFromVector(h_assocdxy[counter],totASS_dxy[counter]);
1572  fillPlotFromVector(h_assoc2dxy[counter],totASS2_dxy[counter]);
1573  fillPlotFromVector(h_looperdxy[counter],totloop_dxy[counter]);
1574  fillPlotFromVector(h_misiddxy[counter],totmisid_dxy[counter]);
1575 
1576  fillPlotFromVector(h_recodz[counter],totREC_dz[counter]);
1577  fillPlotFromVector(h_simuldz[counter],totSIM_dz[counter]);
1578  fillPlotFromVector(h_assocdz[counter],totASS_dz[counter]);
1579  fillPlotFromVector(h_assoc2dz[counter],totASS2_dz[counter]);
1580  fillPlotFromVector(h_looperdz[counter],totloop_dz[counter]);
1581  fillPlotFromVector(h_misiddz[counter],totmisid_dz[counter]);
1582 
1585 
1586  fillPlotFromVector(h_simulzpos[counter],totSIM_zpos[counter]);
1587  fillPlotFromVector(h_assoczpos[counter],totASS_zpos[counter]);
1588 
1593 
1598 
1603 
1608 
1611 
1614 
1617 
1620 
1623 
1626 
1629 
1632 
1633  fillPlotFromVector(h_con_eta[counter],totCONeta[counter]);
1635  fillPlotFromVector(h_con_zpos[counter],totCONzpos[counter]);
1636 
1637 }
std::vector< MonitorElement * > h_assoc_vertz_fwdpos
std::vector< std::vector< int > > totFOMT_vertcount
double qoverp() const
q/p
Definition: TrackBase.h:115
std::vector< MonitorElement * > h_fakerate_ootpu_entire
std::vector< std::vector< double > > vertcountintervals
double phiModeError() const
error on phi from mode
Definition: GsfTrack.h:93
std::vector< MonitorElement * > h_simul_vertz_entire
std::vector< MonitorElement * > h_looperhit
std::vector< MonitorElement * > h_loopratephi
T getParameter(std::string const &) const
std::vector< MonitorElement * > h_fakerate_vertcount_fwdpos
std::vector< MonitorElement * > h_assoc2hit
T getUntrackedParameter(std::string const &, T const &) const
std::vector< MonitorElement * > h_dedx_estim2
int i
Definition: DBlmapReader.cc:9
std::vector< MonitorElement * > h_dzpulletamean
std::vector< MonitorElement * > h_recodxy
std::vector< std::vector< int > > totASS_vertcount_fwdpos
std::vector< MonitorElement * > h_fomt_itpu_eta
std::vector< MonitorElement * > h_assochit
std::vector< MonitorElement * > h_efficPt
std::vector< MonitorElement * > h_fakes
std::vector< std::vector< double > > zposintervals
std::vector< MonitorElement * > h_loopratedxy
std::vector< MonitorElement * > h_PXFhits_eta
std::vector< std::vector< int > > totASS2_ootpu_fwdpos
std::vector< MonitorElement * > h_nchi2_prob
std::vector< MonitorElement * > h_looperpT
std::vector< MonitorElement * > h_pullDz
void getFittedSigmaWithError(MonitorElement *)
Fill the ME with the sigma value (with error) of the gaussian fit in each slice.
TrackingParticleSelector * TpSelectorForEfficiencyVsPhi
void fillPlotFromVectors(MonitorElement *h, std::vector< int > &numerator, std::vector< int > &denominator, std::string type)
std::vector< MonitorElement * > ptpull_vs_phi
std::vector< MonitorElement * > h_assoczpos
std::vector< std::vector< int > > totASS_phi
std::vector< MonitorElement * > nPXFhits_vs_eta
std::vector< std::vector< int > > totSIM_vertz_fwdpos
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:150
std::vector< MonitorElement * > h_fake_vs_hit
std::vector< MonitorElement * > h_dzmeanh
std::vector< MonitorElement * > h_assoc2_ootpu_vertcount
std::vector< std::vector< int > > totRECeta
std::vector< MonitorElement * > h_misidratephi
void doProfileX(TH2 *th2, MonitorElement *me)
std::vector< MonitorElement * > h_simulzpos
std::vector< std::vector< int > > totASSeta
std::vector< MonitorElement * > nrecHit_vs_nsimHit_rec2sim
std::vector< std::vector< double > > vertposintervals
std::vector< std::vector< int > > totASS2_itpu_eta_entire
std::vector< std::vector< int > > totCONeta
std::vector< MonitorElement * > h_effic_vertz_fwdpos
std::vector< MonitorElement * > h_assoc2pT
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
double lambdaMode() const
Lambda angle from mode.
Definition: GsfTrack.h:44
std::vector< MonitorElement * > h_simulpT
std::vector< MonitorElement * > h_effic_vertz_barrel
void fillPlotFromVector(MonitorElement *h, std::vector< int > &vec)
std::vector< MonitorElement * > h_ptshifteta
list step
Definition: launcher.py:15
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
Definition: TrackBase.h:111
void getRecoMomentum(const reco::Track &track, double &pt, double &ptError, double &qoverp, double &qoverpError, double &lambda, double &lambdaError, double &phi, double &phiError) const
retrieval of reconstructed momentum components from reco::Track (== mean values for GSF) ...
std::vector< MonitorElement * > nTEChits_vs_eta
std::vector< MonitorElement * > h_reco_ootpu_entire
std::vector< MonitorElement * > h_fakerate_vertcount_barrel
std::vector< std::vector< int > > totSIM_vertz_entire
std::vector< MonitorElement * > h_fake_vs_dz
std::vector< MonitorElement * > h_hits
std::vector< MonitorElement * > h_assoc_vertcount_fwdneg
std::vector< MonitorElement * > h_effic_vs_vertpos
std::vector< std::vector< double > > dxyintervals
double theta() const
polar angle
Definition: TrackBase.h:117
double dxyError() const
error on dxy
Definition: TrackBase.h:209
std::vector< MonitorElement * > nLayersWithMeas_vs_eta
std::vector< MonitorElement * > h_pullPhi
std::vector< MonitorElement * > h_fomt_vertcount
std::vector< std::vector< int > > totASS_vertcount_barrel
std::vector< MonitorElement * > h_fake_vs_dxy
std::vector< MonitorElement * > phipull_vs_phi
std::vector< MonitorElement * > h_dedx_sat1
std::vector< MonitorElement * > h_hits_eta
std::vector< MonitorElement * > h_effic_vertcount_fwdpos
void fill_generic_simTrack_histos(int counter, ParticleBase::Vector, ParticleBase::Point vertex, int bx)
std::vector< MonitorElement * > h_thetapullphi
void fill_dedx_recoTrack_histos(int count, edm::RefToBase< reco::Track > &trackref, std::vector< edm::ValueMap< reco::DeDxData > > v_dEdx)
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< MonitorElement * > nrec_vs_nsim
std::vector< MonitorElement * > h_ptrmshPt
std::vector< MonitorElement * > h_fakerate_ootpu_barrel
std::vector< MonitorElement * > h_algo
std::vector< MonitorElement * > h_assocdz
std::vector< std::vector< int > > totREC_dz
std::vector< std::vector< int > > totASS2_phi
int pixelLayersWithMeasurement() const
Definition: HitPattern.h:710
std::vector< MonitorElement * > h_assoc_vertcount_fwdpos
std::vector< MonitorElement * > nTIDhits_vs_eta
std::vector< std::vector< int > > totREC_vertcount_entire
std::vector< MonitorElement * > h_ptSIM
std::vector< MonitorElement * > h_dxypulletamean
std::vector< std::vector< int > > totASS2_vertcount_entire
std::vector< std::vector< int > > totREC_algo
std::vector< MonitorElement * > phires_vs_eta
std::vector< MonitorElement * > h_pullDxy
std::vector< MonitorElement * > h_assoc2phi
std::vector< std::vector< int > > totASS_dxy
std::vector< MonitorElement * > h_phipullphi
std::vector< MonitorElement * > h_nchi2
std::vector< MonitorElement * > h_fakeratePt
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:139
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
Definition: TrackBase.h:234
std::vector< std::vector< int > > totSIM_vertcount_entire
TrackingParticleSelector * TpSelectorForEfficiencyVsVTXZ
std::vector< MonitorElement * > h_dxyrmsh
#define min(a, b)
Definition: mlp_lapack.h:161
std::vector< MonitorElement * > h_simul_vertcount_fwdpos
std::vector< std::vector< int > > totmisid_dxy
math::XYZVectorD Vector
point in the space
Definition: ParticleBase.h:30
std::vector< MonitorElement * > h_dzrmshPt
std::vector< MonitorElement * > h_vertposSIM
std::vector< MonitorElement * > h_looperdxy
std::vector< MonitorElement * > h_simuleta
std::vector< MonitorElement * > h_misidratepT
std::vector< std::vector< int > > totSIM_dz
std::vector< MonitorElement * > h_ptpulleta
std::vector< MonitorElement * > h_effic_PU_eta
std::vector< MonitorElement * > h_assoc2_ootpu_fwdneg
std::vector< MonitorElement * > h_assoc2_vertcount_fwdneg
std::vector< MonitorElement * > h_fomt_sig_vertcount
T eta() const
std::vector< MonitorElement * > h_assoc_vertz_fwdneg
int numberOfValidStripLayersWithMonoAndStereo() const
Definition: HitPattern.cc:224
std::vector< MonitorElement * > h_TIBhits_eta
std::vector< MonitorElement * > h_thetapullphimean
std::vector< MonitorElement * > h_fomt_ootpu_eta
std::vector< MonitorElement * > h_cotThetameanhPt
std::vector< std::vector< int > > totFOMT_eta
std::vector< MonitorElement * > h_phimeanhPhi
void fill_trackBased_histos(int count, int assTracks, int numRecoTracks, int numSimTracks)
std::vector< MonitorElement * > h_misidratedz
std::vector< MonitorElement * > h_assoc2dz
std::vector< MonitorElement * > chi2_vs_phi
std::vector< MonitorElement * > h_fomt_eta
std::vector< MonitorElement * > h_LayersWithMeas_eta
int numberOfValidStripTOBHits() const
Definition: HitPattern.h:590
std::vector< std::vector< int > > totASS_zpos
std::vector< std::vector< int > > totloop_dxy
std::vector< std::vector< int > > totASS2etaSig
std::vector< std::vector< int > > totASS2_vertcount_barrel
std::vector< MonitorElement * > h_chi2mean_vs_phi
std::vector< MonitorElement * > h_assocphi
int sharedHits(const reco::GsfTrackRef &, const reco::GsfTrackRef &)
std::vector< MonitorElement * > h_cotThetarmsh
std::vector< MonitorElement * > phires_vs_phi
std::vector< MonitorElement * > dzres_vs_eta
std::vector< MonitorElement * > h_losthits_eta
double qoverpMode() const
q/p from mode
Definition: GsfTrack.h:40
std::vector< MonitorElement * > h_ptmeanhPhi
std::vector< std::vector< int > > totSIM_hit
std::vector< MonitorElement * > h_misideta
std::vector< MonitorElement * > nlosthits_vs_eta
std::vector< MonitorElement * > nSTRIPlayersWith1dMeas_vs_eta
std::vector< MonitorElement * > h_phimeanh
double ptModeError() const
error on Pt (set to 1000 TeV if charge==0 for safety) from mode
Definition: GsfTrack.h:80
std::vector< MonitorElement * > h_recohit
TrackAlgorithm algo() const
Definition: TrackBase.h:332
std::vector< MonitorElement * > h_reco_vertcount_entire
void fill_generic_recoTrack_histos(int count, const reco::Track &track, math::XYZPoint bsPosition, bool isMatched, bool isSigMatched, bool isChargeMatched, int numAssocRecoTracks, int numVertices, int tpbunchcrossing, int nSimHits, double sharedFraction)
std::vector< MonitorElement * > h_thetapulleta
void fill_ResoAndPull_recoTrack_histos(int count, ParticleBase::Vector momentumTP, ParticleBase::Point vertexTP, int chargeTP, const reco::Track &track, math::XYZPoint bsPosition)
std::vector< MonitorElement * > h_fakerate_vertcount_entire
std::vector< std::vector< int > > totSIM_zpos
std::vector< std::vector< int > > totASSpT
std::vector< std::vector< int > > totSIM_vertz_fwdneg
std::vector< std::vector< int > > totASS2_vertcount_fwdneg
std::vector< MonitorElement * > h_phipullphimean
std::vector< MonitorElement * > h_dedx_estim1
std::vector< MonitorElement * > h_hits_phi
std::vector< std::vector< int > > totASS2_ootpu_fwdneg
std::vector< MonitorElement * > phires_vs_pt
std::vector< MonitorElement * > h_reco_ootpu_fwdneg
SingleObjectSelector< TrackingParticleCollection,::TrackingParticleSelector > TrackingParticleSelector
std::vector< std::vector< int > > totlooppT
std::vector< std::vector< int > > totloop_hit
math::XYZPointD Point
point in the space
Definition: ParticleBase.h:28
std::vector< MonitorElement * > h_STRIPlayersWithMeas_eta
std::vector< std::vector< int > > totASS2eta
std::vector< MonitorElement * > h_assoc2_ootpu_fwdpos
std::vector< MonitorElement * > nPXBhits_vs_eta
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:141
std::vector< std::vector< int > > totASS_hit
std::vector< std::vector< int > > totASS2_vertcount_entire_signal
std::vector< std::vector< int > > totASS2_itpu_vertcount_entire
std::vector< MonitorElement * > h_assoc2dxy
std::vector< MonitorElement * > h_dxyrmshPt
std::vector< MonitorElement * > h_STRIPlayersWith1dMeas_eta
std::vector< MonitorElement * > h_pullQoverp
int numberOfValidPixelBarrelHits() const
Definition: HitPattern.h:570
std::vector< std::vector< int > > totSIM_phi
std::vector< std::vector< int > > totASS2pT
std::vector< MonitorElement * > h_fake_vs_phi
std::vector< MonitorElement * > h_ptpulletamean
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:107
std::vector< MonitorElement * > h_misidhit
std::vector< MonitorElement * > nSTRIPlayersWithMeas_vs_eta
std::vector< MonitorElement * > nTOBhits_vs_eta
std::vector< std::vector< int > > totASS_dz
double ndof() const
number of degrees of freedom of the fit
Definition: TrackBase.h:109
int trackerLayersWithMeasurement() const
Definition: HitPattern.h:705
std::vector< std::vector< int > > totASS_vertz_barrel
T sqrt(T t)
Definition: SSEVec.h:46
std::vector< MonitorElement * > ptpull_vs_eta
std::vector< MonitorElement * > etares_vs_eta
std::vector< MonitorElement * > h_fakerate_ootpu_fwdneg
double pt() const
track transverse momentum
Definition: TrackBase.h:131
std::vector< MonitorElement * > h_recophi
std::vector< MonitorElement * > h_misidratehit
std::vector< MonitorElement * > h_assocpT
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< MonitorElement * > h_ptpullphimean
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
Definition: TrackBase.h:194
std::vector< MonitorElement * > h_simul_vertz_barrel
std::vector< std::vector< int > > totASS_vertcount_entire
std::vector< MonitorElement * > nSTRIPlayersWith2dMeas_vs_eta
std::vector< MonitorElement * > h_tracks
std::vector< MonitorElement * > h_chi2meanh
double phiError() const
error on phi
Definition: TrackBase.h:207
std::vector< MonitorElement * > h_TIDhits_eta
std::vector< MonitorElement * > h_tracksSIM
std::vector< MonitorElement * > h_effic_vertcount_entire
std::vector< MonitorElement * > h_effic
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
std::vector< MonitorElement * > nhits_vs_phi
std::vector< std::vector< int > > totloopeta
std::vector< std::vector< int > > totASS2_dz
int numberOfValidStripTIDHits() const
Definition: HitPattern.h:586
double lambda() const
Lambda angle.
Definition: TrackBase.h:119
std::vector< std::vector< int > > totSIM_vertpos
std::vector< MonitorElement * > h_simul_vertcount_barrel
std::vector< std::vector< int > > totREC_ootpu_entire
std::vector< MonitorElement * > h_ptmeanhPt
std::vector< MonitorElement * > h_phirmsh
double f[11][100]
std::vector< MonitorElement * > nrecHit_vs_nsimHit_sim2rec
bool isMatched(TrackingRecHit const &hit)
std::vector< std::vector< int > > totRECpT
std::vector< std::vector< int > > totmisid_phi
std::vector< std::vector< int > > totREC_vertcount_fwdneg
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:232
void fill_simAssociated_recoTrack_histos(int count, const reco::Track &track)
int numberOfValidStripTECHits() const
Definition: HitPattern.h:594
std::vector< std::vector< int > > totmisidpT
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
std::vector< MonitorElement * > h_reco_ootpu_barrel
std::vector< MonitorElement * > h_assoc_vertz_barrel
std::vector< MonitorElement * > h_effic_PU_zpos
std::vector< MonitorElement * > h_phirmshPt
std::vector< std::vector< int > > totloop_dz
std::vector< MonitorElement * > phimean_vs_eta_phi
std::vector< MonitorElement * > h_charge
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:223
std::vector< std::vector< int > > totASS2_itpu_vertcount_entire_signal
std::vector< MonitorElement * > h_reco_ootpu_eta
std::vector< std::vector< int > > totASS2_hit
std::vector< MonitorElement * > h_loopratehit
std::vector< MonitorElement * > h_loopereta
std::vector< MonitorElement * > h_effic_vertcount_fwdneg
std::vector< MonitorElement * > h_misiddz
std::vector< std::vector< int > > totREC_dxy
#define LogTrace(id)
std::vector< std::vector< double > > phiintervals
std::vector< MonitorElement * > h_assoc_vertcount_entire
std::vector< MonitorElement * > chi2_vs_nhits
std::vector< std::vector< int > > totSIM_vertcount_fwdpos
std::vector< std::vector< int > > totSIM_vertz_barrel
std::vector< std::vector< int > > totASS2_itpu_eta_entire_signal
std::vector< MonitorElement * > dzpull_vs_eta
std::vector< std::vector< int > > totREC_vertcount_barrel
std::vector< MonitorElement * > h_simuldz
std::vector< MonitorElement * > h_misiddxy
std::vector< std::vector< int > > totASS_vertz_fwdpos
std::vector< MonitorElement * > h_bunchxSIM
int k[5][pyjets_maxn]
std::vector< MonitorElement * > h_fakerate
double qoverpError() const
error on signed transverse curvature
Definition: TrackBase.h:192
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:127
double dzError() const
error on dz
Definition: TrackBase.h:215
std::vector< std::vector< int > > totmisid_hit
std::vector< MonitorElement * > h_ptpullphi
std::vector< std::vector< int > > totCONzpos
std::vector< MonitorElement * > thetapull_vs_phi
std::vector< MonitorElement * > h_assoc2_ootpu_barrel
TrackingParticleSelector * TpSelectorForEfficiencyVsPt
std::vector< std::vector< int > > totREC_ootpu_barrel
std::vector< MonitorElement * > h_simulvertpos
std::vector< MonitorElement * > h_STRIPlayersWith2dMeas_eta
std::vector< MonitorElement * > dxyres_vs_eta
std::vector< MonitorElement * > h_effic_vs_phi
std::vector< std::vector< int > > totREC_vertcount_fwdpos
std::vector< MonitorElement * > h_ptrmsh
std::vector< std::vector< int > > totASS_vertpos
std::vector< MonitorElement * > h_chi2meanhitsh
std::vector< MonitorElement * > h_fomt_ootpu_vertcount
std::vector< MonitorElement * > h_dxymeanhPt
std::vector< MonitorElement * > h_dzpulleta
#define M_PI
Definition: BFit3D.cc:3
std::vector< MonitorElement * > h_misidpT
std::vector< MonitorElement * > nPXLlayersWithMeas_vs_eta
std::vector< std::vector< int > > totSIMpT
std::vector< std::vector< int > > totASS_vertz_entire
std::vector< std::vector< int > > totASS_vertcount_fwdneg
std::vector< MonitorElement * > nTIBhits_vs_eta
std::vector< MonitorElement * > h_fakerate_ootpu_fwdpos
std::vector< MonitorElement * > h_dxypulleta
void fill_recoAssociated_simTrack_histos(int count, const TrackingParticle &tp, ParticleBase::Vector momentumTP, ParticleBase::Point vertexTP, double dxy, double dz, int nSimHits, const reco::Track *track, int numVertices, double vertz)
std::vector< std::vector< double > > etaintervals
std::vector< MonitorElement * > h_effic_vs_dz
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
std::vector< MonitorElement * > h_phirmshPhi
std::vector< std::vector< int > > totREC_ootpu_fwdpos
double qoverpModeError() const
error on signed transverse curvature from mode
Definition: GsfTrack.h:78
int stripLayersWithMeasurement() const
Definition: HitPattern.h:715
std::vector< std::vector< int > > totASS2_ootpu_entire
std::vector< MonitorElement * > h_eta
void getFittedMeanWithError(MonitorElement *)
Fill the ME with the mean value (with error) of the gaussian fit in each slice.
std::vector< MonitorElement * > h_effic_PU_vertcount
std::vector< MonitorElement * > h_pt
std::vector< MonitorElement * > h_PXBhits_eta
std::vector< std::vector< int > > totASS2_ootpu_eta_entire
std::vector< MonitorElement * > h_phimeanhPt
std::vector< MonitorElement * > h_dedx_nom2
std::vector< MonitorElement * > cotThetares_vs_pt
std::vector< MonitorElement * > h_effic_vs_zpos
std::vector< MonitorElement * > h_etaSIM
int numberOfValidStripTIBHits() const
Definition: HitPattern.h:582
std::vector< MonitorElement * > h_simulphi
std::vector< MonitorElement * > h_reco_vertcount_fwdpos
int numberOfValidPixelEndcapHits() const
Definition: HitPattern.h:574
std::vector< MonitorElement * > h_pullTheta
std::vector< std::vector< int > > totREC_hit
std::vector< MonitorElement * > ptmean_vs_eta_phi
std::vector< MonitorElement * > h_looperphi
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
double lambdaError() const
error on lambda
Definition: TrackBase.h:203
std::vector< std::vector< int > > totSIMeta
std::vector< MonitorElement * > h_reco_vertcount_fwdneg
std::vector< std::vector< int > > totREC_ootpu_fwdneg
std::vector< std::vector< int > > totSIM_vertcount_barrel
std::vector< MonitorElement * > dxypull_vs_eta
std::vector< MonitorElement * > h_fomt_itpu_vertcount
std::vector< MonitorElement * > ptres_vs_eta
std::vector< MonitorElement * > h_cotThetameanh
std::vector< MonitorElement * > h_assoc_vertz_entire
std::vector< MonitorElement * > h_assoc2_vertcount_fwdpos
std::vector< MonitorElement * > h_dzrmsh
std::vector< MonitorElement * > h_con_vertcount
std::vector< MonitorElement * > h_effic_vs_dxy
std::vector< MonitorElement * > phipull_vs_eta
unsigned short found() const
Number of valid hits on track.
Definition: Track.h:100
std::vector< MonitorElement * > h_TOBhits_eta
std::vector< MonitorElement * > h_misidrate
std::vector< MonitorElement * > h_TEChits_eta
std::vector< MonitorElement * > h_reco_vertcount_barrel
std::vector< MonitorElement * > h_simulhit
std::vector< MonitorElement * > h_effic_vertz_entire
std::vector< MonitorElement * > h_con_zpos
std::vector< MonitorElement * > h_dzmeanhPt
std::vector< std::vector< int > > totASS_vertz_fwdneg
std::vector< MonitorElement * > h_recopT
std::vector< MonitorElement * > h_looperdz
std::vector< MonitorElement * > h_simul_vertcount_fwdneg
std::vector< std::vector< double > > pTintervals
std::vector< MonitorElement * > h_assocdxy
double phiMode() const
azimuthal angle of momentum vector from mode
Definition: GsfTrack.h:56
int charge() const
track electric charge
Definition: TrackBase.h:113
std::vector< MonitorElement * > cotThetares_vs_eta
std::vector< MonitorElement * > h_assocFraction
std::vector< MonitorElement * > h_loopratedz
std::vector< MonitorElement * > h_fomt_sig_eta
std::vector< MonitorElement * > h_cotThetarmshPt
std::vector< std::vector< int > > totSIM_vertcount_fwdneg
std::vector< std::vector< int > > totREC_phi
double lambdaModeError() const
error on lambda from mode
Definition: GsfTrack.h:89
std::vector< std::vector< int > > totASS2_ootpu_barrel
std::vector< MonitorElement * > h_assoc_vertcount_barrel
std::vector< MonitorElement * > h_simul_vertz_fwdpos
std::vector< MonitorElement * > h_recodz
std::vector< MonitorElement * > ptres_vs_pt
std::vector< MonitorElement * > h_reco_ootpu_fwdpos
std::vector< MonitorElement * > h_dedx_sat2
std::vector< MonitorElement * > h_reco_ootpu_vertcount
std::vector< std::vector< int > > totloop_phi
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
std::vector< MonitorElement * > h_assoc2_ootpu_entire
std::vector< MonitorElement * > h_phipulleta
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
std::vector< MonitorElement * > h_simul_vertcount_entire
std::vector< std::vector< int > > totCONvertcount
std::vector< MonitorElement * > h_assoceta
std::vector< MonitorElement * > h_effic_vertcount_barrel
std::vector< MonitorElement * > h_looprate
std::vector< MonitorElement * > ptres_vs_phi
TrackingParticleSelector * TpSelectorForEfficiencyVsVTXR
std::vector< MonitorElement * > h_con_eta
std::vector< MonitorElement * > h_assocSharedHit
std::vector< MonitorElement * > h_dxymeanh
std::vector< MonitorElement * > nhits_vs_eta
std::vector< MonitorElement * > h_ptrmshPhi
double ptMode() const
track transverse momentum from mode
Definition: GsfTrack.h:48
std::vector< MonitorElement * > h_assoc2_vertcount_barrel
std::vector< MonitorElement * > h_effic_vs_hit
std::vector< MonitorElement * > h_simuldxy
std::vector< std::vector< int > > totmisideta
std::vector< MonitorElement * > h_assocvertpos
std::vector< MonitorElement * > h_loopratepT
std::vector< MonitorElement * > h_effic_vertz_fwdneg
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
std::vector< std::vector< int > > totASS2_vertcount_fwdpos
std::vector< MonitorElement * > h_assoc2_vertcount_entire
MTVHistoProducerAlgoForTracker(const edm::ParameterSet &pset)
std::vector< MonitorElement * > h_simul_vertz_fwdneg
std::vector< MonitorElement * > h_recoeta
std::vector< MonitorElement * > thetapull_vs_eta
std::vector< std::vector< int > > totSIM_dxy
std::vector< MonitorElement * > chi2_vs_eta
std::vector< MonitorElement * > h_phipulletamean
std::vector< MonitorElement * > h_PXLlayersWithMeas_eta
std::vector< std::vector< double > > dzintervals
std::vector< MonitorElement * > dxyres_vs_pt
TrackingParticleSelector * TpSelectorForEfficiencyVsCon
std::vector< MonitorElement * > h_misidratedxy
std::vector< MonitorElement * > h_dedx_nom1
std::vector< std::vector< int > > totASS2_dxy
std::vector< MonitorElement * > h_losthits
TrackingParticleSelector * TpSelectorForEfficiencyVsEta
std::vector< MonitorElement * > h_assoc2eta
std::vector< std::vector< int > > totmisid_dz
std::vector< MonitorElement * > h_thetapulletamean
std::vector< MonitorElement * > h_misidphi
std::vector< MonitorElement * > h_fakerate_vertcount_fwdneg
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
std::vector< MonitorElement * > dzres_vs_pt