CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private 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

template<typename T , typename... Args>
Tbook (const Args &...args) const
 
 GeneralPurposeTrackAnalyzer (const edm::ParameterSet &pset)
 
template<class OBJECT_TYPE >
int index (const std::vector< OBJECT_TYPE *> &vec, const TString &name)
 
 ~GeneralPurposeTrackAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private 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
 
bool isHit2D (const TrackingRecHit &hit)
 

Private Attributes

edm::InputTag BeamSpotTag_
 
edm::EDGetTokenT< reco::BeamSpotbeamspotToken_
 
std::map< int, std::pair< int, float > > conditionsMap_
 
std::optional< SiPixelCoordinatescoord_
 
bool doLatencyAnalysis_
 
float etaMax_
 
TH1D * evtsByTrigger_
 
TH1D * fieldByRun_
 
edm::Service< TFileServicefs
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordgeomToken_
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordgeomTokenBR_
 
TH1F * h_Beamsigmaz
 
TH1F * h_BeamWidthX
 
TH1F * h_BeamWidthY
 
TH1F * h_BSdxdz
 
TH1F * h_BSdydz
 
TH1F * h_BSx0
 
TH1F * h_BSy0
 
TH1F * h_BSz0
 
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_
 
int itrks
 
edm::ESGetToken< SiStripLatency, SiStripLatencyRcdlatencyToken_
 
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmagFieldToken_
 
edm::ESHandle< MagneticFieldmagneticField_
 
int mode
 
TH1D * modeByRun_
 
SiPixelPI::phase phase_
 
std::unique_ptr< Phase1PixelMapspixelmap
 
std::unique_ptr< Phase1PixelROCMapspixelrocsmap_
 
std::unique_ptr< TrackerMappmap
 
TProfile * pNBpixHitsVsVx
 
TProfile * pNBpixHitsVsVy
 
TProfile * pNBpixHitsVsVz
 
std::map< int, std::pair< int, int > > runInfoMap_
 
const edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcdsiPixelFedCablingMapTokenBR_
 
edm::EDGetTokenT< reco::TrackCollectiontheTrackCollectionToken_
 
TH1D * tksByTrigger_
 
edm::InputTag TkTag_
 
std::unique_ptr< TrackerMaptmap
 
const TrackerGeometrytrackerGeometry_
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtrackerTopologyTokenBR_
 
std::map< std::string, std::pair< int, int > > triggerMap_
 
edm::InputTag TriggerResultsTag_
 
edm::EDGetTokenT< reco::VertexCollectionvertexToken_
 
edm::InputTag VerticesTag_
 
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
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 89 of file GeneralPurposeTrackAnalyzer.cc.

Constructor & Destructor Documentation

◆ GeneralPurposeTrackAnalyzer()

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

Definition at line 91 of file GeneralPurposeTrackAnalyzer.cc.

References BeamSpotTag_, beamspotToken_, coord_, doLatencyAnalysis_, hltresultsToken_, isCosmics_, TFileService::kSharedResource, latencyToken_, pixelmap, pixelrocsmap_, pmap, muonDTDigis_cfi::pset, theTrackCollectionToken_, TkTag_, tmap, TriggerResultsTag_, vertexToken_, and VerticesTag_.

93  magFieldToken_(esConsumes<edm::Transition::BeginRun>()),
94  geomTokenBR_(esConsumes<edm::Transition::BeginRun>()),
95  trackerTopologyTokenBR_(esConsumes<edm::Transition::BeginRun>()),
96  siPixelFedCablingMapTokenBR_(esConsumes<edm::Transition::BeginRun>()) {
97  doLatencyAnalysis_ = pset.getParameter<bool>("doLatencyAnalysis");
98  if (doLatencyAnalysis_) {
99  latencyToken_ = esConsumes<edm::Transition::BeginRun>();
100  }
101 
102  coord_ = std::nullopt;
103  usesResource(TFileService::kSharedResource);
104 
105  TkTag_ = pset.getParameter<edm::InputTag>("TkTag");
106  theTrackCollectionToken_ = consumes<reco::TrackCollection>(TkTag_);
107 
108  TriggerResultsTag_ = pset.getParameter<edm::InputTag>("TriggerResultsTag");
109  hltresultsToken_ = consumes<edm::TriggerResults>(TriggerResultsTag_);
110 
111  BeamSpotTag_ = pset.getParameter<edm::InputTag>("BeamSpotTag");
112  beamspotToken_ = consumes<reco::BeamSpot>(BeamSpotTag_);
113 
114  VerticesTag_ = pset.getParameter<edm::InputTag>("VerticesTag");
115  vertexToken_ = consumes<reco::VertexCollection>(VerticesTag_);
116 
117  isCosmics_ = pset.getParameter<bool>("isCosmics");
118 
119  pmap = std::make_unique<TrackerMap>("Pixel");
120  pmap->onlyPixel(true);
121  pmap->setTitle("Pixel Hit entries");
122  pmap->setPalette(1);
123 
124  tmap = std::make_unique<TrackerMap>("Strip");
125  tmap->setTitle("Strip Hit entries");
126  tmap->setPalette(1);
127 
128  pixelmap = std::make_unique<Phase1PixelMaps>("COLZ0 L");
129  pixelmap->bookBarrelHistograms("entriesBarrel", "# hits", "# pixel hits");
130  pixelmap->bookForwardHistograms("entriesForward", "# hits", "# pixel hits");
131 
132  pixelrocsmap_ = std::make_unique<Phase1PixelROCMaps>("");
133  }
static const std::string kSharedResource
Definition: TFileService.h:76
edm::EDGetTokenT< edm::TriggerResults > hltresultsToken_
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionToken_
std::unique_ptr< TrackerMap > tmap
std::unique_ptr< TrackerMap > pmap
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomTokenBR_
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
edm::EDGetTokenT< reco::BeamSpot > beamspotToken_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyTokenBR_
edm::ESGetToken< SiStripLatency, SiStripLatencyRcd > latencyToken_
std::unique_ptr< Phase1PixelROCMaps > pixelrocsmap_
std::unique_ptr< Phase1PixelMaps > pixelmap
const edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > siPixelFedCablingMapTokenBR_
std::optional< SiPixelCoordinates > coord_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_

◆ ~GeneralPurposeTrackAnalyzer()

GeneralPurposeTrackAnalyzer::~GeneralPurposeTrackAnalyzer ( )
overridedefault

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 323 of file GeneralPurposeTrackAnalyzer.cc.

