CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions | Public Attributes
GeneralPurposeTrackAnalyzer Class Reference

#include <Alignment/OfflineValidation/plugins/GeneralPurposeTrackAnalyzer.cc>

Inheritance diagram for GeneralPurposeTrackAnalyzer:
edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &setup) override
 
void beginJob () override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endJob () override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
 GeneralPurposeTrackAnalyzer (const edm::ParameterSet &pset)
 
template<class OBJECT_TYPE >
int GetIndex (const std::vector< OBJECT_TYPE * > &vec, const TString &name)
 
bool isHit2D (const TrackingRecHit &hit)
 
 ~GeneralPurposeTrackAnalyzer () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources >
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Public Attributes

edm::EDGetTokenT< reco::BeamSpotbeamspotToken
 
std::map< int, std::pair< int, float > > conditionsMap_
 
float etaMax_
 
TH1D * evtsByTrigger_
 
TH1D * fieldByRun_
 
bool firstEvent_
 
edm::Service< TFileServicefs
 
TH1D * hCharge
 
TH1D * hchi2ndof
 
TH1D * hchi2ndofhp
 
TH1D * hchi2Probhp
 
TH1D * hd0
 
TH1D * hd0BS
 
TH1D * hd0PV
 
TH2D * hd0PVvseta
 
TH2D * hd0PVvsphi
 
TH2D * hd0PVvspt
 
TH2D * hd0vseta
 
TH2D * hd0vsphi
 
TH2D * hd0vspt
 
TH1D * hDeltaEta
 
TH1D * hDeltaPhi
 
TH1D * hDeltaR
 
TH1D * hdxy
 
TH1D * hdxyBS
 
TH1D * hdxyPV
 
TH1D * hdz
 
TH1D * hdzBS
 
TH1D * hdzPV
 
TH1D * hEta
 
TH1D * hEtahp
 
TH1D * hEtaMinus
 
TH1D * hEtaPlus
 
TH1D * hHit
 
TH1D * hHit2D
 
TH1D * hHitComposition
 
TH1D * hHitCountVsPhiBPix
 
TH1D * hHitCountVsPhiFPix
 
TH1D * hHitCountVsThetaBPix
 
TH1D * hHitCountVsThetaFPix
 
TH1D * hHitCountVsXBPix
 
TH1D * hHitCountVsXFPix
 
TH1D * hHitCountVsYBPix
 
TH1D * hHitCountVsYFPix
 
TH1D * hHitCountVsZBPix
 
TH1D * hHitCountVsZFPix
 
TH1D * hHithp
 
TH1D * hHitMinus
 
TH1D * hHitPlus
 
edm::EDGetTokenT< edm::TriggerResultshltresultsToken
 
TH1D * hlumi
 
TH1D * hMinPt
 
TH1D * hMultCand
 
TH1D * hNhighPurity
 
TH1D * hnhpxb
 
TH1D * hnhpxe
 
TH1D * hnhTEC
 
TH1D * hnhTIB
 
TH1D * hnhTID
 
TH1D * hnhTOB
 
TH1D * hNtrk
 
TH1D * hNtrkZoom
 
TH1D * hP
 
TH1D * hPhi
 
TH1D * hPhiBarrel
 
TH1D * hPhiEndcapMinus
 
TH1D * hPhiEndcapPlus
 
TH1D * hPhihp
 
TH1D * hPhiMinus
 
TH1D * hPhiOverlapMinus
 
TH1D * hPhiOverlapPlus
 
TH1D * hPhiPlus
 
TH1D * hPhp
 
TH1D * hPMinus
 
TH1D * hPPlus
 
TH1D * hPt
 
TH1D * hPthp
 
TH1D * hPtMinus
 
TH1D * hPtPlus
 
TH1D * hQoverP
 
TH1D * hQoverPZoom
 
TH1D * hrun
 
TH1I * htrkAlgo
 
TH1I * htrkOriAlgo
 
TH1I * htrkQuality
 
TH1D * hvx
 
TH1D * hvy
 
TH1D * hvz
 
int ievt
 
bool isCosmics_
 
bool isPhase1_
 
int itrks
 
int mode
 
TH1D * modeByRun_
 
std::unique_ptr< TrackerMappmap
 
TProfile * pNBpixHitsVsVx
 
TProfile * pNBpixHitsVsVy
 
TProfile * pNBpixHitsVsVz
 
std::map< int, std::pair< int, int > > runInfoMap_
 
edm::EDGetTokenT< reco::TrackCollectiontheTrackCollectionToken
 
TH1D * tksByTrigger_
 
std::string TkTag_
 
std::unique_ptr< TrackerMaptmap
 
const TrackerGeometrytrackerGeometry_
 
std::map< std::string, std::pair< int, int > > triggerMap_
 
edm::EDGetTokenT< reco::VertexCollectionvertexToken
 
std::vector< TH1 * > vTrack2DHistos_
 
std::vector< TH1 * > vTrackHistos_
 
std::vector< TH1 * > vTrackProfiles_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 84 of file GeneralPurposeTrackAnalyzer.cc.

Constructor & Destructor Documentation

◆ GeneralPurposeTrackAnalyzer()

GeneralPurposeTrackAnalyzer::GeneralPurposeTrackAnalyzer ( const edm::ParameterSet pset)
inline

Definition at line 86 of file GeneralPurposeTrackAnalyzer.cc.

86  {
87  usesResource(TFileService::kSharedResource);
88 
89  TkTag_ = pset.getParameter<std::string>("TkTag");
90  theTrackCollectionToken = consumes<reco::TrackCollection>(TkTag_);
91 
92  edm::InputTag tag("TriggerResults", "", "HLT");
93  hltresultsToken = consumes<edm::TriggerResults>(tag);
94 
95  edm::InputTag beamSpotTag("offlineBeamSpot");
96  beamspotToken = consumes<reco::BeamSpot>(beamSpotTag);
97 
98  edm::InputTag vertexTag("offlinePrimaryVertices");
99  vertexToken = consumes<reco::VertexCollection>(vertexTag);
100 
101  isCosmics_ = pset.getParameter<bool>("isCosmics");
102 
103  pmap = std::make_unique<TrackerMap>("Pixel");
104  pmap->onlyPixel(true);
105  pmap->setTitle("Pixel Hit entries");
106  pmap->setPalette(1);
107 
108  tmap = std::make_unique<TrackerMap>("Strip");
109  tmap->setTitle("Strip Hit entries");
110  tmap->setPalette(1);
111  }

References AlignmentProducer_cff::beamSpotTag, beamspotToken, hltresultsToken, isCosmics_, TFileService::kSharedResource, pmap, muonDTDigis_cfi::pset, AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, theTrackCollectionToken, TkTag_, tmap, StandaloneTrackMonitor_cfi::vertexTag, and vertexToken.

◆ ~GeneralPurposeTrackAnalyzer()

GeneralPurposeTrackAnalyzer::~GeneralPurposeTrackAnalyzer ( )
inlineoverride

Definition at line 113 of file GeneralPurposeTrackAnalyzer.cc.

113 {}

Member Function Documentation

◆ analyze()

void GeneralPurposeTrackAnalyzer::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
inlineoverridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 264 of file GeneralPurposeTrackAnalyzer.cc.

