CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
Phase2TrackerValidateDigi Class Reference

#include <Phase2TrackerValidateDigi.h>

Inheritance diagram for Phase2TrackerValidateDigi:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Classes

struct  DigiMEs
 

Public Member Functions

void analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
void bookHistograms (DQMStore::IBooker &ibooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
 
void dqmBeginRun (const edm::Run &iRun, const edm::EventSetup &iSetup) override
 
std::string getHistoId (uint32_t det_id, bool flag)
 
 Phase2TrackerValidateDigi (const edm::ParameterSet &)
 
 ~Phase2TrackerValidateDigi () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Member Functions

void bookLayerHistos (DQMStore::IBooker &ibooker, unsigned int det_id, bool flag)
 
void fillHistogram (MonitorElement *th1, MonitorElement *th2, MonitorElement *th3, float val, int primary)
 
void fillHitsPerTrack ()
 
void fillITPixelBXInfo ()
 
void fillOTBXInfo ()
 
int fillSimHitInfo (const edm::Event &iEvent, const SimTrack simTrk)
 
bool findITPixelDigi (unsigned int detid, unsigned int id)
 
bool findOTDigi (unsigned int detid, unsigned int id)
 
unsigned int getSimTrackId (const edm::DetSetVector< PixelDigiSimLink > *simLinks, const DetId &detId, unsigned int &channel)
 
bool isPrimary (const SimTrack &simTrk, const PSimHit &simHit)
 
int matchedSimTrack (edm::Handle< edm::SimTrackContainer > &SimTk, unsigned int simTrkId)
 

Private Attributes

edm::ParameterSet config_
 
const float cval
 
float etaCut_
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordgeomToken_
 
std::string geomType_
 
const float GeVperElectron
 
const edm::DetSetVector< PixelDigi > * itdigis_
 
edm::InputTag itPixelDigiSimLinkSrc_
 
const edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > itPixelDigiSimLinkToken_
 
edm::InputTag itPixelDigiSrc_
 
const edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > itPixelDigiToken_
 
const edm::DetSetVector< PixelDigiSimLink > * itSimLink_
 
std::map< std::string, DigiMEslayerMEs
 
MonitorElementMatchedRZPositionMap
 
MonitorElementMatchedXYPositionMap
 
MonitorElementnSimHitsPerTrack
 
MonitorElementnSimulatedTracks
 
MonitorElementnSimulatedTracksP
 
MonitorElementnSimulatedTracksS
 
MonitorElementnSimVertices
 
const edm::DetSetVector< Phase2TrackerDigi > * otdigis_
 
edm::InputTag otDigiSimLinkSrc_
 
const edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > otDigiSimLinkToken_
 
edm::InputTag otDigiSrc_
 
const edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > otDigiToken_
 
const edm::DetSetVector< PixelDigiSimLink > * otSimLink_
 
bool pixelFlag_
 
std::vector< edm::InputTagpSimHitSrc_
 
float ptCut_
 
edm::Handle< edm::PSimHitContainersimHits
 
std::vector< edm::EDGetTokenT< edm::PSimHitContainer > > simHitTokens_
 
edm::Handle< edm::SimTrackContainersimTracks
 
edm::InputTag simTrackSrc_
 
const edm::EDGetTokenT< edm::SimTrackContainersimTrackToken_
 
MonitorElementSimulatedRZPositionMap
 
MonitorElementSimulatedTOFEtaMap
 
MonitorElementSimulatedTOFPhiMap
 
MonitorElementSimulatedTOFRMap
 
MonitorElementSimulatedTOFZMap
 
MonitorElementSimulatedTrackEta
 
MonitorElementSimulatedTrackEtaP
 
MonitorElementSimulatedTrackEtaS
 
MonitorElementSimulatedTrackPhi
 
MonitorElementSimulatedTrackPhiP
 
MonitorElementSimulatedTrackPhiS
 
MonitorElementSimulatedTrackPt
 
MonitorElementSimulatedTrackPtP
 
MonitorElementSimulatedTrackPtS
 
MonitorElementSimulatedXYPositionMap
 
edm::InputTag simVertexSrc_
 
const edm::EDGetTokenT< edm::SimVertexContainersimVertexToken_
 
edm::Handle< edm::SimVertexContainersimVertices
 
const TrackerGeometrytkGeom_ = nullptr
 
float tofLowerCut_
 
float tofUpperCut_
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtopoToken_
 
const TrackerTopologytTopo_ = nullptr
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Description: Test pixel digis.

Definition at line 29 of file Phase2TrackerValidateDigi.h.

Constructor & Destructor Documentation

◆ Phase2TrackerValidateDigi()

Phase2TrackerValidateDigi::Phase2TrackerValidateDigi ( const edm::ParameterSet iConfig)
explicit

Definition at line 51 of file Phase2TrackerValidateDigi.cc.

References config_, etaCut_, edm::ParameterSet::getParameter(), pSimHitSrc_, ptCut_, simHitTokens_, tofLowerCut_, and tofUpperCut_.

52  : config_(iConfig),
53  pixelFlag_(config_.getParameter<bool>("PixelPlotFillingFlag")),
54  geomType_(config_.getParameter<std::string>("GeometryType")),
55  otDigiSrc_(config_.getParameter<edm::InputTag>("OuterTrackerDigiSource")),
56  otDigiSimLinkSrc_(config_.getParameter<edm::InputTag>("OuterTrackerDigiSimLinkSource")),
57  itPixelDigiSrc_(config_.getParameter<edm::InputTag>("InnerPixelDigiSource")),
58  itPixelDigiSimLinkSrc_(config_.getParameter<edm::InputTag>("InnerPixelDigiSimLinkSource")),
59  pSimHitSrc_(config_.getParameter<std::vector<edm::InputTag>>("PSimHitSource")),
60  simTrackSrc_(config_.getParameter<edm::InputTag>("SimTrackSource")),
61  simVertexSrc_(config_.getParameter<edm::InputTag>("SimVertexSource")),
66  simTrackToken_(consumes<edm::SimTrackContainer>(simTrackSrc_)),
67  simVertexToken_(consumes<edm::SimVertexContainer>(simVertexSrc_)),
68  geomToken_(esConsumes<TrackerGeometry, TrackerDigiGeometryRecord, edm::Transition::BeginRun>()),
69  topoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd, edm::Transition::BeginRun>()),
70  GeVperElectron(3.61E-09), // 1 electron(3.61eV, 1keV(277e, mod 9/06 d.k.
71  cval(30.) {
72  for (const auto& itag : pSimHitSrc_)
73  simHitTokens_.push_back(consumes<edm::PSimHitContainer>(itag));
74 
75  etaCut_ = config_.getParameter<double>("EtaCutOff");
76  ptCut_ = config_.getParameter<double>("PtCutOff");
77  tofUpperCut_ = config_.getParameter<double>("TOFUpperCutOff");
78  tofLowerCut_ = config_.getParameter<double>("TOFLowerCutOff");
79 
80  edm::LogInfo("Phase2TrackerValidateDigi") << ">>> Construct Phase2TrackerValidateDigi ";
81 }
const edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > otDigiToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > itPixelDigiSimLinkToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
std::vector< edm::InputTag > pSimHitSrc_
const edm::EDGetTokenT< edm::SimVertexContainer > simVertexToken_
std::vector< edm::EDGetTokenT< edm::PSimHitContainer > > simHitTokens_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Log< level::Info, false > LogInfo
const edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > itPixelDigiToken_
const edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > otDigiSimLinkToken_
const edm::EDGetTokenT< edm::SimTrackContainer > simTrackToken_

◆ ~Phase2TrackerValidateDigi()

Phase2TrackerValidateDigi::~Phase2TrackerValidateDigi ( )
override

Definition at line 86 of file Phase2TrackerValidateDigi.cc.

86  {
87  // do anything here that needs to be done at desctruction time
88  // (e.g. close files, deallocate resources etc.)
89  edm::LogInfo("Phase2TrackerValidateDigi") << ">>> Destroy Phase2TrackerValidateDigi ";
90 }
Log< level::Info, false > LogInfo

Member Function Documentation

◆ analyze()

void Phase2TrackerValidateDigi::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 108 of file Phase2TrackerValidateDigi.cc.

References etaCut_, dqm::impl::MonitorElement::Fill(), fillHistogram(), fillITPixelBXInfo(), fillOTBXInfo(), fillSimHitInfo(), iEvent, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, itdigis_, itPixelDigiSimLinkToken_, itPixelDigiToken_, itSimLink_, layerMEs, matchedSimTrack(), Phase2TrackerValidateDigi::DigiMEs::MissedHitTrackEta, Phase2TrackerValidateDigi::DigiMEs::MissedHitTrackPhi, Phase2TrackerValidateDigi::DigiMEs::MissedHitTrackPt, nSimulatedTracks, nSimulatedTracksP, nSimulatedTracksS, nSimVertices, beamSpotPI::nTracks, otdigis_, otDigiSimLinkToken_, otDigiToken_, otSimLink_, pixelFlag_, ptCut_, simTracks, simTrackToken_, SimulatedTrackEta, SimulatedTrackEtaP, SimulatedTrackEtaS, SimulatedTrackPhi, SimulatedTrackPhiP, SimulatedTrackPhiS, SimulatedTrackPt, SimulatedTrackPtP, SimulatedTrackPtS, simVertexToken_, simVertices, and L1BJetProducer_cff::vtx.