References funct::abs(), accept(), pwdgSkimBPark_cfi::beamSpot, beamspotToken_, cuy::col, reco::TrackBase::confirmed, coord_, DEBUG, hcalRecHitTable_cff::detId, PVValHelper::dxy, PVValHelper::dz, HcalObjRepresent::Fill(), geomToken_, reco::TrackBase::goodIterative, h_Beamsigmaz, h_BeamWidthX, h_BeamWidthY, h_BSdxdz, h_BSdydz, h_BSx0, h_BSy0, h_BSz0, 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, 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, index(), MagneticField::inInverseGeV(), isCosmics_, isHit2D(), edm::HandleBase::isValid(), itrks, hgcalLayerClustersEE_cfi::kappa, reco::TrackBase::loose, magneticField_, run3scouting_cff::normchi2, SiPixelPI::one, phase_, PV3DBase< T, PVType, FrameType >::phi(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, pixelmap, pixelrocsmap_, pmap, pNBpixHitsVsVx, pNBpixHitsVsVy, pNBpixHitsVsVz, point, runInfoMap_, singleTopDQM_cfi::setup, AlCaHLTBitMon_QueryRunRegistry::string, PV3DBase< T, PVType, FrameType >::theta(), theTrackCollectionToken_, reco::TrackBase::tight, tmap, HLT_2023v12_cff::track, JetHT_cfg::trackCollection, triggerMap_, edm::TriggerNames::triggerName(), edm::TriggerNames::triggerNames(), cscTnPEfficiencyTask_cfi::trigName, SiPixelPI::two, reco::TrackBase::undefQuality, vertexToken_, vTrack2DHistos_, vTrackHistos_, vTrackProfiles_, PV3DBase< T, PVType, FrameType >::x(), reco::Vertex::x(), PV3DBase< T, PVType, FrameType >::y(), reco::Vertex::y(), PV3DBase< T, PVType, FrameType >::z(), reco::Vertex::z(), and SiPixelPI::zero.

325  {
326  ievt++;
327 
328  // geometry setup
329  const TrackerGeometry *theGeometry = &setup.getData(geomToken_);
330 
332  const reco::TrackCollection tC = *(trackCollection.product());
333  itrks += tC.size();
334 
335  runInfoMap_[event.run()].first += 1;
336  runInfoMap_[event.run()].second += tC.size();
337 
338  if (DEBUG) {
339  edm::LogInfo("GeneralPurposeTrackAnalyzer") << "Reconstructed " << tC.size() << " tracks" << std::endl;
340  }
341  //int iCounter=0;
342 
344  if (hltresults.isValid()) {
345  const edm::TriggerNames &triggerNames_ = event.triggerNames(*hltresults);
346  int ntrigs = hltresults->size();
347  //const vector<std::string> &triggernames = triggerNames_.triggerNames();
348 
349  for (int itrig = 0; itrig != ntrigs; ++itrig) {
350  const std::string &trigName = triggerNames_.triggerName(itrig);
351  bool accept = hltresults->accept(itrig);
352  if (accept == 1) {
353  if (DEBUG) {
354  edm::LogInfo("GeneralPurposeTrackAnalyzer")
355  << trigName << " " << accept << " ,track size: " << tC.size() << std::endl;
356  }
357  triggerMap_[trigName].first += 1;
358  triggerMap_[trigName].second += tC.size();
359  // triggerInfo.push_back(pair <std::string, int> (trigName, accept));
360  }
361  }
362  }
363 
364  hrun->Fill(event.run());
365  hlumi->Fill(event.luminosityBlock());
366 
367  int nHighPurityTracks = 0;
368 
369  for (auto track = tC.cbegin(); track != tC.cend(); track++) {
370  unsigned int nHit2D = 0;
371  std::bitset<16> rocsToMask;
372  for (auto iHit = track->recHitsBegin(); iHit != track->recHitsEnd(); ++iHit) {
373  if (this->isHit2D(**iHit)) {
374  ++nHit2D;
375  }
376  // rest the ROCs for the map
377  rocsToMask.reset();
378  const DetId &detId = (*iHit)->geographicalId();
379  const GeomDet *geomDet(theGeometry->idToDet(detId));
380 
381  const SiPixelRecHit *pixhit = dynamic_cast<const SiPixelRecHit *>(*iHit);
382 
383  if (pixhit) {
384  if (pixhit->isValid()) {
385  unsigned int subid = detId.subdetId();
386  int detid_db = detId.rawId();
387 
388  // get the cluster
389  auto clustp = pixhit->cluster();
390 
391  if (clustp.isNull())
392  continue;
393  auto const &cluster = *clustp;
394  int row = cluster.x() - 0.5, col = cluster.y() - 0.5;
395 
397  pmap->fill(detid_db, 1);
398  } else if (phase_ == SiPixelPI::phase::one) {
399  int rocId = coord_->roc(detId, std::make_pair(row, col));
400  rocsToMask.set(rocId);
401  pixelrocsmap_->fillSelectedRocs(detid_db, rocsToMask, 1);
402 
403  if (subid == PixelSubdetector::PixelBarrel) {
404  pixelmap->fillBarrelBin("entriesBarrel", detid_db, 1);
405  } else {
406  pixelmap->fillForwardBin("entriesForward", detid_db, 1);
407  }
408  }
409 
410  LocalPoint lp = (*iHit)->localPosition();
411  //LocalError le = (*iHit)->localPositionError();
412 
413  GlobalPoint GP = geomDet->surface().toGlobal(lp);
414 
415  if ((subid == PixelSubdetector::PixelBarrel) || (subid == PixelSubdetector::PixelEndcap)) {
416  // 1 = PXB, 2 = PXF
417  if (subid == PixelSubdetector::PixelBarrel) {
418  hHitCountVsThetaBPix->Fill(GP.theta());
419  hHitCountVsPhiBPix->Fill(GP.phi());
420 
421  hHitCountVsZBPix->Fill(GP.z());
422  hHitCountVsXBPix->Fill(GP.x());
423  hHitCountVsYBPix->Fill(GP.y());
424 
425  } else if (subid == PixelSubdetector::PixelEndcap) {
426  hHitCountVsThetaFPix->Fill(GP.theta());
427  hHitCountVsPhiFPix->Fill(GP.phi());
428 
429  hHitCountVsZFPix->Fill(GP.z());
430  hHitCountVsXFPix->Fill(GP.x());
431  hHitCountVsYFPix->Fill(GP.y());
432  }
433  }
434  }
435  } else {
436  if ((*iHit)->isValid() && phase_ != SiPixelPI::phase::two) {
437  tmap->fill(detId.rawId(), 1);
438  }
439  }
440  }
441 
442  hHit2D->Fill(nHit2D);
443  hHit->Fill(track->numberOfValidHits());
444  hnhpxb->Fill(track->hitPattern().numberOfValidPixelBarrelHits());
445  hnhpxe->Fill(track->hitPattern().numberOfValidPixelEndcapHits());
446  hnhTIB->Fill(track->hitPattern().numberOfValidStripTIBHits());
447  hnhTID->Fill(track->hitPattern().numberOfValidStripTIDHits());
448  hnhTOB->Fill(track->hitPattern().numberOfValidStripTOBHits());
449  hnhTEC->Fill(track->hitPattern().numberOfValidStripTECHits());
450 
451  // fill hit composition histogram
452  if (track->hitPattern().numberOfValidPixelBarrelHits() != 0) {
453  hHitComposition->Fill(0., track->hitPattern().numberOfValidPixelBarrelHits());
454 
455  pNBpixHitsVsVx->Fill(track->vx(), track->hitPattern().numberOfValidPixelBarrelHits());
456  pNBpixHitsVsVy->Fill(track->vy(), track->hitPattern().numberOfValidPixelBarrelHits());
457  pNBpixHitsVsVz->Fill(track->vz(), track->hitPattern().numberOfValidPixelBarrelHits());
458  }
459  if (track->hitPattern().numberOfValidPixelEndcapHits() != 0) {
460  hHitComposition->Fill(1., track->hitPattern().numberOfValidPixelEndcapHits());
461  }
462  if (track->hitPattern().numberOfValidStripTIBHits() != 0) {
463  hHitComposition->Fill(2., track->hitPattern().numberOfValidStripTIBHits());
464  }
465  if (track->hitPattern().numberOfValidStripTIDHits() != 0) {
466  hHitComposition->Fill(3., track->hitPattern().numberOfValidStripTIDHits());
467  }
468  if (track->hitPattern().numberOfValidStripTOBHits() != 0) {
469  hHitComposition->Fill(4., track->hitPattern().numberOfValidStripTOBHits());
470  }
471  if (track->hitPattern().numberOfValidStripTECHits() != 0) {
472  hHitComposition->Fill(5., track->hitPattern().numberOfValidStripTECHits());
473  }
474 
475  hCharge->Fill(track->charge());
476  hQoverP->Fill(track->qoverp());
477  hQoverPZoom->Fill(track->qoverp());
478  hPt->Fill(track->pt());
479  hP->Fill(track->p());
480  hchi2ndof->Fill(track->normalizedChi2());
481  hEta->Fill(track->eta());
482  hPhi->Fill(track->phi());
483 
484  if (fabs(track->eta()) < 0.8) {
485  hPhiBarrel->Fill(track->phi());
486  }
487  if (track->eta() > 0.8 && track->eta() < 1.4) {
488  hPhiOverlapPlus->Fill(track->phi());
489  }
490  if (track->eta() < -0.8 && track->eta() > -1.4) {
491  hPhiOverlapMinus->Fill(track->phi());
492  }
493  if (track->eta() > 1.4) {
494  hPhiEndcapPlus->Fill(track->phi());
495  }
496  if (track->eta() < -1.4) {
497  hPhiEndcapMinus->Fill(track->phi());
498  }
499 
500  hd0->Fill(track->d0());
501  hdz->Fill(track->dz());
502  hdxy->Fill(track->dxy());
503  hvx->Fill(track->vx());
504  hvy->Fill(track->vy());
505  hvz->Fill(track->vz());
506 
507  htrkAlgo->Fill(static_cast<int>(track->algo()));
508  htrkOriAlgo->Fill(static_cast<int>(track->originalAlgo()));
509 
510  int myquality = -99;
511  if (track->quality(reco::TrackBase::undefQuality)) {
512  myquality = -1;
513  htrkQuality->Fill(myquality);
514  }
515  if (track->quality(reco::TrackBase::loose)) {
516  myquality = 0;
517  htrkQuality->Fill(myquality);
518  }
519  if (track->quality(reco::TrackBase::tight)) {
520  myquality = 1;
521  htrkQuality->Fill(myquality);
522  }
523  if (track->quality(reco::TrackBase::highPurity) && (!isCosmics_)) {
524  myquality = 2;
525  htrkQuality->Fill(myquality);
526  hPhp->Fill(track->p());
527  hPthp->Fill(track->pt());
528  hHithp->Fill(track->numberOfValidHits());
529  hEtahp->Fill(track->eta());
530  hPhihp->Fill(track->phi());
531  hchi2ndofhp->Fill(track->normalizedChi2());
532  hchi2Probhp->Fill(TMath::Prob(track->chi2(), track->ndof()));
533  nHighPurityTracks++;
534  }
535  if (track->quality(reco::TrackBase::confirmed)) {
536  myquality = 3;
537  htrkQuality->Fill(myquality);
538  }
539  if (track->quality(reco::TrackBase::goodIterative)) {
540  myquality = 4;
541  htrkQuality->Fill(myquality);
542  }
543 
544  // Fill 1D track histos
545  static const int etaindex = this->index(vTrackHistos_, "h_tracketa");
546  vTrackHistos_[etaindex]->Fill(track->eta());
547  static const int phiindex = this->index(vTrackHistos_, "h_trackphi");
548  vTrackHistos_[phiindex]->Fill(track->phi());
549  static const int numOfValidHitsindex = this->index(vTrackHistos_, "h_trackNumberOfValidHits");
550  vTrackHistos_[numOfValidHitsindex]->Fill(track->numberOfValidHits());
551  static const int numOfLostHitsindex = this->index(vTrackHistos_, "h_trackNumberOfLostHits");
552  vTrackHistos_[numOfLostHitsindex]->Fill(track->numberOfLostHits());
553 
554  GlobalPoint gPoint(track->vx(), track->vy(), track->vz());
555  double theLocalMagFieldInInverseGeV = magneticField_->inInverseGeV(gPoint).z();
556  double kappa = -track->charge() * theLocalMagFieldInInverseGeV / track->pt();
557 
558  static const int kappaindex = this->index(vTrackHistos_, "h_curvature");
559  vTrackHistos_[kappaindex]->Fill(kappa);
560  static const int kappaposindex = this->index(vTrackHistos_, "h_curvature_pos");
561  if (track->charge() > 0)
562  vTrackHistos_[kappaposindex]->Fill(fabs(kappa));
563  static const int kappanegindex = this->index(vTrackHistos_, "h_curvature_neg");
564  if (track->charge() < 0)
565  vTrackHistos_[kappanegindex]->Fill(fabs(kappa));
566 
567  double chi2Prob = TMath::Prob(track->chi2(), track->ndof());
568  double normchi2 = track->normalizedChi2();
569 
570  static const int normchi2index = this->index(vTrackHistos_, "h_normchi2");
571  vTrackHistos_[normchi2index]->Fill(normchi2);
572  static const int chi2index = this->index(vTrackHistos_, "h_chi2");
573  vTrackHistos_[chi2index]->Fill(track->chi2());
574  static const int chi2Probindex = this->index(vTrackHistos_, "h_chi2Prob");
575  vTrackHistos_[chi2Probindex]->Fill(chi2Prob);
576  static const int ptindex = this->index(vTrackHistos_, "h_pt");
577  static const int pt2index = this->index(vTrackHistos_, "h_ptrebin");
578  vTrackHistos_[ptindex]->Fill(track->pt());
579  vTrackHistos_[pt2index]->Fill(track->pt());
580  if (track->ptError() != 0.) {
581  static const int ptResolutionindex = this->index(vTrackHistos_, "h_ptResolution");
582  vTrackHistos_[ptResolutionindex]->Fill(track->ptError() / track->pt());
583  }
584  // Fill track profiles
585  static const int d0phiindex = this->index(vTrackProfiles_, "p_d0_vs_phi");
586  vTrackProfiles_[d0phiindex]->Fill(track->phi(), track->d0());
587  static const int dzphiindex = this->index(vTrackProfiles_, "p_dz_vs_phi");
588  vTrackProfiles_[dzphiindex]->Fill(track->phi(), track->dz());
589  static const int d0etaindex = this->index(vTrackProfiles_, "p_d0_vs_eta");
590  vTrackProfiles_[d0etaindex]->Fill(track->eta(), track->d0());
591  static const int dzetaindex = this->index(vTrackProfiles_, "p_dz_vs_eta");
592  vTrackProfiles_[dzetaindex]->Fill(track->eta(), track->dz());
593  static const int chiProbphiindex = this->index(vTrackProfiles_, "p_chi2Prob_vs_phi");
594  vTrackProfiles_[chiProbphiindex]->Fill(track->phi(), chi2Prob);
595  static const int chiProbabsd0index = this->index(vTrackProfiles_, "p_chi2Prob_vs_d0");
596  vTrackProfiles_[chiProbabsd0index]->Fill(fabs(track->d0()), chi2Prob);
597  static const int chiProbabsdzindex = this->index(vTrackProfiles_, "p_chi2Prob_vs_dz");
598  vTrackProfiles_[chiProbabsdzindex]->Fill(track->dz(), chi2Prob);
599  static const int chiphiindex = this->index(vTrackProfiles_, "p_chi2_vs_phi");
600  vTrackProfiles_[chiphiindex]->Fill(track->phi(), track->chi2());
601  static const int normchiphiindex = this->index(vTrackProfiles_, "p_normchi2_vs_phi");
602  vTrackProfiles_[normchiphiindex]->Fill(track->phi(), normchi2);
603  static const int chietaindex = this->index(vTrackProfiles_, "p_chi2_vs_eta");
604  vTrackProfiles_[chietaindex]->Fill(track->eta(), track->chi2());
605  static const int normchiptindex = this->index(vTrackProfiles_, "p_normchi2_vs_pt");
606  vTrackProfiles_[normchiptindex]->Fill(track->pt(), normchi2);
607  static const int normchipindex = this->index(vTrackProfiles_, "p_normchi2_vs_p");
608  vTrackProfiles_[normchipindex]->Fill(track->p(), normchi2);
609  static const int chiProbetaindex = this->index(vTrackProfiles_, "p_chi2Prob_vs_eta");
610  vTrackProfiles_[chiProbetaindex]->Fill(track->eta(), chi2Prob);
611  static const int normchietaindex = this->index(vTrackProfiles_, "p_normchi2_vs_eta");
612  vTrackProfiles_[normchietaindex]->Fill(track->eta(), normchi2);
613  static const int kappaphiindex = this->index(vTrackProfiles_, "p_kappa_vs_phi");
614  vTrackProfiles_[kappaphiindex]->Fill(track->phi(), kappa);
615  static const int kappaetaindex = this->index(vTrackProfiles_, "p_kappa_vs_eta");
616  vTrackProfiles_[kappaetaindex]->Fill(track->eta(), kappa);
617  static const int ptResphiindex = this->index(vTrackProfiles_, "p_ptResolution_vs_phi");
618  vTrackProfiles_[ptResphiindex]->Fill(track->phi(), track->ptError() / track->pt());
619  static const int ptResetaindex = this->index(vTrackProfiles_, "p_ptResolution_vs_eta");
620  vTrackProfiles_[ptResetaindex]->Fill(track->eta(), track->ptError() / track->pt());
621 
622  // Fill 2D track histos
623  static const int etaphiindex_2d = this->index(vTrack2DHistos_, "h2_phi_vs_eta");
624  vTrack2DHistos_[etaphiindex_2d]->Fill(track->eta(), track->phi());
625  static const int d0phiindex_2d = this->index(vTrack2DHistos_, "h2_d0_vs_phi");
626  vTrack2DHistos_[d0phiindex_2d]->Fill(track->phi(), track->d0());
627  static const int dzphiindex_2d = this->index(vTrack2DHistos_, "h2_dz_vs_phi");
628  vTrack2DHistos_[dzphiindex_2d]->Fill(track->phi(), track->dz());
629  static const int d0etaindex_2d = this->index(vTrack2DHistos_, "h2_d0_vs_eta");
630  vTrack2DHistos_[d0etaindex_2d]->Fill(track->eta(), track->d0());
631  static const int dzetaindex_2d = this->index(vTrack2DHistos_, "h2_dz_vs_eta");
632  vTrack2DHistos_[dzetaindex_2d]->Fill(track->eta(), track->dz());
633  static const int chiphiindex_2d = this->index(vTrack2DHistos_, "h2_chi2_vs_phi");
634  vTrack2DHistos_[chiphiindex_2d]->Fill(track->phi(), track->chi2());
635  static const int chiProbphiindex_2d = this->index(vTrack2DHistos_, "h2_chi2Prob_vs_phi");
636  vTrack2DHistos_[chiProbphiindex_2d]->Fill(track->phi(), chi2Prob);
637  static const int chiProbabsd0index_2d = this->index(vTrack2DHistos_, "h2_chi2Prob_vs_d0");
638  vTrack2DHistos_[chiProbabsd0index_2d]->Fill(fabs(track->d0()), chi2Prob);
639  static const int normchiphiindex_2d = this->index(vTrack2DHistos_, "h2_normchi2_vs_phi");
640  vTrack2DHistos_[normchiphiindex_2d]->Fill(track->phi(), normchi2);
641  static const int chietaindex_2d = this->index(vTrack2DHistos_, "h2_chi2_vs_eta");
642  vTrack2DHistos_[chietaindex_2d]->Fill(track->eta(), track->chi2());
643  static const int chiProbetaindex_2d = this->index(vTrack2DHistos_, "h2_chi2Prob_vs_eta");
644  vTrack2DHistos_[chiProbetaindex_2d]->Fill(track->eta(), chi2Prob);
645  static const int normchietaindex_2d = this->index(vTrack2DHistos_, "h2_normchi2_vs_eta");
646  vTrack2DHistos_[normchietaindex_2d]->Fill(track->eta(), normchi2);
647  static const int kappaphiindex_2d = this->index(vTrack2DHistos_, "h2_kappa_vs_phi");
648  vTrack2DHistos_[kappaphiindex_2d]->Fill(track->phi(), kappa);
649  static const int kappaetaindex_2d = this->index(vTrack2DHistos_, "h2_kappa_vs_eta");
650  vTrack2DHistos_[kappaetaindex_2d]->Fill(track->eta(), kappa);
651  static const int normchi2kappa_2d = this->index(vTrack2DHistos_, "h2_normchi2_vs_kappa");
652  vTrack2DHistos_[normchi2kappa_2d]->Fill(normchi2, kappa);
653 
654  //dxy with respect to the beamspot
656  edm::Handle<reco::BeamSpot> beamSpotHandle = event.getHandle(beamspotToken_);
657  if (beamSpotHandle.isValid()) {
658  beamSpot = *beamSpotHandle;
659 
660  double BSx0 = beamSpot.x0();
661  double BSy0 = beamSpot.y0();
662  double BSz0 = beamSpot.z0();
663  double Beamsigmaz = beamSpot.sigmaZ();
664  double Beamdxdz = beamSpot.dxdz();
665  double Beamdydz = beamSpot.dydz();
666  double BeamWidthX = beamSpot.BeamWidthX();
667  double BeamWidthY = beamSpot.BeamWidthY();
668 
669  math::XYZPoint point(BSx0, BSy0, BSz0);
670  double dxy = track->dxy(point);
671  double dz = track->dz(point);
672  hdxyBS->Fill(dxy);
673  hd0BS->Fill(-dxy);
674  hdzBS->Fill(dz);
675 
676  h_BSx0->Fill(BSx0);
677  h_BSy0->Fill(BSy0);
678  h_BSz0->Fill(BSz0);
679  h_Beamsigmaz->Fill(Beamsigmaz);
680  h_BeamWidthX->Fill(BeamWidthX);
681  h_BeamWidthY->Fill(BeamWidthY);
682  h_BSdxdz->Fill(Beamdxdz);
683  h_BSdydz->Fill(Beamdydz);
684  }
685 
686  //dxy with respect to the primary vertex
687  reco::Vertex pvtx;
688  edm::Handle<reco::VertexCollection> vertexHandle = event.getHandle(vertexToken_);
689  double mindxy = 100.;
690  double dz = 100;
691  if (vertexHandle.isValid() && !isCosmics_) {
692  for (auto pvtx = vertexHandle->cbegin(); pvtx != vertexHandle->cend(); ++pvtx) {
693  math::XYZPoint mypoint(pvtx->x(), pvtx->y(), pvtx->z());
694  if (abs(mindxy) > abs(track->dxy(mypoint))) {
695  mindxy = track->dxy(mypoint);
696  dz = track->dz(mypoint);
697  }
698  }
699 
700  hdxyPV->Fill(mindxy);
701  hd0PV->Fill(-mindxy);
702  hdzPV->Fill(dz);
703 
704  hd0PVvsphi->Fill(track->phi(), -mindxy);
705  hd0PVvseta->Fill(track->eta(), -mindxy);
706  hd0PVvspt->Fill(track->pt(), -mindxy);
707 
708  } else {
709  hdxyPV->Fill(100);
710  hd0PV->Fill(100);
711  hdzPV->Fill(100);
712 
713  hd0vsphi->Fill(track->phi(), -track->dxy());
714  hd0vseta->Fill(track->eta(), -track->dxy());
715  hd0vspt->Fill(track->pt(), -track->dxy());
716  }
717 
718  if (DEBUG) {
719  edm::LogInfo("GeneralPurposeTrackAnalyzer") << "end of track loop" << std::endl;
720  }
721  }
722 
723  hNtrk->Fill(tC.size());
724  hNtrkZoom->Fill(tC.size());
725  hNhighPurity->Fill(nHighPurityTracks);
726 
727  if (DEBUG) {
728  edm::LogInfo("GeneralPurposeTrackAnalyzer") << "end of analysis" << std::endl;
729  }
730  }
double z() const
z coordinate
Definition: Vertex.h:133
edm::EDGetTokenT< edm::TriggerResults > hltresultsToken_
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionToken_
T z() const
Definition: PV3DBase.h:61
Strings const & triggerNames() const
Definition: TriggerNames.cc:48
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
std::unique_ptr< TrackerMap > tmap
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition: MagneticField.h:36
std::unique_ptr< TrackerMap > pmap
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
edm::ESHandle< MagneticField > magneticField_
std::map< std::string, std::pair< int, int > > triggerMap_
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::map< int, std::pair< int, int > > runInfoMap_
double x() const
x coordinate
Definition: Vertex.h:129
trackCollection
Definition: JetHT_cfg.py:51
const TrackerGeomDet * idToDet(DetId) const override
double y() const
y coordinate
Definition: Vertex.h:131
edm::EDGetTokenT< reco::BeamSpot > beamspotToken_
Log< level::Info, false > LogInfo
Definition: DetId.h:17
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:50
bool isValid() const
Definition: HandleBase.h:70
std::unique_ptr< Phase1PixelROCMaps > pixelrocsmap_
col
Definition: cuy.py:1009
std::unique_ptr< Phase1PixelMaps > pixelmap
bool isHit2D(const TrackingRecHit &hit)
*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
std::optional< SiPixelCoordinates > coord_
Definition: event.py:1
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
Our base class.
Definition: SiPixelRecHit.h:23
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
int index(const std::vector< OBJECT_TYPE *> &vec, const TString &name)