266  {
267  ievt++;
268 
270  event.getByToken(theTrackCollectionToken, trackCollection);
271 
272  // magnetic field setup
273  edm::ESHandle<MagneticField> magneticField_;
274  setup.get<IdealMagneticFieldRecord>().get(magneticField_);
275 
276  // geometry setup
279  const TrackerGeometry *theGeometry = &(*geometry);
280 
281  // switch on the phase1
282  if ((theGeometry->isThere(GeomDetEnumerators::P1PXB)) || (theGeometry->isThere(GeomDetEnumerators::P1PXEC))) {
283  isPhase1_ = true;
284  } else {
285  isPhase1_ = false;
286  }
287 
288  const reco::TrackCollection tC = *(trackCollection.product());
289  itrks += tC.size();
290 
291  runInfoMap_[event.run()].first += 1;
292  runInfoMap_[event.run()].second += tC.size();
293 
294  if (DEBUG) {
295  edm::LogInfo("GeneralPurposeTrackAnalyzer") << "Reconstructed " << tC.size() << " tracks" << std::endl;
296  }
297  //int iCounter=0;
299  event.getByToken(hltresultsToken, hltresults);
300 
301  const edm::TriggerNames &triggerNames_ = event.triggerNames(*hltresults);
302  int ntrigs = hltresults->size();
303  //const vector<std::string> &triggernames = triggerNames_.triggerNames();
304 
305  for (int itrig = 0; itrig != ntrigs; ++itrig) {
306  const std::string &trigName = triggerNames_.triggerName(itrig);
307  bool accept = hltresults->accept(itrig);
308  if (accept == 1) {
309  if (DEBUG) {
310  edm::LogInfo("GeneralPurposeTrackAnalyzer")
311  << trigName << " " << accept << " ,track size: " << tC.size() << std::endl;
312  }
313  triggerMap_[trigName].first += 1;
314  triggerMap_[trigName].second += tC.size();
315  // triggerInfo.push_back(pair <std::string, int> (trigName, accept));
316  }
317  }
318 
319  hrun->Fill(event.run());
320  hlumi->Fill(event.luminosityBlock());
321 
322  int nHighPurityTracks = 0;
323 
324  for (auto track = tC.cbegin(); track != tC.cend(); track++) {
325  unsigned int nHit2D = 0;
326  for (auto iHit = track->recHitsBegin(); iHit != track->recHitsEnd(); ++iHit) {
327  if (this->isHit2D(**iHit)) {
328  ++nHit2D;
329  }
330 
331  const DetId &detId = (*iHit)->geographicalId();
332  const GeomDet *geomDet(theGeometry->idToDet(detId));
333 
334  const SiPixelRecHit *pixhit = dynamic_cast<const SiPixelRecHit *>(*iHit);
335 
336  if (pixhit) {
337  if (pixhit->isValid()) {
338  unsigned int subid = detId.subdetId();
339  int detid_db = detId.rawId();
340 
341  if (!isPhase1_)
342  pmap->fill(detid_db, 1);
343 
344  LocalPoint lp = (*iHit)->localPosition();
345  //LocalError le = (*iHit)->localPositionError();
346 
347  GlobalPoint GP = geomDet->surface().toGlobal(lp);
348 
349  if ((subid == PixelSubdetector::PixelBarrel) || (subid == PixelSubdetector::PixelEndcap)) {
350  // 1 = PXB, 2 = PXF
351  if (subid == PixelSubdetector::PixelBarrel) {
352  hHitCountVsThetaBPix->Fill(GP.theta());
353  hHitCountVsPhiBPix->Fill(GP.phi());
354 
355  hHitCountVsZBPix->Fill(GP.z());
356  hHitCountVsXBPix->Fill(GP.x());
357  hHitCountVsYBPix->Fill(GP.y());
358 
359  } else if (subid == PixelSubdetector::PixelEndcap) {
360  hHitCountVsThetaFPix->Fill(GP.theta());
361  hHitCountVsPhiFPix->Fill(GP.phi());
362 
363  hHitCountVsZFPix->Fill(GP.z());
364  hHitCountVsXFPix->Fill(GP.x());
365  hHitCountVsYFPix->Fill(GP.y());
366  }
367  }
368  }
369  } else {
370  if ((*iHit)->isValid()) {
371  tmap->fill(detId.rawId(), 1);
372  }
373  }
374  }
375  hHit2D->Fill(nHit2D);
376  hHit->Fill(track->numberOfValidHits());
377  hnhpxb->Fill(track->hitPattern().numberOfValidPixelBarrelHits());
378  hnhpxe->Fill(track->hitPattern().numberOfValidPixelEndcapHits());
379  hnhTIB->Fill(track->hitPattern().numberOfValidStripTIBHits());
380  hnhTID->Fill(track->hitPattern().numberOfValidStripTIDHits());
381  hnhTOB->Fill(track->hitPattern().numberOfValidStripTOBHits());
382  hnhTEC->Fill(track->hitPattern().numberOfValidStripTECHits());
383 
384  // fill hit composition histogram
385  if (track->hitPattern().numberOfValidPixelBarrelHits() != 0) {
386  hHitComposition->Fill(0., track->hitPattern().numberOfValidPixelBarrelHits());
387 
388  pNBpixHitsVsVx->Fill(track->vx(), track->hitPattern().numberOfValidPixelBarrelHits());
389  pNBpixHitsVsVy->Fill(track->vy(), track->hitPattern().numberOfValidPixelBarrelHits());
390  pNBpixHitsVsVz->Fill(track->vz(), track->hitPattern().numberOfValidPixelBarrelHits());
391  }
392  if (track->hitPattern().numberOfValidPixelEndcapHits() != 0) {
393  hHitComposition->Fill(1., track->hitPattern().numberOfValidPixelEndcapHits());
394  }
395  if (track->hitPattern().numberOfValidStripTIBHits() != 0) {
396  hHitComposition->Fill(2., track->hitPattern().numberOfValidStripTIBHits());
397  }
398  if (track->hitPattern().numberOfValidStripTIDHits() != 0) {
399  hHitComposition->Fill(3., track->hitPattern().numberOfValidStripTIDHits());
400  }
401  if (track->hitPattern().numberOfValidStripTOBHits() != 0) {
402  hHitComposition->Fill(4., track->hitPattern().numberOfValidStripTOBHits());
403  }
404  if (track->hitPattern().numberOfValidStripTECHits() != 0) {
405  hHitComposition->Fill(5., track->hitPattern().numberOfValidStripTECHits());
406  }
407 
408  hCharge->Fill(track->charge());
409  hQoverP->Fill(track->qoverp());
410  hQoverPZoom->Fill(track->qoverp());
411  hPt->Fill(track->pt());
412  hP->Fill(track->p());
413  hchi2ndof->Fill(track->normalizedChi2());
414  hEta->Fill(track->eta());
415  hPhi->Fill(track->phi());
416 
417  if (fabs(track->eta()) < 0.8) {
418  hPhiBarrel->Fill(track->phi());
419  }
420  if (track->eta() > 0.8 && track->eta() < 1.4) {
421  hPhiOverlapPlus->Fill(track->phi());
422  }
423  if (track->eta() < -0.8 && track->eta() > -1.4) {
424  hPhiOverlapMinus->Fill(track->phi());
425  }
426  if (track->eta() > 1.4) {
427  hPhiEndcapPlus->Fill(track->phi());
428  }
429  if (track->eta() < -1.4) {
430  hPhiEndcapMinus->Fill(track->phi());
431  }
432 
433  hd0->Fill(track->d0());
434  hdz->Fill(track->dz());
435  hdxy->Fill(track->dxy());
436  hvx->Fill(track->vx());
437  hvy->Fill(track->vy());
438  hvz->Fill(track->vz());
439 
440  htrkAlgo->Fill(static_cast<int>(track->algo()));
441  htrkOriAlgo->Fill(static_cast<int>(track->originalAlgo()));
442 
443  int myquality = -99;
444  if (track->quality(reco::TrackBase::undefQuality)) {
445  myquality = -1;
446  htrkQuality->Fill(myquality);
447  }
448  if (track->quality(reco::TrackBase::loose)) {
449  myquality = 0;
450  htrkQuality->Fill(myquality);
451  }
452  if (track->quality(reco::TrackBase::tight)) {
453  myquality = 1;
454  htrkQuality->Fill(myquality);
455  }
456  if (track->quality(reco::TrackBase::highPurity) && (!isCosmics_)) {
457  myquality = 2;
458  htrkQuality->Fill(myquality);
459  hPhp->Fill(track->p());
460  hPthp->Fill(track->pt());
461  hHithp->Fill(track->numberOfValidHits());
462  hEtahp->Fill(track->eta());
463  hPhihp->Fill(track->phi());
464  hchi2ndofhp->Fill(track->normalizedChi2());
465  hchi2Probhp->Fill(TMath::Prob(track->chi2(), track->ndof()));
466  nHighPurityTracks++;
467  }
468  if (track->quality(reco::TrackBase::confirmed)) {
469  myquality = 3;
470  htrkQuality->Fill(myquality);
471  }
472  if (track->quality(reco::TrackBase::goodIterative)) {
473  myquality = 4;
474  htrkQuality->Fill(myquality);
475  }
476 
477  // Fill 1D track histos
478  static const int etaindex = this->GetIndex(vTrackHistos_, "h_tracketa");
479  vTrackHistos_[etaindex]->Fill(track->eta());
480  static const int phiindex = this->GetIndex(vTrackHistos_, "h_trackphi");
481  vTrackHistos_[phiindex]->Fill(track->phi());
482  static const int numOfValidHitsindex = this->GetIndex(vTrackHistos_, "h_trackNumberOfValidHits");
483  vTrackHistos_[numOfValidHitsindex]->Fill(track->numberOfValidHits());
484  static const int numOfLostHitsindex = this->GetIndex(vTrackHistos_, "h_trackNumberOfLostHits");
485  vTrackHistos_[numOfLostHitsindex]->Fill(track->numberOfLostHits());
486 
487  GlobalPoint gPoint(track->vx(), track->vy(), track->vz());
488  double theLocalMagFieldInInverseGeV = magneticField_->inInverseGeV(gPoint).z();
489  double kappa = -track->charge() * theLocalMagFieldInInverseGeV / track->pt();
490 
491  static const int kappaindex = this->GetIndex(vTrackHistos_, "h_curvature");
492  vTrackHistos_[kappaindex]->Fill(kappa);
493  static const int kappaposindex = this->GetIndex(vTrackHistos_, "h_curvature_pos");
494  if (track->charge() > 0)
495  vTrackHistos_[kappaposindex]->Fill(fabs(kappa));
496  static const int kappanegindex = this->GetIndex(vTrackHistos_, "h_curvature_neg");
497  if (track->charge() < 0)
498  vTrackHistos_[kappanegindex]->Fill(fabs(kappa));
499 
500  double chi2Prob = TMath::Prob(track->chi2(), track->ndof());
501  double normchi2 = track->normalizedChi2();
502 
503  static const int normchi2index = this->GetIndex(vTrackHistos_, "h_normchi2");
504  vTrackHistos_[normchi2index]->Fill(normchi2);
505  static const int chi2index = this->GetIndex(vTrackHistos_, "h_chi2");
506  vTrackHistos_[chi2index]->Fill(track->chi2());
507  static const int chi2Probindex = this->GetIndex(vTrackHistos_, "h_chi2Prob");
508  vTrackHistos_[chi2Probindex]->Fill(chi2Prob);
509  static const int ptindex = this->GetIndex(vTrackHistos_, "h_pt");
510  static const int pt2index = this->GetIndex(vTrackHistos_, "h_ptrebin");
511  vTrackHistos_[ptindex]->Fill(track->pt());
512  vTrackHistos_[pt2index]->Fill(track->pt());
513  if (track->ptError() != 0.) {
514  static const int ptResolutionindex = this->GetIndex(vTrackHistos_, "h_ptResolution");
515  vTrackHistos_[ptResolutionindex]->Fill(track->ptError() / track->pt());
516  }
517  // Fill track profiles
518  static const int d0phiindex = this->GetIndex(vTrackProfiles_, "p_d0_vs_phi");
519  vTrackProfiles_[d0phiindex]->Fill(track->phi(), track->d0());
520  static const int dzphiindex = this->GetIndex(vTrackProfiles_, "p_dz_vs_phi");
521  vTrackProfiles_[dzphiindex]->Fill(track->phi(), track->dz());
522  static const int d0etaindex = this->GetIndex(vTrackProfiles_, "p_d0_vs_eta");
523  vTrackProfiles_[d0etaindex]->Fill(track->eta(), track->d0());
524  static const int dzetaindex = this->GetIndex(vTrackProfiles_, "p_dz_vs_eta");
525  vTrackProfiles_[dzetaindex]->Fill(track->eta(), track->dz());
526  static const int chiProbphiindex = this->GetIndex(vTrackProfiles_, "p_chi2Prob_vs_phi");
527  vTrackProfiles_[chiProbphiindex]->Fill(track->phi(), chi2Prob);
528  static const int chiProbabsd0index = this->GetIndex(vTrackProfiles_, "p_chi2Prob_vs_d0");
529  vTrackProfiles_[chiProbabsd0index]->Fill(fabs(track->d0()), chi2Prob);
530  static const int chiProbabsdzindex = this->GetIndex(vTrackProfiles_, "p_chi2Prob_vs_dz");
531  vTrackProfiles_[chiProbabsdzindex]->Fill(track->dz(), chi2Prob);
532  static const int chiphiindex = this->GetIndex(vTrackProfiles_, "p_chi2_vs_phi");
533  vTrackProfiles_[chiphiindex]->Fill(track->phi(), track->chi2());
534  static const int normchiphiindex = this->GetIndex(vTrackProfiles_, "p_normchi2_vs_phi");
535  vTrackProfiles_[normchiphiindex]->Fill(track->phi(), normchi2);
536  static const int chietaindex = this->GetIndex(vTrackProfiles_, "p_chi2_vs_eta");
537  vTrackProfiles_[chietaindex]->Fill(track->eta(), track->chi2());
538  static const int normchiptindex = this->GetIndex(vTrackProfiles_, "p_normchi2_vs_pt");
539  vTrackProfiles_[normchiptindex]->Fill(track->pt(), normchi2);
540  static const int normchipindex = this->GetIndex(vTrackProfiles_, "p_normchi2_vs_p");
541  vTrackProfiles_[normchipindex]->Fill(track->p(), normchi2);
542  static const int chiProbetaindex = this->GetIndex(vTrackProfiles_, "p_chi2Prob_vs_eta");
543  vTrackProfiles_[chiProbetaindex]->Fill(track->eta(), chi2Prob);
544  static const int normchietaindex = this->GetIndex(vTrackProfiles_, "p_normchi2_vs_eta");
545  vTrackProfiles_[normchietaindex]->Fill(track->eta(), normchi2);
546  static const int kappaphiindex = this->GetIndex(vTrackProfiles_, "p_kappa_vs_phi");
547  vTrackProfiles_[kappaphiindex]->Fill(track->phi(), kappa);
548  static const int kappaetaindex = this->GetIndex(vTrackProfiles_, "p_kappa_vs_eta");
549  vTrackProfiles_[kappaetaindex]->Fill(track->eta(), kappa);
550  static const int ptResphiindex = this->GetIndex(vTrackProfiles_, "p_ptResolution_vs_phi");
551  vTrackProfiles_[ptResphiindex]->Fill(track->phi(), track->ptError() / track->pt());
552  static const int ptResetaindex = this->GetIndex(vTrackProfiles_, "p_ptResolution_vs_eta");
553  vTrackProfiles_[ptResetaindex]->Fill(track->eta(), track->ptError() / track->pt());
554 
555  // Fill 2D track histos
556  static const int d0phiindex_2d = this->GetIndex(vTrack2DHistos_, "h2_d0_vs_phi");
557  vTrack2DHistos_[d0phiindex_2d]->Fill(track->phi(), track->d0());
558  static const int dzphiindex_2d = this->GetIndex(vTrack2DHistos_, "h2_dz_vs_phi");
559  vTrack2DHistos_[dzphiindex_2d]->Fill(track->phi(), track->dz());
560  static const int d0etaindex_2d = this->GetIndex(vTrack2DHistos_, "h2_d0_vs_eta");
561  vTrack2DHistos_[d0etaindex_2d]->Fill(track->eta(), track->d0());
562  static const int dzetaindex_2d = this->GetIndex(vTrack2DHistos_, "h2_dz_vs_eta");
563  vTrack2DHistos_[dzetaindex_2d]->Fill(track->eta(), track->dz());
564  static const int chiphiindex_2d = this->GetIndex(vTrack2DHistos_, "h2_chi2_vs_phi");
565  vTrack2DHistos_[chiphiindex_2d]->Fill(track->phi(), track->chi2());
566  static const int chiProbphiindex_2d = this->GetIndex(vTrack2DHistos_, "h2_chi2Prob_vs_phi");
567  vTrack2DHistos_[chiProbphiindex_2d]->Fill(track->phi(), chi2Prob);
568  static const int chiProbabsd0index_2d = this->GetIndex(vTrack2DHistos_, "h2_chi2Prob_vs_d0");
569  vTrack2DHistos_[chiProbabsd0index_2d]->Fill(fabs(track->d0()), chi2Prob);
570  static const int normchiphiindex_2d = this->GetIndex(vTrack2DHistos_, "h2_normchi2_vs_phi");
571  vTrack2DHistos_[normchiphiindex_2d]->Fill(track->phi(), normchi2);
572  static const int chietaindex_2d = this->GetIndex(vTrack2DHistos_, "h2_chi2_vs_eta");
573  vTrack2DHistos_[chietaindex_2d]->Fill(track->eta(), track->chi2());
574  static const int chiProbetaindex_2d = this->GetIndex(vTrack2DHistos_, "h2_chi2Prob_vs_eta");
575  vTrack2DHistos_[chiProbetaindex_2d]->Fill(track->eta(), chi2Prob);
576  static const int normchietaindex_2d = this->GetIndex(vTrack2DHistos_, "h2_normchi2_vs_eta");
577  vTrack2DHistos_[normchietaindex_2d]->Fill(track->eta(), normchi2);
578  static const int kappaphiindex_2d = this->GetIndex(vTrack2DHistos_, "h2_kappa_vs_phi");
579  vTrack2DHistos_[kappaphiindex_2d]->Fill(track->phi(), kappa);
580  static const int kappaetaindex_2d = this->GetIndex(vTrack2DHistos_, "h2_kappa_vs_eta");
581  vTrack2DHistos_[kappaetaindex_2d]->Fill(track->eta(), kappa);
582  static const int normchi2kappa_2d = this->GetIndex(vTrack2DHistos_, "h2_normchi2_vs_kappa");
583  vTrack2DHistos_[normchi2kappa_2d]->Fill(normchi2, kappa);
584 
585  //dxy with respect to the beamspot
587  edm::Handle<reco::BeamSpot> beamSpotHandle;
588  event.getByToken(beamspotToken, beamSpotHandle);
589  if (beamSpotHandle.isValid()) {
590  beamSpot = *beamSpotHandle;
591  math::XYZPoint point(beamSpot.x0(), beamSpot.y0(), beamSpot.z0());
592  double dxy = track->dxy(point);
593  double dz = track->dz(point);
594  hdxyBS->Fill(dxy);
595  hd0BS->Fill(-dxy);
596  hdzBS->Fill(dz);
597  }
598 
599  //dxy with respect to the primary vertex
600  reco::Vertex pvtx;
603  event.getByLabel("offlinePrimaryVertices", vertexHandle);
604  double mindxy = 100.;
605  double dz = 100;
606  if (vertexHandle.isValid()) {
607  for (auto pvtx = vertexHandle->cbegin(); pvtx != vertexHandle->cend(); ++pvtx) {
608  math::XYZPoint mypoint(pvtx->x(), pvtx->y(), pvtx->z());
609  if (abs(mindxy) > abs(track->dxy(mypoint))) {
610  mindxy = track->dxy(mypoint);
611  dz = track->dz(mypoint);
612  }
613  }
614 
615  hdxyPV->Fill(mindxy);
616  hd0PV->Fill(-mindxy);
617  hdzPV->Fill(dz);
618 
619  hd0PVvsphi->Fill(track->phi(), -mindxy);
620  hd0PVvseta->Fill(track->eta(), -mindxy);
621  hd0PVvspt->Fill(track->pt(), -mindxy);
622 
623  } else {
624  hdxyPV->Fill(100);
625  hd0PV->Fill(100);
626  hdzPV->Fill(100);
627  }
628 
629  if (DEBUG) {
630  edm::LogInfo("GeneralPurposeTrackAnalyzer") << "end of track loop" << std::endl;
631  }
632  }
633 
634  hNtrk->Fill(tC.size());
635  hNtrkZoom->Fill(tC.size());
636  hNhighPurity->Fill(nHighPurityTracks);
637 
638  if (DEBUG) {
639  edm::LogInfo("GeneralPurposeTrackAnalyzer") << "end of analysis" << std::endl;
640  }
641  }