108  {
109  //Digis
111  otdigis_ = &iEvent.get(otDigiToken_);
112  // DigiSimLink
115 
116  // SimTrack
117  simTracks = iEvent.getHandle(simTrackToken_);
118  // SimVertex
119  simVertices = iEvent.getHandle(simVertexToken_);
120 
121  // Fil # of SIM Vertices@
122  nSimVertices->Fill((*simVertices).size());
123  // Loop over Sim Tracks and Fill relevant histograms
124  int nTracks = 0;
125  int nTracksP = 0;
126  int nTracksS = 0;
127  for (edm::SimTrackContainer::const_iterator simTrkItr = simTracks->begin(); simTrkItr != simTracks->end();
128  ++simTrkItr) {
129  if (simTrkItr->charge() == 0)
130  continue;
131  int vtxIndex = simTrkItr->vertIndex();
132  int vtxParent = -1;
133  if (vtxIndex > 0) {
134  SimVertex vtx = (*simVertices)[vtxIndex];
135  if (!vtx.noParent()) {
136  int trkId = vtx.parentIndex();
137  vtxParent = (*simTracks)[matchedSimTrack(simTracks, trkId)].vertIndex();
138  }
139  }
140  int simTk_type = -1;
141  if (vtxIndex == 0 || vtxParent == 0)
142  simTk_type = 1;
143  else
144  simTk_type = 0;
145  nTracks++;
146  if (simTk_type == 1)
147  nTracksP++;
148  else
149  nTracksS++;
150 
151  float simTk_pt = simTrkItr->momentum().pt();
152  float simTk_eta = simTrkItr->momentum().eta();
153  float simTk_phi = simTrkItr->momentum().phi();
154 
155  if (fabs(simTk_eta) < etaCut_)
157  if (simTk_pt > ptCut_)
159  if (fabs(simTk_eta) < etaCut_ && simTk_pt > ptCut_)
161 
162  // initialize
163  for (auto& it : layerMEs) {
164  it.second.nDigis = 0;
165  it.second.nHits = 0;
166  }
167  fillSimHitInfo(iEvent, (*simTrkItr));
168 
169  int nHitCutoff = 2;
170  if (pixelFlag_)
171  nHitCutoff = 1;
172  for (auto& it : layerMEs) {
173  DigiMEs& local_mes = it.second;
174  if (it.second.nHits < nHitCutoff) {
175  if (std::fabs(simTk_eta) < 1.0)
176  local_mes.MissedHitTrackPt->Fill(simTk_pt);
177  if (simTk_pt > ptCut_ && std::fabs(simTk_eta) < 1.0)
178  local_mes.MissedHitTrackEta->Fill(simTk_eta);
179  if (std::fabs(simTk_eta) < 1.0 && simTk_pt > ptCut_)
180  local_mes.MissedHitTrackPhi->Fill(simTk_phi);
181  }
182  }
183  }
185  nSimulatedTracksP->Fill(nTracksP);
186  nSimulatedTracksS->Fill(nTracksS);
187  if (pixelFlag_)
189  else
190  fillOTBXInfo();
191 }
const edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > otDigiToken_
edm::Handle< edm::SimTrackContainer > simTracks
const edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > itPixelDigiSimLinkToken_
const edm::DetSetVector< PixelDigiSimLink > * itSimLink_
int matchedSimTrack(edm::Handle< edm::SimTrackContainer > &SimTk, unsigned int simTrkId)
const edm::EDGetTokenT< edm::SimVertexContainer > simVertexToken_
void Fill(long long x)
std::map< std::string, DigiMEs > layerMEs
int iEvent
Definition: GenABIO.cc:224
void fillHistogram(MonitorElement *th1, MonitorElement *th2, MonitorElement *th3, float val, int primary)
const edm::DetSetVector< PixelDigi > * itdigis_
edm::Handle< edm::SimVertexContainer > simVertices
const edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > itPixelDigiToken_
int fillSimHitInfo(const edm::Event &iEvent, const SimTrack simTrk)
const edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > otDigiSimLinkToken_
const edm::DetSetVector< PixelDigiSimLink > * otSimLink_
const edm::EDGetTokenT< edm::SimTrackContainer > simTrackToken_
const edm::DetSetVector< Phase2TrackerDigi > * otdigis_

◆ bookHistograms()

void Phase2TrackerValidateDigi::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 364 of file Phase2TrackerValidateDigi.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), bookLayerHistos(), dqm::implementation::NavigatorBase::cd(), edm::ESWatcher< T >::check(), config_, TrackerGeometry::detUnits(), fed_dqm_sourceclient-live_cfg::folder_name, edm::ParameterSet::getParameter(), MatchedRZPositionMap, MatchedXYPositionMap, nSimulatedTracks, nSimulatedTracksP, nSimulatedTracksS, nSimVertices, pixelFlag_, dqm::implementation::NavigatorBase::setCurrentFolder(), SimulatedRZPositionMap, SimulatedTOFEtaMap, SimulatedTOFPhiMap, SimulatedTOFRMap, SimulatedTOFZMap, SimulatedTrackEta, SimulatedTrackEtaP, SimulatedTrackEtaS, SimulatedTrackPhi, SimulatedTrackPhiP, SimulatedTrackPhiS, SimulatedTrackPt, SimulatedTrackPtP, SimulatedTrackPtS, SimulatedXYPositionMap, AlCaHLTBitMon_QueryRunRegistry::string, and tkGeom_.