◆ beginJob()

void GeneralPurposeTrackAnalyzer::beginJob ( )
inlineoverrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 797 of file GeneralPurposeTrackAnalyzer.cc.

References reco::TrackBase::algoNames, reco::TrackBase::algoSize, DEBUG, etaMax_, h_Beamsigmaz, h_BeamWidthX, h_BeamWidthY, h_BSdxdz, h_BSdydz, h_BSx0, h_BSy0, h_BSz0, 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_, itrks, M_PI, pNBpixHitsVsVx, pNBpixHitsVsVy, pNBpixHitsVsVz, qualities, AlCaHLTBitMon_QueryRunRegistry::string, vTrack2DHistos_, vTrackHistos_, vTrackProfiles_, and multiplicitycorr_cfi::xBins.

799  {
800  if (DEBUG) {
801  edm::LogInfo("GeneralPurposeTrackAnalyzer") << __LINE__ << std::endl;
802  }
803 
804  TH1D::SetDefaultSumw2(kTRUE);
805  etaMax_ = 3.0;
806 
807  ievt = 0;
808  itrks = 0;
809 
810  hrun = book<TH1D>("h_run", "run", 100000, 230000, 240000);
811  hlumi = book<TH1D>("h_lumi", "lumi", 1000, 0, 1000);
812 
813  hchi2ndof = book<TH1D>("h_chi2ndof", "chi2/ndf;#chi^{2}/ndf;tracks", 100, 0, 5.);
814  hCharge = book<TH1D>("h_charge", "charge;Charge of the track;tracks", 5, -2.5, 2.5);
815  hNtrk = book<TH1D>("h_Ntrk", "ntracks;Number of Tracks;events", 200, 0., 200.);
816  hNtrkZoom = book<TH1D>("h_NtrkZoom", "Number of tracks; number of tracks;events", 10, 0., 10.);
817  hNhighPurity =
818  book<TH1D>("h_NhighPurity", "n. high purity tracks;Number of high purity tracks;events", 200, 0., 200.);
819 
820  htrkAlgo = book<TH1I>("h_trkAlgo",
821  "tracking step;iterative tracking step;tracks",
823  0.,
824  double(reco::TrackBase::algoSize));
825 
826  htrkOriAlgo = book<TH1I>("h_trkOriAlgo",
827  "original tracking step;original iterative tracking step;tracks",
829  0.,
830  double(reco::TrackBase::algoSize));
831 
832  for (size_t ibin = 0; ibin < reco::TrackBase::algoSize - 1; ibin++) {
833  htrkAlgo->GetXaxis()->SetBinLabel(ibin + 1, (reco::TrackBase::algoNames[ibin]).c_str());
834  htrkOriAlgo->GetXaxis()->SetBinLabel(ibin + 1, (reco::TrackBase::algoNames[ibin]).c_str());
835  }
836 
837  htrkQuality = book<TH1I>("h_trkQuality", "track quality;track quality;tracks", 6, -1, 5);
838  std::string qualities[7] = {"undef", "loose", "tight", "highPurity", "confirmed", "goodIterative"};
839  for (int nbin = 1; nbin <= htrkQuality->GetNbinsX(); nbin++) {
840  htrkQuality->GetXaxis()->SetBinLabel(nbin, (qualities[nbin - 1]).c_str());
841  }
842 
843  hP = book<TH1D>("h_P", "Momentum;track momentum [GeV];tracks", 100, 0., 100.);
844  hQoverP = book<TH1D>("h_qoverp", "Track q/p; track q/p [GeV^{-1}];tracks", 100, -1., 1.);
845  hQoverPZoom = book<TH1D>("h_qoverpZoom", "Track q/p; track q/p [GeV^{-1}];tracks", 100, -0.1, 0.1);
846  hPt = book<TH1D>("h_Pt", "Transverse Momentum;track p_{T} [GeV];tracks", 100, 0., 100.);
847  hHit = book<TH1D>("h_nHits", "Number of hits;track n. hits;tracks", 50, -0.5, 49.5);
848  hHit2D = book<TH1D>("h_nHit2D", "Number of 2D hits; number of 2D hits;tracks", 20, 0, 20);
849 
850  hHitCountVsZBPix = book<TH1D>("h_HitCountVsZBpix", "Number of BPix hits vs z;hit global z;hits", 60, -30, 30);
851  hHitCountVsZFPix = book<TH1D>("h_HitCountVsZFpix", "Number of FPix hits vs z;hit global z;hits", 100, -100, 100);
852 
853  hHitCountVsXBPix = book<TH1D>("h_HitCountVsXBpix", "Number of BPix hits vs x;hit global x;hits", 20, -20, 20);
854  hHitCountVsXFPix = book<TH1D>("h_HitCountVsXFpix", "Number of FPix hits vs x;hit global x;hits", 20, -20, 20);
855 
856  hHitCountVsYBPix = book<TH1D>("h_HitCountVsYBpix", "Number of BPix hits vs y;hit global y;hits", 20, -20, 20);
857  hHitCountVsYFPix = book<TH1D>("h_HitCountVsYFpix", "Number of FPix hits vs y;hit global y;hits", 20, -20, 20);
858 
860  book<TH1D>("h_HitCountVsThetaBpix", "Number of BPix hits vs #theta;hit global #theta;hits", 20, 0., M_PI);
862  book<TH1D>("h_HitCountVsPhiBpix", "Number of BPix hits vs #phi;hit global #phi;hits", 20, -M_PI, M_PI);
863 
865  book<TH1D>("h_HitCountVsThetaFpix", "Number of FPix hits vs #theta;hit global #theta;hits", 40, 0., M_PI);
867  book<TH1D>("h_HitCountVsPhiFpix", "Number of FPix hits vs #phi;hit global #phi;hits", 20, -M_PI, M_PI);
868 
869  hEta = book<TH1D>("h_Eta", "Track pseudorapidity; track #eta;tracks", 100, -etaMax_, etaMax_);
870  hPhi = book<TH1D>("h_Phi", "Track azimuth; track #phi;tracks", 100, -M_PI, M_PI);
871 
872  hPhiBarrel = book<TH1D>("h_PhiBarrel", "hPhiBarrel (0<|#eta|<0.8);track #Phi;tracks", 100, -M_PI, M_PI);
874  book<TH1D>("h_PhiOverlapPlus", "hPhiOverlapPlus (0.8<#eta<1.4);track #phi;tracks", 100, -M_PI, M_PI);
876  book<TH1D>("h_PhiOverlapMinus", "hPhiOverlapMinus (-1.4<#eta<-0.8);track #phi;tracks", 100, -M_PI, M_PI);
877  hPhiEndcapPlus = book<TH1D>("h_PhiEndcapPlus", "hPhiEndcapPlus (#eta>1.4);track #phi;track", 100, -M_PI, M_PI);
878  hPhiEndcapMinus = book<TH1D>("h_PhiEndcapMinus", "hPhiEndcapMinus (#eta<1.4);track #phi;tracks", 100, -M_PI, M_PI);
879 
880  h_BSx0 = book<TH1F>("h_BSx0", "x-coordinate of reco beamspot;x^{BS}_{0};n_{events}", 100, -0.1, 0.1);
881  h_BSy0 = book<TH1F>("h_BSy0", "y-coordinate of reco beamspot;y^{BS}_{0};n_{events}", 100, -0.1, 0.1);
882  h_BSz0 = book<TH1F>("h_BSz0", "z-coordinate of reco beamspot;z^{BS}_{0};n_{events}", 100, -1., 1.);
883  h_Beamsigmaz = book<TH1F>("h_Beamsigmaz", "z-coordinate beam width;#sigma_{Z}^{beam};n_{events}", 100, 0., 1.);
884  h_BeamWidthX = book<TH1F>("h_BeamWidthX", "x-coordinate beam width;#sigma_{X}^{beam};n_{events}", 100, 0., 0.01);
885  h_BeamWidthY = book<TH1F>("h_BeamWidthY", "y-coordinate beam width;#sigma_{Y}^{beam};n_{events}", 100, 0., 0.01);
886  h_BSdxdz = book<TH1F>("h_BSdxdz", "BeamSpot dxdz;beamspot dx/dz;n_{events}", 100, -0.0003, 0.0003);
887  h_BSdydz = book<TH1F>("h_BSdydz", "BeamSpot dydz;beamspot dy/dz;n_{events}", 100, -0.0003, 0.0003);
888 
889  if (!isCosmics_) {
890  hPhp = book<TH1D>("h_P_hp", "Momentum (high purity);track momentum [GeV];tracks", 100, 0., 100.);
891  hPthp = book<TH1D>("h_Pt_hp", "Transverse Momentum (high purity);track p_{T} [GeV];tracks", 100, 0., 100.);
892  hHithp = book<TH1D>("h_nHit_hp", "Number of hits (high purity);track n. hits;tracks", 30, 0, 30);
893  hEtahp = book<TH1D>("h_Eta_hp", "Track pseudorapidity (high purity); track #eta;tracks", 100, -etaMax_, etaMax_);
894  hPhihp = book<TH1D>("h_Phi_hp", "Track azimuth (high purity); track #phi;tracks", 100, -M_PI, M_PI);
895  hchi2ndofhp = book<TH1D>("h_chi2ndof_hp", "chi2/ndf (high purity);#chi^{2}/ndf;tracks", 100, 0, 5.);
896  hchi2Probhp = book<TH1D>(
897  "h_chi2_Prob_hp", "#chi^{2} probability (high purity);#chi^{2}prob_{Track};Number of Tracks", 100, 0.0, 1.);
898 
899  hvx = book<TH1D>("h_vx", "Track v_{x} ; track v_{x} [cm];tracks", 100, -1.5, 1.5);
900  hvy = book<TH1D>("h_vy", "Track v_{y} ; track v_{y} [cm];tracks", 100, -1.5, 1.5);
901  hvz = book<TH1D>("h_vz", "Track v_{z} ; track v_{z} [cm];tracks", 100, -20., 20.);
902  hd0 = book<TH1D>("h_d0", "Track d_{0} ; track d_{0} [cm];tracks", 100, -1., 1.);
903  hdxy = book<TH1D>("h_dxy", "Track d_{xy}; track d_{xy} [cm]; tracks", 100, -0.5, 0.5);
904  hdz = book<TH1D>("h_dz", "Track d_{z} ; track d_{z} [cm]; tracks", 100, -20, 20);
905 
906  hd0PVvsphi =
907  book<TH2D>("h2_d0PVvsphi", "hd0PVvsphi;track #phi;track d_{0}(PV) [cm]", 160, -M_PI, M_PI, 100, -1., 1.);
908  hd0PVvseta =
909  book<TH2D>("h2_d0PVvseta", "hdPV0vseta;track #eta;track d_{0}(PV) [cm]", 160, -2.5, 2.5, 100, -1., 1.);
910  hd0PVvspt = book<TH2D>("h2_d0PVvspt", "hdPV0vspt;track p_{T};d_{0}(PV) [cm]", 50, 0., 100., 100, -1, 1.);
911 
912  hdxyBS = book<TH1D>("h_dxyBS", "hdxyBS; track d_{xy}(BS) [cm];tracks", 100, -0.1, 0.1);
913  hd0BS = book<TH1D>("h_d0BS", "hd0BS ; track d_{0}(BS) [cm];tracks", 100, -0.1, 0.1);
914  hdzBS = book<TH1D>("h_dzBS", "hdzBS ; track d_{z}(BS) [cm];tracks", 100, -12, 12);
915  hdxyPV = book<TH1D>("h_dxyPV", "hdxyPV; track d_{xy}(PV) [cm];tracks", 100, -0.1, 0.1);
916  hd0PV = book<TH1D>("h_d0PV", "hd0PV ; track d_{0}(PV) [cm];tracks", 100, -0.15, 0.15);
917  hdzPV = book<TH1D>("h_dzPV", "hdzPV ; track d_{z}(PV) [cm];tracks", 100, -0.1, 0.1);
918 
919  hnhTIB = book<TH1D>("h_nHitTIB", "nhTIB;# hits in TIB; tracks", 20, 0., 20.);
920  hnhTID = book<TH1D>("h_nHitTID", "nhTID;# hits in TID; tracks", 20, 0., 20.);
921  hnhTOB = book<TH1D>("h_nHitTOB", "nhTOB;# hits in TOB; tracks", 20, 0., 20.);
922  hnhTEC = book<TH1D>("h_nHitTEC", "nhTEC;# hits in TEC; tracks", 20, 0., 20.);
923 
924  } else {
925  hvx = book<TH1D>("h_vx", "Track v_{x};track v_{x} [cm];tracks", 100, -100., 100.);
926  hvy = book<TH1D>("h_vy", "Track v_{y};track v_{y} [cm];tracks", 100, -100., 100.);
927  hvz = book<TH1D>("h_vz", "Track v_{z};track v_{z} [cm];track", 100, -100., 100.);
928  hd0 = book<TH1D>("h_d0", "Track d_{0};track d_{0} [cm];track", 100, -100., 100.);
929  hdxy = book<TH1D>("h_dxy", "Track d_{xy};track d_{xy} [cm];tracks", 100, -100, 100);
930  hdz = book<TH1D>("h_dz", "Track d_{z};track d_{z} [cm];tracks", 100, -200, 200);
931 
932  hd0vsphi = book<TH2D>(
933  "h2_d0vsphi", "Track d_{0} vs #phi; track #phi;track d_{0} [cm]", 160, -3.20, 3.20, 100, -100., 100.);
934  hd0vseta = book<TH2D>(
935  "h2_d0vseta", "Track d_{0} vs #eta; track #eta;track d_{0} [cm]", 160, -3.20, 3.20, 100, -100., 100.);
936  hd0vspt =
937  book<TH2D>("h2_d0vspt", "Track d_{0} vs p_{T};track p_{T};track d_{0} [cm]", 50, 0., 100., 100, -100, 100);
938 
939  hdxyBS = book<TH1D>("h_dxyBS", "Track d_{xy}(BS);d_{xy}(BS) [cm];tracks", 100, -100., 100.);
940  hd0BS = book<TH1D>("h_d0BS", "Track d_{0}(BS);d_{0}(BS) [cm];tracks", 100, -100., 100.);
941  hdzBS = book<TH1D>("h_dzBS", "Track d_{z}(BS);d_{z}(BS) [cm];tracks", 100, -100., 100.);
942  hdxyPV = book<TH1D>("h_dxyPV", "Track d_{xy}(PV); d_{xy}(PV) [cm];tracks", 100, -100., 100.);
943  hd0PV = book<TH1D>("h_d0PV", "Track d_{0}(PV); d_{0}(PV) [cm];tracks", 100, -100., 100.);
944  hdzPV = book<TH1D>("h_dzPV", "Track d_{z}(PV); d_{z}(PV) [cm];tracks", 100, -100., 100.);
945 
946  hnhTIB = book<TH1D>("h_nHitTIB", "nhTIB;# hits in TIB; tracks", 30, 0., 30.);
947  hnhTID = book<TH1D>("h_nHitTID", "nhTID;# hits in TID; tracks", 30, 0., 30.);
948  hnhTOB = book<TH1D>("h_nHitTOB", "nhTOB;# hits in TOB; tracks", 30, 0., 30.);
949  hnhTEC = book<TH1D>("h_nHitTEC", "nhTEC;# hits in TEC; tracks", 30, 0., 30.);
950  }
951 
952  hnhpxb = book<TH1D>("h_nHitPXB", "nhpxb;# hits in Pixel Barrel; tracks", 10, 0., 10.);
953  hnhpxe = book<TH1D>("h_nHitPXE", "nhpxe;# hits in Pixel Endcap; tracks", 10, 0., 10.);
954 
955  hHitComposition = book<TH1D>("h_hitcomposition", "track hit composition;;# hits", 6, -0.5, 5.5);
956 
958  book<TProfile>("p_NpixHits_vs_Vx", "n. Barrel Pixel hits vs. v_{x};v_{x} (cm);n. BPix hits", 20, -20, 20);
959 
961  book<TProfile>("p_NpixHits_vs_Vy", "n. Barrel Pixel hits vs. v_{y};v_{y} (cm);n. BPix hits", 20, -20, 20);
962 
964  book<TProfile>("p_NpixHits_vs_Vz", "n. Barrel Pixel hits vs. v_{z};v_{z} (cm);n. BPix hits", 20, -100, 100);
965 
966  std::string dets[6] = {"PXB", "PXF", "TIB", "TID", "TOB", "TEC"};
967 
968  for (int i = 1; i <= hHitComposition->GetNbinsX(); i++) {
969  hHitComposition->GetXaxis()->SetBinLabel(i, (dets[i - 1]).c_str());
970  }
971 
972  // vector of track histograms
973 
974  // clang-format off
975 
976  vTrackHistos_.push_back(book<TH1F>("h_tracketa", "Track #eta;#eta_{Track};Number of Tracks", 90, -etaMax_, etaMax_));
977  vTrackHistos_.push_back(book<TH1F>("h_trackphi", "Track #phi;#phi_{Track};Number of Tracks", 90, -M_PI, M_PI));
978  vTrackHistos_.push_back(book<TH1F>("h_trackNumberOfValidHits", "Track # of valid hits;# of valid hits _{Track};Number of Tracks", 40, 0., 40.));
979  vTrackHistos_.push_back(book<TH1F>("h_trackNumberOfLostHits", "Track # of lost hits;# of lost hits _{Track};Number of Tracks", 10, 0., 10.));
980  vTrackHistos_.push_back(book<TH1F>("h_curvature", "Curvature #kappa;#kappa_{Track};Number of Tracks", 100, -.05, .05));
981  vTrackHistos_.push_back(book<TH1F>("h_curvature_pos", "Curvature |#kappa| Positive Tracks;|#kappa_{pos Track}|;Number of Tracks", 100, .0, .05));
982  vTrackHistos_.push_back(book<TH1F>("h_curvature_neg", "Curvature |#kappa| Negative Tracks;|#kappa_{neg Track}|;Number of Tracks", 100, .0, .05));
983  vTrackHistos_.push_back(book<TH1F>("h_diff_curvature","Curvature |#kappa| Tracks Difference;|#kappa_{Track}|;# Pos Tracks - # Neg Tracks",100, .0, .05));
984  vTrackHistos_.push_back(book<TH1F>("h_chi2", "Track #chi^{2};#chi^{2}_{Track};Number of Tracks", 500, -0.01, 500.));
985  vTrackHistos_.push_back(book<TH1F>("h_chi2Prob", "#chi^{2} probability;Track Prob(#chi^{2},ndof);Number of Tracks", 100, 0.0, 1.));
986  vTrackHistos_.push_back(book<TH1F>("h_normchi2", "#chi^{2}/ndof;#chi^{2}/ndof;Number of Tracks", 100, -0.01, 10.));
987  //variable binning for chi2/ndof vs. pT
988  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.};
989  vTrackHistos_.push_back(book<TH1F>("h_pt", "Track p_{T};p_{T}^{track} [GeV];Number of Tracks", 250, 0., 250));
990  vTrackHistos_.push_back(book<TH1F>("h_ptrebin", "Track p_{T};p_{T}^{track} [GeV];Number of Tracks", 18, xBins));
991  vTrackHistos_.push_back(book<TH1F>("h_ptResolution", "#delta_{p_{T}}/p_{T}^{track};#delta_{p_{T}}/p_{T}^{track};Number of Tracks", 100, 0., 0.5));
992 
993  vTrackProfiles_.push_back(book<TProfile>("p_d0_vs_phi", "Transverse Impact Parameter vs. #phi;#phi_{Track};#LT d_{0} #GT [cm]", 100, -M_PI, M_PI));
994  vTrackProfiles_.push_back(book<TProfile>("p_dz_vs_phi", "Longitudinal Impact Parameter vs. #phi;#phi_{Track};#LT d_{z} #GT [cm]", 100, -M_PI, M_PI));
995  vTrackProfiles_.push_back(book<TProfile>("p_d0_vs_eta", "Transverse Impact Parameter vs. #eta;#eta_{Track};#LT d_{0} #GT [cm]", 100, -etaMax_, etaMax_));
996  vTrackProfiles_.push_back(book<TProfile>("p_dz_vs_eta", "Longitudinal Impact Parameter vs. #eta;#eta_{Track};#LT d_{z} #GT [cm]", 100, -etaMax_, etaMax_));
997  vTrackProfiles_.push_back(book<TProfile>("p_chi2_vs_phi", "#chi^{2} vs. #phi;#phi_{Track};#LT #chi^{2} #GT", 100, -M_PI, M_PI));
998  vTrackProfiles_.push_back(book<TProfile>("p_chi2Prob_vs_phi", "#chi^{2} probablility vs. #phi;#phi_{Track};#LT #chi^{2} probability#GT", 100, -M_PI, M_PI));
999  vTrackProfiles_.push_back(book<TProfile>("p_chi2Prob_vs_d0", "#chi^{2} probablility vs. |d_{0}|;|d_{0}|[cm];#LT #chi^{2} probability#GT", 100, 0, 80));
1000  vTrackProfiles_.push_back(book<TProfile>("p_chi2Prob_vs_dz", "#chi^{2} probablility vs. dz;d_{z} [cm];#LT #chi^{2} probability#GT", 100, -30, 30));
1001  vTrackProfiles_.push_back(book<TProfile>("p_normchi2_vs_phi", "#chi^{2}/ndof vs. #phi;#phi_{Track};#LT #chi^{2}/ndof #GT", 100, -M_PI, M_PI));
1002  vTrackProfiles_.push_back(book<TProfile>("p_chi2_vs_eta", "#chi^{2} vs. #eta;#eta_{Track};#LT #chi^{2} #GT", 100, -etaMax_, etaMax_));
1003  vTrackProfiles_.push_back(book<TProfile>("p_normchi2_vs_pt", "norm #chi^{2} vs. p_{T}_{Track}; p_{T}_{Track};#LT #chi^{2}/ndof #GT", 18, xBins));
1004  vTrackProfiles_.push_back(book<TProfile>("p_normchi2_vs_p", "#chi^{2}/ndof vs. p_{Track};p_{Track};#LT #chi^{2}/ndof #GT", 18, xBins));
1005  vTrackProfiles_.push_back(book<TProfile>("p_chi2Prob_vs_eta","#chi^{2} probability vs. #eta;#eta_{Track};#LT #chi^{2} probability #GT",100,-etaMax_,etaMax_));
1006  vTrackProfiles_.push_back(book<TProfile>("p_normchi2_vs_eta", "#chi^{2}/ndof vs. #eta;#eta_{Track};#LT #chi^{2}/ndof #GT", 100, -etaMax_, etaMax_));
1007  vTrackProfiles_.push_back(book<TProfile>("p_kappa_vs_phi", "#kappa vs. #phi;#phi_{Track};#kappa", 100, -M_PI, M_PI));
1008  vTrackProfiles_.push_back(book<TProfile>("p_kappa_vs_eta", "#kappa vs. #eta;#eta_{Track};#kappa", 100, -etaMax_, etaMax_));
1009  vTrackProfiles_.push_back(book<TProfile>("p_ptResolution_vs_phi","#delta_{p_{T}}/p_{T}^{track};#phi^{track};#delta_{p_{T}}/p_{T}^{track}",100,-M_PI,M_PI));
1010  vTrackProfiles_.push_back(book<TProfile>("p_ptResolution_vs_eta","#delta_{p_{T}}/p_{T}^{track};#eta^{track};#delta_{p_{T}}/p_{T}^{track}",100,-etaMax_,etaMax_));
1011 
1012  vTrack2DHistos_.push_back(book<TH2F>("h2_phi_vs_eta", "Track #phi vs. #eta;#eta_{Track};#phi_{Track}",50, -etaMax_, etaMax_, 50, -M_PI, M_PI));
1013  vTrack2DHistos_.push_back(book<TH2F>("h2_d0_vs_phi", "Transverse Impact Parameter vs. #phi;#phi_{Track};d_{0} [cm]", 100, -M_PI, M_PI, 100, -1., 1.));
1014  vTrack2DHistos_.push_back(book<TH2F>("h2_dz_vs_phi", "Longitudinal Impact Parameter vs. #phi;#phi_{Track};d_{z} [cm]",100, -M_PI, M_PI, 100, -100., 100.));
1015  vTrack2DHistos_.push_back(book<TH2F>("h2_d0_vs_eta", "Transverse Impact Parameter vs. #eta;#eta_{Track};d_{0} [cm]", 100, -etaMax_, etaMax_, 100, -1., 1.));
1016  vTrack2DHistos_.push_back(book<TH2F>("h2_dz_vs_eta", "Longitudinal Impact Parameter vs. #eta;#eta_{Track};d_{z} [cm]", 100, -etaMax_, etaMax_, 100, -100., 100.));
1017  vTrack2DHistos_.push_back(book<TH2F>("h2_chi2_vs_phi", "#chi^{2} vs. #phi;#phi_{Track};#chi^{2}", 100, -M_PI, M_PI, 500, 0., 500.));
1018  vTrack2DHistos_.push_back(book<TH2F>("h2_chi2Prob_vs_phi", "#chi^{2} probability vs. #phi;#phi_{Track};#chi^{2} probability", 100, -M_PI, M_PI, 100, 0., 1.));
1019  vTrack2DHistos_.push_back(book<TH2F>("h2_chi2Prob_vs_d0", "#chi^{2} probability vs. |d_{0}|;|d_{0}| [cm];#chi^{2} probability", 100, 0, 80, 100, 0., 1.));
1020  vTrack2DHistos_.push_back(book<TH2F>("h2_normchi2_vs_phi", "#chi^{2}/ndof vs. #phi;#phi_{Track};#chi^{2}/ndof", 100, -M_PI, M_PI, 100, 0., 10.));
1021  vTrack2DHistos_.push_back(book<TH2F>("h2_chi2_vs_eta", "#chi^{2} vs. #eta;#eta_{Track};#chi^{2}", 100, -etaMax_, etaMax_, 500, 0., 500.));
1022  vTrack2DHistos_.push_back(book<TH2F>("h2_chi2Prob_vs_eta", "#chi^{2} probaility vs. #eta;#eta_{Track};#chi^{2} probability", 100, -etaMax_, etaMax_, 100, 0., 1.));
1023  vTrack2DHistos_.push_back(book<TH2F>("h2_normchi2_vs_eta", "#chi^{2}/ndof vs. #eta;#eta_{Track};#chi^{2}/ndof", 100, -etaMax_, etaMax_, 100, 0., 10.));
1024  vTrack2DHistos_.push_back(book<TH2F>("h2_kappa_vs_phi", "#kappa vs. #phi;#phi_{Track};#kappa", 100, -M_PI, M_PI, 100, .0, .05));
1025  vTrack2DHistos_.push_back(book<TH2F>("h2_kappa_vs_eta", "#kappa vs. #eta;#eta_{Track};#kappa", 100, -etaMax_, etaMax_, 100, .0, .05));
1026  vTrack2DHistos_.push_back(book<TH2F>("h2_normchi2_vs_kappa", "#kappa vs. #chi^{2}/ndof;#chi^{2}/ndof;#kappa", 100, 0., 10, 100, -.03, .03));
1027 
1028  // clang-format on
1029 
1030  } //beginJob
const char * qualities[3]
#define M_PI
Log< level::Info, false > LogInfo
static const std::string algoNames[]
Definition: TrackBase.h:147