References funct::abs(), accept(), pwdgSkimBPark_cfi::beamSpot, beamspotToken, reco::TrackBase::confirmed, DEBUG, PVValHelper::dxy, PVValHelper::dz, HcalObjRepresent::Fill(), geometry, get, GetIndex(), reco::TrackBase::goodIterative, hCharge, hchi2ndof, hchi2ndofhp, hchi2Probhp, hd0, hd0BS, hd0PV, hd0PVvseta, hd0PVvsphi, hd0PVvspt, hdxy, hdxyBS, hdxyPV, hdz, hdzBS, hdzPV, hEta, hEtahp, hHit, hHit2D, hHitComposition, hHitCountVsPhiBPix, hHitCountVsPhiFPix, hHitCountVsThetaBPix, hHitCountVsThetaFPix, hHitCountVsXBPix, hHitCountVsXFPix, hHitCountVsYBPix, hHitCountVsYFPix, hHitCountVsZBPix, hHitCountVsZFPix, hHithp, reco::TrackBase::highPurity, HLTBitAnalyser_cfi::hltresults, hltresultsToken, hlumi, hNhighPurity, hnhpxb, hnhpxe, hnhTEC, hnhTIB, hnhTID, hnhTOB, hNtrk, hNtrkZoom, hP, hPhi, hPhiBarrel, hPhiEndcapMinus, hPhiEndcapPlus, hPhihp, hPhiOverlapMinus, hPhiOverlapPlus, hPhp, hPt, hPthp, hQoverP, hQoverPZoom, hrun, htrkAlgo, htrkOriAlgo, htrkQuality, hvx, hvy, hvz, TrackerGeometry::idToDet(), ievt, MagneticField::inInverseGeV(), isCosmics_, isHit2D(), isPhase1_, TrackerGeometry::isThere(), edm::HandleBase::isValid(), itrks, kappa, reco::TrackBase::loose, GeomDetEnumerators::P1PXB, GeomDetEnumerators::P1PXEC, PV3DBase< T, PVType, FrameType >::phi(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, pmap, pNBpixHitsVsVx, pNBpixHitsVsVy, pNBpixHitsVsVz, point, DetId::rawId(), runInfoMap_, singleTopDQM_cfi::setup, AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), PV3DBase< T, PVType, FrameType >::theta(), theTrackCollectionToken, reco::TrackBase::tight, tmap, HLT_2018_cff::track, duplicaterechits_cfi::trackCollection, triggerMap_, edm::TriggerNames::triggerName(), edm::TriggerNames::triggerNames(), EgHLTOffTrigSelection_cfi::trigName, reco::TrackBase::undefQuality, spclusmultinvestigator_cfi::vertexCollection, vTrack2DHistos_, vTrackHistos_, vTrackProfiles_, PV3DBase< T, PVType, FrameType >::x(), reco::Vertex::x(), PV3DBase< T, PVType, FrameType >::y(), reco::Vertex::y(), PV3DBase< T, PVType, FrameType >::z(), and reco::Vertex::z().

◆ beginJob()

void GeneralPurposeTrackAnalyzer::beginJob ( void  )
inlineoverridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 680 of file GeneralPurposeTrackAnalyzer.cc.