366  {
367  std::string top_folder = config_.getParameter<std::string>("TopFolderName");
368  std::stringstream folder_name;
369 
370  ibooker.cd();
371  folder_name << top_folder << "/"
372  << "SimTrackInfo";
373  ibooker.setCurrentFolder(folder_name.str());
374 
375  edm::LogInfo("Phase2TrackerValidateDigi") << " Booking Histograms in : " << folder_name.str();
376  std::stringstream HistoName;
377 
378  HistoName.str("");
379  HistoName << "NumberOfSimulatedTracks";
380  nSimulatedTracks = ibooker.book1D(HistoName.str(), HistoName.str(), 501, -0.5, 500.5);
381 
382  HistoName.str("");
383  HistoName << "NumberOfSimulatedTracksP";
384  nSimulatedTracksP = ibooker.book1D(HistoName.str(), HistoName.str(), 501, -0.5, 500.5);
385 
386  HistoName.str("");
387  HistoName << "NumberOfSimulatedTracksS";
388  nSimulatedTracksS = ibooker.book1D(HistoName.str(), HistoName.str(), 501, -0.5, 500.5);
389 
390  HistoName.str("");
391  HistoName << "NumberOfSimulatedVertices";
392  nSimVertices = ibooker.book1D(HistoName.str(), HistoName.str(), 101, -0.5, 100.5);
393 
395  HistoName.str("");
396  HistoName << "SimulatedTrackPt";
397  if (Parameters.getParameter<bool>("switch"))
398  SimulatedTrackPt = ibooker.book1D(HistoName.str(),
399  HistoName.str(),
400  Parameters.getParameter<int32_t>("Nbins"),
401  Parameters.getParameter<double>("xmin"),
402  Parameters.getParameter<double>("xmax"));
403  else
404  SimulatedTrackPt = nullptr;
405  /*
406  HistoName.str("");
407  HistoName << "SimulatedTrackPt";
408  SimulatedTrackPt = ibooker.book1D(HistoName.str(),HistoName.str(),
409  Parameters.getParameter<int32_t>("Nbins"),
410  Parameters.getParameter<double>("xmin"),
411  Parameters.getParameter<double>("xmax");*/
412  HistoName.str("");
413  HistoName << "SimulatedTrackPtP";
414  if (Parameters.getParameter<bool>("switch"))
415  SimulatedTrackPtP = ibooker.book1D(HistoName.str(),
416  HistoName.str(),
417  Parameters.getParameter<int32_t>("Nbins"),
418  Parameters.getParameter<double>("xmin"),
419  Parameters.getParameter<double>("xmax"));
420  else
421  SimulatedTrackPtP = nullptr;
422  HistoName.str("");
423  HistoName << "SimulatedTrackPtS";
424  if (Parameters.getParameter<bool>("switch"))
425  SimulatedTrackPtS = ibooker.book1D(HistoName.str(),
426  HistoName.str(),
427  Parameters.getParameter<int32_t>("Nbins"),
428  Parameters.getParameter<double>("xmin"),
429  Parameters.getParameter<double>("xmax"));
430  else
431  SimulatedTrackPtS = nullptr;
432 
434  HistoName.str("");
435  HistoName << "SimulatedTrackEta";
436  if (Parameters.getParameter<bool>("switch"))
437  SimulatedTrackEta = ibooker.book1D(HistoName.str(),
438  HistoName.str(),
439  Parameters.getParameter<int32_t>("Nbins"),
440  Parameters.getParameter<double>("xmin"),
441  Parameters.getParameter<double>("xmax"));
442  else
443  SimulatedTrackEta = nullptr;
444  HistoName.str("");
445  HistoName << "SimulatedTrackEtaP";
446  if (Parameters.getParameter<bool>("switch"))
447  SimulatedTrackEtaP = ibooker.book1D(HistoName.str(),
448  HistoName.str(),
449  Parameters.getParameter<int32_t>("Nbins"),
450  Parameters.getParameter<double>("xmin"),
451  Parameters.getParameter<double>("xmax"));
452  else
453  SimulatedTrackEtaP = nullptr;
454  HistoName.str("");
455  HistoName << "SimulatedTrackEtaS";
456  if (Parameters.getParameter<bool>("switch"))
457  SimulatedTrackEtaS = ibooker.book1D(HistoName.str(),
458  HistoName.str(),
459  Parameters.getParameter<int32_t>("Nbins"),
460  Parameters.getParameter<double>("xmin"),
461  Parameters.getParameter<double>("xmax"));
462  else
463  SimulatedTrackEtaS = nullptr;
464 
466  HistoName.str("");
467  HistoName << "SimulatedTrackPhi";
468  if (Parameters.getParameter<bool>("switch"))
469  SimulatedTrackPhi = ibooker.book1D(HistoName.str(),
470  HistoName.str(),
471  Parameters.getParameter<int32_t>("Nbins"),
472  Parameters.getParameter<double>("xmin"),
473  Parameters.getParameter<double>("xmax"));
474  else
475  SimulatedTrackPhi = nullptr;
476 
477  HistoName.str("");
478  HistoName << "SimulatedTrackPhiP";
479  if (Parameters.getParameter<bool>("switch"))
480  SimulatedTrackPhiP = ibooker.book1D(HistoName.str(),
481  HistoName.str(),
482  Parameters.getParameter<int32_t>("Nbins"),
483  Parameters.getParameter<double>("xmin"),
484  Parameters.getParameter<double>("xmax"));
485  else
486  SimulatedTrackPhiP = nullptr;
487 
488  HistoName.str("");
489  HistoName << "SimulatedTrackPhiS";
490  if (Parameters.getParameter<bool>("switch"))
491  SimulatedTrackPhiS = ibooker.book1D(HistoName.str(),
492  HistoName.str(),
493  Parameters.getParameter<int32_t>("Nbins"),
494  Parameters.getParameter<double>("xmin"),
495  Parameters.getParameter<double>("xmax"));
496  else
497  SimulatedTrackPhiS = nullptr;
498 
499  Parameters = config_.getParameter<edm::ParameterSet>("XYPositionMapH");
500  HistoName.str("");
501  HistoName << "SimulatedXPosVsYPos";
502  if (Parameters.getParameter<bool>("switch"))
503  SimulatedXYPositionMap = ibooker.book2D(HistoName.str(),
504  HistoName.str(),
505  Parameters.getParameter<int32_t>("Nxbins"),
506  Parameters.getParameter<double>("xmin"),
507  Parameters.getParameter<double>("xmax"),
508  Parameters.getParameter<int32_t>("Nybins"),
509  Parameters.getParameter<double>("ymin"),
510  Parameters.getParameter<double>("ymax"));
511  else
512  SimulatedXYPositionMap = nullptr;
513 
514  Parameters = config_.getParameter<edm::ParameterSet>("RZPositionMapH");
515  HistoName.str("");
516  HistoName << "SimulatedRPosVsZPos";
517  if (Parameters.getParameter<bool>("switch"))
518  SimulatedRZPositionMap = ibooker.book2D(HistoName.str(),
519  HistoName.str(),
520  Parameters.getParameter<int32_t>("Nxbins"),
521  Parameters.getParameter<double>("xmin"),
522  Parameters.getParameter<double>("xmax"),
523  Parameters.getParameter<int32_t>("Nybins"),
524  Parameters.getParameter<double>("ymin"),
525  Parameters.getParameter<double>("ymax"));
526  else
527  SimulatedRZPositionMap = nullptr;
528 
529  //add TOF maps
531  HistoName.str("");
532  HistoName << "SimulatedTOFVsEta";
533  if (Parameters.getParameter<bool>("switch"))
534  SimulatedTOFEtaMap = ibooker.book2D(HistoName.str(),
535  HistoName.str(),
536  Parameters.getParameter<int32_t>("Nxbins"),
537  Parameters.getParameter<double>("xmin"),
538  Parameters.getParameter<double>("xmax"),
539  Parameters.getParameter<int32_t>("Nybins"),
540  Parameters.getParameter<double>("ymin"),
541  Parameters.getParameter<double>("ymax"));
542  else
543  SimulatedTOFEtaMap = nullptr;
545  HistoName.str("");
546  HistoName << "SimulatedTOFVsPhi";
547  if (Parameters.getParameter<bool>("switch"))
548  SimulatedTOFPhiMap = ibooker.book2D(HistoName.str(),
549  HistoName.str(),
550  Parameters.getParameter<int32_t>("Nxbins"),
551  Parameters.getParameter<double>("xmin"),
552  Parameters.getParameter<double>("xmax"),
553  Parameters.getParameter<int32_t>("Nybins"),
554  Parameters.getParameter<double>("ymin"),
555  Parameters.getParameter<double>("ymax"));
556  else
557  SimulatedTOFPhiMap = nullptr;
559  HistoName.str("");
560  HistoName << "SimulatedTOFVsR";
561  if (Parameters.getParameter<bool>("switch"))
562  SimulatedTOFRMap = ibooker.book2D(HistoName.str(),
563  HistoName.str(),
564  Parameters.getParameter<int32_t>("Nxbins"),
565  Parameters.getParameter<double>("xmin"),
566  Parameters.getParameter<double>("xmax"),
567  Parameters.getParameter<int32_t>("Nybins"),
568  Parameters.getParameter<double>("ymin"),
569  Parameters.getParameter<double>("ymax"));
570  else
571  SimulatedTOFRMap = nullptr;
573  HistoName.str("");
574  HistoName << "SimulatedTOFVsZ";
575  if (Parameters.getParameter<bool>("switch"))
576  SimulatedTOFZMap = ibooker.book2D(HistoName.str(),
577  HistoName.str(),
578  Parameters.getParameter<int32_t>("Nxbins"),
579  Parameters.getParameter<double>("xmin"),
580  Parameters.getParameter<double>("xmax"),
581  Parameters.getParameter<int32_t>("Nybins"),
582  Parameters.getParameter<double>("ymin"),
583  Parameters.getParameter<double>("ymax"));
584  else
585  SimulatedTOFZMap = nullptr;
586 
587  edm::ESWatcher<TrackerDigiGeometryRecord> theTkDigiGeomWatcher;
588  if (theTkDigiGeomWatcher.check(iSetup)) {
589  for (auto const& det_u : tkGeom_->detUnits()) {
590  unsigned int detId_raw = det_u->geographicalId().rawId();
591  bookLayerHistos(ibooker, detId_raw, pixelFlag_);
592  }
593  }
594  ibooker.cd();
595  folder_name.str("");
596  folder_name << top_folder << "/"
597  << "DigiMonitor";
598  ibooker.setCurrentFolder(folder_name.str());
599 
600  Parameters = config_.getParameter<edm::ParameterSet>("XYPositionMapH");
601  HistoName.str("");
602  HistoName << "MatchedSimXPosVsYPos";
603  if (Parameters.getParameter<bool>("switch"))
604  MatchedXYPositionMap = ibooker.book2D(HistoName.str(),
605  HistoName.str(),
606  Parameters.getParameter<int32_t>("Nxbins"),
607  Parameters.getParameter<double>("xmin"),
608  Parameters.getParameter<double>("xmax"),
609  Parameters.getParameter<int32_t>("Nybins"),
610  Parameters.getParameter<double>("ymin"),
611  Parameters.getParameter<double>("ymax"));
612  else
613  MatchedXYPositionMap = nullptr;
614 
615  Parameters = config_.getParameter<edm::ParameterSet>("RZPositionMapH");
616  HistoName.str("");
617  HistoName << "MatchedSimRPosVsZPos";
618  if (Parameters.getParameter<bool>("switch"))
619  MatchedRZPositionMap = ibooker.book2D(HistoName.str(),
620  HistoName.str(),
621  Parameters.getParameter<int32_t>("Nxbins"),
622  Parameters.getParameter<double>("xmin"),
623  Parameters.getParameter<double>("xmax"),
624  Parameters.getParameter<int32_t>("Nybins"),
625  Parameters.getParameter<double>("ymin"),
626  Parameters.getParameter<double>("ymax"));
627  else
628  MatchedRZPositionMap = nullptr;
629 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
void bookLayerHistos(DQMStore::IBooker &ibooker, unsigned int det_id, bool flag)
Log< level::Info, false > LogInfo
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
std::string HistoName
std::vector< AlignmentParameters * > Parameters
Definition: Utilities.h:32
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

◆ bookLayerHistos()

void Phase2TrackerValidateDigi::bookLayerHistos ( DQMStore::IBooker ibooker,
unsigned int  det_id,
bool  flag 
)
private

Definition at line 633 of file Phase2TrackerValidateDigi.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookProfile(), Phase2TrackerValidateDigi::DigiMEs::BunchXTimeBin, dqm::implementation::NavigatorBase::cd(), config_, RemoveAddSevLevel::flag, fed_dqm_sourceclient-live_cfg::folder_name, Phase2TrackerValidateDigi::DigiMEs::FractionOfOOTDigis, getHistoId(), TrackerTopology::getITPixelLayerNumber(), TrackerTopology::getOTLayerNumber(), edm::ParameterSet::getParameter(), submitPVResolutionJobs::key, nano_mu_digi_cff::layer, layerMEs, Phase2TrackerValidateDigi::DigiMEs::MatchedSimHitElossP, Phase2TrackerValidateDigi::DigiMEs::MatchedSimHitElossS, Phase2TrackerValidateDigi::DigiMEs::MatchedTrackEta, Phase2TrackerValidateDigi::DigiMEs::MatchedTrackPhi, Phase2TrackerValidateDigi::DigiMEs::MatchedTrackPt, Phase2TrackerValidateDigi::DigiMEs::MissedDigiLocalXposVsYPos, Phase2TrackerValidateDigi::DigiMEs::MissedDigiSimHitElossP, Phase2TrackerValidateDigi::DigiMEs::MissedDigiSimHitElossS, Phase2TrackerValidateDigi::DigiMEs::MissedDigiTimeWindow, Phase2TrackerValidateDigi::DigiMEs::MissedDigiTrackEta, Phase2TrackerValidateDigi::DigiMEs::MissedDigiTrackPhi, Phase2TrackerValidateDigi::DigiMEs::MissedDigiTrackPt, Phase2TrackerValidateDigi::DigiMEs::MissedHitTrackEta, Phase2TrackerValidateDigi::DigiMEs::MissedHitTrackPhi, Phase2TrackerValidateDigi::DigiMEs::MissedHitTrackPt, Phase2TrackerValidateDigi::DigiMEs::nDigis, pixelFlag_, dqm::implementation::NavigatorBase::setCurrentFolder(), Phase2TrackerValidateDigi::DigiMEs::SimHitDx, Phase2TrackerValidateDigi::DigiMEs::SimHitDy, Phase2TrackerValidateDigi::DigiMEs::SimHitDz, Phase2TrackerValidateDigi::DigiMEs::SimTrackEta, Phase2TrackerValidateDigi::DigiMEs::SimTrackPhi, Phase2TrackerValidateDigi::DigiMEs::SimTrackPt, AlCaHLTBitMon_QueryRunRegistry::string, TrackerTopology::tidRing(), TrackerTopology::tidWheel(), funct::true, and tTopo_.

Referenced by bookHistograms().

633  {
634  int layer;
635  if (flag)
637  else
638  layer = tTopo_->getOTLayerNumber(det_id);
639 
640  if (layer < 0)
641  return;
642 
643  std::string key = getHistoId(det_id, flag);
644  std::map<std::string, DigiMEs>::iterator pos = layerMEs.find(key);
645  if (pos == layerMEs.end()) {
646  std::string top_folder = config_.getParameter<std::string>("TopFolderName");
647  std::stringstream folder_name;
648 
649  //For endCap: P-type sensors are present only upto ring 10 for discs 1&2 (TEDD-1) and upto ring 7 for discs 3,4&5 (TEDD-2)
650  bool isPStypeModForTEDD_1 =
651  (!pixelFlag_ && layer > 100 && tTopo_->tidWheel(det_id) < 3 && tTopo_->tidRing(det_id) <= 10) ? true : false;
652  bool isPStypeModForTEDD_2 =
653  (!pixelFlag_ && layer > 100 && tTopo_->tidWheel(det_id) >= 3 && tTopo_->tidRing(det_id) <= 7) ? true : false;
654 
655  bool isPtypeSensor =
656  (flag || (layer < 4 || (layer > 6 && (isPStypeModForTEDD_1 || isPStypeModForTEDD_2)))) ? true : false;
657 
658  ibooker.cd();
659  ibooker.setCurrentFolder(top_folder + "/DigiMonitor/" + key);
660  edm::LogInfo("Phase2TrackerValidateDigi") << " Booking Histograms in : " << key;
661 
662  std::ostringstream HistoName;
663  DigiMEs local_mes;
664 
666  HistoName.str("");
667  HistoName << "SimTrackPt";
668  if (Parameters.getParameter<bool>("switch"))
669  local_mes.SimTrackPt = ibooker.book1D(HistoName.str(),
670  HistoName.str(),
671  Parameters.getParameter<int32_t>("Nbins"),
672  Parameters.getParameter<double>("xmin"),
673  Parameters.getParameter<double>("xmax"));
674  else
675  local_mes.SimTrackPt = nullptr;
676  HistoName.str("");
677  HistoName << "MatchedTrackPt";
678  if (Parameters.getParameter<bool>("switch"))
679  local_mes.MatchedTrackPt = ibooker.book1D(HistoName.str(),
680  HistoName.str(),
681  Parameters.getParameter<int32_t>("Nbins"),
682  Parameters.getParameter<double>("xmin"),
683  Parameters.getParameter<double>("xmax"));
684  else
685  local_mes.MatchedTrackPt = nullptr;
686  HistoName.str("");
687  HistoName << "MissedHitTrackPt";
688  if (Parameters.getParameter<bool>("switch"))
689  local_mes.MissedHitTrackPt = ibooker.book1D(HistoName.str(),
690  HistoName.str(),
691  Parameters.getParameter<int32_t>("Nbins"),
692  Parameters.getParameter<double>("xmin"),
693  Parameters.getParameter<double>("xmax"));
694  else
695  local_mes.MissedHitTrackPt = nullptr;
696  HistoName.str("");
697  HistoName << "MissedDigiTrackPt";
698  if (Parameters.getParameter<bool>("switch"))
699  local_mes.MissedDigiTrackPt = ibooker.book1D(HistoName.str(),
700  HistoName.str(),
701  Parameters.getParameter<int32_t>("Nbins"),
702  Parameters.getParameter<double>("xmin"),
703  Parameters.getParameter<double>("xmax"));
704  else
705  local_mes.MissedDigiTrackPt = nullptr;
706 
708  HistoName.str("");
709  HistoName << "SimTrackEta";
710  if (Parameters.getParameter<bool>("switch"))
711  local_mes.SimTrackEta = ibooker.book1D(HistoName.str(),
712  HistoName.str(),
713  Parameters.getParameter<int32_t>("Nbins"),
714  Parameters.getParameter<double>("xmin"),
715  Parameters.getParameter<double>("xmax"));
716  else
717  local_mes.SimTrackEta = nullptr;
718  HistoName.str("");
719  HistoName << "MatchedTrackEta";
720  if (Parameters.getParameter<bool>("switch"))
721  local_mes.MatchedTrackEta = ibooker.book1D(HistoName.str(),
722  HistoName.str(),
723  Parameters.getParameter<int32_t>("Nbins"),
724  Parameters.getParameter<double>("xmin"),
725  Parameters.getParameter<double>("xmax"));
726  else
727  local_mes.MatchedTrackEta = nullptr;
728  HistoName.str("");
729  HistoName << "MissedHitTrackEta";
730  if (Parameters.getParameter<bool>("switch"))
731  local_mes.MissedHitTrackEta = ibooker.book1D(HistoName.str(),
732  HistoName.str(),
733  Parameters.getParameter<int32_t>("Nbins"),
734  Parameters.getParameter<double>("xmin"),
735  Parameters.getParameter<double>("xmax"));
736  else
737  local_mes.MissedHitTrackEta = nullptr;
738  HistoName.str("");
739  HistoName << "MissedDigiTrackEta";
740  if (Parameters.getParameter<bool>("switch"))
741  local_mes.MissedDigiTrackEta = ibooker.book1D(HistoName.str(),
742  HistoName.str(),
743  Parameters.getParameter<int32_t>("Nbins"),
744  Parameters.getParameter<double>("xmin"),
745  Parameters.getParameter<double>("xmax"));
746  else
747  local_mes.MissedDigiTrackEta = nullptr;
748 
750  HistoName.str("");
751  HistoName << "SimTrackPhi";
752  if (Parameters.getParameter<bool>("switch"))
753  local_mes.SimTrackPhi = ibooker.book1D(HistoName.str(),
754  HistoName.str(),
755  Parameters.getParameter<int32_t>("Nbins"),
756  Parameters.getParameter<double>("xmin"),
757  Parameters.getParameter<double>("xmax"));
758  else
759  local_mes.SimTrackPhi = nullptr;
760  HistoName.str("");
761  HistoName << "MatchedTrackPhi";
762  if (Parameters.getParameter<bool>("switch"))
763  local_mes.MatchedTrackPhi = ibooker.book1D(HistoName.str(),
764  HistoName.str(),
765  Parameters.getParameter<int32_t>("Nbins"),
766  Parameters.getParameter<double>("xmin"),
767  Parameters.getParameter<double>("xmax"));
768  else
769  local_mes.MatchedTrackPhi = nullptr;
770  HistoName.str("");
771  HistoName << "MissedHitTrackPhi";
772  if (Parameters.getParameter<bool>("switch"))
773  local_mes.MissedHitTrackPhi = ibooker.book1D(HistoName.str(),
774  HistoName.str(),
775  Parameters.getParameter<int32_t>("Nbins"),
776  Parameters.getParameter<double>("xmin"),
777  Parameters.getParameter<double>("xmax"));
778  else
779  local_mes.MissedHitTrackPhi = nullptr;
780  HistoName.str("");
781  HistoName << "MissedDigiTrackPhi";
782  if (Parameters.getParameter<bool>("switch"))
783  local_mes.MissedDigiTrackPhi = ibooker.book1D(HistoName.str(),
784  HistoName.str(),
785  Parameters.getParameter<int32_t>("Nbins"),
786  Parameters.getParameter<double>("xmin"),
787  Parameters.getParameter<double>("xmax"));
788  else
789  local_mes.MissedDigiTrackPhi = nullptr;
790 
792  if (!flag) {
793  HistoName.str("");
794  HistoName << "MatchedSimHitElossS";
795  if (Parameters.getParameter<bool>("switch"))
796  local_mes.MatchedSimHitElossS = ibooker.book1D(HistoName.str(),
797  HistoName.str(),
798  Parameters.getParameter<int32_t>("Nbins"),
799  Parameters.getParameter<double>("xmin"),
800  Parameters.getParameter<double>("xmax"));
801  else
802  local_mes.MatchedSimHitElossS = nullptr;
803  HistoName.str("");
804  HistoName << "MissedDigiSimHitElossS";
805  if (Parameters.getParameter<bool>("switch"))
806  local_mes.MissedDigiSimHitElossS = ibooker.book1D(HistoName.str(),
807  HistoName.str(),
808  Parameters.getParameter<int32_t>("Nbins"),
809  Parameters.getParameter<double>("xmin"),
810  Parameters.getParameter<double>("xmax"));
811  else
812  local_mes.MissedDigiSimHitElossS = nullptr;
813  }
814  if (isPtypeSensor) {
815  HistoName.str("");
816  HistoName << "MatchedSimHitElossP";
817  if (Parameters.getParameter<bool>("switch"))
818  local_mes.MatchedSimHitElossP = ibooker.book1D(HistoName.str(),
819  HistoName.str(),
820  Parameters.getParameter<int32_t>("Nbins"),
821  Parameters.getParameter<double>("xmin"),
822  Parameters.getParameter<double>("xmax"));
823  else
824  local_mes.MatchedSimHitElossP = nullptr;
825  HistoName.str("");
826  HistoName << "MissedDigiSimHitElossP";
827  if (Parameters.getParameter<bool>("switch"))
828  local_mes.MissedDigiSimHitElossP = ibooker.book1D(HistoName.str(),
829  HistoName.str(),
830  Parameters.getParameter<int32_t>("Nbins"),
831  Parameters.getParameter<double>("xmin"),
832  Parameters.getParameter<double>("xmax"));
833  else
834  local_mes.MissedDigiSimHitElossP = nullptr;
835  }
837  HistoName.str("");
838  HistoName << "SimHitDx";
839  if (Parameters.getParameter<bool>("switch"))
840  local_mes.SimHitDx = ibooker.book1D(HistoName.str(),
841  HistoName.str(),
842  Parameters.getParameter<int32_t>("Nbins"),
843  Parameters.getParameter<double>("xmin"),
844  Parameters.getParameter<double>("xmax"));
845  else
846  local_mes.SimHitDx = nullptr;
847 
849  HistoName.str("");
850  HistoName << "SimHitDy";
851  if (Parameters.getParameter<bool>("switch"))
852  local_mes.SimHitDy = ibooker.book1D(HistoName.str(),
853  HistoName.str(),
854  Parameters.getParameter<int32_t>("Nbins"),
855  Parameters.getParameter<double>("xmin"),
856  Parameters.getParameter<double>("xmax"));
857  else
858  local_mes.SimHitDy = nullptr;
859 
861  HistoName.str("");
862  HistoName << "SimHitDz";
863  if (Parameters.getParameter<bool>("switch"))
864  local_mes.SimHitDz = ibooker.book1D(HistoName.str(),
865  HistoName.str(),
866  Parameters.getParameter<int32_t>("Nbins"),
867  Parameters.getParameter<double>("xmin"),
868  Parameters.getParameter<double>("xmax"));
869  else
870  local_mes.SimHitDz = nullptr;
871 
872  HistoName.str("");
873  HistoName << "BunchXingWindow";
874  local_mes.BunchXTimeBin = ibooker.book1D(HistoName.str(), HistoName.str(), 8, -5.5, 2.5);
875 
876  HistoName.str("");
877  HistoName << "FractionOfOOTPUDigi";
878  local_mes.FractionOfOOTDigis = ibooker.bookProfile(HistoName.str(), HistoName.str(), 8, -5.5, 2.5, 0., 1.0, "s");
879 
880  HistoName.str("");
881  HistoName << "MissedDigiLocalXPosvsYPos";
882  local_mes.MissedDigiLocalXposVsYPos =
883  ibooker.book2D(HistoName.str(), HistoName.str(), 130, -6.5, 6.5, 130, -6.5, 6.5);
884 
886  HistoName.str("");
887  HistoName << "MissedDigiTimeWindow";
888  if (Parameters.getParameter<bool>("switch"))
889  local_mes.MissedDigiTimeWindow = ibooker.book1D(HistoName.str(), HistoName.str(), 100, -0.5, 49.5);
890  else
891  local_mes.MissedDigiTimeWindow = nullptr;
892  local_mes.nDigis = 0;
893  layerMEs.insert(std::make_pair(key, local_mes));
894  }
895 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
unsigned int tidWheel(const DetId &id) const
std::map< std::string, DigiMEs > layerMEs
int getITPixelLayerNumber(const DetId &id) const
int getOTLayerNumber(const DetId &id) const
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:399
key
prepare the HTCondor submission files and eventually submit them
Log< level::Info, false > LogInfo
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
std::string HistoName
std::vector< AlignmentParameters * > Parameters
Definition: Utilities.h:32
std::string getHistoId(uint32_t det_id, bool flag)
unsigned int tidRing(const DetId &id) const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

◆ dqmBeginRun()

void Phase2TrackerValidateDigi::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 93 of file Phase2TrackerValidateDigi.cc.

References edm::ESWatcher< T >::check(), geomToken_, edm::EventSetup::getData(), edm::EventSetup::getHandle(), edm::ESHandleBase::isValid(), tkGeom_, topoToken_, and tTopo_.

93  {
94  edm::ESWatcher<TrackerDigiGeometryRecord> theTkDigiGeomWatcher;
96  if (theTkDigiGeomWatcher.check(iSetup)) {
97  geomHandle = iSetup.getHandle(geomToken_);
98  }
99  if (!geomHandle.isValid())
100  return;
101  tkGeom_ = &(*geomHandle);
102 
103  tTopo_ = &iSetup.getData(topoToken_);
104 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
bool isValid() const
Definition: ESHandle.h:44
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57

◆ fillHistogram()

void Phase2TrackerValidateDigi::fillHistogram ( MonitorElement th1,
MonitorElement th2,
MonitorElement th3,
float  val,
int  primary 
)
private

Definition at line 1021 of file Phase2TrackerValidateDigi.cc.

References dqm::impl::MonitorElement::Fill(), and heppy_batch::val.

Referenced by analyze().

1022  {
1023  if (th1)
1024  th1->Fill(val);
1025  if (th2 && primary == 1)
1026  th2->Fill(val);
1027  if (th3 && primary != 1)
1028  th3->Fill(val);
1029 }
void Fill(long long x)

◆ fillHitsPerTrack()

void Phase2TrackerValidateDigi::fillHitsPerTrack ( )
private

◆ fillITPixelBXInfo()

void Phase2TrackerValidateDigi::fillITPixelBXInfo ( )
private

Definition at line 956 of file Phase2TrackerValidateDigi.cc.

References edm::DetSetVector< T >::begin(), Phase2TrackerValidateDigi::DigiMEs::BunchXTimeBin, nano_mu_digi_cff::bx, hcalRecHitTable_cff::detId, edm::DetSetVector< T >::end(), dqm::impl::MonitorElement::Fill(), flag_, Phase2TrackerValidateDigi::DigiMEs::FractionOfOOTDigis, getHistoId(), TrackerTopology::getITPixelLayerNumber(), itSimLink_, submitPVResolutionJobs::key, nano_mu_digi_cff::layer, layerMEs, AlCaHLTBitMon_QueryRunRegistry::string, align::Tracker, tTopo_, and findQualityFiles::v.

Referenced by analyze().

956  {
958  DSViter != itSimLink_->end();
959  DSViter++) {
960  unsigned int rawid = DSViter->id;
961  DetId detId(rawid);
962  if (DetId(detId).det() != DetId::Detector::Tracker)
963  continue;
964  int layer = tTopo_->getITPixelLayerNumber(rawid);
965  if (layer < 0)
966  continue;
967  bool flag_ = true;
968  std::string key = getHistoId(rawid, flag_);
969  std::map<std::string, DigiMEs>::iterator pos = layerMEs.find(key);
970  if (pos == layerMEs.end())
971  continue;
972  DigiMEs& local_mes = pos->second;
973  int tot_digi = 0;
974  std::map<int, float> bxMap;
975  for (typename edm::DetSet<PixelDigiSimLink>::const_iterator di = DSViter->begin(); di != DSViter->end(); di++) {
976  tot_digi++;
977  int bx = di->eventId().bunchCrossing();
978  std::map<int, float>::iterator ic = bxMap.find(bx);
979  if (ic == bxMap.end())
980  bxMap[bx] = 1.0;
981  else
982  bxMap[bx] += 1.0;
983  }
984  for (const auto& v : bxMap) {
985  if (tot_digi) {
986  local_mes.BunchXTimeBin->Fill(v.first, v.second);
987  local_mes.FractionOfOOTDigis->Fill(v.first, v.second / tot_digi);
988  }
989  }
990  }
991 }
struct @730 flag_
const edm::DetSetVector< PixelDigiSimLink > * itSimLink_
std::map< std::string, DigiMEs > layerMEs
int getITPixelLayerNumber(const DetId &id) const
key
prepare the HTCondor submission files and eventually submit them
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:316
Definition: DetId.h:17
std::string getHistoId(uint32_t det_id, bool flag)
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:305
collection_type::const_iterator const_iterator
Definition: DetSet.h:31
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102

◆ fillOTBXInfo()

void Phase2TrackerValidateDigi::fillOTBXInfo ( )
private

Definition at line 920 of file Phase2TrackerValidateDigi.cc.

References edm::DetSetVector< T >::begin(), Phase2TrackerValidateDigi::DigiMEs::BunchXTimeBin, nano_mu_digi_cff::bx, hcalRecHitTable_cff::detId, edm::DetSetVector< T >::end(), dqm::impl::MonitorElement::Fill(), flag_, Phase2TrackerValidateDigi::DigiMEs::FractionOfOOTDigis, getHistoId(), TrackerTopology::getOTLayerNumber(), submitPVResolutionJobs::key, nano_mu_digi_cff::layer, layerMEs, otSimLink_, AlCaHLTBitMon_QueryRunRegistry::string, align::Tracker, tTopo_, and findQualityFiles::v.

Referenced by analyze().

920  {
922  DSViter != otSimLink_->end();
923  DSViter++) {
924  unsigned int rawid = DSViter->id;
925  DetId detId(rawid);
926  if (DetId(detId).det() != DetId::Detector::Tracker)
927  continue;
928  int layer = tTopo_->getOTLayerNumber(rawid);
929  if (layer < 0)
930  continue;
931  bool flag_ = false;
932  std::string key = getHistoId(rawid, flag_);
933  std::map<std::string, DigiMEs>::iterator pos = layerMEs.find(key);
934  if (pos == layerMEs.end())
935  continue;
936  DigiMEs& local_mes = pos->second;
937  int tot_digi = 0;
938  std::map<int, float> bxMap;
939  for (typename edm::DetSet<PixelDigiSimLink>::const_iterator di = DSViter->begin(); di != DSViter->end(); di++) {
940  tot_digi++;
941  int bx = di->eventId().bunchCrossing();
942  std::map<int, float>::iterator ic = bxMap.find(bx);
943  if (ic == bxMap.end())
944  bxMap[bx] = 1.0;
945  else
946  bxMap[bx] += 1.0;
947  }
948  for (const auto& v : bxMap) {
949  if (tot_digi) {
950  local_mes.BunchXTimeBin->Fill(v.first, v.second);
951  local_mes.FractionOfOOTDigis->Fill(v.first, v.second / tot_digi);
952  }
953  }
954  }
955 }
struct @730 flag_
std::map< std::string, DigiMEs > layerMEs
int getOTLayerNumber(const DetId &id) const
key
prepare the HTCondor submission files and eventually submit them
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:316
Definition: DetId.h:17
const edm::DetSetVector< PixelDigiSimLink > * otSimLink_
std::string getHistoId(uint32_t det_id, bool flag)
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:305
collection_type::const_iterator const_iterator
Definition: DetSet.h:31
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102

◆ fillSimHitInfo()

int Phase2TrackerValidateDigi::fillSimHitInfo ( const edm::Event iEvent,
const SimTrack  simTrk 
)
private

Definition at line 193 of file Phase2TrackerValidateDigi.cc.

References cval, hcalRecHitTable_cff::detId, l1ctLayer1_cff::dZ, PVValHelper::eta, PV3DBase< T, PVType, FrameType >::eta(), etaCut_, dqm::impl::MonitorElement::Fill(), findITPixelDigi(), findOTDigi(), getHistoId(), TrackerTopology::getITPixelLayerNumber(), TrackerTopology::getOTLayerNumber(), GeVperElectron, Matriplex::hypot(), l1ctLayer2EG_cff::id, TrackerGeometry::idToDet(), TrackerGeometry::idToDetUnit(), iEvent, isPrimary(), submitPVResolutionJobs::key, nano_mu_digi_cff::layer, layerMEs, PV3DBase< T, PVType, FrameType >::mag(), MatchedRZPositionMap, Phase2TrackerValidateDigi::DigiMEs::MatchedSimHitElossP, Phase2TrackerValidateDigi::DigiMEs::MatchedSimHitElossS, Phase2TrackerValidateDigi::DigiMEs::MatchedTrackEta, Phase2TrackerValidateDigi::DigiMEs::MatchedTrackPhi, Phase2TrackerValidateDigi::DigiMEs::MatchedTrackPt, MatchedXYPositionMap, Phase2TrackerValidateDigi::DigiMEs::MissedDigiLocalXposVsYPos, Phase2TrackerValidateDigi::DigiMEs::MissedDigiSimHitElossP, Phase2TrackerValidateDigi::DigiMEs::MissedDigiSimHitElossS, Phase2TrackerValidateDigi::DigiMEs::MissedDigiTimeWindow, Phase2TrackerValidateDigi::DigiMEs::MissedDigiTrackEta, Phase2TrackerValidateDigi::DigiMEs::MissedDigiTrackPhi, Phase2TrackerValidateDigi::DigiMEs::MissedDigiTrackPt, CoreSimTrack::momentum(), PixelTopology::ncolumns(), phi, PV3DBase< T, PVType, FrameType >::phi(), pixelFlag_, DiDispStaMuonMonitor_cfi::pt, ptCut_, rpcPointValidation_cfi::simHit, Phase2TrackerValidateDigi::DigiMEs::SimHitDx, Phase2TrackerValidateDigi::DigiMEs::SimHitDy, Phase2TrackerValidateDigi::DigiMEs::SimHitDz, simHits, simHitTokens_, Phase2TrackerValidateDigi::DigiMEs::SimTrackEta, Phase2TrackerValidateDigi::DigiMEs::SimTrackPhi, Phase2TrackerValidateDigi::DigiMEs::SimTrackPt, SimulatedRZPositionMap, SimulatedTOFEtaMap, SimulatedTOFPhiMap, SimulatedTOFRMap, SimulatedTOFZMap, SimulatedXYPositionMap, PixelGeomDetUnit::specificTopology(), AlCaHLTBitMon_QueryRunRegistry::string, GeomDet::surface(), tkGeom_, tofLowerCut_, tofUpperCut_, Surface::toGlobal(), align::Tracker, CoreSimTrack::trackId(), tTopo_, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by analyze().

193  {
194  int totalHits = 0;
195  unsigned int id = simTrk.trackId();
196  // Get digis
197 
198  for (const auto& itoken : simHitTokens_) {
199  const auto& simHitHandle = iEvent.getHandle(itoken);
200  if (!simHitHandle.isValid())
201  continue;
202  const edm::PSimHitContainer& simHits = (*simHitHandle.product());
203  for (edm::PSimHitContainer::const_iterator isim = simHits.begin(); isim != simHits.end(); ++isim) {
204  if ((*isim).trackId() != id)
205  continue;
206  const PSimHit& simHit = (*isim);
207 
208  if (!isPrimary(simTrk, simHit))
209  continue;
210 
211  unsigned int rawid = (*isim).detUnitId();
212  int layer;
213  if (pixelFlag_)
215  else
216  layer = tTopo_->getOTLayerNumber(rawid);
217  if (layer < 0)
218  continue;
220  auto pos = layerMEs.find(key);
221  if (pos == layerMEs.end())
222  continue;
223  DigiMEs& local_mes = pos->second;
224 
225  const DetId detId(rawid);
226  float dZ = (*isim).entryPoint().z() - (*isim).exitPoint().z();
227  if (fabs(dZ) <= 0.01)
228  continue;
229 
230  if (DetId(detId).det() != DetId::Detector::Tracker)
231  continue;
232 
233  const GeomDet* geomDet = tkGeom_->idToDet(detId);
234  if (!geomDet)
235  continue;
236  Global3DPoint pdPos = geomDet->surface().toGlobal(isim->localPosition());
237 
238  if (((*isim).tof() - pdPos.mag() / cval) < tofLowerCut_ || ((*isim).tof() - pdPos.mag() / cval) > tofUpperCut_)
239  continue;
240 
242  SimulatedXYPositionMap->Fill(pdPos.x() * 10., pdPos.y() * 10.);
244  SimulatedRZPositionMap->Fill(pdPos.z() * 10., std::hypot(pdPos.x(), pdPos.y()) * 10.);
245 
246  const TrackerGeomDet* geomDetUnit(tkGeom_->idToDetUnit(detId));
247  const Phase2TrackerGeomDetUnit* tkDetUnit = dynamic_cast<const Phase2TrackerGeomDetUnit*>(geomDetUnit);
248  int nColumns = tkDetUnit->specificTopology().ncolumns();
249 
250  float pt = simTrk.momentum().pt();
251  float eta = simTrk.momentum().eta();
252  float phi = simTrk.momentum().phi();
253  totalHits++;
254  pos->second.nHits++;
255 
256  if (local_mes.SimHitDx)
257  local_mes.SimHitDx->Fill(std::fabs((*isim).entryPoint().x() - (*isim).exitPoint().x()));
258  if (local_mes.SimHitDy)
259  local_mes.SimHitDy->Fill(std::fabs((*isim).entryPoint().y() - (*isim).exitPoint().y()));
260  if (local_mes.SimHitDz)
261  local_mes.SimHitDz->Fill(std::fabs((*isim).entryPoint().z() - (*isim).exitPoint().z()));
262 
263  if (SimulatedTOFEtaMap)
264  SimulatedTOFEtaMap->Fill(pdPos.eta(), (*isim).timeOfFlight());
265  if (SimulatedTOFPhiMap)
266  SimulatedTOFPhiMap->Fill(pdPos.phi(), (*isim).timeOfFlight());
267  if (SimulatedTOFRMap)
268  SimulatedTOFRMap->Fill(std::hypot(pdPos.x(), pdPos.y()), (*isim).timeOfFlight());
269  if (SimulatedTOFZMap)
270  SimulatedTOFZMap->Fill(pdPos.z(), (*isim).timeOfFlight());
271 
272  bool digiFlag;
273 
274  if (pixelFlag_)
275  digiFlag = findITPixelDigi(rawid, id);
276  else
277  digiFlag = findOTDigi(rawid, id);
278 
279  if (fabs(eta) < etaCut_) {
280  if (local_mes.SimTrackPt)
281  local_mes.SimTrackPt->Fill(pt);
282  if (digiFlag && local_mes.MatchedTrackPt)
283  local_mes.MatchedTrackPt->Fill(pt);
284  else if (local_mes.MissedDigiTrackPt)
285  local_mes.MissedDigiTrackPt->Fill(pt);
286  }
287  if (pt > ptCut_) {
288  if (local_mes.SimTrackEta)
289  local_mes.SimTrackEta->Fill(eta);
290  if (digiFlag && local_mes.MatchedTrackEta)
291  local_mes.MatchedTrackEta->Fill(eta);
292  else if (local_mes.MissedDigiTrackEta)
293  local_mes.MissedDigiTrackEta->Fill(eta);
294  }
295  if (fabs(eta) < etaCut_ && pt > ptCut_) {
296  if (local_mes.SimTrackPhi)
297  local_mes.SimTrackPhi->Fill(phi);
298  if (digiFlag && local_mes.MatchedTrackPhi)
299  local_mes.MatchedTrackPhi->Fill(phi);
300  else if (local_mes.MissedDigiTrackPhi)
301  local_mes.MissedDigiTrackPhi->Fill(phi);
302  }
303  if (digiFlag) {
304  pos->second.nDigis++;
306  MatchedRZPositionMap->Fill(pdPos.z() * 10., std::hypot(pdPos.x(), pdPos.y()) * 10.);
308  MatchedXYPositionMap->Fill(pdPos.x() * 10., pdPos.y() * 10.);
309  if (nColumns <= 2 && local_mes.MatchedSimHitElossS)
310  local_mes.MatchedSimHitElossS->Fill((*isim).energyLoss() / GeVperElectron);
311  else if (local_mes.MatchedSimHitElossP)
312  local_mes.MatchedSimHitElossP->Fill((*isim).energyLoss() / GeVperElectron);
313  } else {
314  if (local_mes.MissedDigiLocalXposVsYPos)
315  local_mes.MissedDigiLocalXposVsYPos->Fill((*isim).localPosition().x(), (*isim).localPosition().y());
316  if (local_mes.MissedDigiTimeWindow)
317  local_mes.MissedDigiTimeWindow->Fill(std::fabs((*isim).timeOfFlight() - pdPos.mag() / cval));
318  if (nColumns <= 2 && local_mes.MissedDigiSimHitElossS)
319  local_mes.MissedDigiSimHitElossS->Fill((*isim).energyLoss() / GeVperElectron);
320  else if (local_mes.MissedDigiSimHitElossP)
321  local_mes.MissedDigiSimHitElossP->Fill((*isim).energyLoss() / GeVperElectron);
322  }
323  }
324  }
325  return totalHits;
326 }
MPlex< T, D1, D2, N > hypot(const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
Definition: Matriplex.h:436
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
bool isPrimary(const SimTrack &simTrk, const PSimHit &simHit)
virtual int ncolumns() const =0
T z() const
Definition: PV3DBase.h:61
bool findOTDigi(unsigned int detid, unsigned int id)
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
T eta() const
Definition: PV3DBase.h:73
const math::XYZTLorentzVectorD & momentum() const
Definition: CoreSimTrack.h:19
void Fill(long long x)
std::map< std::string, DigiMEs > layerMEs
int getITPixelLayerNumber(const DetId &id) const
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
int iEvent
Definition: GenABIO.cc:224
bool findITPixelDigi(unsigned int detid, unsigned int id)
edm::Handle< edm::PSimHitContainer > simHits
int getOTLayerNumber(const DetId &id) const
std::vector< edm::EDGetTokenT< edm::PSimHitContainer > > simHitTokens_
T mag() const
Definition: PV3DBase.h:64
key
prepare the HTCondor submission files and eventually submit them
const TrackerGeomDet * idToDet(DetId) const override
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
Definition: DetId.h:17
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
unsigned int trackId() const
Definition: CoreSimTrack.h:31
std::string getHistoId(uint32_t det_id, bool flag)
std::vector< PSimHit > PSimHitContainer

◆ findITPixelDigi()

bool Phase2TrackerValidateDigi::findITPixelDigi ( unsigned int  detid,
unsigned int  id 
)
private

Definition at line 344 of file Phase2TrackerValidateDigi.cc.

References edm::DetSetVector< T >::begin(), cuy::col, edm::DetSetVector< T >::end(), edm::DetSetVector< T >::find(), getSimTrackId(), itdigis_, itSimLink_, muonTagProbeFilters_cff::matched, and PixelDigi::pixelToChannel().

Referenced by fillSimHitInfo().

344  {
345  bool matched = false;
347  if (DSVIter != itdigis_->end()) {
348  for (edm::DetSet<PixelDigi>::const_iterator di = DSVIter->begin(); di != DSVIter->end(); di++) {
349  int col = di->column(); // column
350  int row = di->row(); // row
351  unsigned int channel = PixelDigi::pixelToChannel(row, col);
352  unsigned int simTkId = getSimTrackId(itSimLink_, detid, channel);
353  if (simTkId == id) {
354  matched = true;
355  break;
356  }
357  }
358  }
359  return matched;
360 }
iterator find(det_id_type id)
Definition: DetSetVector.h:255
const edm::DetSetVector< PixelDigiSimLink > * itSimLink_
static int pixelToChannel(int row, int col)
Definition: PixelDigi.h:75
unsigned int getSimTrackId(const edm::DetSetVector< PixelDigiSimLink > *simLinks, const DetId &detId, unsigned int &channel)
const edm::DetSetVector< PixelDigi > * itdigis_
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:316
col
Definition: cuy.py:1009
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:305
collection_type::const_iterator const_iterator
Definition: DetSet.h:31
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102

◆ findOTDigi()

bool Phase2TrackerValidateDigi::findOTDigi ( unsigned int  detid,
unsigned int  id 
)
private

Definition at line 327 of file Phase2TrackerValidateDigi.cc.

References edm::DetSetVector< T >::begin(), cuy::col, edm::DetSetVector< T >::end(), edm::DetSetVector< T >::find(), getSimTrackId(), muonTagProbeFilters_cff::matched, otdigis_, otSimLink_, and Phase2TrackerDigi::pixelToChannel().

Referenced by fillSimHitInfo().

327  {
328  bool matched = false;
330  if (DSVIter != otdigis_->end()) {
331  for (edm::DetSet<Phase2TrackerDigi>::const_iterator di = DSVIter->begin(); di != DSVIter->end(); di++) {
332  int col = di->column(); // column
333  int row = di->row(); // row
334  unsigned int channel = Phase2TrackerDigi::pixelToChannel(row, col);
335  unsigned int simTkId = getSimTrackId(otSimLink_, detid, channel);
336  if (simTkId == id) {
337  matched = true;
338  break;
339  }
340  }
341  }
342  return matched;
343 }
iterator find(det_id_type id)
Definition: DetSetVector.h:255
unsigned int getSimTrackId(const edm::DetSetVector< PixelDigiSimLink > *simLinks, const DetId &detId, unsigned int &channel)
static PackedDigiType pixelToChannel(unsigned int row, unsigned int col)
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:316
const edm::DetSetVector< PixelDigiSimLink > * otSimLink_
col
Definition: cuy.py:1009
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:305
const edm::DetSetVector< Phase2TrackerDigi > * otdigis_
collection_type::const_iterator const_iterator
Definition: DetSet.h:31
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102

◆ getHistoId()

std::string Phase2TrackerValidateDigi::getHistoId ( uint32_t  det_id,
bool  flag 
)

Definition at line 1051 of file Phase2TrackerValidateDigi.cc.

References RemoveAddSevLevel::flag, phase2tkutil::getITHistoId(), phase2tkutil::getOTHistoId(), and tTopo_.

Referenced by bookLayerHistos(), fillITPixelBXInfo(), fillOTBXInfo(), and fillSimHitInfo().

1051  {
1052  if (flag)
1053  return phase2tkutil::getITHistoId(det_id, tTopo_);
1054  else
1055  return phase2tkutil::getOTHistoId(det_id, tTopo_);
1056 }
std::string getITHistoId(uint32_t det_id, const TrackerTopology *tTopo)
std::string getOTHistoId(uint32_t det_id, const TrackerTopology *tTopo)

◆ getSimTrackId()

unsigned int Phase2TrackerValidateDigi::getSimTrackId ( const edm::DetSetVector< PixelDigiSimLink > *  simLinks,
const DetId detId,
unsigned int &  channel 
)
private

Definition at line 899 of file Phase2TrackerValidateDigi.cc.

References edm::DetSet< T >::data, hcalRecHitTable_cff::detId, edm::DetSetVector< T >::end(), edm::DetSetVector< T >::find(), and ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it.

Referenced by findITPixelDigi(), and findOTDigi().

901  {
903 
904  unsigned int simTrkId(0);
905  if (isearch == simLinks->end())
906  return simTrkId;
907 
908  edm::DetSet<PixelDigiSimLink> link_detset = (*simLinks)[detId];
909  // Loop over DigiSimLink in this det unit
910  int iSimLink = 0;
911  for (edm::DetSet<PixelDigiSimLink>::const_iterator it = link_detset.data.begin(); it != link_detset.data.end();
912  it++, iSimLink++) {
913  if (channel == it->channel()) {
914  simTrkId = it->SimTrackId();
915  break;
916  }
917  }
918  return simTrkId;
919 }
iterator find(det_id_type id)
Definition: DetSetVector.h:255
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:316
collection_type data
Definition: DetSet.h:80
collection_type::const_iterator const_iterator
Definition: DetSet.h:31
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102

◆ isPrimary()

bool Phase2TrackerValidateDigi::isPrimary ( const SimTrack simTrk,
const PSimHit simHit 
)
private

Definition at line 1007 of file Phase2TrackerValidateDigi.cc.

References DigiTask_cfi::ptype, rpcPointValidation_cfi::simHit, CoreSimTrack::trackId(), and SimTrack::vertIndex().

Referenced by fillSimHitInfo().

1007  {
1008  bool retval = false;
1009  unsigned int trkId = simTrk.trackId();
1010  if (trkId != simHit.trackId())
1011  return retval;
1012  int vtxIndex = simTrk.vertIndex();
1013  int ptype = simHit.processType();
1014  if ((vtxIndex == 0) && (ptype == 0))
1015  retval = true;
1016  return retval;
1017 }
int vertIndex() const
index of the vertex in the Event container (-1 if no vertex)
Definition: SimTrack.h:33
unsigned int trackId() const
Definition: CoreSimTrack.h:31

◆ matchedSimTrack()

int Phase2TrackerValidateDigi::matchedSimTrack ( edm::Handle< edm::SimTrackContainer > &  SimTk,
unsigned int  simTrkId 
)
private

Definition at line 995 of file Phase2TrackerValidateDigi.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and edm::Handle< T >::product().

Referenced by analyze().

995  {
996  edm::SimTrackContainer sim_tracks = (*SimTk.product());
997  for (unsigned int it = 0; it < sim_tracks.size(); it++) {
998  if (sim_tracks[it].trackId() == simTrkId) {
999  return it;
1000  }
1001  }
1002  return -1;
1003 }
T const * product() const
Definition: Handle.h:70
std::vector< SimTrack > SimTrackContainer

Member Data Documentation

◆ config_

edm::ParameterSet Phase2TrackerValidateDigi::config_
private

◆ cval

const float Phase2TrackerValidateDigi::cval
private

Definition at line 153 of file Phase2TrackerValidateDigi.h.

Referenced by fillSimHitInfo().

◆ etaCut_

float Phase2TrackerValidateDigi::etaCut_
private

Definition at line 97 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), fillSimHitInfo(), and Phase2TrackerValidateDigi().

◆ geomToken_

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

Definition at line 147 of file Phase2TrackerValidateDigi.h.

Referenced by dqmBeginRun().

◆ geomType_

std::string Phase2TrackerValidateDigi::geomType_
private

Definition at line 123 of file Phase2TrackerValidateDigi.h.

◆ GeVperElectron

const float Phase2TrackerValidateDigi::GeVperElectron
private

Definition at line 152 of file Phase2TrackerValidateDigi.h.

Referenced by fillSimHitInfo().

◆ itdigis_

const edm::DetSetVector<PixelDigi>* Phase2TrackerValidateDigi::itdigis_
private

Definition at line 142 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), and findITPixelDigi().