◆ beginRun()

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

Definition at line 733 of file GeneralPurposeTrackAnalyzer.cc.

References conditionsMap_, coord_, DEBUG, doLatencyAnalysis_, geomTokenBR_, MagneticField::inTesla(), TrackerGeometry::isThere(), latencyToken_, PV3DBase< T, PVType, FrameType >::mag(), magFieldToken_, magneticField_, mode, SiPixelPI::one, GeomDetEnumerators::P1PXB, GeomDetEnumerators::P1PXEC, GeomDetEnumerators::P2PXB, GeomDetEnumerators::P2PXEC, phase_, edm::ESHandle< T >::product(), writedatasetfile::run, runInfoMap_, singleTopDQM_cfi::setup, SiStripLatency::singleReadOutMode(), siPixelFedCablingMapTokenBR_, trackerTopologyTokenBR_, SiPixelPI::two, and SiPixelPI::zero.

735  {
736  // initialize runInfoMap_
737  runInfoMap_[run.run()].first = 0;
738  runInfoMap_[run.run()].second = 0;
739 
740  // Magnetic Field setup
741  magneticField_ = setup.getHandle(magFieldToken_);
742  float B_ = magneticField_.product()->inTesla(GlobalPoint(0, 0, 0)).mag();
743 
744  if (DEBUG) {
745  edm::LogInfo("GeneralPurposeTrackAnalyzer")
746  << "run number:" << run.run() << " magnetic field: " << B_ << " [T]" << std::endl;
747  }
748 
749  const TrackerGeometry *trackerGeometry = &setup.getData(geomTokenBR_);
750  if (trackerGeometry->isThere(GeomDetEnumerators::P2PXB) || trackerGeometry->isThere(GeomDetEnumerators::P2PXEC)) {
752  } else if (trackerGeometry->isThere(GeomDetEnumerators::P1PXB) ||
753  trackerGeometry->isThere(GeomDetEnumerators::P1PXEC)) {
755  } else {
757  }
758 
759  // if it's a phase-2 geometry there are no phase-1 conditions
760  if (phase_ == SiPixelPI::phase::two) {
761  mode = 0;
762  } else {
763  if (doLatencyAnalysis_) {
764  //SiStrip Latency
765  const SiStripLatency *apvlat = &setup.getData(latencyToken_);
766  if (apvlat->singleReadOutMode() == 1) {
767  mode = 1; // peak mode
768  } else if (apvlat->singleReadOutMode() == 0) {
769  mode = -1; // deco mode
770  }
771  } else {
772  mode = 0;
773  }
774  }
775 
776  conditionsMap_[run.run()].first = mode;
777  conditionsMap_[run.run()].second = B_;
778 
779  // if phase-2 return, there is no phase-2 implementation of SiPixelCoordinates
781  return;
782 
783  // init the sipixel coordinates
784  const TrackerTopology *trackerTopology = &setup.getData(trackerTopologyTokenBR_);
785  const SiPixelFedCablingMap *siPixelFedCablingMap = &setup.getData(siPixelFedCablingMapTokenBR_);
786 
787  coord_ = coord_.value_or(SiPixelCoordinates());
788  // Pixel Phase-1 helper class
789  coord_->init(trackerTopology, trackerGeometry, siPixelFedCablingMap);
790  }
std::map< int, std::pair< int, float > > conditionsMap_
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomTokenBR_
T const * product() const
Definition: ESHandle.h:86
edm::ESHandle< MagneticField > magneticField_
bool isThere(GeomDetEnumerators::SubDetector subdet) const
T mag() const
Definition: PV3DBase.h:64
std::map< int, std::pair< int, int > > runInfoMap_
Log< level::Info, false > LogInfo
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
int16_t singleReadOutMode() const
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyTokenBR_
edm::ESGetToken< SiStripLatency, SiStripLatencyRcd > latencyToken_
const edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > siPixelFedCablingMapTokenBR_
std::optional< SiPixelCoordinates > coord_