682  {
683  if (DEBUG) {
684  edm::LogInfo("GeneralPurposeTrackAnalyzer") << __LINE__ << std::endl;
685  }
686 
687  TH1D::SetDefaultSumw2(kTRUE);
688 
689  isPhase1_ = true;
690  etaMax_ = 3.0;
691 
692  ievt = 0;
693  itrks = 0;
694 
695  hrun = fs->make<TH1D>("h_run", "run", 100000, 230000, 240000);
696  hlumi = fs->make<TH1D>("h_lumi", "lumi", 1000, 0, 1000);
697 
698  hchi2ndof = fs->make<TH1D>("h_chi2ndof", "chi2/ndf;#chi^{2}/ndf;tracks", 100, 0, 5.);
699  hCharge = fs->make<TH1D>("h_charge", "charge;Charge of the track;tracks", 5, -2.5, 2.5);
700  hNtrk = fs->make<TH1D>("h_Ntrk", "ntracks;Number of Tracks;events", 200, 0., 200.);
701  hNtrkZoom = fs->make<TH1D>("h_NtrkZoom", "Number of tracks; number of tracks;events", 10, 0., 10.);
702  hNhighPurity =
703  fs->make<TH1D>("h_NhighPurity", "n. high purity tracks;Number of high purity tracks;events", 200, 0., 200.);
704 
705  htrkAlgo = fs->make<TH1I>("h_trkAlgo",
706  "tracking step;iterative tracking step;tracks",
708  0.,
709  double(reco::TrackBase::algoSize));
710 
711  htrkOriAlgo = fs->make<TH1I>("h_trkOriAlgo",
712  "original tracking step;original iterative tracking step;tracks",
714  0.,
715  double(reco::TrackBase::algoSize));
716 
717  for (size_t ibin = 0; ibin < reco::TrackBase::algoSize - 1; ibin++) {
718  htrkAlgo->GetXaxis()->SetBinLabel(ibin + 1, (reco::TrackBase::algoNames[ibin]).c_str());
719  htrkOriAlgo->GetXaxis()->SetBinLabel(ibin + 1, (reco::TrackBase::algoNames[ibin]).c_str());
720  }
721 
722  htrkQuality = fs->make<TH1I>("h_trkQuality", "track quality;track quality;tracks", 6, -1, 5);
723  std::string qualities[7] = {"undef", "loose", "tight", "highPurity", "confirmed", "goodIterative"};
724  for (int nbin = 1; nbin <= htrkQuality->GetNbinsX(); nbin++) {
725  htrkQuality->GetXaxis()->SetBinLabel(nbin, (qualities[nbin - 1]).c_str());
726  }
727 
728  hP = fs->make<TH1D>("h_P", "Momentum;track momentum [GeV];tracks", 100, 0., 100.);
729  hQoverP = fs->make<TH1D>("h_qoverp", "Track q/p; track q/p [GeV^{-1}];tracks", 100, -1., 1.);
730  hQoverPZoom = fs->make<TH1D>("h_qoverpZoom", "Track q/p; track q/p [GeV^{-1}];tracks", 100, -0.1, 0.1);
731  hPt = fs->make<TH1D>("h_Pt", "Transverse Momentum;track p_{T} [GeV];tracks", 100, 0., 100.);
732  hHit = fs->make<TH1D>("h_nHits", "Number of hits;track n. hits;tracks", 50, -0.5, 49.5);
733  hHit2D = fs->make<TH1D>("h_nHit2D", "Number of 2D hits; number of 2D hits;tracks", 20, 0, 20);
734 
735  hHitCountVsZBPix = fs->make<TH1D>("h_HitCountVsZBpix", "Number of BPix hits vs z;hit global z;hits", 60, -30, 30);
737  fs->make<TH1D>("h_HitCountVsZFpix", "Number of FPix hits vs z;hit global z;hits", 100, -100, 100);
738 
739  hHitCountVsXBPix = fs->make<TH1D>("h_HitCountVsXBpix", "Number of BPix hits vs x;hit global x;hits", 20, -20, 20);
740  hHitCountVsXFPix = fs->make<TH1D>("h_HitCountVsXFpix", "Number of FPix hits vs x;hit global x;hits", 20, -20, 20);
741 
742  hHitCountVsYBPix = fs->make<TH1D>("h_HitCountVsYBpix", "Number of BPix hits vs y;hit global y;hits", 20, -20, 20);
743  hHitCountVsYFPix = fs->make<TH1D>("h_HitCountVsYFpix", "Number of FPix hits vs y;hit global y;hits", 20, -20, 20);
744 
746  fs->make<TH1D>("h_HitCountVsThetaBpix", "Number of BPix hits vs #theta;hit global #theta;hits", 20, 0., M_PI);
748  fs->make<TH1D>("h_HitCountVsPhiBpix", "Number of BPix hits vs #phi;hit global #phi;hits", 20, -M_PI, M_PI);
749 
751  fs->make<TH1D>("h_HitCountVsThetaFpix", "Number of FPix hits vs #theta;hit global #theta;hits", 40, 0., M_PI);
753  fs->make<TH1D>("h_HitCountVsPhiFpix", "Number of FPix hits vs #phi;hit global #phi;hits", 20, -M_PI, M_PI);
754 
755  hEta = fs->make<TH1D>("h_Eta", "Track pseudorapidity; track #eta;tracks", 100, -etaMax_, etaMax_);
756  hPhi = fs->make<TH1D>("h_Phi", "Track azimuth; track #phi;tracks", 100, -M_PI, M_PI);
757 
758  hPhiBarrel = fs->make<TH1D>("h_PhiBarrel", "hPhiBarrel (0<|#eta|<0.8);track #Phi;tracks", 100, -M_PI, M_PI);
760  fs->make<TH1D>("h_PhiOverlapPlus", "hPhiOverlapPlus (0.8<#eta<1.4);track #phi;tracks", 100, -M_PI, M_PI);
762  fs->make<TH1D>("h_PhiOverlapMinus", "hPhiOverlapMinus (-1.4<#eta<-0.8);track #phi;tracks", 100, -M_PI, M_PI);
763  hPhiEndcapPlus = fs->make<TH1D>("h_PhiEndcapPlus", "hPhiEndcapPlus (#eta>1.4);track #phi;track", 100, -M_PI, M_PI);
765  fs->make<TH1D>("h_PhiEndcapMinus", "hPhiEndcapMinus (#eta<1.4);track #phi;tracks", 100, -M_PI, M_PI);
766 
767  if (!isCosmics_) {
768  hPhp = fs->make<TH1D>("h_P_hp", "Momentum (high purity);track momentum [GeV];tracks", 100, 0., 100.);
769  hPthp = fs->make<TH1D>("h_Pt_hp", "Transverse Momentum (high purity);track p_{T} [GeV];tracks", 100, 0., 100.);
770  hHithp = fs->make<TH1D>("h_nHit_hp", "Number of hits (high purity);track n. hits;tracks", 30, 0, 30);
771  hEtahp =
772  fs->make<TH1D>("h_Eta_hp", "Track pseudorapidity (high purity); track #eta;tracks", 100, -etaMax_, etaMax_);
773  hPhihp = fs->make<TH1D>("h_Phi_hp", "Track azimuth (high purity); track #phi;tracks", 100, -M_PI, M_PI);
774  hchi2ndofhp = fs->make<TH1D>("h_chi2ndof_hp", "chi2/ndf (high purity);#chi^{2}/ndf;tracks", 100, 0, 5.);
775  hchi2Probhp = fs->make<TH1D>(
776  "h_chi2_Prob_hp", "#chi^{2} probability (high purity);#chi^{2}prob_{Track};Number of Tracks", 100, 0.0, 1.);
777 
778  hvx = fs->make<TH1D>("h_vx", "Track v_{x} ; track v_{x} [cm];tracks", 100, -1.5, 1.5);
779  hvy = fs->make<TH1D>("h_vy", "Track v_{y} ; track v_{y} [cm];tracks", 100, -1.5, 1.5);
780  hvz = fs->make<TH1D>("h_vz", "Track v_{z} ; track v_{z} [cm];tracks", 100, -20., 20.);
781  hd0 = fs->make<TH1D>("h_d0", "Track d_{0} ; track d_{0} [cm];tracks", 100, -1., 1.);
782  hdxy = fs->make<TH1D>("h_dxy", "Track d_{xy}; track d_{xy} [cm]; tracks", 100, -0.5, 0.5);
783  hdz = fs->make<TH1D>("h_dz", "Track d_{z} ; track d_{z} [cm]; tracks", 100, -20, 20);
784 
785  hd0PVvsphi =
786  fs->make<TH2D>("h2_d0PVvsphi", "hd0PVvsphi;track #phi;track d_{0}(PV) [cm]", 160, -M_PI, M_PI, 100, -1., 1.);
787  hd0PVvseta =
788  fs->make<TH2D>("h2_d0PVvseta", "hdPV0vseta;track #eta;track d_{0}(PV) [cm]", 160, -2.5, 2.5, 100, -1., 1.);
789  hd0PVvspt = fs->make<TH2D>("h2_d0PVvspt", "hdPV0vspt;track p_{T};d_{0}(PV) [cm]", 50, 0., 100., 100, -1, 1.);
790 
791  hdxyBS = fs->make<TH1D>("h_dxyBS", "hdxyBS; track d_{xy}(BS) [cm];tracks", 100, -0.1, 0.1);
792  hd0BS = fs->make<TH1D>("h_d0BS", "hd0BS ; track d_{0}(BS) [cm];tracks", 100, -0.1, 0.1);
793  hdzBS = fs->make<TH1D>("h_dzBS", "hdzBS ; track d_{z}(BS) [cm];tracks", 100, -12, 12);
794  hdxyPV = fs->make<TH1D>("h_dxyPV", "hdxyPV; track d_{xy}(PV) [cm];tracks", 100, -0.1, 0.1);
795  hd0PV = fs->make<TH1D>("h_d0PV", "hd0PV ; track d_{0}(PV) [cm];tracks", 100, -0.15, 0.15);
796  hdzPV = fs->make<TH1D>("h_dzPV", "hdzPV ; track d_{z}(PV) [cm];tracks", 100, -0.1, 0.1);
797 
798  hnhTIB = fs->make<TH1D>("h_nHitTIB", "nhTIB;# hits in TIB; tracks", 20, 0., 20.);
799  hnhTID = fs->make<TH1D>("h_nHitTID", "nhTID;# hits in TID; tracks", 20, 0., 20.);
800  hnhTOB = fs->make<TH1D>("h_nHitTOB", "nhTOB;# hits in TOB; tracks", 20, 0., 20.);
801  hnhTEC = fs->make<TH1D>("h_nHitTEC", "nhTEC;# hits in TEC; tracks", 20, 0., 20.);
802 
803  } else {
804  hvx = fs->make<TH1D>("h_vx", "Track v_{x};track v_{x} [cm];tracks", 100, -100., 100.);
805  hvy = fs->make<TH1D>("h_vy", "Track v_{y};track v_{y} [cm];tracks", 100, -100., 100.);
806  hvz = fs->make<TH1D>("h_vz", "Track v_{z};track v_{z} [cm];track", 100, -100., 100.);
807  hd0 = fs->make<TH1D>("h_d0", "Track d_{0};track d_{0} [cm];track", 100, -100., 100.);
808  hdxy = fs->make<TH1D>("h_dxy", "Track d_{xy};track d_{xy} [cm];tracks", 100, -100, 100);
809  hdz = fs->make<TH1D>("h_dz", "Track d_{z};track d_{z} [cm];tracks", 100, -200, 200);
810 
811  hd0vsphi = fs->make<TH2D>(
812  "h2_d0vsphi", "Track d_{0} vs #phi; track #phi;track d_{0} [cm]", 160, -3.20, 3.20, 100, -100., 100.);
813  hd0vseta = fs->make<TH2D>(
814  "h2_d0vseta", "Track d_{0} vs #eta; track #eta;track d_{0} [cm]", 160, -3.20, 3.20, 100, -100., 100.);
815  hd0vspt = fs->make<TH2D>(
816  "h2_d0vspt", "Track d_{0} vs p_{T};track p_{T};track d_{0} [cm]", 50, 0., 100., 100, -100, 100);
817 
818  hdxyBS = fs->make<TH1D>("h_dxyBS", "Track d_{xy}(BS);d_{xy}(BS) [cm];tracks", 100, -100., 100.);
819  hd0BS = fs->make<TH1D>("h_d0BS", "Track d_{0}(BS);d_{0}(BS) [cm];tracks", 100, -100., 100.);
820  hdzBS = fs->make<TH1D>("h_dzBS", "Track d_{z}(BS);d_{z}(BS) [cm];tracks", 100, -100., 100.);
821  hdxyPV = fs->make<TH1D>("h_dxyPV", "Track d_{xy}(PV); d_{xy}(PV) [cm];tracks", 100, -100., 100.);
822  hd0PV = fs->make<TH1D>("h_d0PV", "Track d_{0}(PV); d_{0}(PV) [cm];tracks", 100, -100., 100.);
823  hdzPV = fs->make<TH1D>("h_dzPV", "Track d_{z}(PV); d_{z}(PV) [cm];tracks", 100, -100., 100.);
824 
825  hnhTIB = fs->make<TH1D>("h_nHitTIB", "nhTIB;# hits in TIB; tracks", 30, 0., 30.);
826  hnhTID = fs->make<TH1D>("h_nHitTID", "nhTID;# hits in TID; tracks", 30, 0., 30.);
827  hnhTOB = fs->make<TH1D>("h_nHitTOB", "nhTOB;# hits in TOB; tracks", 30, 0., 30.);
828  hnhTEC = fs->make<TH1D>("h_nHitTEC", "nhTEC;# hits in TEC; tracks", 30, 0., 30.);
829  }
830 
831  hnhpxb = fs->make<TH1D>("h_nHitPXB", "nhpxb;# hits in Pixel Barrel; tracks", 10, 0., 10.);
832  hnhpxe = fs->make<TH1D>("h_nHitPXE", "nhpxe;# hits in Pixel Endcap; tracks", 10, 0., 10.);
833 
834  hHitComposition = fs->make<TH1D>("h_hitcomposition", "track hit composition;;# hits", 6, -0.5, 5.5);
835 
837  fs->make<TProfile>("p_NpixHits_vs_Vx", "n. Barrel Pixel hits vs. v_{x};v_{x} (cm);n. BPix hits", 20, -20, 20);
838 
840  fs->make<TProfile>("p_NpixHits_vs_Vy", "n. Barrel Pixel hits vs. v_{y};v_{y} (cm);n. BPix hits", 20, -20, 20);
841 
843  fs->make<TProfile>("p_NpixHits_vs_Vz", "n. Barrel Pixel hits vs. v_{z};v_{z} (cm);n. BPix hits", 20, -100, 100);
844 
845  std::string dets[6] = {"PXB", "PXF", "TIB", "TID", "TOB", "TEC"};
846 
847  for (int i = 1; i <= hHitComposition->GetNbinsX(); i++) {
848  hHitComposition->GetXaxis()->SetBinLabel(i, (dets[i - 1]).c_str());
849  }
850 
851  vTrackHistos_.push_back(
852  fs->make<TH1F>("h_tracketa", "Track #eta;#eta_{Track};Number of Tracks", 90, -etaMax_, etaMax_));
853  vTrackHistos_.push_back(fs->make<TH1F>("h_trackphi", "Track #phi;#phi_{Track};Number of Tracks", 90, -M_PI, M_PI));
854  vTrackHistos_.push_back(fs->make<TH1F>(
855  "h_trackNumberOfValidHits", "Track # of valid hits;# of valid hits _{Track};Number of Tracks", 40, 0., 40.));
856  vTrackHistos_.push_back(fs->make<TH1F>(
857  "h_trackNumberOfLostHits", "Track # of lost hits;# of lost hits _{Track};Number of Tracks", 10, 0., 10.));
858  vTrackHistos_.push_back(
859  fs->make<TH1F>("h_curvature", "Curvature #kappa;#kappa_{Track};Number of Tracks", 100, -.05, .05));
860  vTrackHistos_.push_back(fs->make<TH1F>(
861  "h_curvature_pos", "Curvature |#kappa| Positive Tracks;|#kappa_{pos Track}|;Number of Tracks", 100, .0, .05));
862  vTrackHistos_.push_back(fs->make<TH1F>(
863  "h_curvature_neg", "Curvature |#kappa| Negative Tracks;|#kappa_{neg Track}|;Number of Tracks", 100, .0, .05));
864  vTrackHistos_.push_back(
865  fs->make<TH1F>("h_diff_curvature",
866  "Curvature |#kappa| Tracks Difference;|#kappa_{Track}|;# Pos Tracks - # Neg Tracks",
867  100,
868  .0,
869  .05));
870 
871  vTrackHistos_.push_back(
872  fs->make<TH1F>("h_chi2", "Track #chi^{2};#chi^{2}_{Track};Number of Tracks", 500, -0.01, 500.));
873  vTrackHistos_.push_back(
874  fs->make<TH1F>("h_chi2Prob", "#chi^{2} probability;Track Prob(#chi^{2},ndof);Number of Tracks", 100, 0.0, 1.));
875  vTrackHistos_.push_back(
876  fs->make<TH1F>("h_normchi2", "#chi^{2}/ndof;#chi^{2}/ndof;Number of Tracks", 100, -0.01, 10.));
877  //variable binning for chi2/ndof vs. pT
878  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.};
879  vTrackHistos_.push_back(fs->make<TH1F>("h_pt", "Track p_{T};p_{T}^{track} [GeV];Number of Tracks", 250, 0., 250));
880  vTrackHistos_.push_back(fs->make<TH1F>("h_ptrebin", "Track p_{T};p_{T}^{track} [GeV];Number of Tracks", 18, xBins));
881  vTrackHistos_.push_back(fs->make<TH1F>(
882  "h_ptResolution", "#delta_{p_{T}}/p_{T}^{track};#delta_{p_{T}}/p_{T}^{track};Number of Tracks", 100, 0., 0.5));
883  vTrackProfiles_.push_back(fs->make<TProfile>(
884  "p_d0_vs_phi", "Transverse Impact Parameter vs. #phi;#phi_{Track};#LT d_{0} #GT [cm]", 100, -M_PI, M_PI));
885  vTrackProfiles_.push_back(fs->make<TProfile>(
886  "p_dz_vs_phi", "Longitudinal Impact Parameter vs. #phi;#phi_{Track};#LT d_{z} #GT [cm]", 100, -M_PI, M_PI));
887  vTrackProfiles_.push_back(fs->make<TProfile>(
888  "p_d0_vs_eta", "Transverse Impact Parameter vs. #eta;#eta_{Track};#LT d_{0} #GT [cm]", 100, -etaMax_, etaMax_));
889  vTrackProfiles_.push_back(
890  fs->make<TProfile>("p_dz_vs_eta",
891  "Longitudinal Impact Parameter vs. #eta;#eta_{Track};#LT d_{z} #GT [cm]",
892  100,
893  -etaMax_,
894  etaMax_));
895  vTrackProfiles_.push_back(
896  fs->make<TProfile>("p_chi2_vs_phi", "#chi^{2} vs. #phi;#phi_{Track};#LT #chi^{2} #GT", 100, -M_PI, M_PI));
897  vTrackProfiles_.push_back(
898  fs->make<TProfile>("p_chi2Prob_vs_phi",
899  "#chi^{2} probablility vs. #phi;#phi_{Track};#LT #chi^{2} probability#GT",
900  100,
901  -M_PI,
902  M_PI));
903 
904  vTrackProfiles_.push_back(fs->make<TProfile>(
905  "p_chi2Prob_vs_d0", "#chi^{2} probablility vs. |d_{0}|;|d_{0}|[cm];#LT #chi^{2} probability#GT", 100, 0, 80));
906  vTrackProfiles_.push_back(fs->make<TProfile>(
907  "p_chi2Prob_vs_dz", "#chi^{2} probablility vs. dz;d_{z} [cm];#LT #chi^{2} probability#GT", 100, -30, 30));
908  vTrackProfiles_.push_back(fs->make<TProfile>(
909  "p_normchi2_vs_phi", "#chi^{2}/ndof vs. #phi;#phi_{Track};#LT #chi^{2}/ndof #GT", 100, -M_PI, M_PI));
910  vTrackProfiles_.push_back(
911  fs->make<TProfile>("p_chi2_vs_eta", "#chi^{2} vs. #eta;#eta_{Track};#LT #chi^{2} #GT", 100, -etaMax_, etaMax_));
912  vTrackProfiles_.push_back(fs->make<TProfile>(
913  "p_normchi2_vs_pt", "norm #chi^{2} vs. p_{T}_{Track}; p_{T}_{Track};#LT #chi^{2}/ndof #GT", 18, xBins));
914  vTrackProfiles_.push_back(fs->make<TProfile>(
915  "p_normchi2_vs_p", "#chi^{2}/ndof vs. p_{Track};p_{Track};#LT #chi^{2}/ndof #GT", 18, xBins));
916  vTrackProfiles_.push_back(
917  fs->make<TProfile>("p_chi2Prob_vs_eta",
918  "#chi^{2} probability vs. #eta;#eta_{Track};#LT #chi^{2} probability #GT",
919  100,
920  -etaMax_,
921  etaMax_));
922 
923  vTrackProfiles_.push_back(fs->make<TProfile>(
924  "p_normchi2_vs_eta", "#chi^{2}/ndof vs. #eta;#eta_{Track};#LT #chi^{2}/ndof #GT", 100, -etaMax_, etaMax_));
925  vTrackProfiles_.push_back(
926  fs->make<TProfile>("p_kappa_vs_phi", "#kappa vs. #phi;#phi_{Track};#kappa", 100, -M_PI, M_PI));
927  vTrackProfiles_.push_back(
928  fs->make<TProfile>("p_kappa_vs_eta", "#kappa vs. #eta;#eta_{Track};#kappa", 100, -etaMax_, etaMax_));
929  vTrackProfiles_.push_back(
930  fs->make<TProfile>("p_ptResolution_vs_phi",
931  "#delta_{p_{T}}/p_{T}^{track};#phi^{track};#delta_{p_{T}}/p_{T}^{track}",
932  100,
933  -M_PI,
934  M_PI));
935 
936  vTrackProfiles_.push_back(
937  fs->make<TProfile>("p_ptResolution_vs_eta",
938  "#delta_{p_{T}}/p_{T}^{track};#eta^{track};#delta_{p_{T}}/p_{T}^{track}",
939  100,
940  -etaMax_,
941  etaMax_));
942 
943  vTrack2DHistos_.push_back(fs->make<TH2F>(
944  "h2_d0_vs_phi", "Transverse Impact Parameter vs. #phi;#phi_{Track};d_{0} [cm]", 100, -M_PI, M_PI, 100, -1., 1.));
945  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_dz_vs_phi",
946  "Longitudinal Impact Parameter vs. #phi;#phi_{Track};d_{z} [cm]",
947  100,
948  -M_PI,
949  M_PI,
950  100,
951  -100.,
952  100.));
953 
954  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_d0_vs_eta",
955  "Transverse Impact Parameter vs. #eta;#eta_{Track};d_{0} [cm]",
956  100,
957  -etaMax_,
958  etaMax_,
959  100,
960  -1.,
961  1.));
962  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_dz_vs_eta",
963  "Longitudinal Impact Parameter vs. #eta;#eta_{Track};d_{z} [cm]",
964  100,
965  -etaMax_,
966  etaMax_,
967  100,
968  -100.,
969  100.));
970 
971  vTrack2DHistos_.push_back(
972  fs->make<TH2F>("h2_chi2_vs_phi", "#chi^{2} vs. #phi;#phi_{Track};#chi^{2}", 100, -M_PI, M_PI, 500, 0., 500.));
973  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_chi2Prob_vs_phi",
974  "#chi^{2} probability vs. #phi;#phi_{Track};#chi^{2} probability",
975  100,
976  -M_PI,
977  M_PI,
978  100,
979  0.,
980  1.));
981 
982  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_chi2Prob_vs_d0",
983  "#chi^{2} probability vs. |d_{0}|;|d_{0}| [cm];#chi^{2} probability",
984  100,
985  0,
986  80,
987  100,
988  0.,
989  1.));
990 
991  vTrack2DHistos_.push_back(fs->make<TH2F>(
992  "h2_normchi2_vs_phi", "#chi^{2}/ndof vs. #phi;#phi_{Track};#chi^{2}/ndof", 100, -M_PI, M_PI, 100, 0., 10.));
993  vTrack2DHistos_.push_back(fs->make<TH2F>(
994  "h2_chi2_vs_eta", "#chi^{2} vs. #eta;#eta_{Track};#chi^{2}", 100, -etaMax_, etaMax_, 500, 0., 500.));
995  vTrack2DHistos_.push_back(fs->make<TH2F>("h2_chi2Prob_vs_eta",
996  "#chi^{2} probaility vs. #eta;#eta_{Track};#chi^{2} probability",
997  100,
998  -etaMax_,
999  etaMax_,
1000  100,
1001  0.,
1002  1.));
1003 
1004  vTrack2DHistos_.push_back(fs->make<TH2F>(
1005  "h2_normchi2_vs_eta", "#chi^{2}/ndof vs. #eta;#eta_{Track};#chi^{2}/ndof", 100, -etaMax_, etaMax_, 100, 0., 10.));
1006  vTrack2DHistos_.push_back(
1007  fs->make<TH2F>("h2_kappa_vs_phi", "#kappa vs. #phi;#phi_{Track};#kappa", 100, -M_PI, M_PI, 100, .0, .05));
1008  vTrack2DHistos_.push_back(
1009  fs->make<TH2F>("h2_kappa_vs_eta", "#kappa vs. #eta;#eta_{Track};#kappa", 100, -etaMax_, etaMax_, 100, .0, .05));
1010  vTrack2DHistos_.push_back(fs->make<TH2F>(
1011  "h2_normchi2_vs_kappa", "#kappa vs. #chi^{2}/ndof;#chi^{2}/ndof;#kappa", 100, 0., 10, 100, -.03, .03));
1012 
1013  firstEvent_ = true;
1014 
1015  } //beginJob