◆ itPixelDigiSimLinkSrc_

edm::InputTag Phase2TrackerValidateDigi::itPixelDigiSimLinkSrc_
private

Definition at line 128 of file Phase2TrackerValidateDigi.h.

◆ itPixelDigiSimLinkToken_

const edm::EDGetTokenT<edm::DetSetVector<PixelDigiSimLink> > Phase2TrackerValidateDigi::itPixelDigiSimLinkToken_
private

Definition at line 136 of file Phase2TrackerValidateDigi.h.

Referenced by analyze().

◆ itPixelDigiSrc_

edm::InputTag Phase2TrackerValidateDigi::itPixelDigiSrc_
private

Definition at line 127 of file Phase2TrackerValidateDigi.h.

◆ itPixelDigiToken_

const edm::EDGetTokenT<edm::DetSetVector<PixelDigi> > Phase2TrackerValidateDigi::itPixelDigiToken_
private

Definition at line 135 of file Phase2TrackerValidateDigi.h.

Referenced by analyze().

◆ itSimLink_

const edm::DetSetVector<PixelDigiSimLink>* Phase2TrackerValidateDigi::itSimLink_
private

Definition at line 140 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), fillITPixelBXInfo(), and findITPixelDigi().

◆ layerMEs

std::map<std::string, DigiMEs> Phase2TrackerValidateDigi::layerMEs
private

