CMS 3D CMS Logo

DMRChecker.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Alignment/OfflineValidation
4 // Class: DMRChecker
5 //
9 //
10 // Original Author: Marco Musich
11 // Created: Mon, 10 Aug 2020 15:45:00 GMT
12 //
13 //
14 
15 // ROOT includes
16 
17 #include <RtypesCore.h>
18 #include <TAxis.h>
19 #include <TCanvas.h>
20 #include <TColor.h>
21 #include <TH1.h>
22 #include <TH2.h>
23 #include <TLatex.h>
24 #include <TMath.h>
25 #include <TProfile.h>
26 #include <TString.h>
27 #include <TStyle.h>
28 #include <TVirtualPad.h>
29 
30 // STL includes
31 
32 #include <algorithm>
33 #include <array>
34 #include <cmath>
35 #include <cstdint>
36 #include <cstdlib>
37 #include <ctime>
38 #include <ext/alloc_traits.h>
39 #include <fmt/printf.h>
40 #include <iomanip>
41 #include <iostream>
42 #include <map>
43 #include <memory>
44 #include <string>
45 #include <type_traits>
46 #include <utility>
47 #include <vector>
48 #include <boost/range/adaptor/indexed.hpp>
49 
50 // user system includes
51 
120 
121 #define DEBUG 0
122 
123 using namespace std;
124 using namespace edm;
125 
128 constexpr float cmToUm = 10000.;
129 
135 namespace running {
136  struct Estimators {
140  int hitCount;
145  };
146 
147  using estimatorMap = std::map<uint32_t, running::Estimators>;
148 
149 } // namespace running
150 
151 class DMRChecker : public edm::one::EDAnalyzer<edm::one::SharedResources> {
152 public:
154  : geomToken_(esConsumes<TrackerGeometry, TrackerDigiGeometryRecord>()),
155  runInfoToken_(esConsumes<RunInfo, RunInfoRcd>()),
156  magFieldToken_(esConsumes<MagneticField, IdealMagneticFieldRecord>()),
157  topoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd>()),
158  latencyToken_(esConsumes<SiStripLatency, SiStripLatencyRcd>()),
159  isCosmics_(pset.getParameter<bool>("isCosmics")) {
160  usesResource(TFileService::kSharedResource);
161 
162  TkTag_ = pset.getParameter<edm::InputTag>("TkTag");
163  theTrackCollectionToken = consumes<reco::TrackCollection>(TkTag_);
164 
165  TriggerResultsTag_ = pset.getParameter<edm::InputTag>("TriggerResultsTag");
166  hltresultsToken = consumes<edm::TriggerResults>(TriggerResultsTag_);
167 
168  BeamSpotTag_ = pset.getParameter<edm::InputTag>("BeamSpotTag");
169  beamspotToken = consumes<reco::BeamSpot>(BeamSpotTag_);
170 
171  VerticesTag_ = pset.getParameter<edm::InputTag>("VerticesTag");
172  vertexToken = consumes<reco::VertexCollection>(VerticesTag_);
173 
174  // initialize conventional Tracker maps
175 
176  pmap = std::make_unique<TrackerMap>("Pixel");
177  pmap->onlyPixel(true);
178  pmap->setTitle("Pixel Hit entries");
179  pmap->setPalette(1);
180 
181  tmap = std::make_unique<TrackerMap>("Strip");
182  tmap->setTitle("Strip Hit entries");
183  tmap->setPalette(1);
184 
185  // initialize Phase1 Pixel Maps
186 
187  pixelmap = std::make_unique<Phase1PixelMaps>("COLZ0 L");
188  pixelmap->bookBarrelHistograms("DMRsX", "Median Residuals x-direction", "Median Residuals");
189  pixelmap->bookBarrelBins("DMRsX");
190  pixelmap->bookForwardHistograms("DMRsX", "Median Residuals x-direction", "Median Residuals");
191  pixelmap->bookForwardBins("DMRsX");
192 
193  pixelmap->bookBarrelHistograms("DMRsY", "Median Residuals y-direction", "Median Residuals");
194  pixelmap->bookBarrelBins("DMRsY");
195  pixelmap->bookForwardHistograms("DMRsY", "Median Residuals y-direction", "Median Residuals");
196  pixelmap->bookForwardBins("DMRsY");
197 
198  // set no rescale
199  pixelmap->setNoRescale();
200  }
201 
203 
204  ~DMRChecker() override {}
205 
206  /*_______________________________________________________
207  //
208  // auxilliary method to retrieve certain histogram types
209  //_______________________________________________________
210  */
211  template <class OBJECT_TYPE>
212  int GetIndex(const std::vector<OBJECT_TYPE *> &vec, const std::string &name) {
213  for (const auto &iter : vec | boost::adaptors::indexed(0)) {
214  if (iter.value() && iter.value()->GetName() == name) {
215  return iter.index();
216  }
217  }
218  edm::LogError("Alignment") << "@SUB=DMRChecker::GetIndex"
219  << " could not find " << name;
220  return -1;
221  }
222 
223 private:
224  // tokens for the event setup
230 
232 
233  std::unique_ptr<Phase1PixelMaps> pixelmap;
234  std::unique_ptr<PixelRegions::PixelRegionContainers> PixelDMRS_x_ByLayer;
235  std::unique_ptr<PixelRegions::PixelRegionContainers> PixelDMRS_y_ByLayer;
236 
237  std::unique_ptr<TrackerMap> tmap;
238  std::unique_ptr<TrackerMap> pmap;
239 
240  TH1D *hchi2ndof;
241  TH1D *hNtrk;
242  TH1D *hNtrkZoom;
243  TH1I *htrkQuality;
244  TH1I *htrkAlgo;
246  TH1D *hP;
247  TH1D *hPPlus;
248  TH1D *hPMinus;
249  TH1D *hPt;
250  TH1D *hMinPt;
251  TH1D *hPtPlus;
252  TH1D *hPtMinus;
253  TH1D *hHit;
254  TH1D *hHit2D;
255 
260 
265 
270 
275 
280 
285 
292 
295 
298 
305 
308 
311 
312  TH1D *hHitPlus;
313  TH1D *hHitMinus;
314 
315  TH1D *hPhp;
316  TH1D *hPthp;
317  TH1D *hHithp;
318  TH1D *hEtahp;
319  TH1D *hPhihp;
320  TH1D *hchi2ndofhp;
321  TH1D *hchi2Probhp;
322 
323  TH1D *hCharge;
324  TH1D *hQoverP;
325  TH1D *hQoverPZoom;
326  TH1D *hEta;
327  TH1D *hEtaPlus;
328  TH1D *hEtaMinus;
329  TH1D *hPhi;
330  TH1D *hPhiBarrel;
335  TH1D *hPhiPlus;
336  TH1D *hPhiMinus;
337 
338  TH1D *hDeltaPhi;
339  TH1D *hDeltaEta;
340  TH1D *hDeltaR;
341 
342  TH1D *hvx;
343  TH1D *hvy;
344  TH1D *hvz;
345  TH1D *hd0;
346  TH1D *hdz;
347  TH1D *hdxy;
348 
349  TH2D *hd0PVvsphi;
350  TH2D *hd0PVvseta;
351  TH2D *hd0PVvspt;
352 
353  TH2D *hd0vsphi;
354  TH2D *hd0vseta;
355  TH2D *hd0vspt;
356 
357  TH1D *hnhpxb;
358  TH1D *hnhpxe;
359  TH1D *hnhTIB;
360  TH1D *hnhTID;
361  TH1D *hnhTOB;
362  TH1D *hnhTEC;
363 
365 
366  TProfile *pNBpixHitsVsVx;
367  TProfile *pNBpixHitsVsVy;
368  TProfile *pNBpixHitsVsVz;
369 
370  TH1D *hMultCand;
371 
372  TH1D *hdxyBS;
373  TH1D *hd0BS;
374  TH1D *hdzBS;
375  TH1D *hdxyPV;
376  TH1D *hd0PV;
377  TH1D *hdzPV;
378  TH1D *hrun;
379  TH1D *hlumi;
380 
381  std::vector<TH1 *> vTrackHistos_;
382  std::vector<TH1 *> vTrackProfiles_;
383  std::vector<TH1 *> vTrack2DHistos_;
384 
387 
388  TH1D *modeByRun_;
389  TH1D *fieldByRun_;
390 
392  TH1D *hitsByRun_;
393 
396 
399 
400  // Pixel
401 
402  TH1D *DMRBPixX_;
403  TH1D *DMRBPixY_;
404 
405  TH1D *DMRFPixX_;
406  TH1D *DMRFPixY_;
407 
408  TH1D *DRnRBPixX_;
409  TH1D *DRnRBPixY_;
410 
411  TH1D *DRnRFPixX_;
412  TH1D *DRnRFPixY_;
413 
414  // Strips
415 
416  TH1D *DMRTIB_;
417  TH1D *DMRTOB_;
418 
419  TH1D *DMRTID_;
420  TH1D *DMRTEC_;
421 
422  TH1D *DRnRTIB_;
423  TH1D *DRnRTOB_;
424 
425  TH1D *DRnRTID_;
426  TH1D *DRnRTEC_;
427 
428  // Split DMRs
429 
430  std::array<TH1D *, 2> DMRBPixXSplit_;
431  std::array<TH1D *, 2> DMRBPixYSplit_;
432 
433  std::array<TH1D *, 2> DMRFPixXSplit_;
434  std::array<TH1D *, 2> DMRFPixYSplit_;
435 
436  std::array<TH1D *, 2> DMRTIBSplit_;
437  std::array<TH1D *, 2> DMRTOBSplit_;
438 
439  // residuals
440 
441  std::map<unsigned int, TH1D *> barrelLayersResidualsX;
442  std::map<unsigned int, TH1D *> barrelLayersPullsX;
443  std::map<unsigned int, TH1D *> barrelLayersResidualsY;
444  std::map<unsigned int, TH1D *> barrelLayersPullsY;
445 
446  std::map<unsigned int, TH1D *> endcapDisksResidualsX;
447  std::map<unsigned int, TH1D *> endcapDisksPullsX;
448  std::map<unsigned int, TH1D *> endcapDisksResidualsY;
449  std::map<unsigned int, TH1D *> endcapDisksPullsY;
450 
451  int ievt;
452  int itrks;
453  int mode;
455 
457  const bool isCosmics_;
458 
463 
468 
469  std::map<std::string, std::pair<int, int> > triggerMap_;
470  std::map<int, std::pair<int, float> > conditionsMap_;
471  std::map<int, std::pair<int, int> > runInfoMap_;
472  std::map<int, std::array<int, 6> > runHitsMap_;
473 
474  std::map<int, float> timeMap_;
475 
476  // Pixel
477 
482 
483  // Strips
484 
489 
490  void analyze(const edm::Event &event, const edm::EventSetup &setup) override {
491  ievt++;
492 
494  event.getByToken(theTrackCollectionToken, trackCollection);
495 
496  // magnetic field setup
497  const MagneticField *magneticField_ = &setup.getData(magFieldToken_);
498  float B_ = magneticField_->inTesla(GlobalPoint(0, 0, 0)).mag();
499 
500  const RunInfo *summary = &setup.getData(runInfoToken_);
501  time_t start_time = summary->m_start_time_ll;
502  ctime(&start_time);
503  time_t end_time = summary->m_stop_time_ll;
504  ctime(&end_time);
505 
506  /*
507  float average_current = runInfo.product()->m_avg_current;
508  float uptimeInSeconds = runInfo.product()->m_run_intervall_micros;
509  edm::LogVerbatim("DMRChecker")<< " start_time " << start_time << "( " << summary->m_start_time_str <<" )"
510  << " end_time " << end_time << "( " << summary->m_stop_time_str <<" )" << std::endl;
511  */
512 
513  double seconds = difftime(end_time, start_time) / 1.0e+6; // convert from micros-seconds
514  //edm::LogVerbatim("DMRChecker")<<" diff: "<< seconds << "s" << std::endl;
515  timeMap_[event.run()] = seconds;
516 
517  // topology setup
518  const TrackerTopology *const tTopo = &setup.getData(topoToken_);
519 
520  const SiStripLatency *apvlat = &setup.getData(latencyToken_);
521  if (apvlat->singleReadOutMode() == 1) {
522  mode = 1; // peak mode
523  } else if (apvlat->singleReadOutMode() == 0) {
524  mode = -1; // deco mode
525  }
526 
527  conditionsMap_[event.run()].first = mode;
528  conditionsMap_[event.run()].second = B_;
529 
530  // geometry setup
531  const TrackerGeometry *theGeometry = &setup.getData(geomToken_);
532 
533  if (firstEvent_) {
534  if (theGeometry->isThere(GeomDetEnumerators::P2PXB) || theGeometry->isThere(GeomDetEnumerators::P2PXEC)) {
535  phase_ = SiPixelPI::phase::two;
536  } else if (theGeometry->isThere(GeomDetEnumerators::P1PXB) || theGeometry->isThere(GeomDetEnumerators::P1PXEC)) {
537  phase_ = SiPixelPI::phase::one;
538  } else {
539  phase_ = SiPixelPI::phase::zero;
540  }
541  firstEvent_ = false;
542  }
543 
544  GlobalPoint zeroPoint(0, 0, 0);
545  //edm::LogVerbatim("DMRChecker") << "event#" << ievt << " Event ID = "<< event.id()
547 
548  const reco::TrackCollection tC = *(trackCollection.product());
549  itrks += tC.size();
550 
551  runInfoMap_[event.run()].first += 1;
552  runInfoMap_[event.run()].second += tC.size();
553 
554  //edm::LogVerbatim("DMRChecker") << "Reconstructed "<< tC.size() << " tracks" << std::endl ;
555 
557  event.getByToken(hltresultsToken, hltresults);
558  if (hltresults.isValid()) {
559  const edm::TriggerNames &triggerNames_ = event.triggerNames(*hltresults);
560  int ntrigs = hltresults->size();
561 
562  for (int itrig = 0; itrig != ntrigs; ++itrig) {
563  const string &trigName = triggerNames_.triggerName(itrig);
564  bool accept = hltresults->accept(itrig);
565  if (accept == 1) {
566  // emd::LogVerbatim("DMRChecker") << trigName << " " << accept << " ,track size: " << tC.size() << endl;
567  triggerMap_[trigName].first += 1;
568  triggerMap_[trigName].second += tC.size();
569  }
570  }
571  }
572 
573  hrun->Fill(event.run());
574  hlumi->Fill(event.luminosityBlock());
575 
576  int nHighPurityTracks = 0;
577 
578  for (const auto &track : tC) {
579  auto const &residuals = track.extra()->residuals();
580 
581  unsigned int nHit2D = 0;
582  int h_index = 0;
583  for (trackingRecHit_iterator iHit = track.recHitsBegin(); iHit != track.recHitsEnd(); ++iHit, ++h_index) {
584  if (this->isHit2D(**iHit))
585  ++nHit2D;
586 
587  double resX = residuals.residualX(h_index);
588  double resY = residuals.residualY(h_index);
589  double pullX = residuals.pullX(h_index);
590  double pullY = residuals.pullY(h_index);
591 
592  const DetId &detId = (*iHit)->geographicalId();
593 
594  unsigned int subid = detId.subdetId();
595  uint32_t detid_db = detId.rawId();
596 
597  const GeomDet *geomDet(theGeometry->idToDet(detId));
598 
599  float uOrientation(-999.F), vOrientation(-999.F);
600  LocalPoint lPModule(0., 0., 0.), lUDirection(1., 0., 0.), lVDirection(0., 1., 0.), lWDirection(0., 0., 1.);
601 
602  // do all the transformations here
603  GlobalPoint gUDirection = geomDet->surface().toGlobal(lUDirection);
604  GlobalPoint gVDirection = geomDet->surface().toGlobal(lVDirection);
605  GlobalPoint gWDirection = geomDet->surface().toGlobal(lWDirection);
606  GlobalPoint gPModule = geomDet->surface().toGlobal(lPModule);
607 
608  if (!(*iHit)->detUnit())
609  continue; // is it a single physical module?
610 
611  if ((*iHit)->isValid() && (subid > PixelSubdetector::PixelEndcap)) {
612  tmap->fill(detid_db, 1);
613 
614  //LocalPoint lp = (*iHit)->localPosition();
615  //LocalError le = (*iHit)->localPositionError();
616 
617  // fill DMRs and DrNRs
618  if (subid == StripSubdetector::TIB) {
619  uOrientation = deltaPhi(gUDirection.barePhi(), gPModule.barePhi()) >= 0. ? +1.F : -1.F;
620  //vOrientation = gVDirection.z() - gPModule.z() >= 0 ? +1.F : -1.F; // not used for Strips
621 
622  // if the detid has never occcurred yet, set the local orientations
623  if (resDetailsTIB_.find(detid_db) == resDetailsTIB_.end()) {
624  resDetailsTIB_[detid_db].rDirection = gWDirection.perp() - gPModule.perp() >= 0 ? +1 : -1;
625  resDetailsTIB_[detid_db].zDirection = gVDirection.z() - gPModule.z() >= 0 ? +1 : -1;
626  resDetailsTIB_[detid_db].rOrZDirection = resDetailsTIB_[detid_db].rDirection; // barrel (split in r)
627  }
628 
629  hTIBResXPrime->Fill(uOrientation * resX * 10000);
630  hTIBResXPull->Fill(pullX);
631 
632  // update residuals
633  this->updateOnlineMomenta(resDetailsTIB_, detid_db, uOrientation * resX * cmToUm, pullX);
634 
635  } else if (subid == StripSubdetector::TOB) {
636  uOrientation = deltaPhi(gUDirection.barePhi(), gPModule.barePhi()) >= 0. ? +1.F : -1.F;
637  //vOrientation = gVDirection.z() - gPModule.z() >= 0 ? +1.F : -1.F; // not used for Strips
638 
639  hTOBResXPrime->Fill(uOrientation * resX * 10000);
640  hTOBResXPull->Fill(pullX);
641 
642  // if the detid has never occcurred yet, set the local orientations
643  if (resDetailsTOB_.find(detid_db) == resDetailsTOB_.end()) {
644  resDetailsTOB_[detid_db].rDirection = gWDirection.perp() - gPModule.perp() >= 0 ? +1 : -1;
645  resDetailsTOB_[detid_db].zDirection = gVDirection.z() - gPModule.z() >= 0 ? +1 : -1;
646  resDetailsTOB_[detid_db].rOrZDirection = resDetailsTOB_[detid_db].rDirection; // barrel (split in r)
647  }
648 
649  // update residuals
650  this->updateOnlineMomenta(resDetailsTOB_, detid_db, uOrientation * resX * cmToUm, pullX);
651 
652  } else if (subid == StripSubdetector::TID) {
653  uOrientation = deltaPhi(gUDirection.barePhi(), gPModule.barePhi()) >= 0. ? +1.F : -1.F;
654  //vOrientation = gVDirection.perp() - gPModule.perp() >= 0. ? +1.F : -1.F; // not used for Strips
655 
656  hTIDResXPrime->Fill(uOrientation * resX * 10000);
657  hTIDResXPull->Fill(pullX);
658 
659  // update residuals
660  this->updateOnlineMomenta(resDetailsTID_, detid_db, uOrientation * resX * cmToUm, pullX);
661 
662  } else if (subid == StripSubdetector::TEC) {
663  uOrientation = deltaPhi(gUDirection.barePhi(), gPModule.barePhi()) >= 0. ? +1.F : -1.F;
664  //vOrientation = gVDirection.perp() - gPModule.perp() >= 0. ? +1.F : -1.F; // not used for Strips
665 
666  hTECResXPrime->Fill(uOrientation * resX * 10000);
667  hTECResXPull->Fill(pullX);
668 
669  // update residuals
670  this->updateOnlineMomenta(resDetailsTEC_, detid_db, uOrientation * resX * cmToUm, pullX);
671  }
672  }
673 
674  const SiPixelRecHit *pixhit = dynamic_cast<const SiPixelRecHit *>(*iHit);
675 
676  if (pixhit) {
677  if (pixhit->isValid()) {
678  if (phase_ == SiPixelPI::phase::zero) {
679  pmap->fill(detid_db, 1);
680  }
681 
682  LocalPoint lp = (*iHit)->localPosition();
683  //LocalError le = (*iHit)->localPositionError();
684  GlobalPoint GP = geomDet->surface().toGlobal(lp);
685 
686  if ((subid == PixelSubdetector::PixelBarrel) || (subid == PixelSubdetector::PixelEndcap)) {
687  // 1 = PXB, 2 = PXF
688  if (subid == PixelSubdetector::PixelBarrel) {
689  int layer_num = tTopo->pxbLayer(detid_db);
690 
691  uOrientation = deltaPhi(gUDirection.barePhi(), gPModule.barePhi()) >= 0. ? +1.F : -1.F;
692  vOrientation = gVDirection.z() - gPModule.z() >= 0 ? +1.F : -1.F;
693 
694  // if the detid has never occcurred yet, set the local orientations
695  if (resDetailsBPixX_.find(detid_db) == resDetailsBPixX_.end()) {
696  resDetailsBPixX_[detid_db].rDirection = gWDirection.perp() - gPModule.perp() >= 0 ? +1 : -1;
697  resDetailsBPixX_[detid_db].zDirection = gVDirection.z() - gPModule.z() >= 0 ? +1 : -1;
698  resDetailsBPixX_[detid_db].rOrZDirection =
699  resDetailsBPixX_[detid_db].rDirection; // barrel (split in r)
700  }
701 
702  // if the detid has never occcurred yet, set the local orientations
703  if (resDetailsBPixY_.find(detid_db) == resDetailsBPixY_.end()) {
704  resDetailsBPixY_[detid_db].rDirection = gWDirection.perp() - gPModule.perp() >= 0 ? +1 : -1;
705  resDetailsBPixY_[detid_db].zDirection = gVDirection.z() - gPModule.z() >= 0 ? +1 : -1;
706  resDetailsBPixY_[detid_db].rOrZDirection =
707  resDetailsBPixY_[detid_db].rDirection; // barrel (split in r)
708  }
709 
710  hHitCountVsThetaBPix->Fill(GP.theta());
711  hHitCountVsPhiBPix->Fill(GP.phi());
712 
713  hHitCountVsZBPix->Fill(GP.z());
714  hHitCountVsXBPix->Fill(GP.x());
715  hHitCountVsYBPix->Fill(GP.y());
716 
717  hBPixResXPrime->Fill(uOrientation * resX * cmToUm);
718  hBPixResYPrime->Fill(vOrientation * resY * cmToUm);
719  hBPixResXPull->Fill(pullX);
720  hBPixResYPull->Fill(pullY);
721 
722  //edm::LogVerbatim("DMRChecker")<<"layer: "<<layer_num<<std::endl;
723 
724  // update residuals X
725  this->updateOnlineMomenta(resDetailsBPixX_, detid_db, uOrientation * resX * cmToUm, pullX);
726 
727  // update residuals Y
728  this->updateOnlineMomenta(resDetailsBPixY_, detid_db, vOrientation * resY * cmToUm, pullY);
729 
730  fillByIndex(barrelLayersResidualsX, layer_num, uOrientation * resX * cmToUm);
731  fillByIndex(barrelLayersPullsX, layer_num, pullX);
732  fillByIndex(barrelLayersResidualsY, layer_num, vOrientation * resY * cmToUm);
733  fillByIndex(barrelLayersPullsY, layer_num, pullY);
734 
735  } else if (subid == PixelSubdetector::PixelEndcap) {
736  uOrientation = gUDirection.perp() - gPModule.perp() >= 0 ? +1.F : -1.F;
737  vOrientation = deltaPhi(gVDirection.barePhi(), gPModule.barePhi()) >= 0. ? +1.F : -1.F;
738 
739  int side_num = tTopo->pxfSide(detid_db);
740  int disk_num = tTopo->pxfDisk(detid_db);
741 
742  int packedTopo = disk_num + 3 * (side_num - 1);
743 
744  //edm::LogVerbatim("DMRChecker")<<"side: "<< side_num <<" disk: " << disk_num << " packedTopo: " << packedTopo <<" GP.z(): "<<GP.z()<<std::endl;
745 
746  hHitCountVsThetaFPix->Fill(GP.theta());
747  hHitCountVsPhiFPix->Fill(GP.phi());
748 
749  hHitCountVsZFPix->Fill(GP.z());
750  hHitCountVsXFPix->Fill(GP.x());
751  hHitCountVsYFPix->Fill(GP.y());
752 
753  hFPixResXPrime->Fill(uOrientation * resX * cmToUm);
754  hFPixResYPrime->Fill(vOrientation * resY * cmToUm);
755  hFPixResXPull->Fill(pullX);
756  hFPixResYPull->Fill(pullY);
757 
758  fillByIndex(endcapDisksResidualsX, packedTopo, uOrientation * resX * cmToUm);
759  fillByIndex(endcapDisksPullsX, packedTopo, pullX);
760  fillByIndex(endcapDisksResidualsY, packedTopo, vOrientation * resY * cmToUm);
761  fillByIndex(endcapDisksPullsY, packedTopo, pullY);
762 
763  // if the detid has never occcurred yet, set the local orientations
764  if (resDetailsFPixX_.find(detid_db) == resDetailsFPixX_.end()) {
765  resDetailsFPixX_[detid_db].rDirection = gUDirection.perp() - gPModule.perp() >= 0 ? +1 : -1;
766  resDetailsFPixX_[detid_db].zDirection = gWDirection.z() - gPModule.z() >= 0 ? +1 : -1;
767  resDetailsFPixX_[detid_db].rOrZDirection =
768  resDetailsFPixX_[detid_db].zDirection; // endcaps (split in z)
769  }
770 
771  // if the detid has never occcurred yet, set the local orientations
772  if (resDetailsFPixY_.find(detid_db) == resDetailsFPixY_.end()) {
773  resDetailsFPixY_[detid_db].rDirection = gUDirection.perp() - gPModule.perp() >= 0 ? +1 : -1;
774  resDetailsFPixY_[detid_db].zDirection = gWDirection.z() - gPModule.z() >= 0 ? +1 : -1;
775  resDetailsFPixY_[detid_db].rOrZDirection =
776  resDetailsFPixY_[detid_db].zDirection; // endcaps (split in z)
777  }
778 
779  // update residuals X
780  this->updateOnlineMomenta(resDetailsFPixX_, detid_db, uOrientation * resX * cmToUm, pullX);
781 
782  // update residuals Y
783  this->updateOnlineMomenta(resDetailsFPixY_, detid_db, vOrientation * resY * cmToUm, pullY);
784 
785  if (side_num == 1) {
786  hHitCountVsXFPixMinus->Fill(GP.x());
787  hHitCountVsYFPixMinus->Fill(GP.y());
788  hHitCountVsZFPixMinus->Fill(GP.z());
789  hHitCountVsThetaFPixMinus->Fill(GP.theta());
790  hHitCountVsPhiFPixMinus->Fill(GP.phi());
791 
792  hFPixZMinusResXPrime->Fill(uOrientation * resX * cmToUm);
793  hFPixZMinusResYPrime->Fill(vOrientation * resY * cmToUm);
794  hFPixZMinusResXPull->Fill(pullX);
795  hFPixZMinusResYPull->Fill(pullY);
796 
797  } else {
798  hHitCountVsXFPixPlus->Fill(GP.x());
799  hHitCountVsYFPixPlus->Fill(GP.y());
800  hHitCountVsZFPixPlus->Fill(GP.z());
801  hHitCountVsThetaFPixPlus->Fill(GP.theta());
802  hHitCountVsPhiFPixPlus->Fill(GP.phi());
803 
804  hFPixZPlusResXPrime->Fill(uOrientation * resX * cmToUm);
805  hFPixZPlusResYPrime->Fill(vOrientation * resY * cmToUm);
806  hFPixZPlusResXPull->Fill(pullX);
807  hFPixZPlusResYPull->Fill(pullY);
808  }
809  }
810  }
811  }
812  }
813  }
814 
815  hHit2D->Fill(nHit2D);
816  hHit->Fill(track.numberOfValidHits());
817  hnhpxb->Fill(track.hitPattern().numberOfValidPixelBarrelHits());
818  hnhpxe->Fill(track.hitPattern().numberOfValidPixelEndcapHits());
819  hnhTIB->Fill(track.hitPattern().numberOfValidStripTIBHits());
820  hnhTID->Fill(track.hitPattern().numberOfValidStripTIDHits());
821  hnhTOB->Fill(track.hitPattern().numberOfValidStripTOBHits());
822  hnhTEC->Fill(track.hitPattern().numberOfValidStripTECHits());
823 
824  runHitsMap_[event.run()][0] += track.hitPattern().numberOfValidPixelBarrelHits();
825  runHitsMap_[event.run()][1] += track.hitPattern().numberOfValidPixelEndcapHits();
826  runHitsMap_[event.run()][2] += track.hitPattern().numberOfValidStripTIBHits();
827  runHitsMap_[event.run()][3] += track.hitPattern().numberOfValidStripTIDHits();
828  runHitsMap_[event.run()][4] += track.hitPattern().numberOfValidStripTOBHits();
829  runHitsMap_[event.run()][5] += track.hitPattern().numberOfValidStripTECHits();
830 
831  // fill hit composition histogram
832  if (track.hitPattern().numberOfValidPixelBarrelHits() != 0) {
833  hHitComposition->Fill(0., track.hitPattern().numberOfValidPixelBarrelHits());
834 
835  pNBpixHitsVsVx->Fill(track.vx(), track.hitPattern().numberOfValidPixelBarrelHits());
836  pNBpixHitsVsVy->Fill(track.vy(), track.hitPattern().numberOfValidPixelBarrelHits());
837  pNBpixHitsVsVz->Fill(track.vz(), track.hitPattern().numberOfValidPixelBarrelHits());
838  }
839  if (track.hitPattern().numberOfValidPixelEndcapHits() != 0) {
840  hHitComposition->Fill(1., track.hitPattern().numberOfValidPixelEndcapHits());
841  }
842  if (track.hitPattern().numberOfValidStripTIBHits() != 0) {
843  hHitComposition->Fill(2., track.hitPattern().numberOfValidStripTIBHits());
844  }
845  if (track.hitPattern().numberOfValidStripTIDHits() != 0) {
846  hHitComposition->Fill(3., track.hitPattern().numberOfValidStripTIDHits());
847  }
848  if (track.hitPattern().numberOfValidStripTOBHits() != 0) {
849  hHitComposition->Fill(4., track.hitPattern().numberOfValidStripTOBHits());
850  }
851  if (track.hitPattern().numberOfValidStripTECHits() != 0) {
852  hHitComposition->Fill(5., track.hitPattern().numberOfValidStripTECHits());
853  }
854 
855  hCharge->Fill(track.charge());
856  hQoverP->Fill(track.qoverp());
857  hQoverPZoom->Fill(track.qoverp());
858  hPt->Fill(track.pt());
859  hP->Fill(track.p());
860  hchi2ndof->Fill(track.normalizedChi2());
861  hEta->Fill(track.eta());
862  hPhi->Fill(track.phi());
863 
864  if (fabs(track.eta()) < 0.8)
865  hPhiBarrel->Fill(track.phi());
866  if (track.eta() > 0.8 && track.eta() < 1.4)
867  hPhiOverlapPlus->Fill(track.phi());
868  if (track.eta() < -0.8 && track.eta() > -1.4)
869  hPhiOverlapMinus->Fill(track.phi());
870  if (track.eta() > 1.4)
871  hPhiEndcapPlus->Fill(track.phi());
872  if (track.eta() < -1.4)
873  hPhiEndcapMinus->Fill(track.phi());
874 
875  hd0->Fill(track.d0());
876  hdz->Fill(track.dz());
877  hdxy->Fill(track.dxy());
878  hvx->Fill(track.vx());
879  hvy->Fill(track.vy());
880  hvz->Fill(track.vz());
881 
882  htrkAlgo->Fill(track.algo());
883 
884  int myquality = -99;
885  if (track.quality(reco::TrackBase::undefQuality)) {
886  myquality = -1;
887  htrkQuality->Fill(myquality);
888  }
889  if (track.quality(reco::TrackBase::loose)) {
890  myquality = 0;
891  htrkQuality->Fill(myquality);
892  }
893  if (track.quality(reco::TrackBase::tight)) {
894  myquality = 1;
895  htrkQuality->Fill(myquality);
896  }
897  if (track.quality(reco::TrackBase::highPurity) && (!isCosmics_)) {
898  myquality = 2;
899  htrkQuality->Fill(myquality);
900  hPhp->Fill(track.p());
901  hPthp->Fill(track.pt());
902  hHithp->Fill(track.numberOfValidHits());
903  hEtahp->Fill(track.eta());
904  hPhihp->Fill(track.phi());
905  hchi2ndofhp->Fill(track.normalizedChi2());
906  hchi2Probhp->Fill(TMath::Prob(track.chi2(), track.ndof()));
907  nHighPurityTracks++;
908  }
909  if (track.quality(reco::TrackBase::confirmed)) {
910  myquality = 3;
911  htrkQuality->Fill(myquality);
912  }
913  if (track.quality(reco::TrackBase::goodIterative)) {
914  myquality = 4;
915  htrkQuality->Fill(myquality);
916  }
917 
918  // Fill 1D track histos
919  static const int etaindex = this->GetIndex(vTrackHistos_, "h_tracketa");
920  vTrackHistos_[etaindex]->Fill(track.eta());
921  static const int phiindex = this->GetIndex(vTrackHistos_, "h_trackphi");
922  vTrackHistos_[phiindex]->Fill(track.phi());
923  static const int numOfValidHitsindex = this->GetIndex(vTrackHistos_, "h_trackNumberOfValidHits");
924  vTrackHistos_[numOfValidHitsindex]->Fill(track.numberOfValidHits());
925  static const int numOfLostHitsindex = this->GetIndex(vTrackHistos_, "h_trackNumberOfLostHits");
926  vTrackHistos_[numOfLostHitsindex]->Fill(track.numberOfLostHits());
927 
928  GlobalPoint gPoint(track.vx(), track.vy(), track.vz());
929  double theLocalMagFieldInInverseGeV = magneticField_->inInverseGeV(gPoint).z();
930  double kappa = -track.charge() * theLocalMagFieldInInverseGeV / track.pt();
931 
932  static const int kappaindex = this->GetIndex(vTrackHistos_, "h_curvature");
933  vTrackHistos_[kappaindex]->Fill(kappa);
934  static const int kappaposindex = this->GetIndex(vTrackHistos_, "h_curvature_pos");
935  if (track.charge() > 0)
936  vTrackHistos_[kappaposindex]->Fill(fabs(kappa));
937  static const int kappanegindex = this->GetIndex(vTrackHistos_, "h_curvature_neg");
938  if (track.charge() < 0)
939  vTrackHistos_[kappanegindex]->Fill(fabs(kappa));
940 
941  double chi2Prob = TMath::Prob(track.chi2(), track.ndof());
942  double normchi2 = track.normalizedChi2();
943 
944  static const int normchi2index = this->GetIndex(vTrackHistos_, "h_normchi2");
945  vTrackHistos_[normchi2index]->Fill(normchi2);
946  static const int chi2index = this->GetIndex(vTrackHistos_, "h_chi2");
947  vTrackHistos_[chi2index]->Fill(track.chi2());
948  static const int chi2Probindex = this->GetIndex(vTrackHistos_, "h_chi2Prob");
949  vTrackHistos_[chi2Probindex]->Fill(chi2Prob);
950  static const int ptindex = this->GetIndex(vTrackHistos_, "h_pt");
951  static const int pt2index = this->GetIndex(vTrackHistos_, "h_ptrebin");
952  vTrackHistos_[ptindex]->Fill(track.pt());
953  vTrackHistos_[pt2index]->Fill(track.pt());
954  if (track.ptError() != 0.) {
955  static const int ptResolutionindex = this->GetIndex(vTrackHistos_, "h_ptResolution");
956  vTrackHistos_[ptResolutionindex]->Fill(track.ptError() / track.pt());
957  }
958  // Fill track profiles
959  static const int d0phiindex = this->GetIndex(vTrackProfiles_, "p_d0_vs_phi");
960  vTrackProfiles_[d0phiindex]->Fill(track.phi(), track.d0());
961  static const int dzphiindex = this->GetIndex(vTrackProfiles_, "p_dz_vs_phi");
962  vTrackProfiles_[dzphiindex]->Fill(track.phi(), track.dz());
963  static const int d0etaindex = this->GetIndex(vTrackProfiles_, "p_d0_vs_eta");
964  vTrackProfiles_[d0etaindex]->Fill(track.eta(), track.d0());
965  static const int dzetaindex = this->GetIndex(vTrackProfiles_, "p_dz_vs_eta");
966  vTrackProfiles_[dzetaindex]->Fill(track.eta(), track.dz());
967  static const int chiProbphiindex = this->GetIndex(vTrackProfiles_, "p_chi2Prob_vs_phi");
968  vTrackProfiles_[chiProbphiindex]->Fill(track.phi(), chi2Prob);
969  static const int chiProbabsd0index = this->GetIndex(vTrackProfiles_, "p_chi2Prob_vs_d0");
970  vTrackProfiles_[chiProbabsd0index]->Fill(fabs(track.d0()), chi2Prob);
971  static const int chiProbabsdzindex = this->GetIndex(vTrackProfiles_, "p_chi2Prob_vs_dz");
972  vTrackProfiles_[chiProbabsdzindex]->Fill(track.dz(), chi2Prob);
973  static const int chiphiindex = this->GetIndex(vTrackProfiles_, "p_chi2_vs_phi");
974  vTrackProfiles_[chiphiindex]->Fill(track.phi(), track.chi2());
975  static const int normchiphiindex = this->GetIndex(vTrackProfiles_, "p_normchi2_vs_phi");
976  vTrackProfiles_[normchiphiindex]->Fill(track.phi(), normchi2);
977  static const int chietaindex = this->GetIndex(vTrackProfiles_, "p_chi2_vs_eta");
978  vTrackProfiles_[chietaindex]->Fill(track.eta(), track.chi2());
979  static const int normchiptindex = this->GetIndex(vTrackProfiles_, "p_normchi2_vs_pt");
980  vTrackProfiles_[normchiptindex]->Fill(track.pt(), normchi2);
981  static const int normchipindex = this->GetIndex(vTrackProfiles_, "p_normchi2_vs_p");
982  vTrackProfiles_[normchipindex]->Fill(track.p(), normchi2);
983  static const int chiProbetaindex = this->GetIndex(vTrackProfiles_, "p_chi2Prob_vs_eta");
984  vTrackProfiles_[chiProbetaindex]->Fill(track.eta(), chi2Prob);
985  static const int normchietaindex = this->GetIndex(vTrackProfiles_, "p_normchi2_vs_eta");
986  vTrackProfiles_[normchietaindex]->Fill(track.eta(), normchi2);
987  static const int kappaphiindex = this->GetIndex(vTrackProfiles_, "p_kappa_vs_phi");
988  vTrackProfiles_[kappaphiindex]->Fill(track.phi(), kappa);
989  static const int kappaetaindex = this->GetIndex(vTrackProfiles_, "p_kappa_vs_eta");
990  vTrackProfiles_[kappaetaindex]->Fill(track.eta(), kappa);
991  static const int ptResphiindex = this->GetIndex(vTrackProfiles_, "p_ptResolution_vs_phi");
992  vTrackProfiles_[ptResphiindex]->Fill(track.phi(), track.ptError() / track.pt());
993  static const int ptResetaindex = this->GetIndex(vTrackProfiles_, "p_ptResolution_vs_eta");
994  vTrackProfiles_[ptResetaindex]->Fill(track.eta(), track.ptError() / track.pt());
995 
996  // Fill 2D track histos
997  static const int d0phiindex_2d = this->GetIndex(vTrack2DHistos_, "h2_d0_vs_phi");
998  vTrack2DHistos_[d0phiindex_2d]->Fill(track.phi(), track.d0());
999  static const int dzphiindex_2d = this->GetIndex(vTrack2DHistos_, "h2_dz_vs_phi");
1000  vTrack2DHistos_[dzphiindex_2d]->Fill(track.phi(), track.dz());
1001  static const int d0etaindex_2d = this->GetIndex(vTrack2DHistos_, "h2_d0_vs_eta");
1002  vTrack2DHistos_[d0etaindex_2d]->Fill(track.eta(), track.d0());
1003  static const int dzetaindex_2d = this->GetIndex(vTrack2DHistos_, "h2_dz_vs_eta");
1004  vTrack2DHistos_[dzetaindex_2d]->Fill(track.eta(), track.dz());
1005  static const int chiphiindex_2d = this->GetIndex(vTrack2DHistos_, "h2_chi2_vs_phi");
1006  vTrack2DHistos_[chiphiindex_2d]->Fill(track.phi(), track.chi2());
1007  static const int chiProbphiindex_2d = this->GetIndex(vTrack2DHistos_, "h2_chi2Prob_vs_phi");
1008  vTrack2DHistos_[chiProbphiindex_2d]->Fill(track.phi(), chi2Prob);
1009  static const int chiProbabsd0index_2d = this->GetIndex(vTrack2DHistos_, "h2_chi2Prob_vs_d0");
1010  vTrack2DHistos_[chiProbabsd0index_2d]->Fill(fabs(track.d0()), chi2Prob);
1011  static const int normchiphiindex_2d = this->GetIndex(vTrack2DHistos_, "h2_normchi2_vs_phi");
1012  vTrack2DHistos_[normchiphiindex_2d]->Fill(track.phi(), normchi2);
1013  static const int chietaindex_2d = this->GetIndex(vTrack2DHistos_, "h2_chi2_vs_eta");
1014  vTrack2DHistos_[chietaindex_2d]->Fill(track.eta(), track.chi2());
1015  static const int chiProbetaindex_2d = this->GetIndex(vTrack2DHistos_, "h2_chi2Prob_vs_eta");
1016  vTrack2DHistos_[chiProbetaindex_2d]->Fill(track.eta(), chi2Prob);
1017  static const int normchietaindex_2d = this->GetIndex(vTrack2DHistos_, "h2_normchi2_vs_eta");
1018  vTrack2DHistos_[normchietaindex_2d]->Fill(track.eta(), normchi2);
1019  static const int kappaphiindex_2d = this->GetIndex(vTrack2DHistos_, "h2_kappa_vs_phi");
1020  vTrack2DHistos_[kappaphiindex_2d]->Fill(track.phi(), kappa);
1021  static const int kappaetaindex_2d = this->GetIndex(vTrack2DHistos_, "h2_kappa_vs_eta");
1022  vTrack2DHistos_[kappaetaindex_2d]->Fill(track.eta(), kappa);
1023  static const int normchi2kappa_2d = this->GetIndex(vTrack2DHistos_, "h2_normchi2_vs_kappa");
1024  vTrack2DHistos_[normchi2kappa_2d]->Fill(normchi2, kappa);
1025 
1026  //edm::LogVerbatim("DMRChecker") << "filling histos"<<std::endl;
1027 
1028  //dxy with respect to the beamspot
1030  edm::Handle<reco::BeamSpot> beamSpotHandle;
1031  event.getByToken(beamspotToken, beamSpotHandle);
1032  if (beamSpotHandle.isValid()) {
1033  beamSpot = *beamSpotHandle;
1034  math::XYZPoint point(beamSpot.x0(), beamSpot.y0(), beamSpot.z0());
1035  double dxy = track.dxy(point);
1036  double dz = track.dz(point);
1037  hdxyBS->Fill(dxy);
1038  hd0BS->Fill(-dxy);
1039  hdzBS->Fill(dz);
1040  }
1041 
1042  //dxy with respect to the primary vertex
1043  reco::Vertex pvtx;
1046  event.getByLabel("offlinePrimaryVertices", vertexHandle);
1047  double mindxy = 100.;
1048  double dz = 100;
1049  if (vertexHandle.isValid()) {
1050  for (reco::VertexCollection::const_iterator pvtx = vertexHandle->begin(); pvtx != vertexHandle->end(); ++pvtx) {
1051  math::XYZPoint mypoint(pvtx->x(), pvtx->y(), pvtx->z());
1052  if (abs(mindxy) > abs(track.dxy(mypoint))) {
1053  mindxy = track.dxy(mypoint);
1054  dz = track.dz(mypoint);
1055  //edm::LogVerbatim("DMRChecker")<<"dxy: "<<mindxy<<"dz: "<<dz<<std::endl;
1056  }
1057  }
1058 
1059  hdxyPV->Fill(mindxy);
1060  hd0PV->Fill(-mindxy);
1061  hdzPV->Fill(dz);
1062 
1063  hd0PVvsphi->Fill(track.phi(), -mindxy);
1064  hd0PVvseta->Fill(track.eta(), -mindxy);
1065  hd0PVvspt->Fill(track.pt(), -mindxy);
1066 
1067  } else {
1068  hdxyPV->Fill(100);
1069  hd0PV->Fill(100);
1070  hdzPV->Fill(100);
1071  }
1072 
1073  // edm::LogVerbatim("DMRChecker")<<"end of track loop"<<std::endl;
1074  }
1075 
1076  // edm::LogVerbatim("DMRChecker")<<"end of analysis"<<std::endl;
1077 
1078  hNtrk->Fill(tC.size());
1079  hNtrkZoom->Fill(tC.size());
1080  hNhighPurity->Fill(nHighPurityTracks);
1081 
1082  // edm::LogVerbatim("DMRChecker")<<"end of analysis"<<std::endl;
1083  }
1084 
1085  void beginJob() override {
1086  if (DEBUG)
1087  edm::LogVerbatim("DMRChecker") << __LINE__ << endl;
1088 
1089  TH1D::SetDefaultSumw2(kTRUE);
1090 
1091  ievt = 0;
1092  itrks = 0;
1093 
1094  hrun = fs->make<TH1D>("h_run", "run", 100000, 230000, 240000);
1095  hlumi = fs->make<TH1D>("h_lumi", "lumi", 1000, 0, 1000);
1096 
1097  // clang-format off
1098 
1099  hchi2ndof = fs->make<TH1D>("h_chi2ndof", "chi2/ndf;#chi^{2}/ndf;tracks", 100, 0, 5.);
1100  hCharge = fs->make<TH1D>("h_charge", "charge;Charge of the track;tracks", 5, -2.5, 2.5);
1101  hNtrk = fs->make<TH1D>("h_Ntrk", "ntracks;Number of Tracks;events", 200, 0., 200.);
1102  hNtrkZoom = fs->make<TH1D>("h_NtrkZoom", "Number of tracks; number of tracks;events", 10, 0., 10.);
1103  hNhighPurity = fs->make<TH1D>("h_NhighPurity", "n. high purity tracks;Number of high purity tracks;events", 200, 0., 200.);
1104 
1105  int nAlgos = reco::TrackBase::algoSize;
1106  htrkAlgo = fs->make<TH1I>("h_trkAlgo", "tracking step;iterative tracking step;tracks", nAlgos, -0.5, nAlgos - 0.5);
1107  for (int nbin = 1; nbin <= htrkAlgo->GetNbinsX(); nbin++) {
1108  htrkAlgo->GetXaxis()->SetBinLabel(nbin, reco::TrackBase::algoNames[nbin - 1].c_str());
1109  }
1110 
1111  htrkQuality = fs->make<TH1I>("h_trkQuality", "track quality;track quality;tracks", 6, -1, 5);
1112  std::string qualities[7] = {"undef", "loose", "tight", "highPurity", "confirmed", "goodIterative"};
1113  for (int nbin = 1; nbin <= htrkQuality->GetNbinsX(); nbin++) {
1114  htrkQuality->GetXaxis()->SetBinLabel(nbin, qualities[nbin - 1].c_str());
1115  }
1116 
1117  hP = fs->make<TH1D>("h_P", "Momentum;track momentum [GeV];tracks", 100, 0., 100.);
1118  hQoverP = fs->make<TH1D>("h_qoverp", "Track q/p; track q/p [GeV^{-1}];tracks", 100, -1., 1.);
1119  hQoverPZoom = fs->make<TH1D>("h_qoverpZoom", "Track q/p; track q/p [GeV^{-1}];tracks", 100, -0.1, 0.1);
1120  hPt = fs->make<TH1D>("h_Pt", "Transverse Momentum;track p_{T} [GeV];tracks", 100, 0., 100.);
1121  hHit = fs->make<TH1D>("h_nHits", "Number of hits;track n. hits;tracks", 50, -0.5, 49.5);
1122  hHit2D = fs->make<TH1D>("h_nHit2D", "Number of 2D hits; number of 2D hits;tracks", 20, 0, 20);
1123 
1124  // Pixel
1125 
1126  hBPixResXPrime = fs->make<TH1D>("h_BPixResXPrime", "BPix track X-residuals;res_{X'} [#mum];hits", 100, -1000., 1000.);
1127  hFPixResXPrime = fs->make<TH1D>("h_FPixResXPrime", "FPix track X-residuals;res_{X'} [#mum];hits", 100, -1000., 1000.);
1128  hFPixZPlusResXPrime = fs->make<TH1D>("h_FPixZPlusResXPrime", "FPix (Z+) track X-residuals;res_{X'} [#mum];hits", 100, -1000., 1000.);
1129  hFPixZMinusResXPrime = fs->make<TH1D>("h_FPixZMinusResXPrime", "FPix (Z-) track X-residuals;res_{X'} [#mum];hits", 100, -1000., 1000.);
1130 
1131  hBPixResYPrime = fs->make<TH1D>("h_BPixResYPrime", "BPix track Y-residuals;res_{Y'} [#mum];hits", 100, -1000., 1000.);
1132  hFPixResYPrime = fs->make<TH1D>("h_FPixResYPrime", "FPix track Y-residuals;res_{Y'} [#mum];hits", 100, -1000., 1000.);
1133  hFPixZPlusResYPrime = fs->make<TH1D>("h_FPixZPlusResYPrime", "FPix (Z+) track Y-residuals;res_{Y'} [#mum];hits", 100, -1000., 1000.);
1134  hFPixZMinusResYPrime = fs->make<TH1D>("h_FPixZMinusResYPrime", "FPix (Z-) track Y-residuals;res_{Y'} [#mum];hits", 100, -1000., 1000.);
1135 
1136  hBPixResXPull = fs->make<TH1D>("h_BPixResXPull", "BPix track X-pulls;res_{X'}/#sigma_{res_{X'}};hits", 100, -5., 5.);
1137  hFPixResXPull = fs->make<TH1D>("h_FPixResXPull", "FPix track X-pulls;res_{X'}/#sigma_{res_{X'}};hits", 100, -5., 5.);
1138  hFPixZPlusResXPull = fs->make<TH1D>("h_FPixZPlusResXPull", "FPix (Z+) track X-pulls;res_{X'}/#sigma_{res_{X'}};hits", 100, -5., 5.);
1139  hFPixZMinusResXPull = fs->make<TH1D>("h_FPixZMinusResXPull", "FPix (Z-) track X-pulls;res_{X'}/#sigma_{res_{X'}};hits", 100, -5., 5.);
1140 
1141  hBPixResYPull = fs->make<TH1D>("h_BPixResYPull", "BPix track Y-pulls;res_{Y'}/#sigma_{res_{Y'}};hits", 100, -5., 5.);
1142  hFPixResYPull = fs->make<TH1D>("h_FPixResYPull", "FPix track Y-pulls;res_{Y'}/#sigma_{res_{Y'}};hits", 100, -5., 5.);
1143  hFPixZPlusResYPull = fs->make<TH1D>("h_FPixZPlusResYPull", "FPix (Z+) track Y-pulls;res_{Y'}/#sigma_{res_{Y'}};hits", 100, -5., 5.);
1144  hFPixZMinusResYPull = fs->make<TH1D>("h_FPixZMinusResYPull", "FPix (Z-) track Y-pulls;res_{Y'}/#sigma_{res_{Y'}};hits", 100, -5., 5.);
1145 
1146  // Strips
1147 
1148  hTIBResXPrime = fs->make<TH1D>("h_TIBResXPrime", "TIB track X-residuals;res_{X'} [#mum];hits", 100, -1000., 1000.);
1149  hTOBResXPrime = fs->make<TH1D>("h_TOBResXPrime", "TOB track X-residuals;res_{X'} [#mum];hits", 100, -1000., 1000.);
1150  hTIDResXPrime = fs->make<TH1D>("h_TIDResXPrime", "TID track X-residuals;res_{X'} [#mum];hits", 100, -1000., 1000.);
1151  hTECResXPrime = fs->make<TH1D>("h_TECResXPrime", "TEC track X-residuals;res_{X'} [#mum];hits", 100, -1000., 1000.);
1152 
1153  hTIBResXPull = fs->make<TH1D>("h_TIBResXPull", "TIB track X-pulls;res_{X'}/#sigma_{res_{X'}};hits", 100, -5., 5.);
1154  hTOBResXPull = fs->make<TH1D>("h_TOBResXPull", "TOB track X-pulls;res_{X'}/#sigma_{res_{X'}};hits", 100, -5., 5.);
1155  hTIDResXPull = fs->make<TH1D>("h_TIDResXPull", "TID track X-pulls;res_{X'}/#sigma_{res_{X'}};hits", 100, -5., 5.);
1156  hTECResXPull = fs->make<TH1D>("h_TECResXPull", "TEC track X-pulls;res_{X'}/#sigma_{res_{X'}};hits", 100, -5., 5.);
1157 
1158  // hit counts
1159 
1160  hHitCountVsZBPix = fs->make<TH1D>("h_HitCountVsZBpix", "Number of BPix hits vs z;hit global z;hits", 60, -30, 30);
1161  hHitCountVsZFPix = fs->make<TH1D>("h_HitCountVsZFpix", "Number of FPix hits vs z;hit global z;hits", 100, -100, 100);
1162 
1163  hHitCountVsXBPix = fs->make<TH1D>("h_HitCountVsXBpix", "Number of BPix hits vs x;hit global x;hits", 20, -20, 20);
1164  hHitCountVsXFPix = fs->make<TH1D>("h_HitCountVsXFpix", "Number of FPix hits vs x;hit global x;hits", 20, -20, 20);
1165 
1166  hHitCountVsYBPix = fs->make<TH1D>("h_HitCountVsYBpix", "Number of BPix hits vs y;hit global y;hits", 20, -20, 20);
1167  hHitCountVsYFPix = fs->make<TH1D>("h_HitCountVsYFpix", "Number of FPix hits vs y;hit global y;hits", 20, -20, 20);
1168 
1169  hHitCountVsThetaBPix = fs->make<TH1D>("h_HitCountVsThetaBpix", "Number of BPix hits vs #theta;hit global #theta;hits", 20, 0., M_PI);
1170  hHitCountVsPhiBPix = fs->make<TH1D>("h_HitCountVsPhiBpix", "Number of BPix hits vs #phi;hit global #phi;hits", 20, -M_PI, M_PI);
1171 
1172  hHitCountVsThetaFPix = fs->make<TH1D>("h_HitCountVsThetaFpix", "Number of FPix hits vs #theta;hit global #theta;hits", 40, 0., M_PI);
1173  hHitCountVsPhiFPix = fs->make<TH1D>("h_HitCountVsPhiFpix", "Number of FPix hits vs #phi;hit global #phi;hits", 20, -M_PI, M_PI);
1174 
1175  // two sides of FPix
1176 
1177  hHitCountVsZFPixPlus = fs->make<TH1D>("h_HitCountVsZFPixPlus", "Number of FPix(Z+) hits vs z;hit global z;hits", 60, 15., 60);
1178  hHitCountVsZFPixMinus = fs->make<TH1D>("h_HitCountVsZFPixMinus", "Number of FPix(Z-) hits vs z;hit global z;hits", 100, -60., -15.);
1179 
1180  hHitCountVsXFPixPlus = fs->make<TH1D>("h_HitCountVsXFPixPlus", "Number of FPix(Z+) hits vs x;hit global x;hits", 20, -20, 20);
1181  hHitCountVsXFPixMinus = fs->make<TH1D>("h_HitCountVsXFPixMinus", "Number of FPix(Z-) hits vs x;hit global x;hits", 20, -20, 20);
1182 
1183  hHitCountVsYFPixPlus = fs->make<TH1D>("h_HitCountVsYFPixPlus", "Number of FPix(Z+) hits vs y;hit global y;hits", 20, -20, 20);
1184  hHitCountVsYFPixMinus = fs->make<TH1D>("h_HitCountVsYFPixMinus", "Number of FPix(Z-) hits vs y;hit global y;hits", 20, -20, 20);
1185 
1186  hHitCountVsThetaFPixPlus = fs->make<TH1D>("h_HitCountVsThetaFPixPlus", "Number of FPix(Z+) hits vs #theta;hit global #theta;hits", 20, 0., M_PI);
1187  hHitCountVsPhiFPixPlus = fs->make<TH1D>("h_HitCountVsPhiFPixPlus","Number of FPix(Z+) hits vs #phi;hit global #phi;hits",20,-M_PI,M_PI);
1188 
1189  hHitCountVsThetaFPixMinus = fs->make<TH1D>("h_HitCountVsThetaFPixMinus", "Number of FPix(Z+) hits vs #theta;hit global #theta;hits", 40, 0., M_PI);
1190  hHitCountVsPhiFPixMinus = fs->make<TH1D>("h_HitCountVsPhiFPixMinus","Number of FPix(Z+) hits vs #phi;hit global #phi;hits",20,-M_PI,M_PI);
1191 
1192  TFileDirectory ByLayerResiduals = fs->mkdir("ByLayerResiduals");
1193  barrelLayersResidualsX = bookResidualsHistogram(ByLayerResiduals, 4, "X", "Res", "BPix");
1194  endcapDisksResidualsX = bookResidualsHistogram(ByLayerResiduals, 6, "X", "Res", "FPix");
1195  barrelLayersResidualsY = bookResidualsHistogram(ByLayerResiduals, 4, "Y", "Res", "BPix");
1196  endcapDisksResidualsY = bookResidualsHistogram(ByLayerResiduals, 6, "Y", "Res", "FPix");
1197 
1198  TFileDirectory ByLayerPulls = fs->mkdir("ByLayerPulls");
1199  barrelLayersPullsX = bookResidualsHistogram(ByLayerPulls, 4, "X", "Pull", "BPix");
1200  endcapDisksPullsX = bookResidualsHistogram(ByLayerPulls, 6, "X", "Pull", "FPix");
1201  barrelLayersPullsY = bookResidualsHistogram(ByLayerPulls, 4, "Y", "Pull", "BPix");
1202  endcapDisksPullsY = bookResidualsHistogram(ByLayerPulls, 6, "Y", "Pull", "FPix");
1203 
1204  hEta = fs->make<TH1D>("h_Eta", "Track pseudorapidity; track #eta;tracks", 100, -M_PI, M_PI);
1205  hPhi = fs->make<TH1D>("h_Phi", "Track azimuth; track #phi;tracks", 100, -M_PI, M_PI);
1206 
1207  hPhiBarrel = fs->make<TH1D>("h_PhiBarrel", "hPhiBarrel (0<|#eta|<0.8);track #Phi;tracks", 100, -M_PI, M_PI);
1208  hPhiOverlapPlus = fs->make<TH1D>("h_PhiOverlapPlus", "hPhiOverlapPlus (0.8<#eta<1.4);track #phi;tracks", 100, -M_PI, M_PI);
1209  hPhiOverlapMinus = fs->make<TH1D>("h_PhiOverlapMinus", "hPhiOverlapMinus (-1.4<#eta<-0.8);track #phi;tracks", 100, -M_PI, M_PI);
1210  hPhiEndcapPlus = fs->make<TH1D>("h_PhiEndcapPlus", "hPhiEndcapPlus (#eta>1.4);track #phi;track", 100, -M_PI, M_PI);
1211  hPhiEndcapMinus = fs->make<TH1D>("h_PhiEndcapMinus", "hPhiEndcapMinus (#eta<1.4);track #phi;tracks", 100, -M_PI, M_PI);
1212 
1213  if (!isCosmics_) {
1214  hPhp = fs->make<TH1D>("h_P_hp", "Momentum (high purity);track momentum [GeV];tracks", 100, 0., 100.);
1215  hPthp = fs->make<TH1D>("h_Pt_hp", "Transverse Momentum (high purity);track p_{T} [GeV];tracks", 100, 0., 100.);
1216  hHithp = fs->make<TH1D>("h_nHit_hp", "Number of hits (high purity);track n. hits;tracks", 30, 0, 30);
1217  hEtahp = fs->make<TH1D>("h_Eta_hp", "Track pseudorapidity (high purity); track #eta;tracks", 100, -M_PI, M_PI);
1218  hPhihp = fs->make<TH1D>("h_Phi_hp", "Track azimuth (high purity); track #phi;tracks", 100, -M_PI, M_PI);
1219  hchi2ndofhp = fs->make<TH1D>("h_chi2ndof_hp", "chi2/ndf (high purity);#chi^{2}/ndf;tracks", 100, 0, 5.);
1220  hchi2Probhp = fs->make<TH1D>("hchi2_Prob_hp", "#chi^{2} probability (high purity);#chi^{2}prob_{Track};Number of Tracks", 100, 0.0, 1.);
1221 
1222  hvx = fs->make<TH1D>("h_vx", "Track v_{x} ; track v_{x} [cm];tracks", 100, -1.5, 1.5);
1223  hvy = fs->make<TH1D>("h_vy", "Track v_{y} ; track v_{y} [cm];tracks", 100, -1.5, 1.5);
1224  hvz = fs->make<TH1D>("h_vz", "Track v_{z} ; track v_{z} [cm];tracks", 100, -20., 20.);
1225  hd0 = fs->make<TH1D>("h_d0", "Track d_{0} ; track d_{0} [cm];tracks", 100, -1., 1.);
1226  hdxy = fs->make<TH1D>("h_dxy", "Track d_{xy}; track d_{xy} [cm]; tracks", 100, -0.5, 0.5);
1227  hdz = fs->make<TH1D>("h_dz", "Track d_{z} ; track d_{z} [cm]; tracks", 100, -20, 20);
1228 
1229  hd0PVvsphi = fs->make<TH2D>("h2_d0PVvsphi", "hd0PVvsphi;track #phi;track d_{0}(PV) [cm]", 160, -M_PI, M_PI, 100, -1., 1.);
1230  hd0PVvseta = fs->make<TH2D>("h2_d0PVvseta", "hdPV0vseta;track #eta;track d_{0}(PV) [cm]", 160, -2.5, 2.5, 100, -1., 1.);
1231  hd0PVvspt = fs->make<TH2D>("h2_d0PVvspt", "hdPV0vspt;track p_{T};d_{0}(PV) [cm]", 50, 0., 100., 100, -1, 1.);
1232 
1233  hdxyBS = fs->make<TH1D>("h_dxyBS", "hdxyBS; track d_{xy}(BS) [cm];tracks", 100, -0.1, 0.1);
1234  hd0BS = fs->make<TH1D>("h_d0BS", "hd0BS ; track d_{0}(BS) [cm];tracks", 100, -0.1, 0.1);
1235  hdzBS = fs->make<TH1D>("h_dzBS", "hdzBS ; track d_{z}(BS) [cm];tracks", 100, -12, 12);
1236  hdxyPV = fs->make<TH1D>("h_dxyPV", "hdxyPV; track d_{xy}(PV) [cm];tracks", 100, -0.1, 0.1);
1237  hd0PV = fs->make<TH1D>("h_d0PV", "hd0PV ; track d_{0}(PV) [cm];tracks", 100, -0.15, 0.15);
1238  hdzPV = fs->make<TH1D>("h_dzPV", "hdzPV ; track d_{z}(PV) [cm];tracks", 100, -0.1, 0.1);
1239 
1240  hnhTIB = fs->make<TH1D>("h_nHitTIB", "nhTIB;# hits in TIB; tracks", 20, 0., 20.);
1241  hnhTID = fs->make<TH1D>("h_nHitTID", "nhTID;# hits in TID; tracks", 20, 0., 20.);
1242  hnhTOB = fs->make<TH1D>("h_nHitTOB", "nhTOB;# hits in TOB; tracks", 20, 0., 20.);
1243  hnhTEC = fs->make<TH1D>("h_nHitTEC", "nhTEC;# hits in TEC; tracks", 20, 0., 20.);
1244 
1245  } else {
1246  hvx = fs->make<TH1D>("h_vx", "Track v_{x};track v_{x} [cm];tracks", 100, -100., 100.);
1247  hvy = fs->make<TH1D>("h_vy", "Track v_{y};track v_{y} [cm];tracks", 100, -100., 100.);
1248  hvz = fs->make<TH1D>("h_vz", "Track v_{z};track v_{z} [cm];track", 100, -100., 100.);
1249  hd0 = fs->make<TH1D>("h_d0", "Track d_{0};track d_{0} [cm];track", 100, -100., 100.);
1250  hdxy = fs->make<TH1D>("h_dxy", "Track d_{xy};track d_{xy} [cm];tracks", 100, -100, 100);
1251  hdz = fs->make<TH1D>("h_dz", "Track d_{z};track d_{z} [cm];tracks", 100, -200, 200);
1252 
1253  hd0vsphi = fs->make<TH2D>("h2_d0vsphi", "Track d_{0} vs #phi; track #phi;track d_{0} [cm]", 160, -3.20, 3.20, 100, -100., 100.);
1254  hd0vseta = fs->make<TH2D>("h2_d0vseta", "Track d_{0} vs #eta; track #eta;track d_{0} [cm]", 160, -3.20, 3.20, 100, -100., 100.);
1255  hd0vspt = fs->make<TH2D>("h2_d0vspt", "Track d_{0} vs p_{T};track p_{T};track d_{0} [cm]", 50, 0., 100., 100, -100, 100);
1256 
1257  hdxyBS = fs->make<TH1D>("h_dxyBS", "Track d_{xy}(BS);d_{xy}(BS) [cm];tracks", 100, -100., 100.);
1258  hd0BS = fs->make<TH1D>("h_d0BS", "Track d_{0}(BS);d_{0}(BS) [cm];tracks", 100, -100., 100.);
1259  hdzBS = fs->make<TH1D>("h_dzBS", "Track d_{z}(BS);d_{z}(BS) [cm];tracks", 100, -100., 100.);
1260  hdxyPV = fs->make<TH1D>("h_dxyPV", "Track d_{xy}(PV); d_{xy}(PV) [cm];tracks", 100, -100., 100.);
1261  hd0PV = fs->make<TH1D>("h_d0PV", "Track d_{0}(PV); d_{0}(PV) [cm];tracks", 100, -100., 100.);
1262  hdzPV = fs->make<TH1D>("h_dzPV", "Track d_{z}(PV); d_{z}(PV) [cm];tracks", 100, -100., 100.);
1263 
1264  hnhTIB = fs->make<TH1D>("h_nHitTIB", "nhTIB;# hits in TIB; tracks", 30, 0., 30.);
1265  hnhTID = fs->make<TH1D>("h_nHitTID", "nhTID;# hits in TID; tracks", 30, 0., 30.);
1266  hnhTOB = fs->make<TH1D>("h_nHitTOB", "nhTOB;# hits in TOB; tracks", 30, 0., 30.);
1267  hnhTEC = fs->make<TH1D>("h_nHitTEC", "nhTEC;# hits in TEC; tracks", 30, 0., 30.);
1268  }
1269 
1270  hnhpxb = fs->make<TH1D>("h_nHitPXB", "nhpxb;# hits in Pixel Barrel; tracks", 10, 0., 10.);
1271  hnhpxe = fs->make<TH1D>("h_nHitPXE", "nhpxe;# hits in Pixel Endcap; tracks", 10, 0., 10.);
1272 
1273  hHitComposition = fs->make<TH1D>("h_hitcomposition", "track hit composition;;# hits", 6, -0.5, 5.5);
1274  pNBpixHitsVsVx = fs->make<TProfile>("p_NpixHits_vs_Vx", "n. Barrel Pixel hits vs. v_{x};v_{x} (cm);n. BPix hits", 20, -20, 20);
1275  pNBpixHitsVsVy = fs->make<TProfile>("p_NpixHits_vs_Vy", "n. Barrel Pixel hits vs. v_{y};v_{y} (cm);n. BPix hits", 20, -20, 20);
1276  pNBpixHitsVsVz = fs->make<TProfile>("p_NpixHits_vs_Vz", "n. Barrel Pixel hits vs. v_{z};v_{z} (cm);n. BPix hits", 20, -100, 100);
1277 
1278  std::string dets[6] = {"PXB", "PXF", "TIB", "TID", "TOB", "TEC"};
1279  for (int i = 1; i <= hHitComposition->GetNbinsX(); i++) {
1280  hHitComposition->GetXaxis()->SetBinLabel(i, dets[i - 1].c_str());
1281  }
1282 
1283  vTrackHistos_.push_back(fs->make<TH1F>("h_tracketa", "Track #eta;#eta_{Track};Number of Tracks", 90, -3., 3.));
1284  vTrackHistos_.push_back(fs->make<TH1F>("h_trackphi", "Track #phi;#phi_{Track};Number of Tracks", 90, -M_PI, M_PI));
1285  vTrackHistos_.push_back(fs->make<TH1F>("h_trackNumberOfValidHits", "Track # of valid hits;# of valid hits _{Track};Number of Tracks", 40, 0., 40.));
1286  vTrackHistos_.push_back(fs->make<TH1F>("h_trackNumberOfLostHits", "Track # of lost hits;# of lost hits _{Track};Number of Tracks", 10, 0., 10.));
1287  vTrackHistos_.push_back(fs->make<TH1F>("h_curvature", "Curvature #kappa;#kappa_{Track};Number of Tracks", 100, -.05, .05));
1288  vTrackHistos_.push_back(fs->make<TH1F>("h_curvature_pos", "Curvature |#kappa| Positive Tracks;|#kappa_{pos Track}|;Number of Tracks", 100, .0, .05));
1289  vTrackHistos_.push_back(fs->make<TH1F>("h_curvature_neg", "Curvature |#kappa| Negative Tracks;|#kappa_{neg Track}|;Number of Tracks", 100, .0, .05));
1290  vTrackHistos_.push_back(fs->make<TH1F>("h_diff_curvature", "Curvature |#kappa| Tracks Difference;|#kappa_{Track}|;# Pos Tracks - # Neg Tracks", 100,.0,.05));
1291 
1292  vTrackHistos_.push_back(fs->make<TH1F>("h_chi2", "Track #chi^{2};#chi^{2}_{Track};Number of Tracks", 500, -0.01, 500.));
1293  vTrackHistos_.push_back(fs->make<TH1F>("h_chi2Prob", "#chi^{2} probability;Track Prob(#chi^{2},ndof);Number of Tracks", 100, 0.0, 1.));
1294  vTrackHistos_.push_back(fs->make<TH1F>("h_normchi2", "#chi^{2}/ndof;#chi^{2}/ndof;Number of Tracks", 100, -0.01, 10.));
1295 
1296  //variable binning for chi2/ndof vs. pT
1297  double xBins[19] = {0., 0.15, 0.5, 1., 1.5, 2., 2.5, 3., 3.5, 4., 4.5, 5., 7., 10., 15., 25., 40., 100., 200.};
1298  vTrackHistos_.push_back(fs->make<TH1F>("h_pt", "Track p_{T};p_{T}^{track} [GeV];Number of Tracks", 250, 0., 250));
1299  vTrackHistos_.push_back(fs->make<TH1F>("h_ptrebin", "Track p_{T};p_{T}^{track} [GeV];Number of Tracks", 18, xBins));
1300 
1301  vTrackHistos_.push_back(fs->make<TH1F>("h_ptResolution", "#delta_{p_{T}}/p_{T}^{track};#delta_{p_{T}}/p_{T}^{track};Number of Tracks", 100, 0., 0.5));
1302  vTrackProfiles_.push_back(fs->make<TProfile>("p_d0_vs_phi", "Transverse Impact Parameter vs. #phi;#phi_{Track};#LT d_{0} #GT [cm]", 100, -M_PI, M_PI));
1303  vTrackProfiles_.push_back(fs->make<TProfile>("p_dz_vs_phi", "Longitudinal Impact Parameter vs. #phi;#phi_{Track};#LT d_{z} #GT [cm]", 100, -M_PI, M_PI));
1304  vTrackProfiles_.push_back(fs->make<TProfile>("p_d0_vs_eta", "Transverse Impact Parameter vs. #eta;#eta_{Track};#LT d_{0} #GT [cm]", 100, -M_PI, M_PI));
1305  vTrackProfiles_.push_back(fs->make<TProfile>("p_dz_vs_eta", "Longitudinal Impact Parameter vs. #eta;#eta_{Track};#LT d_{z} #GT [cm]", 100, -M_PI, M_PI));
1306  vTrackProfiles_.push_back(fs->make<TProfile>("p_chi2_vs_phi", "#chi^{2} vs. #phi;#phi_{Track};#LT #chi^{2} #GT", 100, -M_PI, M_PI));
1307  vTrackProfiles_.push_back(fs->make<TProfile>("p_chi2Prob_vs_phi","#chi^{2} probablility vs. #phi;#phi_{Track};#LT #chi^{2} probability#GT",100,-M_PI,M_PI));
1308  vTrackProfiles_.push_back(fs->make<TProfile>("p_chi2Prob_vs_d0", "#chi^{2} probablility vs. |d_{0}|;|d_{0}|[cm];#LT #chi^{2} probability#GT", 100, 0, 80));
1309  vTrackProfiles_.push_back(fs->make<TProfile>("p_chi2Prob_vs_dz", "#chi^{2} probablility vs. dz;d_{z} [cm];#LT #chi^{2} probability#GT", 100, -30, 30));
1310  vTrackProfiles_.push_back(fs->make<TProfile>("p_normchi2_vs_phi", "#chi^{2}/ndof vs. #phi;#phi_{Track};#LT #chi^{2}/ndof #GT", 100, -M_PI, M_PI));
1311  vTrackProfiles_.push_back(fs->make<TProfile>("p_chi2_vs_eta", "#chi^{2} vs. #eta;#eta_{Track};#LT #chi^{2} #GT", 100, -M_PI, M_PI));
1312  vTrackProfiles_.push_back(fs->make<TProfile>("p_normchi2_vs_pt", "norm #chi^{2} vs. p_{T}_{Track}; p_{T}_{Track};#LT #chi^{2}/ndof #GT", 18, xBins));
1313  vTrackProfiles_.push_back(fs->make<TProfile>("p_normchi2_vs_p", "#chi^{2}/ndof vs. p_{Track};p_{Track};#LT #chi^{2}/ndof #GT", 18, xBins));
1314  vTrackProfiles_.push_back(fs->make<TProfile>("p_chi2Prob_vs_eta","#chi^{2} probability vs. #eta;#eta_{Track};#LT #chi^{2} probability #GT",100,-M_PI,M_PI));
1315  vTrackProfiles_.push_back(fs->make<TProfile>("p_normchi2_vs_eta", "#chi^{2}/ndof vs. #eta;#eta_{Track};#LT #chi^{2}/ndof #GT", 100, -M_PI, M_PI));
1316  vTrackProfiles_.push_back(fs->make<TProfile>("p_kappa_vs_phi", "#kappa vs. #phi;#phi_{Track};#kappa", 100, -M_PI, M_PI));
1317  vTrackProfiles_.push_back(fs->make<TProfile>("p_kappa_vs_eta", "#kappa vs. #eta;#eta_{Track};#kappa", 100, -M_PI, M_PI));
1318  vTrackProfiles_.push_back(fs->make<TProfile>("p_ptResolution_vs_phi","#delta_{p_{T}}/p_{T}^{track};#phi^{track};#delta_{p_{T}}/p_{T}^{track}",100,-M_PI,M_PI));
1319  vTrackProfiles_.push_back(fs->make<TProfile>("p_ptResolution_vs_eta","#delta_{p_{T}}/p_{T}^{track};#eta^{track};#delta_{p_{T}}/p_{T}^{track}",100,-M_PI,M_PI));
1320  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_d0_vs_phi","Transverse Impact Parameter vs. #phi;#phi_{Track};d_{0} [cm]", 100, -M_PI, M_PI, 100, -1., 1.));
1321  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_dz_vs_phi","Longitudinal Impact Parameter vs. #phi;#phi_{Track};d_{z} [cm]",100,-M_PI,M_PI,100,-100.,100.));
1322  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_d0_vs_eta","Transverse Impact Parameter vs. #eta;#eta_{Track};d_{0} [cm]", 100, -M_PI, M_PI, 100, -1., 1.));
1323  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_dz_vs_eta","Longitudinal Impact Parameter vs. #eta;#eta_{Track};d_{z} [cm]",100,-M_PI,M_PI, 100,-100.,100.));
1324  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_chi2_vs_phi", "#chi^{2} vs. #phi;#phi_{Track};#chi^{2}", 100, -M_PI, M_PI, 500, 0., 500.));
1325  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_chi2Prob_vs_phi","#chi^{2} probability vs. #phi;#phi_{Track};#chi^{2} probability",100,-M_PI,M_PI,100,0.,1.));
1326  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_chi2Prob_vs_d0","#chi^{2} probability vs. |d_{0}|;|d_{0}| [cm];#chi^{2} probability",100,0,80,100,0.,1.));
1327  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_normchi2_vs_phi", "#chi^{2}/ndof vs. #phi;#phi_{Track};#chi^{2}/ndof", 100, -M_PI, M_PI, 100, 0., 10.));
1328  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_chi2_vs_eta", "#chi^{2} vs. #eta;#eta_{Track};#chi^{2}", 100, -M_PI, M_PI, 500, 0., 500.));
1329  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_chi2Prob_vs_eta","#chi^{2} probaility vs. #eta;#eta_{Track};#chi^{2} probability",100,-M_PI,M_PI,100,0.,1.));
1330  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_normchi2_vs_eta", "#chi^{2}/ndof vs. #eta;#eta_{Track};#chi^{2}/ndof", 100, -M_PI, M_PI, 100, 0., 10.));
1331  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_kappa_vs_phi", "#kappa vs. #phi;#phi_{Track};#kappa", 100, -M_PI, M_PI, 100, .0, .05));
1332  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_kappa_vs_eta", "#kappa vs. #eta;#eta_{Track};#kappa", 100, -M_PI, M_PI, 100, .0, .05));
1333  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_normchi2_vs_kappa", "#kappa vs. #chi^{2}/ndof;#chi^{2}/ndof;#kappa", 100, 0., 10, 100, -.03, .03));
1334 
1335  // clang-format on
1336 
1337  firstEvent_ = true;
1338 
1339  } //beginJob
1340 
1341  void endJob() override {
1342  edm::LogPrint("DMRChecker") << "*******************************" << std::endl;
1343  edm::LogPrint("DMRChecker") << "Events run in total: " << ievt << std::endl;
1344  edm::LogPrint("DMRChecker") << "n. tracks: " << itrks << std::endl;
1345  edm::LogPrint("DMRChecker") << "*******************************" << std::endl;
1346 
1347  int nFiringTriggers = triggerMap_.size();
1348  edm::LogPrint("DMRChecker") << "firing triggers: " << nFiringTriggers << std::endl;
1349  edm::LogPrint("DMRChecker") << "*******************************" << std::endl;
1350 
1351  tksByTrigger_ = fs->make<TH1D>(
1352  "tksByTrigger", "tracks by HLT path;;% of # traks", nFiringTriggers, -0.5, nFiringTriggers - 0.5);
1353  evtsByTrigger_ = fs->make<TH1D>(
1354  "evtsByTrigger", "events by HLT path;;% of # events", nFiringTriggers, -0.5, nFiringTriggers - 0.5);
1355 
1356  int i = 0;
1357 
1358  for (std::map<std::string, std::pair<int, int> >::iterator it = triggerMap_.begin(); it != triggerMap_.end();
1359  ++it) {
1360  i++;
1361 
1362  double trkpercent = ((it->second).second) * 100. / double(itrks);
1363  double evtpercent = ((it->second).first) * 100. / double(ievt);
1364 
1365  std::cout.precision(4);
1366 
1367  edm::LogPrint("DMRChecker") << "HLT path: " << std::setw(60) << left << it->first << " | events firing: " << right
1368  << std::setw(8) << (it->second).first << " (" << setw(8) << fixed << evtpercent
1369  << "%)"
1370  << " | tracks collected: " << std::setw(10) << (it->second).second << " (" << setw(8)
1371  << fixed << trkpercent << "%)";
1372 
1373  tksByTrigger_->SetBinContent(i, trkpercent);
1374  tksByTrigger_->GetXaxis()->SetBinLabel(i, (it->first).c_str());
1375 
1376  evtsByTrigger_->SetBinContent(i, evtpercent);
1377  evtsByTrigger_->GetXaxis()->SetBinLabel(i, (it->first).c_str());
1378  }
1379 
1380  int nRuns = conditionsMap_.size();
1381 
1382  vector<int> theRuns_;
1383  for (map<int, std::pair<int, float> >::iterator it = conditionsMap_.begin(); it != conditionsMap_.end(); ++it) {
1384  theRuns_.push_back(it->first);
1385  }
1386 
1387  sort(theRuns_.begin(), theRuns_.end());
1388  edm::LogPrint("DMRChecker") << "*******************************" << std::endl;
1389  edm::LogPrint("DMRChecker") << "first run: " << theRuns_[0] << std::endl;
1390  edm::LogPrint("DMRChecker") << "last run: " << theRuns_[theRuns_.size() - 1] << std::endl;
1391  edm::LogPrint("DMRChecker") << "considered runs: " << nRuns << std::endl;
1392  edm::LogPrint("DMRChecker") << "*******************************" << std::endl;
1393 
1394  modeByRun_ = fs->make<TH1D>(
1395  "modeByRun", "Strip APV mode by run number;;APV mode (-1=deco,+1=peak)", nRuns, -0.5, nRuns - 0.5);
1396  fieldByRun_ = fs->make<TH1D>(
1397  "fieldByRun", "CMS B-field intensity by run number;;B-field intensity [T]", nRuns, -0.5, nRuns - 0.5);
1398 
1399  tracksByRun_ =
1400  fs->make<TH1D>("tracksByRun", "n. AlCaReco Tracks by run number;;n. of tracks", nRuns, -0.5, nRuns - 0.5);
1401  hitsByRun_ = fs->make<TH1D>("histByRun", "n. of hits by run number;;n. of hits", nRuns, -0.5, nRuns - 0.5);
1402 
1403  trackRatesByRun_ = fs->make<TH1D>(
1404  "trackRatesByRun", "rate of AlCaReco Tracks by run number;;n. of tracks/s", nRuns, -0.5, nRuns - 0.5);
1405  eventRatesByRun_ = fs->make<TH1D>(
1406  "eventRatesByRun", "rate of AlCaReco Events by run number;;n. of events/s", nRuns, -0.5, nRuns - 0.5);
1407 
1408  hitsinBPixByRun_ = fs->make<TH1D>(
1409  "histinBPixByRun", "n. of hits in BPix by run number;;n. of BPix hits", nRuns, -0.5, nRuns - 0.5);
1410  hitsinFPixByRun_ = fs->make<TH1D>(
1411  "histinFPixByRun", "n. of hits in FPix by run number;;n. of FPix hits", nRuns, -0.5, nRuns - 0.5);
1412 
1413  int indexing(0);
1414  for (int the_r = theRuns_[0]; the_r <= theRuns_[theRuns_.size() - 1]; the_r++) {
1415  if (conditionsMap_.find(the_r)->second.first != 0) {
1416  indexing++;
1417  double runTime = timeMap_.find(the_r)->second;
1418 
1419  edm::LogPrint("DMRChecker") << "run:" << the_r << " | isPeak: " << std::setw(4)
1420  << conditionsMap_.find(the_r)->second.first
1421  << "| B-field: " << conditionsMap_.find(the_r)->second.second << " [T]"
1422  << "| events: " << setw(10) << runInfoMap_.find(the_r)->second.first
1423  << "(rate: " << setw(10) << (runInfoMap_.find(the_r)->second.first) / runTime
1424  << " ev/s)"
1425  << ", tracks " << setw(10) << runInfoMap_.find(the_r)->second.second
1426  << "(rate: " << setw(10) << (runInfoMap_.find(the_r)->second.second) / runTime
1427  << " trk/s)" << std::endl;
1428 
1429  // int the_bin = modeByRun_->GetXaxis()->FindBin(the_r);
1430  modeByRun_->SetBinContent(indexing, conditionsMap_.find(the_r)->second.first);
1431  modeByRun_->GetXaxis()->SetBinLabel(indexing, Form("%d", the_r));
1432  fieldByRun_->SetBinContent(indexing, conditionsMap_.find(the_r)->second.second);
1433  fieldByRun_->GetXaxis()->SetBinLabel(indexing, Form("%d", the_r));
1434 
1435  tracksByRun_->SetBinContent(indexing, runInfoMap_.find(the_r)->second.first);
1436  tracksByRun_->GetXaxis()->SetBinLabel(indexing, Form("%d", the_r));
1437  hitsByRun_->SetBinContent(indexing, runInfoMap_.find(the_r)->second.second);
1438  hitsByRun_->GetXaxis()->SetBinLabel(indexing, Form("%d", the_r));
1439 
1440  hitsinBPixByRun_->SetBinContent(indexing, (runHitsMap_.find(the_r)->second)[0]);
1441  hitsinBPixByRun_->GetXaxis()->SetBinLabel(indexing, Form("%d", the_r));
1442  hitsinFPixByRun_->SetBinContent(indexing, (runHitsMap_.find(the_r)->second)[1]);
1443  hitsinFPixByRun_->GetXaxis()->SetBinLabel(indexing, Form("%d", the_r));
1444 
1445  trackRatesByRun_->SetBinContent(indexing, (runInfoMap_.find(the_r)->second.second) / runTime);
1446  trackRatesByRun_->GetXaxis()->SetBinLabel(indexing, Form("%d", the_r));
1447  eventRatesByRun_->SetBinContent(indexing, (runInfoMap_.find(the_r)->second.first) / runTime);
1448  eventRatesByRun_->GetXaxis()->SetBinLabel(indexing, Form("%d", the_r));
1449 
1450  constexpr const char *subdets[]{"BPix", "FPix", "TIB", "TID", "TOB", "TEC"};
1451 
1452  edm::LogPrint("DMRChecker") << "*******************************" << std::endl;
1453  edm::LogPrint("DMRChecker") << "Hits by Sub-det" << std::endl;
1454  int si = 0;
1455  for (const auto &entry : runHitsMap_.find(the_r)->second) {
1456  edm::LogPrint("DMRChecker") << subdets[si] << " " << entry << std::endl;
1457  si++;
1458  }
1459  edm::LogPrint("DMRChecker") << "*******************************" << std::endl;
1460  }
1461 
1462  // modeByRun_->GetXaxis()->SetBinLabel(the_r-theRuns_[0]+1,(const char*)the_r);
1463  }
1464 
1465  // DMRs
1466 
1467  TFileDirectory DMeanR = fs->mkdir("DMRs");
1468 
1469  DMRBPixX_ = DMeanR.make<TH1D>("DMRBPix-X", "DMR of BPix-X;mean of X-residuals;modules", 100., -200, 200);
1470  DMRBPixY_ = DMeanR.make<TH1D>("DMRBPix-Y", "DMR of BPix-Y;mean of Y-residuals;modules", 100., -200, 200);
1471 
1472  DMRFPixX_ = DMeanR.make<TH1D>("DMRFPix-X", "DMR of FPix-X;mean of X-residuals;modules", 100., -200, 200);
1473  DMRFPixY_ = DMeanR.make<TH1D>("DMRFPix-Y", "DMR of FPix-Y;mean of Y-residuals;modules", 100., -200, 200);
1474 
1475  DMRTIB_ = DMeanR.make<TH1D>("DMRTIB", "DMR of TIB;mean of X-residuals;modules", 100., -200, 200);
1476  DMRTOB_ = DMeanR.make<TH1D>("DMRTOB", "DMR of TOB;mean of X-residuals;modules", 100., -200, 200);
1477 
1478  DMRTID_ = DMeanR.make<TH1D>("DMRTID", "DMR of TID;mean of X-residuals;modules", 100., -200, 200);
1479  DMRTEC_ = DMeanR.make<TH1D>("DMRTEC", "DMR of TEC;mean of X-residuals;modules", 100., -200, 200);
1480 
1481  TFileDirectory DMeanRSplit = fs->mkdir("SplitDMRs");
1482 
1483  DMRBPixXSplit_ = bookSplitDMRHistograms(DMeanRSplit, "BPix", "X", true);
1484  DMRBPixYSplit_ = bookSplitDMRHistograms(DMeanRSplit, "BPix", "Y", true);
1485 
1486  DMRFPixXSplit_ = bookSplitDMRHistograms(DMeanRSplit, "FPix", "X", false);
1487  DMRFPixYSplit_ = bookSplitDMRHistograms(DMeanRSplit, "FPix", "Y", false);
1488 
1489  DMRTIBSplit_ = bookSplitDMRHistograms(DMeanRSplit, "TIB", "X", true);
1490  DMRTOBSplit_ = bookSplitDMRHistograms(DMeanRSplit, "TOB", "X", true);
1491 
1492  // DRnRs
1493  TFileDirectory DRnRs = fs->mkdir("DRnRs");
1494 
1495  DRnRBPixX_ = DRnRs.make<TH1D>("DRnRBPix-X", "DRnR of BPix-X;rms of normalized X-residuals;modules", 100., 0., 3.);
1496  DRnRBPixY_ = DRnRs.make<TH1D>("DRnRBPix-Y", "DRnR of BPix-Y;rms of normalized Y-residuals;modules", 100., 0., 3.);
1497 
1498  DRnRFPixX_ = DRnRs.make<TH1D>("DRnRFPix-X", "DRnR of FPix-X;rms of normalized X-residuals;modules", 100., 0., 3.);
1499  DRnRFPixY_ = DRnRs.make<TH1D>("DRnRFPix-Y", "DRnR of FPix-Y;rms of normalized Y-residuals;modules", 100., 0., 3.);
1500 
1501  DRnRTIB_ = DRnRs.make<TH1D>("DRnRTIB", "DRnR of TIB;rms of normalized X-residuals;modules", 100., 0., 3.);
1502  DRnRTOB_ = DRnRs.make<TH1D>("DRnRTOB", "DRnR of TOB;rms of normalized Y-residuals;modules", 100., 0., 3.);
1503 
1504  DRnRTID_ = DRnRs.make<TH1D>("DRnRTID", "DRnR of TID;rms of normalized X-residuals;modules", 100., 0., 3.);
1505  DRnRTEC_ = DRnRs.make<TH1D>("DRnRTEC", "DRnR of TEC;rms of normalized Y-residuals;modules", 100., 0., 3.);
1506 
1507  // initialize the topology first
1508 
1509  SiPixelPI::PhaseInfo ph_info(phase_);
1510  const char *path_toTopologyXML = ph_info.pathToTopoXML();
1511  const TrackerTopology standaloneTopo =
1513 
1514  // initialize PixelRegionContainers
1515  PixelDMRS_x_ByLayer = std::make_unique<PixelRegions::PixelRegionContainers>(&standaloneTopo, ph_info.phase());
1516  PixelDMRS_y_ByLayer = std::make_unique<PixelRegions::PixelRegionContainers>(&standaloneTopo, ph_info.phase());
1517 
1518  // book PixelRegionContainers
1519  PixelDMRS_x_ByLayer->bookAll("Barrel Pixel DMRs", "median(x'_{pred}-x'_{hit}) [#mum]", "# modules", 100, -50, 50);
1520  PixelDMRS_y_ByLayer->bookAll("Barrel Pixel DMRs", "median(y'_{pred}-y'_{hit}) [#mum]", "# modules", 100, -50, 50);
1521 
1522  /*
1523  auto dets = PixelRegions::attachedDets(PixelRegions::PixelId::L1,&m_standaloneTopo,isPhase1_);
1524  for(const auto& det : dets){
1525  auto myLocalTopo = PixelDMRS_x_ByLayer->getTheTTopo();
1526  edm::LogVerbatim("DMRChecker") << myLocalTopo->print(det) << std::endl;
1527  }
1528  */
1529 
1530  // pixel
1531 
1532  for (auto &bpixid : resDetailsBPixX_) {
1533  DMRBPixX_->Fill(bpixid.second.runningMeanOfRes_);
1534  if (phase_ == SiPixelPI::phase::one)
1535  pixelmap->fillBarrelBin("DMRsX", bpixid.first, bpixid.second.runningMeanOfRes_);
1536 
1537  //auto myLocalTopo = PixelDMRS_x_ByLayer->getTheTopo();
1538  //edm::LogPrint("DMRChecker") << myLocalTopo->print(bpixid.first) << std::endl;
1539 
1540  PixelDMRS_x_ByLayer->fill(bpixid.first, bpixid.second.runningMeanOfRes_);
1541 
1542  // split DMR
1543  if (bpixid.second.rDirection > 0) {
1544  DMRBPixXSplit_[0]->Fill(bpixid.second.runningMeanOfRes_);
1545  } else {
1546  DMRBPixXSplit_[1]->Fill(bpixid.second.runningMeanOfRes_);
1547  }
1548 
1549  if (bpixid.second.hitCount < 2)
1550  DRnRBPixX_->Fill(-1);
1551  else
1552  DRnRBPixX_->Fill(sqrt(bpixid.second.runningNormVarOfRes_ / (bpixid.second.hitCount - 1)));
1553  }
1554 
1555  for (auto &bpixid : resDetailsBPixY_) {
1556  DMRBPixY_->Fill(bpixid.second.runningMeanOfRes_);
1557  if (phase_ == SiPixelPI::phase::one)
1558  pixelmap->fillBarrelBin("DMRsY", bpixid.first, bpixid.second.runningMeanOfRes_);
1559  PixelDMRS_y_ByLayer->fill(bpixid.first, bpixid.second.runningMeanOfRes_);
1560 
1561  // split DMR
1562  if (bpixid.second.rDirection > 0) {
1563  DMRBPixYSplit_[0]->Fill(bpixid.second.runningMeanOfRes_);
1564  } else {
1565  DMRBPixYSplit_[1]->Fill(bpixid.second.runningMeanOfRes_);
1566  }
1567 
1568  if (bpixid.second.hitCount < 2)
1569  DRnRBPixY_->Fill(-1);
1570  else
1571  DRnRBPixY_->Fill(sqrt(bpixid.second.runningNormVarOfRes_ / (bpixid.second.hitCount - 1)));
1572  }
1573 
1574  for (auto &fpixid : resDetailsFPixX_) {
1575  DMRFPixX_->Fill(fpixid.second.runningMeanOfRes_);
1576  if (phase_ == SiPixelPI::phase::one)
1577  pixelmap->fillForwardBin("DMRsX", fpixid.first, fpixid.second.runningMeanOfRes_);
1578  PixelDMRS_x_ByLayer->fill(fpixid.first, fpixid.second.runningMeanOfRes_);
1579 
1580  // split DMR
1581  if (fpixid.second.zDirection > 0) {
1582  DMRFPixXSplit_[0]->Fill(fpixid.second.runningMeanOfRes_);
1583  } else {
1584  DMRFPixXSplit_[1]->Fill(fpixid.second.runningMeanOfRes_);
1585  }
1586 
1587  if (fpixid.second.hitCount < 2)
1588  DRnRFPixX_->Fill(-1);
1589  else
1590  DRnRFPixX_->Fill(sqrt(fpixid.second.runningNormVarOfRes_ / (fpixid.second.hitCount - 1)));
1591  }
1592 
1593  for (auto &fpixid : resDetailsFPixY_) {
1594  DMRFPixY_->Fill(fpixid.second.runningMeanOfRes_);
1595  if (phase_ == SiPixelPI::phase::one)
1596  pixelmap->fillForwardBin("DMRsY", fpixid.first, fpixid.second.runningMeanOfRes_);
1597  PixelDMRS_y_ByLayer->fill(fpixid.first, fpixid.second.runningMeanOfRes_);
1598 
1599  // split DMR
1600  if (fpixid.second.zDirection > 0) {
1601  DMRFPixYSplit_[0]->Fill(fpixid.second.runningMeanOfRes_);
1602  } else {
1603  DMRFPixYSplit_[1]->Fill(fpixid.second.runningMeanOfRes_);
1604  }
1605 
1606  if (fpixid.second.hitCount < 2)
1607  DRnRFPixY_->Fill(-1);
1608  else
1609  DRnRFPixY_->Fill(sqrt(fpixid.second.runningNormVarOfRes_ / (fpixid.second.hitCount - 1)));
1610  }
1611 
1612  // strips
1613 
1614  for (auto &tibid : resDetailsTIB_) {
1615  DMRTIB_->Fill(tibid.second.runningMeanOfRes_);
1616 
1617  // split DMR
1618  if (tibid.second.rDirection > 0) {
1619  DMRTIBSplit_[0]->Fill(tibid.second.runningMeanOfRes_);
1620  } else {
1621  DMRTIBSplit_[1]->Fill(tibid.second.runningMeanOfRes_);
1622  }
1623 
1624  if (tibid.second.hitCount < 2)
1625  DRnRTIB_->Fill(-1);
1626  else
1627  DRnRTIB_->Fill(sqrt(tibid.second.runningNormVarOfRes_ / (tibid.second.hitCount - 1)));
1628  }
1629 
1630  for (auto &tobid : resDetailsTOB_) {
1631  DMRTOB_->Fill(tobid.second.runningMeanOfRes_);
1632 
1633  // split DMR
1634  if (tobid.second.rDirection > 0) {
1635  DMRTOBSplit_[0]->Fill(tobid.second.runningMeanOfRes_);
1636  } else {
1637  DMRTOBSplit_[1]->Fill(tobid.second.runningMeanOfRes_);
1638  }
1639 
1640  if (tobid.second.hitCount < 2)
1641  DRnRTOB_->Fill(-1);
1642  else
1643  DRnRTOB_->Fill(sqrt(tobid.second.runningNormVarOfRes_ / (tobid.second.hitCount - 1)));
1644  }
1645 
1646  for (auto &tidid : resDetailsTID_) {
1647  DMRTID_->Fill(tidid.second.runningMeanOfRes_);
1648 
1649  if (tidid.second.hitCount < 2)
1650  DRnRTID_->Fill(-1);
1651  else
1652  DRnRTID_->Fill(sqrt(tidid.second.runningNormVarOfRes_ / (tidid.second.hitCount - 1)));
1653  }
1654 
1655  for (auto &tecid : resDetailsTEC_) {
1656  DMRTEC_->Fill(tecid.second.runningMeanOfRes_);
1657 
1658  if (tecid.second.hitCount < 2)
1659  DRnRTEC_->Fill(-1);
1660  else
1661  DRnRTEC_->Fill(sqrt(tecid.second.runningNormVarOfRes_ / (tecid.second.hitCount - 1)));
1662  }
1663 
1664  edm::LogPrint("DMRChecker") << "n. of bpix modules " << resDetailsBPixX_.size() << std::endl;
1665  edm::LogPrint("DMRChecker") << "n. of fpix modules " << resDetailsFPixX_.size() << std::endl;
1666 
1667  if (phase_ == SiPixelPI::phase::zero) {
1668  pmap->save(true, 0, 0, "PixelHitMap.pdf", 600, 800);
1669  pmap->save(true, 0, 0, "PixelHitMap.png", 500, 750);
1670  }
1671 
1672  tmap->save(true, 0, 0, "StripHitMap.pdf");
1673  tmap->save(true, 0, 0, "StripHitMap.png");
1674 
1675  if (phase_ == SiPixelPI::phase::one) {
1676  gStyle->SetPalette(kRainBow);
1677  pixelmap->beautifyAllHistograms();
1678 
1679  TCanvas cBX("CanvXBarrel", "CanvXBarrel", 1200, 1000);
1680  pixelmap->DrawBarrelMaps("DMRsX", cBX);
1681  cBX.SaveAs("pixelBarrelDMR_x.png");
1682 
1683  TCanvas cFX("CanvXForward", "CanvXForward", 1600, 1000);
1684  pixelmap->DrawForwardMaps("DMRsX", cFX);
1685  cFX.SaveAs("pixelForwardDMR_x.png");
1686 
1687  TCanvas cBY("CanvYBarrel", "CanvYBarrel", 1200, 1000);
1688  pixelmap->DrawBarrelMaps("DMRsY", cBY);
1689  cBY.SaveAs("pixelBarrelDMR_y.png");
1690 
1691  TCanvas cFY("CanvXForward", "CanvXForward", 1600, 1000);
1692  pixelmap->DrawForwardMaps("DMRsY", cFY);
1693  cFY.SaveAs("pixelForwardDMR_y.png");
1694  }
1695 
1696  // take care now of the 1D histograms
1697  gStyle->SetOptStat("emr");
1698  PixelDMRS_x_ByLayer->beautify(2, 0);
1699  PixelDMRS_y_ByLayer->beautify(2, 0);
1700 
1701  TCanvas DMRxBarrel("DMRxBarrelCanv", "x-coordinate", 1400, 1200);
1702  DMRxBarrel.Divide(2, 2);
1703  PixelDMRS_x_ByLayer->draw(DMRxBarrel, true, "HISTS");
1704  adjustCanvases(DMRxBarrel, true);
1705  for (unsigned int c = 1; c <= 4; c++) {
1706  DMRxBarrel.cd(c)->Update();
1707  }
1708  PixelDMRS_x_ByLayer->stats();
1709 
1710  TCanvas DMRxForward("DMRxForwardCanv", "x-coordinate", 1400, 1200);
1711  DMRxForward.Divide(4, 3);
1712  PixelDMRS_x_ByLayer->draw(DMRxForward, false, "HISTS");
1713  adjustCanvases(DMRxForward, false);
1714  for (unsigned int c = 1; c <= 12; c++) {
1715  DMRxForward.cd(c)->Update();
1716  }
1717  PixelDMRS_x_ByLayer->stats();
1718 
1719  DMRxBarrel.SaveAs("DMR_x_Barrel_ByLayer.png");
1720  DMRxForward.SaveAs("DMR_x_Forward_ByRing.png");
1721 
1722  TCanvas DMRyBarrel("DMRyBarrelCanv", "y-coordinate", 1400, 1200);
1723  DMRyBarrel.Divide(2, 2);
1724  PixelDMRS_y_ByLayer->draw(DMRyBarrel, true, "HISTS");
1725  adjustCanvases(DMRyBarrel, true);
1726  for (unsigned int c = 1; c <= 4; c++) {
1727  DMRyBarrel.cd(c)->Update();
1728  }
1729  PixelDMRS_y_ByLayer->stats();
1730 
1731  TCanvas DMRyForward("DMRyForwardCanv", "y-coordinate", 1400, 1200);
1732  DMRyForward.Divide(4, 3);
1733  PixelDMRS_y_ByLayer->draw(DMRyForward, false, "HISTS");
1734  adjustCanvases(DMRyForward, false);
1735  for (unsigned int c = 1; c <= 12; c++) {
1736  DMRyForward.cd(c)->Update();
1737  }
1738  PixelDMRS_y_ByLayer->stats();
1739 
1740  DMRyBarrel.SaveAs("DMR_y_Barrel_ByLayer.png");
1741  DMRyForward.SaveAs("DMR_y_Forward_ByRing.png");
1742  }
1743 
1744  //*************************************************************
1745  // Adjust canvas for DMRs
1746  //*************************************************************
1747  void adjustCanvases(TCanvas &canvas, bool isBarrel) {
1748  unsigned int maxPads = isBarrel ? 4 : 12;
1749  for (unsigned int c = 1; c <= maxPads; c++) {
1750  canvas.cd(c);
1751  SiPixelPI::adjustCanvasMargins(canvas.cd(c), 0.06, 0.12, 0.12, 0.05);
1752  }
1753 
1754  auto ltx = TLatex();
1755  ltx.SetTextFont(62);
1756  ltx.SetTextSize(0.05);
1757  ltx.SetTextAlign(11);
1758 
1759  std::string toAppend = canvas.GetTitle();
1760 
1761  for (unsigned int c = 1; c <= maxPads; c++) {
1762  auto index = isBarrel ? c - 1 : c + 3;
1763  canvas.cd(c);
1764  ltx.DrawLatexNDC(gPad->GetLeftMargin(),
1765  1 - gPad->GetTopMargin() + 0.01,
1766  (PixelRegions::IDlabels.at(index) + " " + toAppend).c_str());
1767  }
1768  }
1769 
1770  //*************************************************************
1771  // check if the hit is 2D
1772  //*************************************************************
1773  bool isHit2D(const TrackingRecHit &hit) {
1774  bool countStereoHitAs2D_ = true;
1775  // we count SiStrip stereo modules as 2D if selected via countStereoHitAs2D_
1776  // (since they provide theta information)
1777  if (!hit.isValid() ||
1778  (hit.dimension() < 2 && !countStereoHitAs2D_ && !dynamic_cast<const SiStripRecHit1D *>(&hit))) {
1779  return false; // real RecHit1D - but SiStripRecHit1D depends on countStereoHitAs2D_
1780  } else {
1781  const DetId detId(hit.geographicalId());
1782  if (detId.det() == DetId::Tracker) {
1783  if (detId.subdetId() == kBPIX || detId.subdetId() == kFPIX) {
1784  return true; // pixel is always 2D
1785  } else { // should be SiStrip now
1786  const SiStripDetId stripId(detId);
1787  if (stripId.stereo())
1788  return countStereoHitAs2D_; // stereo modules
1789  else if (dynamic_cast<const SiStripRecHit1D *>(&hit) || dynamic_cast<const SiStripRecHit2D *>(&hit))
1790  return false; // rphi modules hit
1791  //the following two are not used any more since ages...
1792  else if (dynamic_cast<const SiStripMatchedRecHit2D *>(&hit))
1793  return true; // matched is 2D
1794  else if (dynamic_cast<const ProjectedSiStripRecHit2D *>(&hit)) {
1795  const ProjectedSiStripRecHit2D *pH = static_cast<const ProjectedSiStripRecHit2D *>(&hit);
1796  return (countStereoHitAs2D_ && this->isHit2D(pH->originalHit())); // depends on original...
1797  } else {
1798  edm::LogError("UnkownType") << "@SUB=DMRChecker::isHit2D"
1799  << "Tracker hit not in pixel, neither SiStripRecHit[12]D nor "
1800  << "SiStripMatchedRecHit2D nor ProjectedSiStripRecHit2D.";
1801  return false;
1802  }
1803  }
1804  } else { // not tracker??
1805  edm::LogWarning("DetectorMismatch") << "@SUB=DMRChecker::isHit2D"
1806  << "Hit not in tracker with 'official' dimension >=2.";
1807  return true; // dimension() >= 2 so accept that...
1808  }
1809  }
1810  // never reached...
1811  }
1812 
1813  //*************************************************************
1814  // Generic booker of split DMRs
1815  //*************************************************************
1817  std::string subdet,
1818  std::string vartype,
1819  bool isBarrel) {
1820  TH1F::SetDefaultSumw2(kTRUE);
1821 
1822  std::array<TH1D *, 2> out;
1823  std::array<std::string, 2> sign_name = {{"plus", "minus"}};
1824  std::array<std::string, 2> sign = {{">0", "<0"}};
1825  for (unsigned int i = 0; i < 2; i++) {
1826  const char *name_;
1827  const char *title_;
1828  const char *axisTitle_;
1829 
1830  if (isBarrel) {
1831  name_ = Form("DMR%s_%s_rDir%s", subdet.c_str(), vartype.c_str(), sign_name[i].c_str());
1832  title_ = Form("Split DMR of %s-%s (rDir%s)", subdet.c_str(), vartype.c_str(), sign[i].c_str());
1833  axisTitle_ = Form("mean of %s-residuals (rDir%s);modules", vartype.c_str(), sign[i].c_str());
1834  } else {
1835  name_ = Form("DMR%s_%s_zDir%s", subdet.c_str(), vartype.c_str(), sign_name[i].c_str());
1836  title_ = Form("Split DMR of %s-%s (zDir%s)", subdet.c_str(), vartype.c_str(), sign[i].c_str());
1837  axisTitle_ = Form("mean of %s-residuals (zDir%s);modules", vartype.c_str(), sign[i].c_str());
1838  }
1839 
1840  out[i] = dir.make<TH1D>(name_, fmt::sprintf("%s;%s", title_, axisTitle_).c_str(), 100., -200, 200);
1841  }
1842  return out;
1843  }
1844 
1845  //*************************************************************
1846  // Generic booker function
1847  //*************************************************************
1848  std::map<unsigned int, TH1D *> bookResidualsHistogram(
1849  TFileDirectory dir, unsigned int theNLayers, std::string resType, std::string varType, std::string detType) {
1850  TH1F::SetDefaultSumw2(kTRUE);
1851 
1852  std::pair<double, double> limits;
1853 
1854  if (varType.find("Res") != std::string::npos) {
1855  limits = std::make_pair(-1000., 1000);
1856  } else {
1857  limits = std::make_pair(-3., 3.);
1858  }
1859 
1860  std::map<unsigned int, TH1D *> h;
1861 
1862  for (unsigned int i = 1; i <= theNLayers; i++) {
1863  const char *name_;
1864  const char *title_;
1865  const char *xAxisTitle_;
1866 
1867  if (varType.find("Res") != std::string::npos) {
1868  xAxisTitle_ = ("res_{" + resType + "'} [#mum]").c_str();
1869  } else {
1870  xAxisTitle_ = ("res_{" + resType + "'}/#sigma_{res_{" + resType + "`}}").c_str();
1871  }
1872 
1873  unsigned int side = -1;
1874  if (detType.find("FPix") != std::string::npos) {
1875  side = (i - 1) / 3 + 1;
1876  unsigned int plane = (i - 1) % 3 + 1;
1877 
1878  std::string theSide = "";
1879  if (side == 1) {
1880  theSide = "Z-";
1881  } else {
1882  theSide = "Z+";
1883  }
1884 
1885  name_ = Form("h_%s%s%s_side%i_disk%i", detType.c_str(), varType.c_str(), resType.c_str(), side, plane);
1886  title_ = Form("%s (%s, disk %i) track %s-%s;%s;hits",
1887  detType.c_str(),
1888  theSide.c_str(),
1889  plane,
1890  resType.c_str(),
1891  varType.c_str(),
1892  xAxisTitle_);
1893 
1894  } else {
1895  name_ = Form("h_%s%s%s_layer%i", detType.c_str(), varType.c_str(), resType.c_str(), i);
1896  title_ = Form(
1897  "%s (layer %i) track %s-%s;%s;hits", detType.c_str(), i, resType.c_str(), varType.c_str(), xAxisTitle_);
1898 
1899  //edm::LogPrint("DMRChecker")<<"bookResidualsHistogram(): "<<i<<" layer:"<<i<<std::endl;
1900  }
1901 
1902  h[i] = dir.make<TH1D>(name_, title_, 100, limits.first, limits.second);
1903  }
1904 
1905  return h;
1906  }
1907 
1908  //*************************************************************
1909  // Generic filler function
1910  //*************************************************************
1911  void fillByIndex(std::map<unsigned int, TH1D *> &h, unsigned int index, double x) {
1912  if (h.count(index) != 0) {
1913  //if(TString(h[index]->GetName()).Contains("BPix"))
1914  //edm::LogPrint("DMRChecker")<<"fillByIndex() index: "<< index << " filling histogram: "<< h[index]->GetName() << std::endl;
1915 
1916  double min = h[index]->GetXaxis()->GetXmin();
1917  double max = h[index]->GetXaxis()->GetXmax();
1918  if (x < min)
1919  h[index]->Fill(min);
1920  else if (x >= max)
1921  h[index]->Fill(0.99999 * max);
1922  else
1923  h[index]->Fill(x);
1924  }
1925  }
1926 
1927  //*************************************************************
1928  // Implementation of the online variance algorithm
1929  // as in https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online_algorithm
1930  //*************************************************************
1931  void updateOnlineMomenta(running::estimatorMap &myDetails, uint32_t theID, float the_data, float the_pull) {
1932  myDetails[theID].hitCount += 1;
1933 
1934  float delta = 0;
1935  float n_delta = 0;
1936 
1937  if (myDetails[theID].hitCount != 1) {
1938  delta = the_data - myDetails[theID].runningMeanOfRes_;
1939  n_delta = the_pull - myDetails[theID].runningNormMeanOfRes_;
1940  myDetails[theID].runningMeanOfRes_ += (delta / myDetails[theID].hitCount);
1941  myDetails[theID].runningNormMeanOfRes_ += (n_delta / myDetails[theID].hitCount);
1942  } else {
1943  myDetails[theID].runningMeanOfRes_ = the_data;
1944  myDetails[theID].runningNormMeanOfRes_ = the_pull;
1945  }
1946 
1947  float delta2 = the_data - myDetails[theID].runningMeanOfRes_;
1948  float n_delta2 = the_pull - myDetails[theID].runningNormMeanOfRes_;
1949 
1950  myDetails[theID].runningVarOfRes_ += delta * delta2;
1951  myDetails[theID].runningNormVarOfRes_ += n_delta * n_delta2;
1952  }
1953 
1954  //*************************************************************
1955  // Fill the histograms using the running::estimatorMap
1956  //**************************************************************
1957  void fillDMRs(const running::estimatorMap &myDetails,
1958  TH1D *DMR,
1959  TH1D *DRnR,
1960  std::array<TH1D *, 2> DMRSplit,
1961  std::unique_ptr<PixelRegions::PixelRegionContainers> regionalDMR) {
1962  for (const auto &element : myDetails) {
1963  // DMR
1964  DMR->Fill(element.second.runningMeanOfRes_);
1965 
1966  // DMR by layer
1967  if (regionalDMR.get()) {
1968  regionalDMR->fill(element.first, element.second.runningMeanOfRes_);
1969  }
1970 
1971  // split DMR
1972  if (element.second.rOrZDirection > 0) {
1973  DMRSplit[0]->Fill(element.second.runningMeanOfRes_);
1974  } else {
1975  DMRSplit[1]->Fill(element.second.runningMeanOfRes_);
1976  }
1977 
1978  // DRnR
1979  if (element.second.hitCount < 2) {
1980  DRnR->Fill(-1);
1981  } else {
1982  DRnR->Fill(sqrt(element.second.runningNormVarOfRes_ / (element.second.hitCount - 1)));
1983  }
1984  }
1985  }
1986 };
1987 
1988 //*************************************************************
1990 //*************************************************************
1991 {
1993  desc.setComment("Generic track analyzer to check ALCARECO sample quantities / compute fast DMRs");
1994  desc.add<edm::InputTag>("TkTag", edm::InputTag("generalTracks"));
1995  desc.add<edm::InputTag>("TriggerResultsTag", edm::InputTag("TriggerResults", "", "HLT"));
1996  desc.add<edm::InputTag>("BeamSpotTag", edm::InputTag("offlineBeamSpot"));
1997  desc.add<edm::InputTag>("VerticesTag", edm::InputTag("offlinePrimaryVertices"));
1998  desc.add<bool>("isCosmics", false);
1999  descriptions.add("DMRChecker", desc);
2000 }
2001 
DMRChecker::hFPixZPlusResYPull
TH1D * hFPixZPlusResYPull
Definition: DMRChecker.cc:273
ConfigurationDescriptions.h
TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
DMRChecker::hHit2D
TH1D * hHit2D
Definition: DMRChecker.cc:254
Phi.h
DMRChecker::hNtrkZoom
TH1D * hNtrkZoom
Definition: DMRChecker.cc:242
DMRChecker::hHitCountVsThetaFPixMinus
TH1D * hHitCountVsThetaFPixMinus
Definition: DMRChecker.cc:309
DMRChecker::hPtPlus
TH1D * hPtPlus
Definition: DMRChecker.cc:251
PixelRegionContainers.h
svgfig.canvas
def canvas(*sub, **attr)
Definition: svgfig.py:482
DMRChecker::DRnRTIB_
TH1D * DRnRTIB_
Definition: DMRChecker.cc:422
DMRChecker::hCharge
TH1D * hCharge
Definition: DMRChecker.cc:323
DMRChecker::itrks
int itrks
Definition: DMRChecker.cc:452
running
Definition: DMRChecker.cc:135
DMRChecker::hd0vseta
TH2D * hd0vseta
Definition: DMRChecker.cc:354
DMRChecker::hMinPt
TH1D * hMinPt
Definition: DMRChecker.cc:250
DMRChecker::eventRatesByRun_
TH1D * eventRatesByRun_
Definition: DMRChecker.cc:395
DMRChecker::isCosmics_
const bool isCosmics_
Definition: DMRChecker.cc:457
DMRChecker::endcapDisksPullsY
std::map< unsigned int, TH1D * > endcapDisksPullsY
Definition: DMRChecker.cc:449
DMRChecker::BeamSpotTag_
edm::InputTag BeamSpotTag_
Definition: DMRChecker.cc:461
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
DMRChecker::topoToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Definition: DMRChecker.cc:228
Handle.h
DMRChecker::hitsinBPixByRun_
TH1D * hitsinBPixByRun_
Definition: DMRChecker.cc:397
MagneticField::inTesla
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
SiPixelPI::PhaseInfo::pathToTopoXML
const char * pathToTopoXML()
Definition: SiPixelPayloadInspectorHelper.h:81
electrons_cff.bool
bool
Definition: electrons_cff.py:393
EDAnalyzer.h
mps_fire.i
i
Definition: mps_fire.py:428
SiPixelPI::one
Definition: SiPixelPayloadInspectorHelper.h:39
PixelSubdetector.h
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
DMRChecker::vTrackHistos_
std::vector< TH1 * > vTrackHistos_
Definition: DMRChecker.cc:381
MessageLogger.h
DMRChecker::hHitCountVsYFPix
TH1D * hHitCountVsYFPix
Definition: DMRChecker.cc:289
reco::TrackBase::tight
Definition: TrackBase.h:153
TrackExtraFwd.h
DMRChecker::hdzPV
TH1D * hdzPV
Definition: DMRChecker.cc:377
PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
RunSummaryRcd.h
TrackerGeometry.h
DMRChecker::hPhiEndcapMinus
TH1D * hPhiEndcapMinus
Definition: DMRChecker.cc:334
reco::TrackBase::loose
Definition: TrackBase.h:152
GeomDet
Definition: GeomDet.h:27
DMRChecker::hnhpxb
TH1D * hnhpxb
Definition: DMRChecker.cc:357
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
DMRChecker::hTECResXPrime
TH1D * hTECResXPrime
Definition: DMRChecker.cc:279
DMRChecker::adjustCanvases
void adjustCanvases(TCanvas &canvas, bool isBarrel)
Definition: DMRChecker.cc:1747
reco::TrackBase::goodIterative
Definition: TrackBase.h:156
DMRChecker::PixelDMRS_y_ByLayer
std::unique_ptr< PixelRegions::PixelRegionContainers > PixelDMRS_y_ByLayer
Definition: DMRChecker.cc:235
ESHandle.h
TriggerResults.h
DMRChecker::hchi2ndofhp
TH1D * hchi2ndofhp
Definition: DMRChecker.cc:320
DMRChecker::evtsByTrigger_
TH1D * evtsByTrigger_
Definition: DMRChecker.cc:386
HLTBitAnalyser_cfi.hltresults
hltresults
Definition: HLTBitAnalyser_cfi.py:13
TrackerTopology::pxfSide
unsigned int pxfSide(const DetId &id) const
Definition: TrackerTopology.h:192
DMRChecker::hHitCountVsZBPix
TH1D * hHitCountVsZBPix
Definition: DMRChecker.cc:290
running::estimatorMap
std::map< uint32_t, running::Estimators > estimatorMap
Definition: DMRChecker.cc:147
DMRChecker::latencyToken_
const edm::ESGetToken< SiStripLatency, SiStripLatencyRcd > latencyToken_
Definition: DMRChecker.cc:229
DMRChecker::fillDMRs
void fillDMRs(const running::estimatorMap &myDetails, TH1D *DMR, TH1D *DRnR, std::array< TH1D *, 2 > DMRSplit, std::unique_ptr< PixelRegions::PixelRegionContainers > regionalDMR)
Definition: DMRChecker.cc:1957
DMRChecker::DRnRBPixY_
TH1D * DRnRBPixY_
Definition: DMRChecker.cc:409
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
min
T min(T a, T b)
Definition: MathUtil.h:58
reco::Vertex::z
double z() const
z coordinate
Definition: Vertex.h:120
DMRChecker::hPPlus
TH1D * hPPlus
Definition: DMRChecker.cc:247
running::Estimators::runningNormVarOfRes_
float runningNormVarOfRes_
Definition: DMRChecker.cc:144
DMRChecker::barrelLayersPullsY
std::map< unsigned int, TH1D * > barrelLayersPullsY
Definition: DMRChecker.cc:444
deltaPhi.h
DMRChecker::resDetailsFPixX_
running::estimatorMap resDetailsFPixX_
Definition: DMRChecker.cc:480
reco::TrackBase::confirmed
Definition: TrackBase.h:155
edm::EDGetTokenT< reco::TrackCollection >
contentValuesFiles.fullPath
fullPath
Definition: contentValuesFiles.py:64
DMRChecker::hBPixResYPull
TH1D * hBPixResYPull
Definition: DMRChecker.cc:271
DMRChecker::hHitCountVsYFPixMinus
TH1D * hHitCountVsYFPixMinus
Definition: DMRChecker.cc:302
TFileDirectory::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileDirectory.h:53
DMRChecker::hFPixZPlusResYPrime
TH1D * hFPixZPlusResYPrime
Definition: DMRChecker.cc:263
TrackBase.h
edm
HLT enums.
Definition: AlignableModifier.h:19
mps_splice.entry
entry
Definition: mps_splice.py:68
TrackerTopology
Definition: TrackerTopology.h:16
DMRChecker::phase_
SiPixelPI::phase phase_
Definition: DMRChecker.cc:456
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition: L1TUtmAlgorithmRcd.h:4
PV3DBase::theta
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
reco::TrackBase::undefQuality
Definition: TrackBase.h:151
fireworks::subdets
static const std::string subdets[7]
Definition: TrackUtils.cc:60
DMRChecker::hnhpxe
TH1D * hnhpxe
Definition: DMRChecker.cc:358
DMRChecker::hPhiOverlapMinus
TH1D * hPhiOverlapMinus
Definition: DMRChecker.cc:332
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
DMRChecker::hFPixResXPrime
TH1D * hFPixResXPrime
Definition: DMRChecker.cc:257
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DMRChecker::fs
edm::Service< TFileService > fs
Definition: DMRChecker.cc:231
RunLumiEventNumber.h
DMRChecker::hvy
TH1D * hvy
Definition: DMRChecker.cc:343
edm::LogPrint
Log< level::Warning, true > LogPrint
Definition: MessageLogger.h:130
DMRChecker::runHitsMap_
std::map< int, std::array< int, 6 > > runHitsMap_
Definition: DMRChecker.cc:472
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
DMRChecker::resDetailsTEC_
running::estimatorMap resDetailsTEC_
Definition: DMRChecker.cc:488
DMRChecker::hHithp
TH1D * hHithp
Definition: DMRChecker.cc:317
DMRChecker::hHitCountVsZFPix
TH1D * hHitCountVsZFPix
Definition: DMRChecker.cc:291
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
DMRChecker::hnhTOB
TH1D * hnhTOB
Definition: DMRChecker.cc:361
PVValHelper::fillByIndex
void fillByIndex(std::vector< TH1F * > &h, unsigned int index, double x, std::string tag="")
Definition: PVValidationHelpers.cc:42
DMRChecker::hitsinFPixByRun_
TH1D * hitsinFPixByRun_
Definition: DMRChecker.cc:398
DMRChecker::DRnRTID_
TH1D * DRnRTID_
Definition: DMRChecker.cc:425
DMRChecker::DMRBPixXSplit_
std::array< TH1D *, 2 > DMRBPixXSplit_
Definition: DMRChecker.cc:430
DMRChecker::hd0PV
TH1D * hd0PV
Definition: DMRChecker.cc:376
DMRChecker::beginJob
void beginJob() override
Definition: DMRChecker.cc:1085
ErrorObj.h
Validation_hcalonly_cfi.sign
sign
Definition: Validation_hcalonly_cfi.py:32
DMRChecker::tracksByRun_
TH1D * tracksByRun_
Definition: DMRChecker.cc:391
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
SiStripDetId.h
TrackingRecHitFwd.h
running::Estimators
Definition: DMRChecker.cc:136
DMRChecker::hchi2Probhp
TH1D * hchi2Probhp
Definition: DMRChecker.cc:321
RefTraits.h
DMRChecker::isHit2D
bool isHit2D(const TrackingRecHit &hit)
Definition: DMRChecker.cc:1773
DMRChecker::hHitCountVsThetaFPix
TH1D * hHitCountVsThetaFPix
Definition: DMRChecker.cc:296
TFileDirectory
Definition: TFileDirectory.h:24
SiPixelPI::zero
Definition: SiPixelPayloadInspectorHelper.h:39
DMRChecker::PixelDMRS_x_ByLayer
std::unique_ptr< PixelRegions::PixelRegionContainers > PixelDMRS_x_ByLayer
Definition: DMRChecker.cc:234
TrackerGeomDet.h
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
DMRChecker::hEta
TH1D * hEta
Definition: DMRChecker.cc:326
DMRChecker::hitsByRun_
TH1D * hitsByRun_
Definition: DMRChecker.cc:392
DMRChecker::ievt
int ievt
Definition: DMRChecker.cc:451
DMRChecker::hNhighPurity
TH1D * hNhighPurity
Definition: DMRChecker.cc:245
running::Estimators::hitCount
int hitCount
Definition: DMRChecker.cc:140
edm::Handle< reco::TrackCollection >
DMRChecker::hHitCountVsXFPix
TH1D * hHitCountVsXFPix
Definition: DMRChecker.cc:287
DMRChecker::hHitMinus
TH1D * hHitMinus
Definition: DMRChecker.cc:313
DMRChecker::hEtaPlus
TH1D * hEtaPlus
Definition: DMRChecker.cc:327
DMRChecker::hHitComposition
TH1D * hHitComposition
Definition: DMRChecker.cc:364
WorkerMaker.h
dqmdumpme.first
first
Definition: dqmdumpme.py:55
ESGetToken.h
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
DMRChecker::hPhiOverlapPlus
TH1D * hPhiOverlapPlus
Definition: DMRChecker.cc:331
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
DMRChecker::resDetailsTOB_
running::estimatorMap resDetailsTOB_
Definition: DMRChecker.cc:486
DMRChecker::DRnRFPixY_
TH1D * DRnRFPixY_
Definition: DMRChecker.cc:412
DMRChecker::trackRatesByRun_
TH1D * trackRatesByRun_
Definition: DMRChecker.cc:394
ProjectedSiStripRecHit2D
Definition: ProjectedSiStripRecHit2D.h:8
SiPixelRecHit
Our base class.
Definition: SiPixelRecHit.h:23
DMRChecker::resDetailsTID_
running::estimatorMap resDetailsTID_
Definition: DMRChecker.cc:487
DMRChecker::hd0BS
TH1D * hd0BS
Definition: DMRChecker.cc:373
DMRChecker::tmap
std::unique_ptr< TrackerMap > tmap
Definition: DMRChecker.cc:237
DMRChecker::vertexToken
edm::EDGetTokenT< reco::VertexCollection > vertexToken
Definition: DMRChecker.cc:467
DMRChecker::DMRFPixYSplit_
std::array< TH1D *, 2 > DMRFPixYSplit_
Definition: DMRChecker.cc:434
DMRChecker::runInfoMap_
std::map< int, std::pair< int, int > > runInfoMap_
Definition: DMRChecker.cc:471
TrackerTopology::pxbLayer
unsigned int pxbLayer(const DetId &id) const
Definition: TrackerTopology.h:144
TFileDirectory.h
F
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
DMRChecker::hdzBS
TH1D * hdzBS
Definition: DMRChecker.cc:374
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
DMRChecker::endcapDisksPullsX
std::map< unsigned int, TH1D * > endcapDisksPullsX
Definition: DMRChecker.cc:447
DMRChecker::barrelLayersPullsX
std::map< unsigned int, TH1D * > barrelLayersPullsX
Definition: DMRChecker.cc:442
DMRChecker::hFPixZMinusResXPrime
TH1D * hFPixZMinusResXPrime
Definition: DMRChecker.cc:259
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
SiPixelPI::PhaseInfo::phase
const SiPixelPI::phase phase() const
Definition: SiPixelPayloadInspectorHelper.h:69
DetId
Definition: DetId.h:17
Plane.h
edm::FileInPath
Definition: FileInPath.h:64
kBPIX
const int kBPIX
Definition: DMRChecker.cc:126
accept
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
MakerMacros.h
TrackerTopology.h
TrackingRecHit.h
RunInfo
Definition: RunInfo.h:18
DMRChecker::endJob
void endJob() override
Definition: DMRChecker.cc:1341
DMRChecker::triggerMap_
std::map< std::string, std::pair< int, int > > triggerMap_
Definition: DMRChecker.cc:469
DMRChecker::DRnRTEC_
TH1D * DRnRTEC_
Definition: DMRChecker.cc:426
h
DMRChecker::hTOBResXPrime
TH1D * hTOBResXPrime
Definition: DMRChecker.cc:277
TrackerTopologyRcd.h
Track.h
TrackFwd.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
BeamSpot.h
DMRChecker::hHit
TH1D * hHit
Definition: DMRChecker.cc:253
DMRChecker::runInfoToken_
const edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: DMRChecker.cc:226
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
StandaloneTrackerTopology.h
SiPixelRawToDigiRegional_cfi.deltaPhi
deltaPhi
Definition: SiPixelRawToDigiRegional_cfi.py:9
DMRChecker::hP
TH1D * hP
Definition: DMRChecker.cc:246
GeomDetEnumerators::P1PXEC
Definition: GeomDetEnumerators.h:26
Service.h
seconds
double seconds()
DMRChecker::hHitCountVsXFPixPlus
TH1D * hHitCountVsXFPixPlus
Definition: DMRChecker.cc:299
DMRChecker::hFPixZPlusResXPrime
TH1D * hFPixZPlusResXPrime
Definition: DMRChecker.cc:258
DMRChecker::hTECResXPull
TH1D * hTECResXPull
Definition: DMRChecker.cc:284
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
DMRChecker::pNBpixHitsVsVz
TProfile * pNBpixHitsVsVz
Definition: DMRChecker.cc:368
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
reco::BeamSpot
Definition: BeamSpot.h:21
DMRChecker::hHitCountVsPhiBPix
TH1D * hHitCountVsPhiBPix
Definition: DMRChecker.cc:294
IdealMagneticFieldRecord.h
ProjectedSiStripRecHit2D::originalHit
SiStripRecHit2D originalHit() const
Definition: ProjectedSiStripRecHit2D.h:56
DMRChecker::TriggerResultsTag_
edm::InputTag TriggerResultsTag_
Definition: DMRChecker.cc:460
DMRChecker::hPtMinus
TH1D * hPtMinus
Definition: DMRChecker.cc:252
DMRChecker::TkTag_
edm::InputTag TkTag_
Definition: DMRChecker.cc:459
DMRChecker::hEtaMinus
TH1D * hEtaMinus
Definition: DMRChecker.cc:328
multiplicitycorr_cfi.xBins
xBins
Definition: multiplicitycorr_cfi.py:5
StripSubdetector::TIB
static constexpr auto TIB
Definition: StripSubdetector.h:16
running::Estimators::runningVarOfRes_
float runningVarOfRes_
Definition: DMRChecker.cc:142
edm::TriggerNames::triggerNames
Strings const & triggerNames() const
Definition: TriggerNames.cc:20
DMRChecker::hBPixResXPrime
TH1D * hBPixResXPrime
Definition: DMRChecker.cc:256
DMRChecker::DMRChecker
DMRChecker(const edm::ParameterSet &pset)
Definition: DMRChecker.cc:153
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
DMRChecker::hFPixZMinusResXPull
TH1D * hFPixZMinusResXPull
Definition: DMRChecker.cc:269
Point3DBase< float, GlobalTag >
ParameterSetDescription.h
SiPixelRecHit.h
EDGetToken.h
TrackerGeometry::isThere
bool isThere(GeomDetEnumerators::SubDetector subdet) const
Definition: TrackerGeometry.cc:219
dumpRecoGeometry_cfg.varType
varType
Definition: dumpRecoGeometry_cfg.py:8
MagneticField::inInverseGeV
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition: MagneticField.h:36
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
RunInfoRcd
Definition: RunSummaryRcd.h:26
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Vertex.h
SiPixelPI::phase
phase
Definition: SiPixelPayloadInspectorHelper.h:39
DMRChecker::hFPixResYPrime
TH1D * hFPixResYPrime
Definition: DMRChecker.cc:262
DMRChecker::hDeltaEta
TH1D * hDeltaEta
Definition: DMRChecker.cc:339
EgHLTOffTrigSelection_cfi.trigName
trigName
Definition: EgHLTOffTrigSelection_cfi.py:8
TFileService.h
DMRChecker::hd0PVvseta
TH2D * hd0PVvseta
Definition: DMRChecker.cc:350
DMRChecker::hFPixZPlusResXPull
TH1D * hFPixZPlusResXPull
Definition: DMRChecker.cc:268
Phase1PixelMaps.h
TFileService::mkdir
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
PixelPluginsPhase0_cfi.isBarrel
isBarrel
Definition: PixelPluginsPhase0_cfi.py:17
DMRChecker::geomToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
Definition: DMRChecker.cc:225
DMRChecker::tksByTrigger_
TH1D * tksByTrigger_
Definition: DMRChecker.cc:385
GeomDetEnumerators::P1PXB
Definition: GeomDetEnumerators.h:25
DMRChecker::DMRBPixYSplit_
std::array< TH1D *, 2 > DMRBPixYSplit_
Definition: DMRChecker.cc:431
cmToUm
constexpr float cmToUm
Definition: DMRChecker.cc:128
DMRChecker::vTrackProfiles_
std::vector< TH1 * > vTrackProfiles_
Definition: DMRChecker.cc:382
DMRChecker::hDeltaPhi
TH1D * hDeltaPhi
Definition: DMRChecker.cc:338
TrackerDigiGeometryRecord.h
DMRChecker::fieldByRun_
TH1D * fieldByRun_
Definition: DMRChecker.cc:389
DMRChecker::hHitCountVsPhiFPix
TH1D * hHitCountVsPhiFPix
Definition: DMRChecker.cc:297
DMRChecker::magFieldToken_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
Definition: DMRChecker.cc:227
edm::ParameterSet
Definition: ParameterSet.h:47
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
DetId::Tracker
Definition: DetId.h:25
DMRChecker::beamspotToken
edm::EDGetTokenT< reco::BeamSpot > beamspotToken
Definition: DMRChecker.cc:466
SiStripCondDataRecords.h
DMRChecker::DRnRFPixX_
TH1D * DRnRFPixX_
Definition: DMRChecker.cc:411
DMRChecker::DMRBPixY_
TH1D * DMRBPixY_
Definition: DMRChecker.cc:403
duplicaterechits_cfi.trackCollection
trackCollection
Definition: duplicaterechits_cfi.py:4
Event.h
DMRChecker::hHitCountVsYBPix
TH1D * hHitCountVsYBPix
Definition: DMRChecker.cc:288
DMRChecker::VerticesTag_
edm::InputTag VerticesTag_
Definition: DMRChecker.cc:462
PV3DBase::barePhi
T barePhi() const
Definition: PV3DBase.h:65
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
DMRChecker::DMRTOB_
TH1D * DMRTOB_
Definition: DMRChecker.cc:417
DMRChecker::DRnRTOB_
TH1D * DRnRTOB_
Definition: DMRChecker.cc:423
DMRChecker::firstEvent_
bool firstEvent_
Definition: DMRChecker.cc:454
DMRChecker::resDetailsFPixY_
running::estimatorMap resDetailsFPixY_
Definition: DMRChecker.cc:481
reco::Vertex::x
double x() const
x coordinate
Definition: Vertex.h:116
DMRChecker::hQoverPZoom
TH1D * hQoverPZoom
Definition: DMRChecker.cc:325
DMRChecker::hTIBResXPull
TH1D * hTIBResXPull
Definition: DMRChecker.cc:281
DMRChecker::DMRBPixX_
TH1D * DMRBPixX_
Definition: DMRChecker.cc:402
dumpMFGeometry_cfg.delta
delta
Definition: dumpMFGeometry_cfg.py:25
DMRChecker::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: DMRChecker.cc:1989
DMRChecker::DMRTID_
TH1D * DMRTID_
Definition: DMRChecker.cc:419
DMRChecker::hHitCountVsThetaBPix
TH1D * hHitCountVsThetaBPix
Definition: DMRChecker.cc:293
DMRChecker::hPhp
TH1D * hPhp
Definition: DMRChecker.cc:315
kFPIX
const int kFPIX
Definition: DMRChecker.cc:127
DMRChecker::GetIndex
int GetIndex(const std::vector< OBJECT_TYPE * > &vec, const std::string &name)
Definition: DMRChecker.cc:212
PixelRegions::IDlabels
const std::vector< std::string > IDlabels
Definition: PixelRegionContainers.h:62
DMRChecker::hTIDResXPrime
TH1D * hTIDResXPrime
Definition: DMRChecker.cc:278
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
DMRChecker::DMRTIB_
TH1D * DMRTIB_
Definition: DMRChecker.cc:416
DMRChecker::fillByIndex
void fillByIndex(std::map< unsigned int, TH1D * > &h, unsigned int index, double x)
Definition: DMRChecker.cc:1911
edm::Service< TFileService >
TriggerNames.h
edmLumisInFiles.summary
summary
Definition: edmLumisInFiles.py:39
DMRChecker::hPthp
TH1D * hPthp
Definition: DMRChecker.cc:316
DMRChecker::updateOnlineMomenta
void updateOnlineMomenta(running::estimatorMap &myDetails, uint32_t theID, float the_data, float the_pull)
Definition: DMRChecker.cc:1931
DMRChecker::hTOBResXPull
TH1D * hTOBResXPull
Definition: DMRChecker.cc:282
DMRChecker::DMRTIBSplit_
std::array< TH1D *, 2 > DMRTIBSplit_
Definition: DMRChecker.cc:436
TrackerTopology::pxfDisk
unsigned int pxfDisk(const DetId &id) const
Definition: TrackerTopology.h:446
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
DMRChecker::pmap
std::unique_ptr< TrackerMap > pmap
Definition: DMRChecker.cc:238
Theta.h
DMRChecker::endcapDisksResidualsX
std::map< unsigned int, TH1D * > endcapDisksResidualsX
Definition: DMRChecker.cc:446
DMRChecker::hTIBResXPrime
TH1D * hTIBResXPrime
Definition: DMRChecker.cc:276
SiPixelPI::PhaseInfo
Definition: SiPixelPayloadInspectorHelper.h:48
DMRChecker::hchi2ndof
TH1D * hchi2ndof
Definition: DMRChecker.cc:240
DMRChecker::bookResidualsHistogram
std::map< unsigned int, TH1D * > bookResidualsHistogram(TFileDirectory dir, unsigned int theNLayers, std::string resType, std::string varType, std::string detType)
Definition: DMRChecker.cc:1848
DMRChecker::hnhTID
TH1D * hnhTID
Definition: DMRChecker.cc:360
ProjectedSiStripRecHit2D.h
MagneticField.h
DMRChecker::hlumi
TH1D * hlumi
Definition: DMRChecker.cc:379
edm::EventSetup
Definition: EventSetup.h:57
DMRChecker::hdxy
TH1D * hdxy
Definition: DMRChecker.cc:347
SiStripLatency::singleReadOutMode
int16_t singleReadOutMode() const
Definition: SiStripLatency.cc:122
DMRChecker::theTrackCollectionToken
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionToken
Definition: DMRChecker.cc:464
DMRChecker::hPhiBarrel
TH1D * hPhiBarrel
Definition: DMRChecker.cc:330
running::Estimators::runningNormMeanOfRes_
float runningNormMeanOfRes_
Definition: DMRChecker.cc:143
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
DMRChecker::hPhi
TH1D * hPhi
Definition: DMRChecker.cc:329
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DMRChecker::hrun
TH1D * hrun
Definition: DMRChecker.cc:378
DMRChecker::hd0vsphi
TH2D * hd0vsphi
Definition: DMRChecker.cc:353
DMRChecker::hBPixResYPrime
TH1D * hBPixResYPrime
Definition: DMRChecker.cc:261
DMRChecker::hTIDResXPull
TH1D * hTIDResXPull
Definition: DMRChecker.cc:283
HitPattern.h
DMRChecker::hHitCountVsYFPixPlus
TH1D * hHitCountVsYFPixPlus
Definition: DMRChecker.cc:301
DMRChecker::hdz
TH1D * hdz
Definition: DMRChecker.cc:346
DMRChecker::endcapDisksResidualsY
std::map< unsigned int, TH1D * > endcapDisksResidualsY
Definition: DMRChecker.cc:448
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord >
DMRChecker::barrelLayersResidualsX
std::map< unsigned int, TH1D * > barrelLayersResidualsX
Definition: DMRChecker.cc:441
HcalObjRepresent::Fill
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:1053
InputTag.h
edm::TriggerNames::triggerName
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:22
DMRChecker::hd0vspt
TH2D * hd0vspt
Definition: DMRChecker.cc:355
TrackerMap.h
DMRChecker::DMRFPixXSplit_
std::array< TH1D *, 2 > DMRFPixXSplit_
Definition: DMRChecker.cc:433
DMRChecker::conditionsMap_
std::map< int, std::pair< int, float > > conditionsMap_
Definition: DMRChecker.cc:470
TrackingRecHit
Definition: TrackingRecHit.h:21
SiStripRecHit1D.h
DMRChecker::resDetailsTIB_
running::estimatorMap resDetailsTIB_
Definition: DMRChecker.cc:485
TH2PolyOfflineMaps.limits
limits
Definition: TH2PolyOfflineMaps.py:45
DMRChecker::hFPixResXPull
TH1D * hFPixResXPull
Definition: DMRChecker.cc:267
DMRChecker::hBPixResXPull
TH1D * hBPixResXPull
Definition: DMRChecker.cc:266
VertexFwd.h
DMRChecker::hNtrk
TH1D * hNtrk
Definition: DMRChecker.cc:241
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
DMRChecker::hEtahp
TH1D * hEtahp
Definition: DMRChecker.cc:318
RunInfo.h
DMRChecker::pNBpixHitsVsVy
TProfile * pNBpixHitsVsVy
Definition: DMRChecker.cc:367
DMRChecker::vTrack2DHistos_
std::vector< TH1 * > vTrack2DHistos_
Definition: DMRChecker.cc:383
SiPixelPI::two
Definition: SiPixelPayloadInspectorHelper.h:39
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
DMRChecker::~DMRChecker
~DMRChecker() override
Definition: DMRChecker.cc:204
std
Definition: JetResolutionObject.h:76
DMRChecker::hQoverP
TH1D * hQoverP
Definition: DMRChecker.cc:324
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
reco::Vertex::y
double y() const
y coordinate
Definition: Vertex.h:118
StripSubdetector::TEC
static constexpr auto TEC
Definition: StripSubdetector.h:19
DMRChecker::bookSplitDMRHistograms
std::array< TH1D *, 2 > bookSplitDMRHistograms(TFileDirectory dir, std::string subdet, std::string vartype, bool isBarrel)
Definition: DMRChecker.cc:1816
DMRChecker::hPhiEndcapPlus
TH1D * hPhiEndcapPlus
Definition: DMRChecker.cc:333
PVValHelper::dxy
Definition: PVValidationHelpers.h:47
reco::TrackBase::algoSize
Definition: TrackBase.h:141
DetId.h
PVValHelper::dz
Definition: PVValidationHelpers.h:50
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
TrackResiduals.h
DMRChecker::hFPixResYPull
TH1D * hFPixResYPull
Definition: DMRChecker.cc:272
LocalPoint.h
spclusmultinvestigator_cfi.vertexCollection
vertexCollection
Definition: spclusmultinvestigator_cfi.py:4
DMRChecker::hHitCountVsThetaFPixPlus
TH1D * hHitCountVsThetaFPixPlus
Definition: DMRChecker.cc:306
DMRChecker::hHitCountVsXBPix
TH1D * hHitCountVsXBPix
Definition: DMRChecker.cc:286
DMRChecker::hPMinus
TH1D * hPMinus
Definition: DMRChecker.cc:248
DMRChecker::hFPixZMinusResYPull
TH1D * hFPixZMinusResYPull
Definition: DMRChecker.cc:274
DMRChecker::htrkAlgo
TH1I * htrkAlgo
Definition: DMRChecker.cc:244
DMRChecker::modeByRun_
TH1D * modeByRun_
Definition: DMRChecker.cc:388
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
DMRChecker::pNBpixHitsVsVx
TProfile * pNBpixHitsVsVx
Definition: DMRChecker.cc:366
DMRChecker::hvz
TH1D * hvz
Definition: DMRChecker.cc:344
edm::TriggerNames
Definition: TriggerNames.h:55
ZMuMuCategoriesSequences_cff.nbin
nbin
Definition: ZMuMuCategoriesSequences_cff.py:25
DMRChecker::DMRTEC_
TH1D * DMRTEC_
Definition: DMRChecker.cc:420
running::Estimators::runningMeanOfRes_
float runningMeanOfRes_
Definition: DMRChecker.cc:141
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
Point3D.h
GlobalVector.h
DMRChecker::hHitCountVsZFPixMinus
TH1D * hHitCountVsZFPixMinus
Definition: DMRChecker.cc:304
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
EventSetup.h
DEBUG
#define DEBUG
Definition: DMRChecker.cc:121
DMRChecker::analyze
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
Definition: DMRChecker.cc:490
DMRChecker::mode
int mode
Definition: DMRChecker.cc:453
DMRChecker::barrelLayersResidualsY
std::map< unsigned int, TH1D * > barrelLayersResidualsY
Definition: DMRChecker.cc:443
DMRChecker::DRnRBPixX_
TH1D * DRnRBPixX_
Definition: DMRChecker.cc:408
DMRChecker::DMRTOBSplit_
std::array< TH1D *, 2 > DMRTOBSplit_
Definition: DMRChecker.cc:437
DMRChecker::DMRFPixY_
TH1D * DMRFPixY_
Definition: DMRChecker.cc:406
SiStripLatencyRcd
Definition: SiStripCondDataRecords.h:36
DMRChecker::hd0PVvspt
TH2D * hd0PVvspt
Definition: DMRChecker.cc:351
DMRChecker::hPt
TH1D * hPt
Definition: DMRChecker.cc:249
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
DMRChecker::hHitCountVsPhiFPixPlus
TH1D * hHitCountVsPhiFPixPlus
Definition: DMRChecker.cc:307
DMRChecker::htrkQuality
TH1I * htrkQuality
Definition: DMRChecker.cc:243
DMRChecker::pixelmap
std::unique_ptr< Phase1PixelMaps > pixelmap
Definition: DMRChecker.cc:233
DMRChecker::hdxyPV
TH1D * hdxyPV
Definition: DMRChecker.cc:375
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
DMRChecker::hHitCountVsXFPixMinus
TH1D * hHitCountVsXFPixMinus
Definition: DMRChecker.cc:300
SiPixelPayloadInspectorHelper.h
DMRChecker::hHitPlus
TH1D * hHitPlus
Definition: DMRChecker.cc:312
GeomDetEnumerators::P2PXB
Definition: GeomDetEnumerators.h:27
DMRChecker::hd0PVvsphi
TH2D * hd0PVvsphi
Definition: DMRChecker.cc:349
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
genParticles_cff.map
map
Definition: genParticles_cff.py:11
kappa
static const G4double kappa
Definition: UrbanMscModel93.cc:35
SiStripLatency.h
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
DMRChecker::hPhiMinus
TH1D * hPhiMinus
Definition: DMRChecker.cc:336
ParameterSet.h
SiStripDetId
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
ParameterSetDescriptionFiller.h
SiStripMatchedRecHit2D.h
DMRChecker::hDeltaR
TH1D * hDeltaR
Definition: DMRChecker.cc:340
DMRChecker::hd0
TH1D * hd0
Definition: DMRChecker.cc:345
DMRChecker::hdxyBS
TH1D * hdxyBS
Definition: DMRChecker.cc:372
DMRChecker::hltresultsToken
edm::EDGetTokenT< edm::TriggerResults > hltresultsToken
Definition: DMRChecker.cc:465
DMRChecker::hnhTIB
TH1D * hnhTIB
Definition: DMRChecker.cc:359
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
DMRChecker
Definition: DMRChecker.cc:151
SiStripLatency
Definition: SiStripLatency.h:59
DMRChecker::hMultCand
TH1D * hMultCand
Definition: DMRChecker.cc:370
MagneticField
Definition: MagneticField.h:19
reco::TrackBase::algoNames
static const std::string algoNames[]
Definition: TrackBase.h:147
TrackingRecHit::isValid
bool isValid() const
Definition: TrackingRecHit.h:141
DMRChecker::DMRFPixX_
TH1D * DMRFPixX_
Definition: DMRChecker.cc:405
GeomDet.h
SiStripRecHit2D.h
DMRChecker::resDetailsBPixX_
running::estimatorMap resDetailsBPixX_
Definition: DMRChecker.cc:478
GlobalPoint.h
StripSubdetector.h
running::Estimators::rOrZDirection
int rOrZDirection
Definition: DMRChecker.cc:139
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
StandaloneTrackerTopology::fromTrackerParametersXMLFile
TrackerTopology fromTrackerParametersXMLFile(const std::string &xmlFileName)
Definition: StandaloneTrackerTopology.cc:168
edm::InputTag
Definition: InputTag.h:15
DMRChecker::hPhihp
TH1D * hPhihp
Definition: DMRChecker.cc:319
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
DMRChecker::resDetailsBPixY_
running::estimatorMap resDetailsBPixY_
Definition: DMRChecker.cc:479
DMRChecker::hHitCountVsZFPixPlus
TH1D * hHitCountVsZFPixPlus
Definition: DMRChecker.cc:303
running::Estimators::zDirection
int zDirection
Definition: DMRChecker.cc:138
reco::Vertex
Definition: Vertex.h:35
StripSubdetector::TID
static constexpr auto TID
Definition: StripSubdetector.h:17
DMRChecker::timeMap_
std::map< int, float > timeMap_
Definition: DMRChecker.cc:474
DMRChecker::hvx
TH1D * hvx
Definition: DMRChecker.cc:342
hit
Definition: SiStripHitEffFromCalibTree.cc:88
running::Estimators::rDirection
int rDirection
Definition: DMRChecker.cc:137
SiPixelPI::adjustCanvasMargins
void adjustCanvasMargins(TVirtualPad *pad, float top, float bottom, float left, float right)
Definition: SiPixelPayloadInspectorHelper.h:505
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
DMRChecker::hPhiPlus
TH1D * hPhiPlus
Definition: DMRChecker.cc:335
SiStripDetId::stereo
uint32_t stereo() const
Definition: SiStripDetId.h:168
GeomDetEnumerators::P2PXEC
Definition: GeomDetEnumerators.h:28
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
DMRChecker::hnhTEC
TH1D * hnhTEC
Definition: DMRChecker.cc:362
TrackerGeometry
Definition: TrackerGeometry.h:14
reco::TrackBase::highPurity
Definition: TrackBase.h:154
DMRChecker::hHitCountVsPhiFPixMinus
TH1D * hHitCountVsPhiFPixMinus
Definition: DMRChecker.cc:310
DMRChecker::hFPixZMinusResYPrime
TH1D * hFPixZMinusResYPrime
Definition: DMRChecker.cc:264