References reco::TrackBase::algoNames, reco::TrackBase::algoSize, DEBUG, etaMax_, firstEvent_, fs, hCharge, hchi2ndof, hchi2ndofhp, hchi2Probhp, hd0, hd0BS, hd0PV, hd0PVvseta, hd0PVvsphi, hd0PVvspt, hd0vseta, hd0vsphi, hd0vspt, hdxy, hdxyBS, hdxyPV, hdz, hdzBS, hdzPV, hEta, hEtahp, hHit, hHit2D, hHitComposition, hHitCountVsPhiBPix, hHitCountVsPhiFPix, hHitCountVsThetaBPix, hHitCountVsThetaFPix, hHitCountVsXBPix, hHitCountVsXFPix, hHitCountVsYBPix, hHitCountVsYFPix, hHitCountVsZBPix, hHitCountVsZFPix, hHithp, hlumi, hNhighPurity, hnhpxb, hnhpxe, hnhTEC, hnhTIB, hnhTID, hnhTOB, hNtrk, hNtrkZoom, hP, hPhi, hPhiBarrel, hPhiEndcapMinus, hPhiEndcapPlus, hPhihp, hPhiOverlapMinus, hPhiOverlapPlus, hPhp, hPt, hPthp, hQoverP, hQoverPZoom, hrun, htrkAlgo, htrkOriAlgo, htrkQuality, hvx, hvy, hvz, mps_fire::i, ievt, isCosmics_, isPhase1_, itrks, M_PI, TFileService::make(), ZMuMuCategoriesSequences_cff::nbin, pNBpixHitsVsVx, pNBpixHitsVsVy, pNBpixHitsVsVz, AlCaHLTBitMon_QueryRunRegistry::string, vTrack2DHistos_, vTrackHistos_, vTrackProfiles_, and multiplicitycorr_cfi::xBins.

◆ beginRun()

void GeneralPurposeTrackAnalyzer::beginRun ( edm::Run const &  run,
edm::EventSetup const &  setup 
)
inlineoverride

Definition at line 644 of file GeneralPurposeTrackAnalyzer.cc.

646  {
647  // Magnetic Field setup
648  edm::ESHandle<MagneticField> magneticField_;
649  setup.get<IdealMagneticFieldRecord>().get(magneticField_);
650  float B_ = magneticField_.product()->inTesla(GlobalPoint(0, 0, 0)).mag();
651 
652  if (DEBUG) {
653  edm::LogInfo("GeneralPurposeTrackAnalyzer")
654  << "run number:" << run.run() << " magnetic field: " << B_ << " [T]" << std::endl;
655  }
656 
657  //topology setup
658  //edm::ESHandle<TrackerTopology> tTopoHandle;
659  //setup.get<TrackerTopologyRcd>().get(tTopoHandle);
660  //const TrackerTopology* const tTopo = tTopoHandle.product();
661 
662  //SiStrip Latency
664  setup.get<SiStripLatencyRcd>().get(apvlat);
665  if (apvlat->singleReadOutMode() == 1) {
666  mode = 1; // peak mode
667  } else if (apvlat->singleReadOutMode() == 0) {
668  mode = -1; // deco mode
669  }
670 
671  conditionsMap_[run.run()].first = mode;
672  conditionsMap_[run.run()].second = B_;
673  }

References conditionsMap_, DEBUG, get, MagneticField::inTesla(), PV3DBase< T, PVType, FrameType >::mag(), mode, edm::ESHandle< T >::product(), writedatasetfile::run, singleTopDQM_cfi::setup, and SiStripLatency::singleReadOutMode().

◆ endJob()

void GeneralPurposeTrackAnalyzer::endJob ( void  )
inlineoverridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 1018 of file GeneralPurposeTrackAnalyzer.cc.

1020  {
1021  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "*******************************" << std::endl;
1022  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "Events run in total: " << ievt << std::endl;
1023  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "n. tracks: " << itrks << std::endl;
1024  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "*******************************" << std::endl;
1025 
1026  int nFiringTriggers = triggerMap_.size();
1027  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "firing triggers: " << nFiringTriggers << std::endl;
1028  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "*******************************" << std::endl;
1029 
1030  tksByTrigger_ = fs->make<TH1D>(
1031  "tksByTrigger", "tracks by HLT path;;% of # traks", nFiringTriggers, -0.5, nFiringTriggers - 0.5);
1032  evtsByTrigger_ = fs->make<TH1D>(
1033  "evtsByTrigger", "events by HLT path;;% of # events", nFiringTriggers, -0.5, nFiringTriggers - 0.5);
1034 
1035  int i = 0;
1036  for (const auto &it : triggerMap_) {
1037  i++;
1038 
1039  double trkpercent = ((it.second).second) * 100. / double(itrks);
1040  double evtpercent = ((it.second).first) * 100. / double(ievt);
1041 
1042  std::cout.precision(4);
1043 
1044  edm::LogPrint("GeneralPurposeTrackAnalyzer")
1045  << "HLT path: " << std::setw(60) << std::left << it.first << " | events firing: " << std::right
1046  << std::setw(8) << (it.second).first << " (" << std::setw(8) << std::fixed << std::setprecision(4)
1047  << evtpercent << "%)"
1048  << " | tracks collected: " << std::setw(10) << (it.second).second << " (" << std::setw(8) << std::fixed
1049  << std::setprecision(4) << trkpercent << "%)";
1050 
1051  tksByTrigger_->SetBinContent(i, trkpercent);
1052  tksByTrigger_->GetXaxis()->SetBinLabel(i, (it.first).c_str());
1053 
1054  evtsByTrigger_->SetBinContent(i, evtpercent);
1055  evtsByTrigger_->GetXaxis()->SetBinLabel(i, (it.first).c_str());
1056  }
1057 
1058  int nRuns = conditionsMap_.size();
1059 
1060  std::vector<int> theRuns_;
1061  for (const auto &it : conditionsMap_) {
1062  theRuns_.push_back(it.first);
1063  }
1064 
1065  sort(theRuns_.begin(), theRuns_.end());
1066  int runRange = theRuns_.back() - theRuns_.front() + 1;
1067 
1068  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "*******************************" << std::endl;
1069  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "first run: " << theRuns_.front() << std::endl;
1070  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "last run: " << theRuns_.back() << std::endl;
1071  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "considered runs: " << nRuns << std::endl;
1072  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "*******************************" << std::endl;
1073 
1074  modeByRun_ = fs->make<TH1D>("modeByRun",
1075  "Strip APV mode by run number;;APV mode (-1=deco,+1=peak)",
1076  runRange,
1077  theRuns_.front() - 0.5,
1078  theRuns_.back() + 0.5);
1079 
1080  fieldByRun_ = fs->make<TH1D>("fieldByRun",
1081  "CMS B-field intensity by run number;;B-field intensity [T]",
1082  runRange,
1083  theRuns_.front() - 0.5,
1084  theRuns_.back() + 0.5);
1085 
1086  for (const auto &the_r : theRuns_) {
1087  if (conditionsMap_.find(the_r)->second.first != 0) {
1088  edm::LogPrint("GeneralPurposeTrackAnalyzer")
1089  << "run:" << the_r << " | isPeak: " << std::setw(4) << conditionsMap_.find(the_r)->second.first
1090  << "| B-field: " << conditionsMap_.find(the_r)->second.second << " [T]"
1091  << "| events: " << std::setw(10) << runInfoMap_.find(the_r)->second.first << ", tracks " << std::setw(10)
1092  << runInfoMap_.find(the_r)->second.second << std::endl;
1093  }
1094 
1095  modeByRun_->SetBinContent((the_r - theRuns_.front()) + 1, conditionsMap_.find(the_r)->second.first);
1096  fieldByRun_->SetBinContent((the_r - theRuns_.front()) + 1, conditionsMap_.find(the_r)->second.second);
1097  modeByRun_->GetXaxis()->SetBinLabel((the_r - theRuns_.front()) + 1, std::to_string(the_r).c_str());
1098  fieldByRun_->GetXaxis()->SetBinLabel((the_r - theRuns_.front()) + 1, std::to_string(the_r).c_str());
1099  }
1100 
1101  pmap->save(true, 0, 0, "pixelmap.pdf", 600, 800);
1102  pmap->save(true, 0, 0, "pixelmap.png", 500, 750);
1103 
1104  tmap->save(true, 0, 0, "trackermap.pdf");
1105  tmap->save(true, 0, 0, "trackermap.png");
1106  }