◆ MatchedRZPositionMap

MonitorElement* Phase2TrackerValidateDigi::MatchedRZPositionMap
private

Definition at line 89 of file Phase2TrackerValidateDigi.h.

Referenced by bookHistograms(), and fillSimHitInfo().

◆ MatchedXYPositionMap

MonitorElement* Phase2TrackerValidateDigi::MatchedXYPositionMap
private

Definition at line 88 of file Phase2TrackerValidateDigi.h.

Referenced by bookHistograms(), and fillSimHitInfo().

◆ nSimHitsPerTrack

MonitorElement* Phase2TrackerValidateDigi::nSimHitsPerTrack
private

Definition at line 96 of file Phase2TrackerValidateDigi.h.

◆ nSimulatedTracks

MonitorElement* Phase2TrackerValidateDigi::nSimulatedTracks
private

Definition at line 67 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), and bookHistograms().

◆ nSimulatedTracksP

MonitorElement* Phase2TrackerValidateDigi::nSimulatedTracksP
private

Definition at line 68 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), and bookHistograms().

◆ nSimulatedTracksS

MonitorElement* Phase2TrackerValidateDigi::nSimulatedTracksS
private

Definition at line 69 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), and bookHistograms().

◆ nSimVertices

MonitorElement* Phase2TrackerValidateDigi::nSimVertices
private