◆ book()

template<typename T , typename... Args>
T* GeneralPurposeTrackAnalyzer::book ( const Args &...  args) const
inline

Definition at line 152 of file GeneralPurposeTrackAnalyzer.cc.

References writedatasetfile::args, fs, TFileService::make(), and submitPVValidationJobs::t.

152  {
153  T *t = fs->make<T>(args...);
154  return t;
155  }
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
long double T

◆ endJob()

void GeneralPurposeTrackAnalyzer::endJob ( void  )
inlineoverrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 1033 of file GeneralPurposeTrackAnalyzer.cc.

References conditionsMap_, gather_cfg::cout, evtsByTrigger_, fieldByRun_, dqmdumpme::first, alignBH_cfg::fixed, mps_fire::i, ievt, itrks, modeByRun_, phase_, pixelmap, pixelrocsmap_, pmap, runInfoMap_, crab_NZS2018C_1::runRange, edm::second(), jetUpdater_cfi::sort, tksByTrigger_, tmap, to_string(), triggerMap_, SiPixelPI::two, and SiPixelPI::zero.

Referenced by o2olib.O2ORunMgr::executeJob().

1035  {
1036  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "*******************************" << std::endl;
1037  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "Events run in total: " << ievt << std::endl;
1038  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "n. tracks: " << itrks << std::endl;
1039  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "*******************************" << std::endl;
1040 
1041  int nFiringTriggers = !triggerMap_.empty() ? triggerMap_.size() : 1;
1042  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "firing triggers: " << triggerMap_.size() << std::endl;
1043  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "*******************************" << std::endl;
1044 
1045  tksByTrigger_ =
1046  book<TH1D>("tksByTrigger", "tracks by HLT path;;% of # traks", nFiringTriggers, -0.5, nFiringTriggers - 0.5);
1047  evtsByTrigger_ =
1048  book<TH1D>("evtsByTrigger", "events by HLT path;;% of # events", nFiringTriggers, -0.5, nFiringTriggers - 0.5);
1049 
1050  int i = 0;
1051  for (const auto &it : triggerMap_) {
1052  i++;
1053 
1054  double trkpercent = ((it.second).second) * 100. / double(itrks);
1055  double evtpercent = ((it.second).first) * 100. / double(ievt);
1056 
1057  std::cout.precision(4);
1058 
1059  edm::LogPrint("GeneralPurposeTrackAnalyzer")
1060  << "HLT path: " << std::setw(60) << std::left << it.first << " | events firing: " << std::right
1061  << std::setw(8) << (it.second).first << " (" << std::setw(8) << std::fixed << std::setprecision(4)
1062  << evtpercent << "%)"
1063  << " | tracks collected: " << std::setw(10) << (it.second).second << " (" << std::setw(8) << std::fixed
1064  << std::setprecision(4) << trkpercent << "%)";
1065 
1066  tksByTrigger_->SetBinContent(i, trkpercent);
1067  tksByTrigger_->GetXaxis()->SetBinLabel(i, (it.first).c_str());
1068 
1069  evtsByTrigger_->SetBinContent(i, evtpercent);
1070  evtsByTrigger_->GetXaxis()->SetBinLabel(i, (it.first).c_str());
1071  }
1072 
1073  int nRuns = conditionsMap_.size();
1074  if (nRuns < 1) {
1075  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "*******************************"
1076  << "\n"
1077  << " no run was processed! "
1078  << "\n"
1079  << "*******************************";
1080 
1081  return;
1082  }
1083 
1084  std::vector<int> theRuns_;
1085  theRuns_.reserve(conditionsMap_.size());
1086  for (const auto &it : conditionsMap_) {
1087  theRuns_.push_back(it.first);
1088  }
1089 
1090  sort(theRuns_.begin(), theRuns_.end());
1091  int runRange = theRuns_.back() - theRuns_.front() + 1;
1092 
1093  edm::LogPrint("GeneralPurposeTrackAnalyzer") << "*******************************"
1094  << "\n"
1095  << "first run: " << theRuns_.front() << "\n"
1096  << "last run: " << theRuns_.back() << "\n"
1097  << "considered runs: " << nRuns << "\n"
1098  << "*******************************";
1099 
1100  modeByRun_ = book<TH1D>("modeByRun",
1101  "Strip APV mode by run number;;APV mode (-1=deco,+1=peak)",
1102  runRange,
1103  theRuns_.front() - 0.5,
1104  theRuns_.back() + 0.5);
1105 
1106  fieldByRun_ = book<TH1D>("fieldByRun",
1107  "CMS B-field intensity by run number;;B-field intensity [T]",
1108  runRange,
1109  theRuns_.front() - 0.5,
1110  theRuns_.back() + 0.5);
1111 
1112  edm::LogPrint("") << __PRETTY_FUNCTION__ << " line: " << __LINE__ << std::endl;
1113 
1114  for (const auto &the_r : theRuns_) {
1115  if (conditionsMap_.find(the_r)->second.first != 0) {
1116  edm::LogPrint("GeneralPurposeTrackAnalyzer")
1117  << "run:" << the_r << " | isPeak: " << std::setw(4) << conditionsMap_.find(the_r)->second.first
1118  << "| B-field: " << conditionsMap_.find(the_r)->second.second << " [T]"
1119  << "| events: " << std::setw(10) << runInfoMap_.find(the_r)->second.first << ", tracks " << std::setw(10)
1120  << runInfoMap_.find(the_r)->second.second << std::endl;
1121  }
1122 
1123  modeByRun_->SetBinContent((the_r - theRuns_.front()) + 1, conditionsMap_.find(the_r)->second.first);
1124  fieldByRun_->SetBinContent((the_r - theRuns_.front()) + 1, conditionsMap_.find(the_r)->second.second);
1125  modeByRun_->GetXaxis()->SetBinLabel((the_r - theRuns_.front()) + 1, std::to_string(the_r).c_str());
1126  fieldByRun_->GetXaxis()->SetBinLabel((the_r - theRuns_.front()) + 1, std::to_string(the_r).c_str());
1127  }
1128 
1129  if (phase_ < SiPixelPI::phase::two) {
1130  if (phase_ == SiPixelPI::phase::zero) {
1131  pmap->save(true, 0, 0, "PixelHitMap.pdf", 600, 800);
1132  pmap->save(true, 0, 0, "PixelHitMap.png", 500, 750);
1133  }
1134 
1135  tmap->save(true, 0, 0, "StripHitMap.pdf");
1136  tmap->save(true, 0, 0, "StripHitMap.png");
1137 
1138  gStyle->SetPalette(kRainBow);
1139  pixelmap->beautifyAllHistograms();
1140 
1141  TCanvas cB("CanvBarrel", "CanvBarrel", 1200, 1000);
1142  pixelmap->drawBarrelMaps("entriesBarrel", cB);
1143  cB.SaveAs("pixelBarrelEntries.png");
1144 
1145  TCanvas cF("CanvForward", "CanvForward", 1600, 1000);
1146  pixelmap->drawForwardMaps("entriesForward", cF);
1147  cF.SaveAs("pixelForwardEntries.png");
1148 
1149  TCanvas cRocs = TCanvas("cRocs", "cRocs", 1200, 1600);
1150  pixelrocsmap_->drawMaps(cRocs, "Pixel on-track clusters occupancy");
1151  cRocs.SaveAs("Phase1PixelROCMaps_fullROCs.png");
1152  }
1153  }
std::map< int, std::pair< int, float > > conditionsMap_
std::unique_ptr< TrackerMap > tmap
std::unique_ptr< TrackerMap > pmap
static std::string to_string(const XMLCh *ch)
U second(std::pair< T, U > const &p)
std::map< std::string, std::pair< int, int > > triggerMap_
std::map< int, std::pair< int, int > > runInfoMap_
Log< level::Warning, true > LogPrint
std::unique_ptr< Phase1PixelROCMaps > pixelrocsmap_
std::unique_ptr< Phase1PixelMaps > pixelmap