References conditionsMap_, gather_cfg::cout, evtsByTrigger_, fieldByRun_, dqmdumpme::first, alignBH_cfg::fixed, fs, mps_fire::i, ievt, itrks, TFileService::make(), modeByRun_, pmap, runInfoMap_, edm::second(), tksByTrigger_, tmap, and triggerMap_.

Referenced by o2olib.O2ORunMgr::executeJob().

◆ endRun()

void GeneralPurposeTrackAnalyzer::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverride

Definition at line 676 of file GeneralPurposeTrackAnalyzer.cc.

676 {}

◆ GetIndex()

template<class OBJECT_TYPE >
int GeneralPurposeTrackAnalyzer::GetIndex ( const std::vector< OBJECT_TYPE * > &  vec,
const TString &  name 
)
inline

Definition at line 116 of file GeneralPurposeTrackAnalyzer.cc.

116  {
117  int result = 0;
118  for (typename std::vector<OBJECT_TYPE *>::const_iterator iter = vec.begin(), iterEnd = vec.end(); iter != iterEnd;
119  ++iter, ++result) {
120  if (*iter && (*iter)->GetName() == name)
121  return result;
122  }
123  edm::LogError("GeneralPurposeTrackAnalyzer") << "@SUB=GeneralPurposeTrackAnalyzer::GetIndex"
124  << " could not find " << name;
125  return -1;
126  }

References Skims_PA_cff::name, and mps_fire::result.

Referenced by analyze().

◆ isHit2D()

bool GeneralPurposeTrackAnalyzer::isHit2D ( const TrackingRecHit hit)
inline

Definition at line 1109 of file GeneralPurposeTrackAnalyzer.cc.

1111  {
1112  bool countStereoHitAs2D_ = true;
1113  // we count SiStrip stereo modules as 2D if selected via countStereoHitAs2D_
1114  // (since they provide theta information)
1115  if (!hit.isValid() ||
1116  (hit.dimension() < 2 && !countStereoHitAs2D_ && !dynamic_cast<const SiStripRecHit1D *>(&hit))) {
1117  return false; // real RecHit1D - but SiStripRecHit1D depends on countStereoHitAs2D_
1118  } else {
1119  const DetId detId(hit.geographicalId());
1120  if (detId.det() == DetId::Tracker) {
1121  if (detId.subdetId() == kBPIX || detId.subdetId() == kFPIX) {
1122  return true; // pixel is always 2D
1123  } else { // should be SiStrip now
1124  const SiStripDetId stripId(detId);
1125  if (stripId.stereo())
1126  return countStereoHitAs2D_; // stereo modules
1127  else if (dynamic_cast<const SiStripRecHit1D *>(&hit) || dynamic_cast<const SiStripRecHit2D *>(&hit))
1128  return false; // rphi modules hit
1129  //the following two are not used any more since ages...
1130  else if (dynamic_cast<const SiStripMatchedRecHit2D *>(&hit))
1131  return true; // matched is 2D
1132  else if (dynamic_cast<const ProjectedSiStripRecHit2D *>(&hit)) {
1133  const ProjectedSiStripRecHit2D *pH = static_cast<const ProjectedSiStripRecHit2D *>(&hit);
1134  return (countStereoHitAs2D_ && this->isHit2D(pH->originalHit())); // depends on original...
1135  } else {
1136  edm::LogError("UnkownType") << "@SUB=GeneralPurposeTrackAnalyzer::isHit2D"
1137  << "Tracker hit not in pixel, neither SiStripRecHit[12]D nor "
1138  << "SiStripMatchedRecHit2D nor ProjectedSiStripRecHit2D.";
1139  return false;
1140  }
1141  }
1142  } else { // not tracker??
1143  edm::LogWarning("DetectorMismatch") << "@SUB=GeneralPurposeTrackAnalyzer::isHit2D"
1144  << "Hit not in tracker with 'official' dimension >=2.";
1145  return true; // dimension() >= 2 so accept that...
1146  }
1147  }
1148  // never reached...
1149  }

References kBPIX, kFPIX, ProjectedSiStripRecHit2D::originalHit(), SiStripDetId::stereo(), and DetId::Tracker.

Referenced by analyze().

Member Data Documentation

◆ beamspotToken

edm::EDGetTokenT<reco::BeamSpot> GeneralPurposeTrackAnalyzer::beamspotToken

Definition at line 256 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and GeneralPurposeTrackAnalyzer().

◆ conditionsMap_

std::map<int, std::pair<int, float> > GeneralPurposeTrackAnalyzer::conditionsMap_

Definition at line 260 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by beginRun(), and endJob().

◆ etaMax_

float GeneralPurposeTrackAnalyzer::etaMax_

Definition at line 247 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by beginJob().

◆ evtsByTrigger_

TH1D* GeneralPurposeTrackAnalyzer::evtsByTrigger_

Definition at line 237 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by endJob().

◆ fieldByRun_

TH1D* GeneralPurposeTrackAnalyzer::fieldByRun_

Definition at line 240 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by endJob().

◆ firstEvent_

bool GeneralPurposeTrackAnalyzer::firstEvent_

Definition at line 245 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by beginJob().

◆ fs

edm::Service<TFileService> GeneralPurposeTrackAnalyzer::fs

Definition at line 128 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by beginJob(), and endJob().

◆ hCharge

TH1D* GeneralPurposeTrackAnalyzer::hCharge

Definition at line 174 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hchi2ndof

TH1D* GeneralPurposeTrackAnalyzer::hchi2ndof

Definition at line 133 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hchi2ndofhp

TH1D* GeneralPurposeTrackAnalyzer::hchi2ndofhp

Definition at line 171 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hchi2Probhp

TH1D* GeneralPurposeTrackAnalyzer::hchi2Probhp

Definition at line 172 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hd0

TH1D* GeneralPurposeTrackAnalyzer::hd0

Definition at line 196 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hd0BS

TH1D* GeneralPurposeTrackAnalyzer::hd0BS

Definition at line 224 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hd0PV

TH1D* GeneralPurposeTrackAnalyzer::hd0PV

Definition at line 227 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hd0PVvseta

TH2D* GeneralPurposeTrackAnalyzer::hd0PVvseta

Definition at line 201 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hd0PVvsphi

TH2D* GeneralPurposeTrackAnalyzer::hd0PVvsphi

Definition at line 200 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hd0PVvspt

TH2D* GeneralPurposeTrackAnalyzer::hd0PVvspt

Definition at line 202 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hd0vseta

TH2D* GeneralPurposeTrackAnalyzer::hd0vseta

Definition at line 205 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by beginJob().

◆ hd0vsphi

TH2D* GeneralPurposeTrackAnalyzer::hd0vsphi

Definition at line 204 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by beginJob().

◆ hd0vspt

TH2D* GeneralPurposeTrackAnalyzer::hd0vspt

Definition at line 206 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by beginJob().

◆ hDeltaEta

TH1D* GeneralPurposeTrackAnalyzer::hDeltaEta

Definition at line 190 of file GeneralPurposeTrackAnalyzer.cc.

◆ hDeltaPhi

TH1D* GeneralPurposeTrackAnalyzer::hDeltaPhi

Definition at line 189 of file GeneralPurposeTrackAnalyzer.cc.

◆ hDeltaR

TH1D* GeneralPurposeTrackAnalyzer::hDeltaR

Definition at line 191 of file GeneralPurposeTrackAnalyzer.cc.

◆ hdxy

TH1D* GeneralPurposeTrackAnalyzer::hdxy

Definition at line 198 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hdxyBS

TH1D* GeneralPurposeTrackAnalyzer::hdxyBS

Definition at line 223 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hdxyPV

TH1D* GeneralPurposeTrackAnalyzer::hdxyPV

Definition at line 226 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hdz

TH1D* GeneralPurposeTrackAnalyzer::hdz

Definition at line 197 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hdzBS

TH1D* GeneralPurposeTrackAnalyzer::hdzBS

Definition at line 225 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hdzPV

TH1D* GeneralPurposeTrackAnalyzer::hdzPV

Definition at line 228 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hEta

TH1D* GeneralPurposeTrackAnalyzer::hEta

Definition at line 177 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hEtahp

TH1D* GeneralPurposeTrackAnalyzer::hEtahp

Definition at line 169 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hEtaMinus

TH1D* GeneralPurposeTrackAnalyzer::hEtaMinus

Definition at line 179 of file GeneralPurposeTrackAnalyzer.cc.

◆ hEtaPlus

TH1D* GeneralPurposeTrackAnalyzer::hEtaPlus

Definition at line 178 of file GeneralPurposeTrackAnalyzer.cc.

◆ hHit

TH1D* GeneralPurposeTrackAnalyzer::hHit

Definition at line 147 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHit2D

TH1D* GeneralPurposeTrackAnalyzer::hHit2D

Definition at line 148 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitComposition

TH1D* GeneralPurposeTrackAnalyzer::hHitComposition

Definition at line 215 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsPhiBPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsPhiBPix

Definition at line 158 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsPhiFPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsPhiFPix

Definition at line 161 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsThetaBPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsThetaBPix

Definition at line 157 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsThetaFPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsThetaFPix

Definition at line 160 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsXBPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsXBPix

Definition at line 150 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsXFPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsXFPix

Definition at line 151 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsYBPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsYBPix

Definition at line 152 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsYFPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsYFPix

Definition at line 153 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsZBPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsZBPix

Definition at line 154 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsZFPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsZFPix

Definition at line 155 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHithp

TH1D* GeneralPurposeTrackAnalyzer::hHithp

Definition at line 168 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitMinus

TH1D* GeneralPurposeTrackAnalyzer::hHitMinus

Definition at line 164 of file GeneralPurposeTrackAnalyzer.cc.

◆ hHitPlus

TH1D* GeneralPurposeTrackAnalyzer::hHitPlus

Definition at line 163 of file GeneralPurposeTrackAnalyzer.cc.

◆ hltresultsToken

edm::EDGetTokenT<edm::TriggerResults> GeneralPurposeTrackAnalyzer::hltresultsToken

Definition at line 255 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and GeneralPurposeTrackAnalyzer().

◆ hlumi

TH1D* GeneralPurposeTrackAnalyzer::hlumi

Definition at line 230 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hMinPt

TH1D* GeneralPurposeTrackAnalyzer::hMinPt

Definition at line 144 of file GeneralPurposeTrackAnalyzer.cc.

◆ hMultCand

TH1D* GeneralPurposeTrackAnalyzer::hMultCand

Definition at line 221 of file GeneralPurposeTrackAnalyzer.cc.

◆ hNhighPurity

TH1D* GeneralPurposeTrackAnalyzer::hNhighPurity

Definition at line 139 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hnhpxb

TH1D* GeneralPurposeTrackAnalyzer::hnhpxb

Definition at line 208 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hnhpxe

TH1D* GeneralPurposeTrackAnalyzer::hnhpxe

Definition at line 209 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hnhTEC

TH1D* GeneralPurposeTrackAnalyzer::hnhTEC

Definition at line 213 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hnhTIB

TH1D* GeneralPurposeTrackAnalyzer::hnhTIB

Definition at line 210 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hnhTID

TH1D* GeneralPurposeTrackAnalyzer::hnhTID

Definition at line 211 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hnhTOB

TH1D* GeneralPurposeTrackAnalyzer::hnhTOB

Definition at line 212 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hNtrk

TH1D* GeneralPurposeTrackAnalyzer::hNtrk

Definition at line 134 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hNtrkZoom

TH1D* GeneralPurposeTrackAnalyzer::hNtrkZoom

Definition at line 135 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hP

TH1D* GeneralPurposeTrackAnalyzer::hP

Definition at line 140 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPhi

TH1D* GeneralPurposeTrackAnalyzer::hPhi

Definition at line 180 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPhiBarrel

TH1D* GeneralPurposeTrackAnalyzer::hPhiBarrel

Definition at line 181 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPhiEndcapMinus

TH1D* GeneralPurposeTrackAnalyzer::hPhiEndcapMinus

Definition at line 185 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPhiEndcapPlus

TH1D* GeneralPurposeTrackAnalyzer::hPhiEndcapPlus

Definition at line 184 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPhihp

TH1D* GeneralPurposeTrackAnalyzer::hPhihp

Definition at line 170 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPhiMinus

TH1D* GeneralPurposeTrackAnalyzer::hPhiMinus

Definition at line 187 of file GeneralPurposeTrackAnalyzer.cc.

◆ hPhiOverlapMinus

TH1D* GeneralPurposeTrackAnalyzer::hPhiOverlapMinus