Definition at line 71 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), and bookHistograms().

◆ otdigis_

const edm::DetSetVector<Phase2TrackerDigi>* Phase2TrackerValidateDigi::otdigis_
private

Definition at line 141 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), and findOTDigi().

◆ otDigiSimLinkSrc_

edm::InputTag Phase2TrackerValidateDigi::otDigiSimLinkSrc_
private

Definition at line 126 of file Phase2TrackerValidateDigi.h.

◆ otDigiSimLinkToken_

const edm::EDGetTokenT<edm::DetSetVector<PixelDigiSimLink> > Phase2TrackerValidateDigi::otDigiSimLinkToken_
private

Definition at line 134 of file Phase2TrackerValidateDigi.h.

Referenced by analyze().

◆ otDigiSrc_

edm::InputTag Phase2TrackerValidateDigi::otDigiSrc_
private

Definition at line 125 of file Phase2TrackerValidateDigi.h.

◆ otDigiToken_

const edm::EDGetTokenT<edm::DetSetVector<Phase2TrackerDigi> > Phase2TrackerValidateDigi::otDigiToken_
private

Definition at line 133 of file Phase2TrackerValidateDigi.h.

Referenced by analyze().

◆ otSimLink_

const edm::DetSetVector<PixelDigiSimLink>* Phase2TrackerValidateDigi::otSimLink_
private