◆ endRun()

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

Definition at line 793 of file GeneralPurposeTrackAnalyzer.cc.

793 {}

◆ fillDescriptions()

void GeneralPurposeTrackAnalyzer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 1200 of file GeneralPurposeTrackAnalyzer.cc.

References edm::ConfigurationDescriptions::addWithDefaultLabel(), submitPVResolutionJobs::desc, and ProducerED_cfi::InputTag.

1202 {
1204  desc.setComment("Generic track analyzer to check ALCARECO sample quantities");
1205  desc.add<edm::InputTag>("TkTag", edm::InputTag("generalTracks"));
1206  desc.add<edm::InputTag>("TriggerResultsTag", edm::InputTag("TriggerResults", "", "HLT"));
1207  desc.add<edm::InputTag>("BeamSpotTag", edm::InputTag("offlineBeamSpot"));
1208  desc.add<edm::InputTag>("VerticesTag", edm::InputTag("offlinePrimaryVertices"));
1209  desc.add<bool>("isCosmics", false);
1210  desc.add<bool>("doLatencyAnalysis", true);
1211  descriptions.addWithDefaultLabel(desc);
1212 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

◆ index()

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

Definition at line 140 of file GeneralPurposeTrackAnalyzer.cc.

References Skims_PA_cff::name.

Referenced by analyze().

140  {
141  for (const auto &iter : vec | boost::adaptors::indexed(0)) {
142  if (iter.value() && iter.value()->GetName() == name) {
143  return iter.index();
144  }
145  }
146  edm::LogError("GeneralPurposeTrackAnalyzer") << "@SUB=GeneralPurposeTrackAnalyzer::index"
147  << " could not find " << name;
148  return -1;
149  }
Log< level::Error, false > LogError

◆ isHit2D()

bool GeneralPurposeTrackAnalyzer::isHit2D ( const TrackingRecHit hit)
inlineprivate

Definition at line 1156 of file GeneralPurposeTrackAnalyzer.cc.

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

Referenced by analyze().

1158  {
1159  bool countStereoHitAs2D_ = true;
1160  // we count SiStrip stereo modules as 2D if selected via countStereoHitAs2D_
1161  // (since they provide theta information)
1162  if (!hit.isValid() ||
1163  (hit.dimension() < 2 && !countStereoHitAs2D_ && !dynamic_cast<const SiStripRecHit1D *>(&hit))) {
1164  return false; // real RecHit1D - but SiStripRecHit1D depends on countStereoHitAs2D_
1165  } else {
1166  const DetId detId(hit.geographicalId());
1167  if (detId.det() == DetId::Tracker) {
1168  if (detId.subdetId() == kBPIX || detId.subdetId() == kFPIX) {
1169  return true; // pixel is always 2D
1170  } else { // should be SiStrip now
1171  const SiStripDetId stripId(detId);
1172  if (stripId.stereo())
1173  return countStereoHitAs2D_; // stereo modules
1174  else if (dynamic_cast<const SiStripRecHit1D *>(&hit) || dynamic_cast<const SiStripRecHit2D *>(&hit))
1175  return false; // rphi modules hit
1176  //the following two are not used any more since ages...
1177  else if (dynamic_cast<const SiStripMatchedRecHit2D *>(&hit))
1178  return true; // matched is 2D
1179  else if (dynamic_cast<const ProjectedSiStripRecHit2D *>(&hit)) {
1180  const ProjectedSiStripRecHit2D *pH = static_cast<const ProjectedSiStripRecHit2D *>(&hit);
1181  return (countStereoHitAs2D_ && this->isHit2D(pH->originalHit())); // depends on original...
1182  } else {
1183  edm::LogError("UnknownType") << "@SUB=GeneralPurposeTrackAnalyzer::isHit2D"
1184  << "Tracker hit not in pixel, neither SiStripRecHit[12]D nor "
1185  << "SiStripMatchedRecHit2D nor ProjectedSiStripRecHit2D.";
1186  return false;
1187  }
1188  }
1189  } else { // not tracker??
1190  edm::LogWarning("DetectorMismatch") << "@SUB=GeneralPurposeTrackAnalyzer::isHit2D"
1191  << "Hit not in tracker with 'official' dimension >=2.";
1192  return true; // dimension() >= 2 so accept that...
1193  }
1194  }
1195  // never reached...
1196  }
Log< level::Error, false > LogError
const int kFPIX
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
Definition: DetId.h:17
SiStripRecHit2D originalHit() const
Log< level::Warning, false > LogWarning
const int kBPIX
bool isHit2D(const TrackingRecHit &hit)

Member Data Documentation

◆ BeamSpotTag_

edm::InputTag GeneralPurposeTrackAnalyzer::BeamSpotTag_
private

Definition at line 307 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by GeneralPurposeTrackAnalyzer().

◆ beamspotToken_

edm::EDGetTokenT<reco::BeamSpot> GeneralPurposeTrackAnalyzer::beamspotToken_
private

Definition at line 315 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and GeneralPurposeTrackAnalyzer().

◆ conditionsMap_

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

Definition at line 319 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by beginRun(), and endJob().

◆ coord_

std::optional<SiPixelCoordinates> GeneralPurposeTrackAnalyzer::coord_
private

Definition at line 169 of file GeneralPurposeTrackAnalyzer.cc.

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

◆ doLatencyAnalysis_

bool GeneralPurposeTrackAnalyzer::doLatencyAnalysis_
private

Definition at line 311 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by beginRun(), and GeneralPurposeTrackAnalyzer().

◆ etaMax_

float GeneralPurposeTrackAnalyzer::etaMax_
private

Definition at line 300 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by beginJob().

◆ evtsByTrigger_

TH1D* GeneralPurposeTrackAnalyzer::evtsByTrigger_
private

Definition at line 292 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by endJob().

◆ fieldByRun_

TH1D* GeneralPurposeTrackAnalyzer::fieldByRun_
private

Definition at line 295 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by endJob().

◆ fs

edm::Service<TFileService> GeneralPurposeTrackAnalyzer::fs
private

Definition at line 171 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by book().

◆ geomToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> GeneralPurposeTrackAnalyzer::geomToken_
private

Definition at line 159 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze().

◆ geomTokenBR_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> GeneralPurposeTrackAnalyzer::geomTokenBR_
private

Definition at line 163 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by beginRun().

◆ h_Beamsigmaz

TH1F* GeneralPurposeTrackAnalyzer::h_Beamsigmaz
private

Definition at line 281 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ h_BeamWidthX

TH1F* GeneralPurposeTrackAnalyzer::h_BeamWidthX
private

Definition at line 282 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ h_BeamWidthY

TH1F* GeneralPurposeTrackAnalyzer::h_BeamWidthY
private

Definition at line 283 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ h_BSdxdz

TH1F* GeneralPurposeTrackAnalyzer::h_BSdxdz
private

Definition at line 284 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ h_BSdydz

TH1F* GeneralPurposeTrackAnalyzer::h_BSdydz
private

Definition at line 285 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ h_BSx0

TH1F* GeneralPurposeTrackAnalyzer::h_BSx0
private

Definition at line 278 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ h_BSy0

TH1F* GeneralPurposeTrackAnalyzer::h_BSy0
private

Definition at line 279 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ h_BSz0

TH1F* GeneralPurposeTrackAnalyzer::h_BSz0
private

Definition at line 280 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hCharge

TH1D* GeneralPurposeTrackAnalyzer::hCharge
private

Definition at line 220 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hchi2ndof

TH1D* GeneralPurposeTrackAnalyzer::hchi2ndof
private

Definition at line 179 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hchi2ndofhp

TH1D* GeneralPurposeTrackAnalyzer::hchi2ndofhp
private

Definition at line 217 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hchi2Probhp

TH1D* GeneralPurposeTrackAnalyzer::hchi2Probhp
private

Definition at line 218 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hd0

TH1D* GeneralPurposeTrackAnalyzer::hd0
private

Definition at line 242 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hd0BS

TH1D* GeneralPurposeTrackAnalyzer::hd0BS
private

Definition at line 270 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hd0PV

TH1D* GeneralPurposeTrackAnalyzer::hd0PV
private

Definition at line 273 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hd0PVvseta

TH2D* GeneralPurposeTrackAnalyzer::hd0PVvseta
private

Definition at line 247 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hd0PVvsphi

TH2D* GeneralPurposeTrackAnalyzer::hd0PVvsphi
private

Definition at line 246 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hd0PVvspt

TH2D* GeneralPurposeTrackAnalyzer::hd0PVvspt
private

Definition at line 248 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hd0vseta

TH2D* GeneralPurposeTrackAnalyzer::hd0vseta
private

Definition at line 251 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hd0vsphi

TH2D* GeneralPurposeTrackAnalyzer::hd0vsphi
private

Definition at line 250 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hd0vspt

TH2D* GeneralPurposeTrackAnalyzer::hd0vspt
private

Definition at line 252 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hDeltaEta

TH1D* GeneralPurposeTrackAnalyzer::hDeltaEta
private

Definition at line 236 of file GeneralPurposeTrackAnalyzer.cc.

◆ hDeltaPhi

TH1D* GeneralPurposeTrackAnalyzer::hDeltaPhi
private

Definition at line 235 of file GeneralPurposeTrackAnalyzer.cc.

◆ hDeltaR

TH1D* GeneralPurposeTrackAnalyzer::hDeltaR
private

Definition at line 237 of file GeneralPurposeTrackAnalyzer.cc.

◆ hdxy

TH1D* GeneralPurposeTrackAnalyzer::hdxy
private

Definition at line 244 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hdxyBS

TH1D* GeneralPurposeTrackAnalyzer::hdxyBS
private

Definition at line 269 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hdxyPV

TH1D* GeneralPurposeTrackAnalyzer::hdxyPV
private

Definition at line 272 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hdz

TH1D* GeneralPurposeTrackAnalyzer::hdz
private

Definition at line 243 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hdzBS

TH1D* GeneralPurposeTrackAnalyzer::hdzBS
private

Definition at line 271 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hdzPV

TH1D* GeneralPurposeTrackAnalyzer::hdzPV
private

Definition at line 274 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hEta

TH1D* GeneralPurposeTrackAnalyzer::hEta
private

Definition at line 223 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hEtahp

TH1D* GeneralPurposeTrackAnalyzer::hEtahp
private

Definition at line 215 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hEtaMinus

TH1D* GeneralPurposeTrackAnalyzer::hEtaMinus
private

Definition at line 225 of file GeneralPurposeTrackAnalyzer.cc.

◆ hEtaPlus

TH1D* GeneralPurposeTrackAnalyzer::hEtaPlus
private

Definition at line 224 of file GeneralPurposeTrackAnalyzer.cc.

◆ hHit

TH1D* GeneralPurposeTrackAnalyzer::hHit
private

Definition at line 193 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHit2D

TH1D* GeneralPurposeTrackAnalyzer::hHit2D
private

Definition at line 194 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitComposition

TH1D* GeneralPurposeTrackAnalyzer::hHitComposition
private

Definition at line 261 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsPhiBPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsPhiBPix
private

Definition at line 204 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsPhiFPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsPhiFPix
private

Definition at line 207 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsThetaBPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsThetaBPix
private

Definition at line 203 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsThetaFPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsThetaFPix
private

Definition at line 206 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsXBPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsXBPix
private

Definition at line 196 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsXFPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsXFPix
private

Definition at line 197 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsYBPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsYBPix
private

Definition at line 198 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsYFPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsYFPix
private

Definition at line 199 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsZBPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsZBPix
private

Definition at line 200 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitCountVsZFPix

TH1D* GeneralPurposeTrackAnalyzer::hHitCountVsZFPix
private

Definition at line 201 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHithp

TH1D* GeneralPurposeTrackAnalyzer::hHithp
private

Definition at line 214 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hHitMinus

TH1D* GeneralPurposeTrackAnalyzer::hHitMinus
private

Definition at line 210 of file GeneralPurposeTrackAnalyzer.cc.

◆ hHitPlus

TH1D* GeneralPurposeTrackAnalyzer::hHitPlus
private

Definition at line 209 of file GeneralPurposeTrackAnalyzer.cc.

◆ hltresultsToken_

edm::EDGetTokenT<edm::TriggerResults> GeneralPurposeTrackAnalyzer::hltresultsToken_
private

Definition at line 314 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and GeneralPurposeTrackAnalyzer().

◆ hlumi

TH1D* GeneralPurposeTrackAnalyzer::hlumi
private

Definition at line 276 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hMinPt

TH1D* GeneralPurposeTrackAnalyzer::hMinPt
private

Definition at line 190 of file GeneralPurposeTrackAnalyzer.cc.

◆ hMultCand

TH1D* GeneralPurposeTrackAnalyzer::hMultCand
private

Definition at line 267 of file GeneralPurposeTrackAnalyzer.cc.

◆ hNhighPurity

TH1D* GeneralPurposeTrackAnalyzer::hNhighPurity
private

Definition at line 185 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hnhpxb

TH1D* GeneralPurposeTrackAnalyzer::hnhpxb
private

Definition at line 254 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hnhpxe

TH1D* GeneralPurposeTrackAnalyzer::hnhpxe
private

Definition at line 255 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hnhTEC

TH1D* GeneralPurposeTrackAnalyzer::hnhTEC
private

Definition at line 259 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hnhTIB

TH1D* GeneralPurposeTrackAnalyzer::hnhTIB
private

Definition at line 256 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hnhTID

TH1D* GeneralPurposeTrackAnalyzer::hnhTID
private

Definition at line 257 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hnhTOB

TH1D* GeneralPurposeTrackAnalyzer::hnhTOB
private

Definition at line 258 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hNtrk

TH1D* GeneralPurposeTrackAnalyzer::hNtrk
private

Definition at line 180 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hNtrkZoom

TH1D* GeneralPurposeTrackAnalyzer::hNtrkZoom
private

Definition at line 181 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hP

TH1D* GeneralPurposeTrackAnalyzer::hP
private

Definition at line 186 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPhi

TH1D* GeneralPurposeTrackAnalyzer::hPhi
private

Definition at line 226 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPhiBarrel

TH1D* GeneralPurposeTrackAnalyzer::hPhiBarrel
private

Definition at line 227 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPhiEndcapMinus

TH1D* GeneralPurposeTrackAnalyzer::hPhiEndcapMinus
private

Definition at line 231 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPhiEndcapPlus

TH1D* GeneralPurposeTrackAnalyzer::hPhiEndcapPlus
private

Definition at line 230 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPhihp

TH1D* GeneralPurposeTrackAnalyzer::hPhihp
private

Definition at line 216 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPhiMinus

TH1D* GeneralPurposeTrackAnalyzer::hPhiMinus
private

Definition at line 233 of file GeneralPurposeTrackAnalyzer.cc.

◆ hPhiOverlapMinus

TH1D* GeneralPurposeTrackAnalyzer::hPhiOverlapMinus
private

Definition at line 229 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPhiOverlapPlus

TH1D* GeneralPurposeTrackAnalyzer::hPhiOverlapPlus
private

Definition at line 228 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPhiPlus

TH1D* GeneralPurposeTrackAnalyzer::hPhiPlus
private

Definition at line 232 of file GeneralPurposeTrackAnalyzer.cc.

◆ hPhp

TH1D* GeneralPurposeTrackAnalyzer::hPhp
private

Definition at line 212 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPMinus

TH1D* GeneralPurposeTrackAnalyzer::hPMinus
private

Definition at line 188 of file GeneralPurposeTrackAnalyzer.cc.

◆ hPPlus

TH1D* GeneralPurposeTrackAnalyzer::hPPlus
private

Definition at line 187 of file GeneralPurposeTrackAnalyzer.cc.

◆ hPt

TH1D* GeneralPurposeTrackAnalyzer::hPt
private

Definition at line 189 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPthp

TH1D* GeneralPurposeTrackAnalyzer::hPthp
private

Definition at line 213 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hPtMinus

TH1D* GeneralPurposeTrackAnalyzer::hPtMinus
private

Definition at line 192 of file GeneralPurposeTrackAnalyzer.cc.

◆ hPtPlus

TH1D* GeneralPurposeTrackAnalyzer::hPtPlus
private

Definition at line 191 of file GeneralPurposeTrackAnalyzer.cc.

◆ hQoverP

TH1D* GeneralPurposeTrackAnalyzer::hQoverP
private

Definition at line 221 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hQoverPZoom

TH1D* GeneralPurposeTrackAnalyzer::hQoverPZoom
private

Definition at line 222 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hrun

TH1D* GeneralPurposeTrackAnalyzer::hrun
private

Definition at line 275 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ htrkAlgo

TH1I* GeneralPurposeTrackAnalyzer::htrkAlgo
private

Definition at line 183 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ htrkOriAlgo

TH1I* GeneralPurposeTrackAnalyzer::htrkOriAlgo
private

Definition at line 184 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ htrkQuality

TH1I* GeneralPurposeTrackAnalyzer::htrkQuality
private

Definition at line 182 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hvx

TH1D* GeneralPurposeTrackAnalyzer::hvx
private

Definition at line 239 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hvy

TH1D* GeneralPurposeTrackAnalyzer::hvy
private

Definition at line 240 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ hvz

TH1D* GeneralPurposeTrackAnalyzer::hvz
private

Definition at line 241 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ ievt

int GeneralPurposeTrackAnalyzer::ievt
private

Definition at line 297 of file GeneralPurposeTrackAnalyzer.cc.

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

◆ isCosmics_

bool GeneralPurposeTrackAnalyzer::isCosmics_
private

Definition at line 310 of file GeneralPurposeTrackAnalyzer.cc.

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

◆ itrks

int GeneralPurposeTrackAnalyzer::itrks
private

Definition at line 298 of file GeneralPurposeTrackAnalyzer.cc.

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

◆ latencyToken_

edm::ESGetToken<SiStripLatency, SiStripLatencyRcd> GeneralPurposeTrackAnalyzer::latencyToken_
private

Definition at line 161 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by beginRun(), and GeneralPurposeTrackAnalyzer().

◆ magFieldToken_

const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> GeneralPurposeTrackAnalyzer::magFieldToken_
private

Definition at line 160 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by beginRun().

◆ magneticField_

edm::ESHandle<MagneticField> GeneralPurposeTrackAnalyzer::magneticField_
private

Definition at line 167 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginRun().

◆ mode

int GeneralPurposeTrackAnalyzer::mode
private

Definition at line 299 of file GeneralPurposeTrackAnalyzer.cc.

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

◆ modeByRun_

TH1D* GeneralPurposeTrackAnalyzer::modeByRun_
private

Definition at line 294 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by endJob().

◆ phase_

SiPixelPI::phase GeneralPurposeTrackAnalyzer::phase_
private

Definition at line 301 of file GeneralPurposeTrackAnalyzer.cc.

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

◆ pixelmap

std::unique_ptr<Phase1PixelMaps> GeneralPurposeTrackAnalyzer::pixelmap
private

Definition at line 176 of file GeneralPurposeTrackAnalyzer.cc.

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

◆ pixelrocsmap_

std::unique_ptr<Phase1PixelROCMaps> GeneralPurposeTrackAnalyzer::pixelrocsmap_
private

Definition at line 177 of file GeneralPurposeTrackAnalyzer.cc.

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

◆ pmap

std::unique_ptr<TrackerMap> GeneralPurposeTrackAnalyzer::pmap
private

Definition at line 174 of file GeneralPurposeTrackAnalyzer.cc.

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

◆ pNBpixHitsVsVx

TProfile* GeneralPurposeTrackAnalyzer::pNBpixHitsVsVx
private

Definition at line 263 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ pNBpixHitsVsVy

TProfile* GeneralPurposeTrackAnalyzer::pNBpixHitsVsVy
private

Definition at line 264 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ pNBpixHitsVsVz

TProfile* GeneralPurposeTrackAnalyzer::pNBpixHitsVsVz
private

Definition at line 265 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ runInfoMap_

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

Definition at line 320 of file GeneralPurposeTrackAnalyzer.cc.

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

◆ siPixelFedCablingMapTokenBR_

const edm::ESGetToken<SiPixelFedCablingMap, SiPixelFedCablingMapRcd> GeneralPurposeTrackAnalyzer::siPixelFedCablingMapTokenBR_
private

Definition at line 165 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by beginRun().

◆ theTrackCollectionToken_

edm::EDGetTokenT<reco::TrackCollection> GeneralPurposeTrackAnalyzer::theTrackCollectionToken_
private

Definition at line 313 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and GeneralPurposeTrackAnalyzer().

◆ tksByTrigger_

TH1D* GeneralPurposeTrackAnalyzer::tksByTrigger_
private

Definition at line 291 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by endJob().

◆ TkTag_

edm::InputTag GeneralPurposeTrackAnalyzer::TkTag_
private

Definition at line 305 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by GeneralPurposeTrackAnalyzer().

◆ tmap

std::unique_ptr<TrackerMap> GeneralPurposeTrackAnalyzer::tmap
private

Definition at line 173 of file GeneralPurposeTrackAnalyzer.cc.

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

◆ trackerGeometry_

const TrackerGeometry* GeneralPurposeTrackAnalyzer::trackerGeometry_
private

Definition at line 303 of file GeneralPurposeTrackAnalyzer.cc.

◆ trackerTopologyTokenBR_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> GeneralPurposeTrackAnalyzer::trackerTopologyTokenBR_
private

Definition at line 164 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by beginRun().

◆ triggerMap_

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

Definition at line 318 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and endJob().

◆ TriggerResultsTag_

edm::InputTag GeneralPurposeTrackAnalyzer::TriggerResultsTag_
private

Definition at line 306 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by GeneralPurposeTrackAnalyzer().

◆ vertexToken_

edm::EDGetTokenT<reco::VertexCollection> GeneralPurposeTrackAnalyzer::vertexToken_
private

Definition at line 316 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and GeneralPurposeTrackAnalyzer().

◆ VerticesTag_

edm::InputTag GeneralPurposeTrackAnalyzer::VerticesTag_
private

Definition at line 308 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by GeneralPurposeTrackAnalyzer().

◆ vTrack2DHistos_

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

Definition at line 289 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ vTrackHistos_

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

Definition at line 287 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().

◆ vTrackProfiles_

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

Definition at line 288 of file GeneralPurposeTrackAnalyzer.cc.

Referenced by analyze(), and beginJob().