Definition at line 183 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPhiOverlapPlus

TH1D* GeneralPurposeTrackAnalyzer::hPhiOverlapPlus

Definition at line 182 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPhiPlus

TH1D* GeneralPurposeTrackAnalyzer::hPhiPlus

Definition at line 186 of file GeneralPurposeTrackAnalyzer.cc.

◆ hPhp

TH1D* GeneralPurposeTrackAnalyzer::hPhp

Definition at line 166 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPMinus

TH1D* GeneralPurposeTrackAnalyzer::hPMinus

Definition at line 142 of file GeneralPurposeTrackAnalyzer.cc.

◆ hPPlus

TH1D* GeneralPurposeTrackAnalyzer::hPPlus

Definition at line 141 of file GeneralPurposeTrackAnalyzer.cc.

◆ hPt

TH1D* GeneralPurposeTrackAnalyzer::hPt

Definition at line 143 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPthp

TH1D* GeneralPurposeTrackAnalyzer::hPthp

Definition at line 167 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPtMinus

TH1D* GeneralPurposeTrackAnalyzer::hPtMinus

Definition at line 146 of file GeneralPurposeTrackAnalyzer.cc.

◆ hPtPlus

TH1D* GeneralPurposeTrackAnalyzer::hPtPlus

Definition at line 145 of file GeneralPurposeTrackAnalyzer.cc.

◆ hQoverP

TH1D* GeneralPurposeTrackAnalyzer::hQoverP

Definition at line 175 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hQoverPZoom

TH1D* GeneralPurposeTrackAnalyzer::hQoverPZoom

Definition at line 176 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hrun

TH1D* GeneralPurposeTrackAnalyzer::hrun

Definition at line 229 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ htrkAlgo

TH1I* GeneralPurposeTrackAnalyzer::htrkAlgo

Definition at line 137 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ htrkOriAlgo

TH1I* GeneralPurposeTrackAnalyzer::htrkOriAlgo

Definition at line 138 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ htrkQuality

TH1I* GeneralPurposeTrackAnalyzer::htrkQuality

Definition at line 136 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hvx

TH1D* GeneralPurposeTrackAnalyzer::hvx

Definition at line 193 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hvy

TH1D* GeneralPurposeTrackAnalyzer::hvy

Definition at line 194 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hvz

TH1D* GeneralPurposeTrackAnalyzer::hvz

Definition at line 195 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ ievt

int GeneralPurposeTrackAnalyzer::ievt

Definition at line 242 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ isCosmics_

bool GeneralPurposeTrackAnalyzer::isCosmics_

Definition at line 252 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), beginJob(), and GeneralPurposeTrackAnalyzer().

◆ isPhase1_

bool GeneralPurposeTrackAnalyzer::isPhase1_

Definition at line 246 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ itrks

int GeneralPurposeTrackAnalyzer::itrks

Definition at line 243 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ mode

int GeneralPurposeTrackAnalyzer::mode

Definition at line 244 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by beginRun(), and alignment.Alignment::restrictTo().

◆ modeByRun_

TH1D* GeneralPurposeTrackAnalyzer::modeByRun_

Definition at line 239 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by endJob().

◆ pmap

std::unique_ptr<TrackerMap> GeneralPurposeTrackAnalyzer::pmap

Definition at line 131 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), endJob(), and GeneralPurposeTrackAnalyzer().

◆ pNBpixHitsVsVx

TProfile* GeneralPurposeTrackAnalyzer::pNBpixHitsVsVx

Definition at line 217 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ pNBpixHitsVsVy

TProfile* GeneralPurposeTrackAnalyzer::pNBpixHitsVsVy

Definition at line 218 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ pNBpixHitsVsVz

TProfile* GeneralPurposeTrackAnalyzer::pNBpixHitsVsVz

Definition at line 219 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ runInfoMap_

std::map<int, std::pair<int, int> > GeneralPurposeTrackAnalyzer::runInfoMap_

Definition at line 261 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and endJob().

◆ theTrackCollectionToken

edm::EDGetTokenT<reco::TrackCollection> GeneralPurposeTrackAnalyzer::theTrackCollectionToken

Definition at line 254 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and GeneralPurposeTrackAnalyzer().

◆ tksByTrigger_

TH1D* GeneralPurposeTrackAnalyzer::tksByTrigger_

Definition at line 236 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by endJob().

◆ TkTag_

std::string GeneralPurposeTrackAnalyzer::TkTag_

Definition at line 251 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by GeneralPurposeTrackAnalyzer().

◆ tmap

std::unique_ptr<TrackerMap> GeneralPurposeTrackAnalyzer::tmap

Definition at line 130 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), endJob(), and GeneralPurposeTrackAnalyzer().

◆ trackerGeometry_

const TrackerGeometry* GeneralPurposeTrackAnalyzer::trackerGeometry_

Definition at line 249 of file GeneralPurposeTrackAnalyzer.cc.

◆ triggerMap_

std::map<std::string, std::pair<int, int> > GeneralPurposeTrackAnalyzer::triggerMap_

Definition at line 259 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and endJob().

◆ vertexToken

edm::EDGetTokenT<reco::VertexCollection> GeneralPurposeTrackAnalyzer::vertexToken

Definition at line 257 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by GeneralPurposeTrackAnalyzer().

◆ vTrack2DHistos_

std::vector<TH1 *> GeneralPurposeTrackAnalyzer::vTrack2DHistos_

Definition at line 234 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ vTrackHistos_

std::vector<TH1 *> GeneralPurposeTrackAnalyzer::vTrackHistos_

Definition at line 232 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ vTrackProfiles_

std::vector<TH1 *> GeneralPurposeTrackAnalyzer::vTrackProfiles_