Definition at line 139 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), fillOTBXInfo(), and findOTDigi().

◆ pixelFlag_

bool Phase2TrackerValidateDigi::pixelFlag_
private

◆ pSimHitSrc_

std::vector<edm::InputTag> Phase2TrackerValidateDigi::pSimHitSrc_
private

Definition at line 129 of file Phase2TrackerValidateDigi.h.

Referenced by Phase2TrackerValidateDigi().

◆ ptCut_

float Phase2TrackerValidateDigi::ptCut_
private

Definition at line 98 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), fillSimHitInfo(), and Phase2TrackerValidateDigi().

◆ simHits

edm::Handle<edm::PSimHitContainer> Phase2TrackerValidateDigi::simHits
private

◆ simHitTokens_

std::vector<edm::EDGetTokenT<edm::PSimHitContainer> > Phase2TrackerValidateDigi::simHitTokens_
private

Definition at line 143 of file Phase2TrackerValidateDigi.h.

Referenced by fillSimHitInfo(), and Phase2TrackerValidateDigi().

◆ simTracks

edm::Handle<edm::SimTrackContainer> Phase2TrackerValidateDigi::simTracks
private

Definition at line 145 of file Phase2TrackerValidateDigi.h.

Referenced by analyze().

◆ simTrackSrc_

edm::InputTag Phase2TrackerValidateDigi::simTrackSrc_
private

Definition at line 130 of file Phase2TrackerValidateDigi.h.

◆ simTrackToken_

const edm::EDGetTokenT<edm::SimTrackContainer> Phase2TrackerValidateDigi::simTrackToken_
private

Definition at line 137 of file Phase2TrackerValidateDigi.h.

Referenced by analyze().

◆ SimulatedRZPositionMap

MonitorElement* Phase2TrackerValidateDigi::SimulatedRZPositionMap
private

Definition at line 86 of file Phase2TrackerValidateDigi.h.

Referenced by bookHistograms(), and fillSimHitInfo().

◆ SimulatedTOFEtaMap

MonitorElement* Phase2TrackerValidateDigi::SimulatedTOFEtaMap
private

Definition at line 91 of file Phase2TrackerValidateDigi.h.

Referenced by bookHistograms(), and fillSimHitInfo().

◆ SimulatedTOFPhiMap

MonitorElement* Phase2TrackerValidateDigi::SimulatedTOFPhiMap
private

Definition at line 92 of file Phase2TrackerValidateDigi.h.

Referenced by bookHistograms(), and fillSimHitInfo().

◆ SimulatedTOFRMap

MonitorElement* Phase2TrackerValidateDigi::SimulatedTOFRMap
private

Definition at line 93 of file Phase2TrackerValidateDigi.h.

Referenced by bookHistograms(), and fillSimHitInfo().

◆ SimulatedTOFZMap

MonitorElement* Phase2TrackerValidateDigi::SimulatedTOFZMap
private

Definition at line 94 of file Phase2TrackerValidateDigi.h.

Referenced by bookHistograms(), and fillSimHitInfo().

◆ SimulatedTrackEta

MonitorElement* Phase2TrackerValidateDigi::SimulatedTrackEta
private

Definition at line 74 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), and bookHistograms().

◆ SimulatedTrackEtaP

MonitorElement* Phase2TrackerValidateDigi::SimulatedTrackEtaP
private

Definition at line 78 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), and bookHistograms().

◆ SimulatedTrackEtaS

MonitorElement* Phase2TrackerValidateDigi::SimulatedTrackEtaS
private

Definition at line 82 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), and bookHistograms().

◆ SimulatedTrackPhi

MonitorElement* Phase2TrackerValidateDigi::SimulatedTrackPhi
private

Definition at line 75 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), and bookHistograms().

◆ SimulatedTrackPhiP

MonitorElement* Phase2TrackerValidateDigi::SimulatedTrackPhiP
private

Definition at line 79 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), and bookHistograms().

◆ SimulatedTrackPhiS

MonitorElement* Phase2TrackerValidateDigi::SimulatedTrackPhiS
private

Definition at line 83 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), and bookHistograms().

◆ SimulatedTrackPt

MonitorElement* Phase2TrackerValidateDigi::SimulatedTrackPt
private

Definition at line 73 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), and bookHistograms().

◆ SimulatedTrackPtP

MonitorElement* Phase2TrackerValidateDigi::SimulatedTrackPtP
private

Definition at line 77 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), and bookHistograms().

◆ SimulatedTrackPtS

MonitorElement* Phase2TrackerValidateDigi::SimulatedTrackPtS
private

Definition at line 81 of file Phase2TrackerValidateDigi.h.

Referenced by analyze(), and bookHistograms().

◆ SimulatedXYPositionMap

MonitorElement* Phase2TrackerValidateDigi::SimulatedXYPositionMap
private

Definition at line 85 of file Phase2TrackerValidateDigi.h.

Referenced by bookHistograms(), and fillSimHitInfo().

◆ simVertexSrc_

edm::InputTag Phase2TrackerValidateDigi::simVertexSrc_
private

Definition at line 131 of file Phase2TrackerValidateDigi.h.

◆ simVertexToken_

const edm::EDGetTokenT<edm::SimVertexContainer> Phase2TrackerValidateDigi::simVertexToken_
private

Definition at line 138 of file Phase2TrackerValidateDigi.h.

Referenced by analyze().

◆ simVertices

edm::Handle<edm::SimVertexContainer> Phase2TrackerValidateDigi::simVertices
private

Definition at line 146 of file Phase2TrackerValidateDigi.h.

Referenced by analyze().

◆ tkGeom_

const TrackerGeometry* Phase2TrackerValidateDigi::tkGeom_ = nullptr
private

Definition at line 149 of file Phase2TrackerValidateDigi.h.

Referenced by bookHistograms(), dqmBeginRun(), and fillSimHitInfo().

◆ tofLowerCut_

float Phase2TrackerValidateDigi::tofLowerCut_
private

Definition at line 100 of file Phase2TrackerValidateDigi.h.

Referenced by fillSimHitInfo(), and Phase2TrackerValidateDigi().

◆ tofUpperCut_

float Phase2TrackerValidateDigi::tofUpperCut_
private

Definition at line 99 of file Phase2TrackerValidateDigi.h.

Referenced by fillSimHitInfo(), and Phase2TrackerValidateDigi().

◆ topoToken_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> Phase2TrackerValidateDigi::topoToken_
private

Definition at line 148 of file Phase2TrackerValidateDigi.h.

Referenced by dqmBeginRun().

◆ tTopo_

const TrackerTopology* Phase2TrackerValidateDigi::tTopo_ = nullptr
private