Definition at line 233 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
GeneralPurposeTrackAnalyzer::hHitCountVsYBPix
TH1D * hHitCountVsYBPix
Definition: GeneralPurposeTrackAnalyzer.cc:152
GeneralPurposeTrackAnalyzer::itrks
int itrks
Definition: GeneralPurposeTrackAnalyzer.cc:243
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
geometry
ESHandle< TrackerGeometry > geometry
Definition: TkLasBeamFitter.cc:200
GeneralPurposeTrackAnalyzer::conditionsMap_
std::map< int, std::pair< int, float > > conditionsMap_
Definition: GeneralPurposeTrackAnalyzer.cc:260
MagneticField::inTesla
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
mps_fire.i
i
Definition: mps_fire.py:355
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
GeneralPurposeTrackAnalyzer::hnhTOB
TH1D * hnhTOB
Definition: GeneralPurposeTrackAnalyzer.cc:212
reco::TrackBase::tight
Definition: TrackBase.h:153
GeneralPurposeTrackAnalyzer::hd0BS
TH1D * hd0BS
Definition: GeneralPurposeTrackAnalyzer.cc:224
PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
reco::TrackBase::loose
Definition: TrackBase.h:152
GeomDet
Definition: GeomDet.h:27
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
reco::TrackBase::goodIterative
Definition: TrackBase.h:156
HLTBitAnalyser_cfi.hltresults
hltresults
Definition: HLTBitAnalyser_cfi.py:13
GeneralPurposeTrackAnalyzer::triggerMap_
std::map< std::string, std::pair< int, int > > triggerMap_
Definition: GeneralPurposeTrackAnalyzer.cc:259
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
GeneralPurposeTrackAnalyzer::vTrack2DHistos_
std::vector< TH1 * > vTrack2DHistos_
Definition: GeneralPurposeTrackAnalyzer.cc:234
reco::Vertex::z
double z() const
z coordinate
Definition: Vertex.h:120
reco::TrackBase::confirmed
Definition: TrackBase.h:155
GeneralPurposeTrackAnalyzer::isHit2D
bool isHit2D(const TrackingRecHit &hit)
Definition: GeneralPurposeTrackAnalyzer.cc:1109
GeneralPurposeTrackAnalyzer::hd0
TH1D * hd0
Definition: GeneralPurposeTrackAnalyzer.cc:196
GeneralPurposeTrackAnalyzer::hPthp
TH1D * hPthp
Definition: GeneralPurposeTrackAnalyzer.cc:167
PV3DBase::theta
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
reco::TrackBase::undefQuality
Definition: TrackBase.h:151
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
gather_cfg.cout
cout
Definition: gather_cfg.py:144
geometry
Definition: geometry.py:1
edm::LogInfo
Definition: MessageLogger.h:254
GeneralPurposeTrackAnalyzer::hvz
TH1D * hvz
Definition: GeneralPurposeTrackAnalyzer.cc:195
GeneralPurposeTrackAnalyzer::hNhighPurity
TH1D * hNhighPurity
Definition: GeneralPurposeTrackAnalyzer.cc:139
GeneralPurposeTrackAnalyzer::tksByTrigger_
TH1D * tksByTrigger_
Definition: GeneralPurposeTrackAnalyzer.cc:236
GeneralPurposeTrackAnalyzer::hnhpxb
TH1D * hnhpxb
Definition: GeneralPurposeTrackAnalyzer.cc:208
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
GeneralPurposeTrackAnalyzer::hHitCountVsPhiFPix
TH1D * hHitCountVsPhiFPix
Definition: GeneralPurposeTrackAnalyzer.cc:161
GeneralPurposeTrackAnalyzer::TkTag_
std::string TkTag_
Definition: GeneralPurposeTrackAnalyzer.cc:251
GeneralPurposeTrackAnalyzer::hHitCountVsPhiBPix
TH1D * hHitCountVsPhiBPix
Definition: GeneralPurposeTrackAnalyzer.cc:158
GeneralPurposeTrackAnalyzer::hHitCountVsThetaFPix
TH1D * hHitCountVsThetaFPix
Definition: GeneralPurposeTrackAnalyzer.cc:160
edm::Handle< reco::TrackCollection >
GeneralPurposeTrackAnalyzer::beamspotToken
edm::EDGetTokenT< reco::BeamSpot > beamspotToken
Definition: GeneralPurposeTrackAnalyzer.cc:256
dqmdumpme.first
first
Definition: dqmdumpme.py:55
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
ProjectedSiStripRecHit2D
Definition: ProjectedSiStripRecHit2D.h:8
GeneralPurposeTrackAnalyzer::hd0PVvspt
TH2D * hd0PVvspt
Definition: GeneralPurposeTrackAnalyzer.cc:202
GeneralPurposeTrackAnalyzer::hdxy
TH1D * hdxy
Definition: GeneralPurposeTrackAnalyzer.cc:198
SiPixelRecHit
Our base class.
Definition: SiPixelRecHit.h:23
GeneralPurposeTrackAnalyzer::runInfoMap_
std::map< int, std::pair< int, int > > runInfoMap_
Definition: GeneralPurposeTrackAnalyzer.cc:261
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
GeneralPurposeTrackAnalyzer::modeByRun_
TH1D * modeByRun_
Definition: GeneralPurposeTrackAnalyzer.cc:239
GeneralPurposeTrackAnalyzer::hHitCountVsYFPix
TH1D * hHitCountVsYFPix
Definition: GeneralPurposeTrackAnalyzer.cc:153
GeneralPurposeTrackAnalyzer::hnhTEC
TH1D * hnhTEC
Definition: GeneralPurposeTrackAnalyzer.cc:213
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
DetId
Definition: DetId.h:17
GeneralPurposeTrackAnalyzer::hQoverPZoom
TH1D * hQoverPZoom
Definition: GeneralPurposeTrackAnalyzer.cc:176
accept
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
GeneralPurposeTrackAnalyzer::hd0PVvseta
TH2D * hd0PVvseta
Definition: GeneralPurposeTrackAnalyzer.cc:201
GeneralPurposeTrackAnalyzer::isCosmics_
bool isCosmics_
Definition: GeneralPurposeTrackAnalyzer.cc:252
GeneralPurposeTrackAnalyzer::hlumi
TH1D * hlumi
Definition: GeneralPurposeTrackAnalyzer.cc:230
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
StandaloneTrackMonitor_cfi.vertexTag
vertexTag
Definition: StandaloneTrackMonitor_cfi.py:6
GeomDetEnumerators::P1PXEC
Definition: GeomDetEnumerators.h:26
GeneralPurposeTrackAnalyzer::hdxyBS
TH1D * hdxyBS
Definition: GeneralPurposeTrackAnalyzer.cc:223
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
GeneralPurposeTrackAnalyzer::hdz
TH1D * hdz
Definition: GeneralPurposeTrackAnalyzer.cc:197
GeneralPurposeTrackAnalyzer::hEta
TH1D * hEta
Definition: GeneralPurposeTrackAnalyzer.cc:177
reco::BeamSpot
Definition: BeamSpot.h:21
edm::ESHandle< MagneticField >
GeneralPurposeTrackAnalyzer::hPhiOverlapMinus
TH1D * hPhiOverlapMinus
Definition: GeneralPurposeTrackAnalyzer.cc:183
ProjectedSiStripRecHit2D::originalHit
SiStripRecHit2D originalHit() const
Definition: ProjectedSiStripRecHit2D.h:56
kFPIX
const int kFPIX
Definition: GeneralPurposeTrackAnalyzer.cc:82
GeneralPurposeTrackAnalyzer::hd0PVvsphi
TH2D * hd0PVvsphi
Definition: GeneralPurposeTrackAnalyzer.cc:200
multiplicitycorr_cfi.xBins
xBins
Definition: multiplicitycorr_cfi.py:5
edm::TriggerNames::triggerNames
Strings const & triggerNames() const
Definition: TriggerNames.cc:20
AlignmentProducer_cff.beamSpotTag
beamSpotTag
Definition: AlignmentProducer_cff.py:50
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
GeneralPurposeTrackAnalyzer::pNBpixHitsVsVx
TProfile * pNBpixHitsVsVx
Definition: GeneralPurposeTrackAnalyzer.cc:217
Point3DBase< float, LocalTag >
GeneralPurposeTrackAnalyzer::pNBpixHitsVsVy
TProfile * pNBpixHitsVsVy
Definition: GeneralPurposeTrackAnalyzer.cc:218
TrackerGeometry::isThere
bool isThere(GeomDetEnumerators::SubDetector subdet) const
Definition: TrackerGeometry.cc:219
GeneralPurposeTrackAnalyzer::hHit2D
TH1D * hHit2D
Definition: GeneralPurposeTrackAnalyzer.cc:148
GeneralPurposeTrackAnalyzer::hd0vseta
TH2D * hd0vseta
Definition: GeneralPurposeTrackAnalyzer.cc:205
MagneticField::inInverseGeV
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition: MagneticField.h:36
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
DEBUG
#define DEBUG
Definition: GeneralPurposeTrackAnalyzer.cc:79
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GeneralPurposeTrackAnalyzer::hchi2Probhp
TH1D * hchi2Probhp
Definition: GeneralPurposeTrackAnalyzer.cc:172
GeneralPurposeTrackAnalyzer::hHitCountVsThetaBPix
TH1D * hHitCountVsThetaBPix
Definition: GeneralPurposeTrackAnalyzer.cc:157
GeneralPurposeTrackAnalyzer::hPhp
TH1D * hPhp
Definition: GeneralPurposeTrackAnalyzer.cc:166
GeneralPurposeTrackAnalyzer::evtsByTrigger_
TH1D * evtsByTrigger_
Definition: GeneralPurposeTrackAnalyzer.cc:237
EgHLTOffTrigSelection_cfi.trigName
trigName
Definition: EgHLTOffTrigSelection_cfi.py:8
edm::LogWarning
Definition: MessageLogger.h:141
GeneralPurposeTrackAnalyzer::hPhiEndcapPlus
TH1D * hPhiEndcapPlus
Definition: GeneralPurposeTrackAnalyzer.cc:184
GeneralPurposeTrackAnalyzer::etaMax_
float etaMax_
Definition: GeneralPurposeTrackAnalyzer.cc:247
GeneralPurposeTrackAnalyzer::hvy
TH1D * hvy
Definition: GeneralPurposeTrackAnalyzer.cc:194
GeomDetEnumerators::P1PXB
Definition: GeomDetEnumerators.h:25
GeneralPurposeTrackAnalyzer::pmap
std::unique_ptr< TrackerMap > pmap
Definition: GeneralPurposeTrackAnalyzer.cc:131
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
edm::LogError
Definition: MessageLogger.h:183
DetId::Tracker
Definition: DetId.h:25
GeneralPurposeTrackAnalyzer::htrkOriAlgo
TH1I * htrkOriAlgo
Definition: GeneralPurposeTrackAnalyzer.cc:138
duplicaterechits_cfi.trackCollection
trackCollection
Definition: duplicaterechits_cfi.py:4
GeneralPurposeTrackAnalyzer::hPhiBarrel
TH1D * hPhiBarrel
Definition: GeneralPurposeTrackAnalyzer.cc:181
reco::Vertex::x
double x() const
x coordinate
Definition: Vertex.h:116
GeneralPurposeTrackAnalyzer::vertexToken
edm::EDGetTokenT< reco::VertexCollection > vertexToken
Definition: GeneralPurposeTrackAnalyzer.cc:257
GeneralPurposeTrackAnalyzer::hEtahp
TH1D * hEtahp
Definition: GeneralPurposeTrackAnalyzer.cc:169
GeneralPurposeTrackAnalyzer::pNBpixHitsVsVz
TProfile * pNBpixHitsVsVz
Definition: GeneralPurposeTrackAnalyzer.cc:219
GeneralPurposeTrackAnalyzer::hnhpxe
TH1D * hnhpxe
Definition: GeneralPurposeTrackAnalyzer.cc:209
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
GeneralPurposeTrackAnalyzer::hrun
TH1D * hrun
Definition: GeneralPurposeTrackAnalyzer.cc:229
edm::LogPrint
Definition: MessageLogger.h:342
GeneralPurposeTrackAnalyzer::hchi2ndof
TH1D * hchi2ndof
Definition: GeneralPurposeTrackAnalyzer.cc:133
GeneralPurposeTrackAnalyzer::hnhTIB
TH1D * hnhTIB
Definition: GeneralPurposeTrackAnalyzer.cc:210
GeneralPurposeTrackAnalyzer::hHitCountVsZFPix
TH1D * hHitCountVsZFPix
Definition: GeneralPurposeTrackAnalyzer.cc:155
SiStripLatency::singleReadOutMode
int16_t singleReadOutMode() const
Definition: SiStripLatency.cc:122
GeneralPurposeTrackAnalyzer::tmap
std::unique_ptr< TrackerMap > tmap
Definition: GeneralPurposeTrackAnalyzer.cc:130
GeneralPurposeTrackAnalyzer::fs
edm::Service< TFileService > fs
Definition: GeneralPurposeTrackAnalyzer.cc:128
GeneralPurposeTrackAnalyzer::hP
TH1D * hP
Definition: GeneralPurposeTrackAnalyzer.cc:140
GeneralPurposeTrackAnalyzer::hHit
TH1D * hHit
Definition: GeneralPurposeTrackAnalyzer.cc:147
get
#define get
GeneralPurposeTrackAnalyzer::htrkAlgo
TH1I * htrkAlgo
Definition: GeneralPurposeTrackAnalyzer.cc:137
HcalObjRepresent::Fill
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: HcalObjRepresent.h:1053
GeneralPurposeTrackAnalyzer::hnhTID
TH1D * hnhTID
Definition: GeneralPurposeTrackAnalyzer.cc:211
kBPIX
const int kBPIX
Definition: GeneralPurposeTrackAnalyzer.cc:81
GeneralPurposeTrackAnalyzer::hHithp
TH1D * hHithp
Definition: GeneralPurposeTrackAnalyzer.cc:168
GeneralPurposeTrackAnalyzer::hHitCountVsZBPix
TH1D * hHitCountVsZBPix
Definition: GeneralPurposeTrackAnalyzer.cc:154
edm::TriggerNames::triggerName
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:22
GeneralPurposeTrackAnalyzer::hPhihp
TH1D * hPhihp
Definition: GeneralPurposeTrackAnalyzer.cc:170
GeneralPurposeTrackAnalyzer::ievt
int ievt
Definition: GeneralPurposeTrackAnalyzer.cc:242
GeneralPurposeTrackAnalyzer::hvx
TH1D * hvx
Definition: GeneralPurposeTrackAnalyzer.cc:193
GeneralPurposeTrackAnalyzer::GetIndex
int GetIndex(const std::vector< OBJECT_TYPE * > &vec, const TString &name)
Definition: GeneralPurposeTrackAnalyzer.cc:116
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
GeneralPurposeTrackAnalyzer::hdzPV
TH1D * hdzPV
Definition: GeneralPurposeTrackAnalyzer.cc:228
GeneralPurposeTrackAnalyzer::hPhiEndcapMinus
TH1D * hPhiEndcapMinus
Definition: GeneralPurposeTrackAnalyzer.cc:185
GeneralPurposeTrackAnalyzer::theTrackCollectionToken
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionToken
Definition: GeneralPurposeTrackAnalyzer.cc:254
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
writedatasetfile.run
run
Definition: writedatasetfile.py:27
GeneralPurposeTrackAnalyzer::fieldByRun_
TH1D * fieldByRun_
Definition: GeneralPurposeTrackAnalyzer.cc:240
reco::Vertex::y
double y() const
y coordinate
Definition: Vertex.h:118
GeneralPurposeTrackAnalyzer::hHitCountVsXFPix
TH1D * hHitCountVsXFPix
Definition: GeneralPurposeTrackAnalyzer.cc:151
GeneralPurposeTrackAnalyzer::hNtrkZoom
TH1D * hNtrkZoom
Definition: GeneralPurposeTrackAnalyzer.cc:135
PVValHelper::dxy
Definition: PVValidationHelpers.h:47
reco::TrackBase::algoSize
Definition: TrackBase.h:141
PVValHelper::dz
Definition: PVValidationHelpers.h:50
GeneralPurposeTrackAnalyzer::mode
int mode
Definition: GeneralPurposeTrackAnalyzer.cc:244
spclusmultinvestigator_cfi.vertexCollection
vertexCollection
Definition: spclusmultinvestigator_cfi.py:4
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
GeneralPurposeTrackAnalyzer::hNtrk
TH1D * hNtrk
Definition: GeneralPurposeTrackAnalyzer.cc:134
edm::TriggerNames
Definition: TriggerNames.h:55
ZMuMuCategoriesSequences_cff.nbin
nbin
Definition: ZMuMuCategoriesSequences_cff.py:25
GeneralPurposeTrackAnalyzer::hPhi
TH1D * hPhi
Definition: GeneralPurposeTrackAnalyzer.cc:180
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
SiStripLatencyRcd
Definition: SiStripCondDataRecords.h:36
GeneralPurposeTrackAnalyzer::hQoverP
TH1D * hQoverP
Definition: GeneralPurposeTrackAnalyzer.cc:175
GeneralPurposeTrackAnalyzer::hltresultsToken
edm::EDGetTokenT< edm::TriggerResults > hltresultsToken
Definition: GeneralPurposeTrackAnalyzer.cc:255
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
mps_fire.result
result
Definition: mps_fire.py:303
GeneralPurposeTrackAnalyzer::hdzBS
TH1D * hdzBS
Definition: GeneralPurposeTrackAnalyzer.cc:225
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
kappa
static const G4double kappa
Definition: UrbanMscModel93.cc:35
GeneralPurposeTrackAnalyzer::isPhase1_
bool isPhase1_
Definition: GeneralPurposeTrackAnalyzer.cc:246
SiStripDetId
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
GeneralPurposeTrackAnalyzer::hHitCountVsXBPix
TH1D * hHitCountVsXBPix
Definition: GeneralPurposeTrackAnalyzer.cc:150
GeneralPurposeTrackAnalyzer::hPt
TH1D * hPt
Definition: GeneralPurposeTrackAnalyzer.cc:143
GeneralPurposeTrackAnalyzer::hchi2ndofhp
TH1D * hchi2ndofhp
Definition: GeneralPurposeTrackAnalyzer.cc:171
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
GeneralPurposeTrackAnalyzer::hHitComposition
TH1D * hHitComposition
Definition: GeneralPurposeTrackAnalyzer.cc:215
GeneralPurposeTrackAnalyzer::firstEvent_
bool firstEvent_
Definition: GeneralPurposeTrackAnalyzer.cc:245
GeneralPurposeTrackAnalyzer::hPhiOverlapPlus
TH1D * hPhiOverlapPlus
Definition: GeneralPurposeTrackAnalyzer.cc:182
GeneralPurposeTrackAnalyzer::vTrackHistos_
std::vector< TH1 * > vTrackHistos_
Definition: GeneralPurposeTrackAnalyzer.cc:232
GeneralPurposeTrackAnalyzer::hCharge
TH1D * hCharge
Definition: GeneralPurposeTrackAnalyzer.cc:174
GeneralPurposeTrackAnalyzer::hd0PV
TH1D * hd0PV
Definition: GeneralPurposeTrackAnalyzer.cc:227
reco::TrackBase::algoNames
static const std::string algoNames[]
Definition: TrackBase.h:147
GeneralPurposeTrackAnalyzer::hd0vsphi
TH2D * hd0vsphi
Definition: GeneralPurposeTrackAnalyzer.cc:204
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
GeneralPurposeTrackAnalyzer::hd0vspt
TH2D * hd0vspt
Definition: GeneralPurposeTrackAnalyzer.cc:206
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
GeneralPurposeTrackAnalyzer::hdxyPV
TH1D * hdxyPV
Definition: GeneralPurposeTrackAnalyzer.cc:226
reco::Vertex
Definition: Vertex.h:35
hit
Definition: SiStripHitEffFromCalibTree.cc:88
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
GeneralPurposeTrackAnalyzer::vTrackProfiles_
std::vector< TH1 * > vTrackProfiles_
Definition: GeneralPurposeTrackAnalyzer.cc:233
TrackerGeometry
Definition: TrackerGeometry.h:14
GeneralPurposeTrackAnalyzer::htrkQuality
TH1I * htrkQuality
Definition: GeneralPurposeTrackAnalyzer.cc:136
reco::TrackBase::highPurity
Definition: TrackBase.h:154