CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
cms::Phase2TrackerDigitizer Class Reference

#include <Phase2TrackerDigitizer.h>

Inheritance diagram for cms::Phase2TrackerDigitizer:
DigiAccumulatorMixMod

Public Types

using ModuleTypeCache = std::unordered_map< uint32_t, TrackerGeometry::ModuleType >
 

Public Member Functions

void accumulate (edm::Event const &e, edm::EventSetup const &c) override
 
void accumulate (PileUpEventPrincipal const &e, edm::EventSetup const &c, edm::StreamID const &) override
 
template<class T >
void accumulate_local (T const &iEvent, edm::EventSetup const &iSetup)
 
virtual void beginJob ()
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &iSetup) override
 
void finalizeEvent (edm::Event &e, edm::EventSetup const &c) override
 
void initializeEvent (edm::Event const &e, edm::EventSetup const &c) override
 
void loadAccumulator (const std::map< uint32_t, std::map< int, float > > &accumulator)
 
 Phase2TrackerDigitizer (const edm::ParameterSet &iConfig, edm::ProducesCollector, edm::ConsumesCollector &iC)
 
 ~Phase2TrackerDigitizer () override
 
- Public Member Functions inherited from DigiAccumulatorMixMod
virtual void beginRun (edm::Run const &run, edm::EventSetup const &setup)
 
 DigiAccumulatorMixMod ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup)
 
virtual void endRun (edm::Run const &run, edm::EventSetup const &setup)
 
virtual void finalizeBunchCrossing (edm::Event &event, edm::EventSetup const &setup, int bunchCrossing)
 
virtual PileupMixingContentgetEventPileupInfo ()
 
virtual void initializeBunchCrossing (edm::Event const &event, edm::EventSetup const &setup, int bunchCrossing)
 
virtual void StorePileupInformation (std::vector< int > &numInteractionList, std::vector< int > &bunchCrossingList, std::vector< float > &TrueInteractionList, std::vector< edm::EventID > &eventList, int bunchSpace)
 
virtual ~DigiAccumulatorMixMod ()
 

Private Types

enum  AlgorithmType {
  AlgorithmType::InnerPixel, AlgorithmType::InnerPixel3D, AlgorithmType::PixelinPS, AlgorithmType::StripinPS,
  AlgorithmType::TwoStrip, AlgorithmType::Unknown
}
 
using vstring = std::vector< std::string >
 

Private Member Functions

void accumulatePixelHits (edm::Handle< std::vector< PSimHit > >, size_t globalSimHitIndex, const uint32_t tofBin)
 
template<typename DigiType >
void addOuterTrackerCollection (edm::Event &iEvent, const edm::EventSetup &iSetup)
 
void addPixelCollection (edm::Event &iEvent, const edm::EventSetup &iSetup, const bool ot_analog)
 
AlgorithmType getAlgoType (uint32_t idet)
 

Private Attributes

std::map< AlgorithmType, std::unique_ptr< Phase2TrackerDigitizerAlgorithm > > algomap_
 
std::map< std::string, size_t > crossingSimHitIndexOffset_
 Offset to add to the index of each sim hit to account for which crossing it's in. More...
 
std::map< uint32_t, const Phase2TrackerGeomDetUnit * > detectorUnits_
 
bool first_
 
const std::string geometryType_
 
const std::string hitsProducer_
 
const bool isOuterTrackerReadoutAnalog_
 
const bool makeDigiSimLinks_
 
ModuleTypeCache moduleTypeCache_
 
edm::ESHandle< TrackerGeometrypDD_
 
const bool premixStage1_
 
edm::ESHandle< MagneticFieldpSetup_
 
edm::ESWatcher< TrackerDigiGeometryRecordtheTkDigiGeomWatcher_
 
const vstring trackerContainers_
 
edm::ESHandle< TrackerTopologytTopoHand_
 

Detailed Description

Definition at line 49 of file Phase2TrackerDigitizer.h.

Member Typedef Documentation

◆ ModuleTypeCache

Definition at line 51 of file Phase2TrackerDigitizer.h.

◆ vstring

using cms::Phase2TrackerDigitizer::vstring = std::vector<std::string>
private

Definition at line 72 of file Phase2TrackerDigitizer.h.

Member Enumeration Documentation

◆ AlgorithmType

Enumerator
InnerPixel 
InnerPixel3D 
PixelinPS 
StripinPS 
TwoStrip 
Unknown 

Definition at line 75 of file Phase2TrackerDigitizer.h.

75 { InnerPixel, InnerPixel3D, PixelinPS, StripinPS, TwoStrip, Unknown };

Constructor & Destructor Documentation

◆ Phase2TrackerDigitizer()

cms::Phase2TrackerDigitizer::Phase2TrackerDigitizer ( const edm::ParameterSet iConfig,
edm::ProducesCollector  producesCollector,
edm::ConsumesCollector iC 
)
explicit

Definition at line 64 of file Phase2TrackerDigitizer.cc.

67  : first_(true),
68  hitsProducer_(iConfig.getParameter<std::string>("hitsProducer")),
69  trackerContainers_(iConfig.getParameter<std::vector<std::string> >("ROUList")),
70  geometryType_(iConfig.getParameter<std::string>("GeometryType")),
71  isOuterTrackerReadoutAnalog_(iConfig.getParameter<bool>("isOTreadoutAnalog")),
72  premixStage1_(iConfig.getParameter<bool>("premixStage1")),
74  iConfig.getParameter<edm::ParameterSet>("AlgorithmCommon").getUntrackedParameter<bool>("makeDigiSimLinks")) {
75  const std::string alias1("simSiPixelDigis");
76  producesCollector.produces<edm::DetSetVector<PixelDigi> >("Pixel").setBranchAlias(alias1);
78  producesCollector.produces<edm::DetSetVector<PixelDigiSimLink> >("Pixel").setBranchAlias(alias1);
79 
80  if (!iConfig.getParameter<bool>("isOTreadoutAnalog")) {
81  const std::string alias2("simSiTrackerDigis");
82  if (premixStage1_) {
83  // Premixing exploits the ADC field of PixelDigi to store the collected charge
84  // But we still want everything else to be treated like for Phase2TrackerDigi
85  producesCollector.produces<edm::DetSetVector<PixelDigi> >("Tracker").setBranchAlias(alias2);
86  } else {
87  producesCollector.produces<edm::DetSetVector<Phase2TrackerDigi> >("Tracker").setBranchAlias(alias2);
88  }
90  producesCollector.produces<edm::DetSetVector<PixelDigiSimLink> >("Tracker").setBranchAlias(alias2);
91  }
92  // creating algorithm objects and pushing them into the map
93  algomap_[AlgorithmType::InnerPixel] = std::make_unique<PixelDigitizerAlgorithm>(iConfig);
94  algomap_[AlgorithmType::InnerPixel3D] = std::make_unique<Pixel3DDigitizerAlgorithm>(iConfig);
95  algomap_[AlgorithmType::PixelinPS] = std::make_unique<PSPDigitizerAlgorithm>(iConfig);
96  algomap_[AlgorithmType::StripinPS] = std::make_unique<PSSDigitizerAlgorithm>(iConfig);
97  algomap_[AlgorithmType::TwoStrip] = std::make_unique<SSDigitizerAlgorithm>(iConfig);
98  }

References algomap_, edm::ParameterSet::getParameter(), InnerPixel, InnerPixel3D, makeDigiSimLinks_, PixelinPS, premixStage1_, edm::ProducesCollector::produces(), AlCaHLTBitMon_QueryRunRegistry::string, StripinPS, and TwoStrip.

◆ ~Phase2TrackerDigitizer()

cms::Phase2TrackerDigitizer::~Phase2TrackerDigitizer ( )
override

Definition at line 121 of file Phase2TrackerDigitizer.cc.

121 {}

Member Function Documentation

◆ accumulate() [1/2]

void cms::Phase2TrackerDigitizer::accumulate ( edm::Event const &  e,
edm::EventSetup const &  c 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 176 of file Phase2TrackerDigitizer.cc.

176  {
177  accumulate_local<edm::Event>(iEvent, iSetup);
178  }

References iEvent.

◆ accumulate() [2/2]

void cms::Phase2TrackerDigitizer::accumulate ( PileUpEventPrincipal const &  e,
edm::EventSetup const &  c,
edm::StreamID const &   
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 180 of file Phase2TrackerDigitizer.cc.

182  {
183  accumulate_local<PileUpEventPrincipal>(iEvent, iSetup);
184  }

References iEvent.

◆ accumulate_local()

template<class T >
void cms::Phase2TrackerDigitizer::accumulate_local ( T const &  iEvent,
edm::EventSetup const &  iSetup 
)

Definition at line 187 of file Phase2TrackerDigitizer.cc.

187  {
188  for (auto const& v : trackerContainers_) {
191  iEvent.getByLabel(tag, simHits);
192 
193  //edm::EDGetTokenT< std::vector<PSimHit> > simHitToken_(consumes< std::vector<PSimHit>(tag));
194  //iEvent.getByToken(simHitToken_, simHits);
195 
196  uint32_t tofBin = PixelDigiSimLink::LowTof;
197  if (v.find(std::string("HighTof")) != std::string::npos)
198  tofBin = PixelDigiSimLink::HighTof;
200  // Now that the hits have been processed, I'll add the amount of hits in this crossing on to
201  // the global counter. Next time accumulateStripHits() is called it will count the sim hits
202  // as though they were on the end of this collection.
203  // Note that this is only used for creating digi-sim links (if configured to do so).
204  if (simHits.isValid())
205  crossingSimHitIndexOffset_[tag.encode()] += simHits->size();
206  }
207  }

References accumulatePixelHits(), crossingSimHitIndexOffset_, PixelDigiSimLink::HighTof, hitsProducer_, iEvent, PixelDigiSimLink::LowTof, FastTrackerRecHitCombiner_cfi::simHits, AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, trackerContainers_, and findQualityFiles::v.

◆ accumulatePixelHits()

void cms::Phase2TrackerDigitizer::accumulatePixelHits ( edm::Handle< std::vector< PSimHit > >  hSimHits,
size_t  globalSimHitIndex,
const uint32_t  tofBin 
)
private

Definition at line 122 of file Phase2TrackerDigitizer.cc.

124  {
125  if (hSimHits.isValid()) {
126  std::set<uint32_t> detIds;
127  auto const& simHits = *(hSimHits.product());
128  for (auto it = std::begin(simHits), itEnd = std::end(simHits); it != itEnd; ++it, ++globalSimHitIndex) {
129  uint32_t detId_raw = (*it).detUnitId();
130  auto fiter = detectorUnits_.find(detId_raw);
131  if (fiter == detectorUnits_.end())
132  continue;
133 
134  if (detIds.insert(detId_raw).second) {
135  // The insert succeeded, so this detector element has not yet been processed.
136  const Phase2TrackerGeomDetUnit* phase2det = fiter->second;
137 
138  // access to magnetic field in global coordinates
139  GlobalVector bfield = pSetup_->inTesla(phase2det->surface().position());
140  LogDebug("PixelDigitizer") << "B-field(T) at " << phase2det->surface().position()
141  << " (cm): " << pSetup_->inTesla(phase2det->surface().position());
142 
143  auto kiter = algomap_.find(getAlgoType(detId_raw));
144  if (kiter != algomap_.end())
145  kiter->second->accumulateSimHits(it, itEnd, globalSimHitIndex, tofBin, phase2det, bfield);
146  else
147  edm::LogInfo("Phase2TrackerDigitizer") << "Unsupported algorithm: ";
148  }
149  }
150  }
151  }

References algomap_, detectorUnits_, mps_fire::end, getAlgoType(), MagneticField::inTesla(), LogDebug, GloballyPositioned< T >::position(), pSetup_, FastTrackerRecHitCombiner_cfi::simHits, and GeomDet::surface().

Referenced by accumulate_local().

◆ addOuterTrackerCollection()

template<typename DigiType >
void cms::Phase2TrackerDigitizer::addOuterTrackerCollection ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 344 of file Phase2TrackerDigitizer.cc.

344  {
345  const TrackerTopology* tTopo = tTopoHand_.product();
346 
347  std::vector<edm::DetSet<DigiType> > digiVector;
348  std::vector<edm::DetSet<PixelDigiSimLink> > digiLinkVector;
349  for (auto const& det_u : pDD_->detUnits()) {
350  uint32_t rawId = det_u->geographicalId().rawId();
351  auto algotype = getAlgoType(rawId);
352 
353  auto fiter = algomap_.find(algotype);
354  if (fiter == algomap_.end() || algotype == AlgorithmType::InnerPixel || algotype == AlgorithmType::InnerPixel3D) {
355  continue;
356  }
357  std::map<int, DigitizerUtility::DigiSimInfo> digi_map;
358  fiter->second->digitize(dynamic_cast<const Phase2TrackerGeomDetUnit*>(det_u), digi_map, tTopo);
359 
360  edm::DetSet<DigiType> collector(rawId);
361  edm::DetSet<PixelDigiSimLink> linkcollector(rawId);
362  for (auto const& digi_p : digi_map) {
363  DigitizerUtility::DigiSimInfo info = digi_p.second;
364  addToCollector(collector, digi_p.first, info);
365  for (auto const& sim_p : info.simInfoList) {
366  linkcollector.data.emplace_back(digi_p.first,
367  sim_p.second->trackId(),
368  sim_p.second->hitIndex(),
369  sim_p.second->tofBin(),
370  sim_p.second->eventId(),
371  sim_p.first);
372  }
373  }
374 
375  if (!collector.data.empty())
376  digiVector.push_back(std::move(collector));
377  if (!linkcollector.data.empty())
378  digiLinkVector.push_back(std::move(linkcollector));
379  }
380 
381  // Step C: create collection with the cache vector of DetSet
382  auto output = std::make_unique<edm::DetSetVector<DigiType> >(digiVector);
383  auto outputlink = std::make_unique<edm::DetSetVector<PixelDigiSimLink> >(digiLinkVector);
384 
385  // Step D: write output to file
386  iEvent.put(std::move(output), "Tracker");
387  if (makeDigiSimLinks_)
388  iEvent.put(std::move(outputlink), "Tracker");
389  }

References algomap_, edm::DetSet< T >::data, TrackerGeometry::detUnits(), getAlgoType(), iEvent, info(), InnerPixel, InnerPixel3D, makeDigiSimLinks_, eostools::move(), convertSQLitetoXML_cfg::output, pDD_, edm::ESHandle< T >::product(), and tTopoHand_.

◆ addPixelCollection()

void cms::Phase2TrackerDigitizer::addPixelCollection ( edm::Event iEvent,
const edm::EventSetup iSetup,
const bool  ot_analog 
)
private

Definition at line 274 of file Phase2TrackerDigitizer.cc.

276  {
277  const TrackerTopology* tTopo = tTopoHand_.product();
278 
279  std::vector<edm::DetSet<PixelDigi> > digiVector;
280  std::vector<edm::DetSet<PixelDigiSimLink> > digiLinkVector;
281  for (auto const& det_u : pDD_->detUnits()) {
282  uint32_t rawId = det_u->geographicalId().rawId();
283  auto algotype = getAlgoType(rawId);
284  auto fiter = algomap_.find(algotype);
285  if (fiter == algomap_.end())
286  continue;
287 
288  // Decide if we want analog readout for Outer Tracker.
289  if (!ot_analog && (algotype != AlgorithmType::InnerPixel && algotype != AlgorithmType::InnerPixel3D)) {
290  continue;
291  }
292  std::map<int, DigitizerUtility::DigiSimInfo> digi_map;
293  fiter->second->digitize(dynamic_cast<const Phase2TrackerGeomDetUnit*>(det_u), digi_map, tTopo);
294 
295  edm::DetSet<PixelDigi> collector(rawId);
296  edm::DetSet<PixelDigiSimLink> linkcollector(rawId);
297  for (auto const& digi_p : digi_map) {
298  DigitizerUtility::DigiSimInfo info = digi_p.second;
299  const auto& ip = PixelDigi::channelToPixel(digi_p.first);
300  collector.data.emplace_back(ip.first, ip.second, info.sig_tot);
301  for (auto const& sim_p : info.simInfoList) {
302  linkcollector.data.emplace_back(digi_p.first,
303  sim_p.second->trackId(),
304  sim_p.second->hitIndex(),
305  sim_p.second->tofBin(),
306  sim_p.second->eventId(),
307  sim_p.first);
308  }
309  }
310  if (!collector.data.empty())
311  digiVector.push_back(std::move(collector));
312  if (!linkcollector.data.empty())
313  digiLinkVector.push_back(std::move(linkcollector));
314  }
315 
316  // Step C: create collection with the cache vector of DetSet
317  auto output = std::make_unique<edm::DetSetVector<PixelDigi> >(digiVector);
318  auto outputlink = std::make_unique<edm::DetSetVector<PixelDigiSimLink> >(digiLinkVector);
319 
320  // Step D: write output to file
321  iEvent.put(std::move(output), "Pixel");
322  if (makeDigiSimLinks_)
323  iEvent.put(std::move(outputlink), "Pixel");
324  }

References algomap_, PixelDigi::channelToPixel(), edm::DetSet< T >::data, TrackerGeometry::detUnits(), getAlgoType(), iEvent, info(), InnerPixel, InnerPixel3D, makeDigiSimLinks_, eostools::move(), convertSQLitetoXML_cfg::output, pDD_, edm::ESHandle< T >::product(), and tTopoHand_.

Referenced by finalizeEvent().

◆ beginJob()

virtual void cms::Phase2TrackerDigitizer::beginJob ( void  )
inlinevirtual

Definition at line 62 of file Phase2TrackerDigitizer.h.

62 {}

◆ beginLuminosityBlock()

void cms::Phase2TrackerDigitizer::beginLuminosityBlock ( edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  iSetup 
)
overridevirtual

Reimplemented from DigiAccumulatorMixMod.

Definition at line 100 of file Phase2TrackerDigitizer.cc.

100  {
101  iSetup.get<IdealMagneticFieldRecord>().get(pSetup_);
102  iSetup.get<TrackerTopologyRcd>().get(tTopoHand_);
103 
104  if (theTkDigiGeomWatcher_.check(iSetup)) {
106 
107  // reset cache
109  detectorUnits_.clear();
110  for (auto const& det_u : pDD_->detUnits()) {
111  uint32_t rawId = det_u->geographicalId().rawId();
112  if (DetId(rawId).det() == DetId::Detector::Tracker) {
113  const Phase2TrackerGeomDetUnit* pixdet = dynamic_cast<const Phase2TrackerGeomDetUnit*>(det_u);
114  assert(pixdet);
115  detectorUnits_.emplace(rawId, pixdet);
116  }
117  }
118  }
119  }

References cms::cuda::assert(), edm::ESWatcher< T >::check(), detectorUnits_, TrackerGeometry::detUnits(), geometryType_, edm::EventSetup::get(), get, moduleTypeCache_, pDD_, pSetup_, theTkDigiGeomWatcher_, align::Tracker, and tTopoHand_.

Referenced by PreMixingPhase2TrackerWorker::beginLuminosityBlock().

◆ finalizeEvent()

void cms::Phase2TrackerDigitizer::finalizeEvent ( edm::Event e,
edm::EventSetup const &  c 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 218 of file Phase2TrackerDigitizer.cc.

218  {
219  //Decide if we want analog readout for Outer Tracker.
222  if (premixStage1_)
223  addOuterTrackerCollection<PixelDigi>(iEvent, iSetup);
224  else
225  addOuterTrackerCollection<Phase2TrackerDigi>(iEvent, iSetup);
226  }
227  }

References addPixelCollection(), iEvent, isOuterTrackerReadoutAnalog_, and premixStage1_.

Referenced by PreMixingPhase2TrackerWorker::put().

◆ getAlgoType()

Phase2TrackerDigitizer::AlgorithmType cms::Phase2TrackerDigitizer::getAlgoType ( uint32_t  idet)
private

Definition at line 228 of file Phase2TrackerDigitizer.cc.

228  {
229  // get mType either from the geometry or from our cache (faster)
231  auto itr = moduleTypeCache_.find(detId_raw);
232  if (itr != moduleTypeCache_.end()) {
233  mType = itr->second;
234  } else {
235  mType = pDD_->getDetectorType(DetId(detId_raw));
236  moduleTypeCache_.emplace(detId_raw, mType);
237  }
238 
240  switch (mType) {
242  algotype = AlgorithmType::InnerPixel;
243  break;
245  algotype = AlgorithmType::InnerPixel;
246  break;
248  algotype = AlgorithmType::InnerPixel;
249  break;
251  algotype = AlgorithmType::InnerPixel;
252  break;
254  algotype = AlgorithmType::InnerPixel3D;
255  break;
257  algotype = AlgorithmType::InnerPixel3D;
258  break;
260  algotype = AlgorithmType::PixelinPS;
261  break;
263  algotype = AlgorithmType::StripinPS;
264  break;
266  algotype = AlgorithmType::TwoStrip;
267  break;
268  default:
269  edm::LogError("Phase2TrackerDigitizer") << "ERROR - Wrong Detector Type, No Algorithm available ";
270  }
271 
272  return algotype;
273  }

References TrackerGeometry::getDetectorType(), InnerPixel, InnerPixel3D, moduleTypeCache_, pDD_, TrackerGeometry::Ph1PXB, TrackerGeometry::Ph1PXF, TrackerGeometry::Ph2PSP, TrackerGeometry::Ph2PSS, TrackerGeometry::Ph2PXB, TrackerGeometry::Ph2PXB3D, TrackerGeometry::Ph2PXF, TrackerGeometry::Ph2PXF3D, TrackerGeometry::Ph2SS, PixelinPS, StripinPS, TwoStrip, TrackerGeometry::UNKNOWN, and Unknown.

Referenced by accumulatePixelHits(), addOuterTrackerCollection(), addPixelCollection(), and loadAccumulator().

◆ initializeEvent()

void cms::Phase2TrackerDigitizer::initializeEvent ( edm::Event const &  e,
edm::EventSetup const &  c 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 153 of file Phase2TrackerDigitizer.cc.

153  {
155  if (!rng.isAvailable()) {
156  throw cms::Exception("Configuration")
157  << "Phase2TrackerDigitizer requires the RandomNumberGeneratorService\n"
158  "which is not present in the configuration file. You must add the service\n"
159  "in the configuration file or remove the modules that require it.";
160  }
161 
162  // Must initialize all the algorithms
163  for (auto const& el : algomap_) {
164  if (first_)
165  el.second->init(iSetup);
166 
167  el.second->initializeEvent(rng->getEngine(e.streamID()));
168  }
169  first_ = false;
170  // Make sure that the first crossing processed starts indexing the sim hits from zero.
171  // This variable is used so that the sim hits from all crossing frames have sequential
172  // indices used to create the digi-sim link (if configured to do so) rather than starting
173  // from zero for each crossing.
175  }

References algomap_, crossingSimHitIndexOffset_, MillePedeFileConverter_cfg::e, Exception, first_, edm::RandomNumberGenerator::getEngine(), and edm::Service< T >::isAvailable().

Referenced by PreMixingPhase2TrackerWorker::initializeEvent().

◆ loadAccumulator()

void cms::Phase2TrackerDigitizer::loadAccumulator ( const std::map< uint32_t, std::map< int, float > > &  accumulator)

Definition at line 210 of file Phase2TrackerDigitizer.cc.

210  {
211  for (const auto& detMap : accumulator) {
212  AlgorithmType algoType = getAlgoType(detMap.first);
213  auto& algo = *(algomap_.at(algoType));
214  algo.loadAccumulator(detMap.first, detMap.second);
215  }
216  }

References mixOne_premix_on_sim_cfi::accumulator, algomap_, and getAlgoType().

Referenced by PreMixingPhase2TrackerWorker::put().

Member Data Documentation

◆ algomap_

std::map<AlgorithmType, std::unique_ptr<Phase2TrackerDigitizerAlgorithm> > cms::Phase2TrackerDigitizer::algomap_
private

◆ crossingSimHitIndexOffset_

std::map<std::string, size_t> cms::Phase2TrackerDigitizer::crossingSimHitIndexOffset_
private

Offset to add to the index of each sim hit to account for which crossing it's in.

I need to know what each sim hit index will be when the hits from all crossing frames are merged into one collection (assuming the MixingModule is configured to create the crossing frame for all sim hits). To do this I'll record how many hits were in each crossing, and then add that on to the index for a given hit in a given crossing. This assumes that the crossings are processed in the same order here as they are put into the crossing frame, which I'm pretty sure is true.
The key is the name of the sim hit collection.

Definition at line 95 of file Phase2TrackerDigitizer.h.

Referenced by accumulate_local(), and initializeEvent().

◆ detectorUnits_

std::map<uint32_t, const Phase2TrackerGeomDetUnit*> cms::Phase2TrackerDigitizer::detectorUnits_
private

Definition at line 102 of file Phase2TrackerDigitizer.h.

Referenced by accumulatePixelHits(), and beginLuminosityBlock().

◆ first_

bool cms::Phase2TrackerDigitizer::first_
private

Definition at line 85 of file Phase2TrackerDigitizer.h.

Referenced by initializeEvent().

◆ geometryType_

const std::string cms::Phase2TrackerDigitizer::geometryType_
private

Definition at line 99 of file Phase2TrackerDigitizer.h.

Referenced by beginLuminosityBlock().

◆ hitsProducer_

const std::string cms::Phase2TrackerDigitizer::hitsProducer_
private

Definition at line 97 of file Phase2TrackerDigitizer.h.

Referenced by accumulate_local().

◆ isOuterTrackerReadoutAnalog_

const bool cms::Phase2TrackerDigitizer::isOuterTrackerReadoutAnalog_
private

Definition at line 105 of file Phase2TrackerDigitizer.h.

Referenced by finalizeEvent().

◆ makeDigiSimLinks_

const bool cms::Phase2TrackerDigitizer::makeDigiSimLinks_
private

◆ moduleTypeCache_

ModuleTypeCache cms::Phase2TrackerDigitizer::moduleTypeCache_
private

Definition at line 109 of file Phase2TrackerDigitizer.h.

Referenced by beginLuminosityBlock(), and getAlgoType().

◆ pDD_

edm::ESHandle<TrackerGeometry> cms::Phase2TrackerDigitizer::pDD_
private

◆ premixStage1_

const bool cms::Phase2TrackerDigitizer::premixStage1_
private

Definition at line 106 of file Phase2TrackerDigitizer.h.

Referenced by finalizeEvent(), and Phase2TrackerDigitizer().

◆ pSetup_

edm::ESHandle<MagneticField> cms::Phase2TrackerDigitizer::pSetup_
private

Definition at line 101 of file Phase2TrackerDigitizer.h.

Referenced by accumulatePixelHits(), and beginLuminosityBlock().

◆ theTkDigiGeomWatcher_

edm::ESWatcher<TrackerDigiGeometryRecord> cms::Phase2TrackerDigitizer::theTkDigiGeomWatcher_
private

Definition at line 104 of file Phase2TrackerDigitizer.h.

Referenced by beginLuminosityBlock().

◆ trackerContainers_

const vstring cms::Phase2TrackerDigitizer::trackerContainers_
private

Definition at line 98 of file Phase2TrackerDigitizer.h.

Referenced by accumulate_local().

◆ tTopoHand_

edm::ESHandle<TrackerTopology> cms::Phase2TrackerDigitizer::tTopoHand_
private
Vector3DBase
Definition: Vector3DBase.h:8
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
edm::DetSetVector
Definition: DetSetVector.h:61
cms::Phase2TrackerDigitizer::AlgorithmType::StripinPS
cms::Phase2TrackerDigitizer::first_
bool first_
Definition: Phase2TrackerDigitizer.h:85
TrackerGeometry::ModuleType::Ph1PXF
edm::RandomNumberGenerator::getEngine
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
cms::Phase2TrackerDigitizer::accumulatePixelHits
void accumulatePixelHits(edm::Handle< std::vector< PSimHit > >, size_t globalSimHitIndex, const uint32_t tofBin)
Definition: Phase2TrackerDigitizer.cc:122
MagneticField::inTesla
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
TrackerGeometry::ModuleType::Ph2PXF
cms::Phase2TrackerDigitizer::getAlgoType
AlgorithmType getAlgoType(uint32_t idet)
Definition: Phase2TrackerDigitizer.cc:228
edm::Handle::product
T const * product() const
Definition: Handle.h:70
TrackerGeometry::ModuleType::Ph2PXB3D
cms::Phase2TrackerDigitizer::AlgorithmType::PixelinPS
TrackerGeometry::ModuleType::Ph2SS
cms::Phase2TrackerDigitizer::isOuterTrackerReadoutAnalog_
const bool isOuterTrackerReadoutAnalog_
Definition: Phase2TrackerDigitizer.h:105
edm::DetSet
Definition: DetSet.h:23
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
TrackerTopology
Definition: TrackerTopology.h:16
TrackerGeometry::ModuleType::Ph2PXF3D
cms::Phase2TrackerDigitizer::tTopoHand_
edm::ESHandle< TrackerTopology > tTopoHand_
Definition: Phase2TrackerDigitizer.h:103
cms::cuda::assert
assert(be >=bs)
FastTrackerRecHitCombiner_cfi.simHits
simHits
Definition: FastTrackerRecHitCombiner_cfi.py:5
reco::Unknown
Definition: MuonSimInfo.h:32
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
TrackerGeometry::ModuleType::Ph2PXB
cms::Phase2TrackerDigitizer::moduleTypeCache_
ModuleTypeCache moduleTypeCache_
Definition: Phase2TrackerDigitizer.h:109
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
findQualityFiles.v
v
Definition: findQualityFiles.py:179
TrackerGeometry::getDetectorType
ModuleType getDetectorType(DetId) const
Definition: TrackerGeometry.cc:247
edm::Handle
Definition: AssociativeIterator.h:50
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
align::Tracker
Definition: StructureType.h:70
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
DetId
Definition: DetId.h:17
cmsdt::algo
algo
Definition: constants.h:165
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
cms::Phase2TrackerDigitizer::geometryType_
const std::string geometryType_
Definition: Phase2TrackerDigitizer.h:99
cms::Phase2TrackerDigitizer::AlgorithmType::Unknown
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
TrackerGeometry::detUnits
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Definition: TrackerGeometry.h:61
PixelGeomDetUnit
Definition: PixelGeomDetUnit.h:15
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
TrackerGeometry::ModuleType
ModuleType
Definition: TrackerGeometry.h:29
mps_fire.end
end
Definition: mps_fire.py:242
cms::Phase2TrackerDigitizer::premixStage1_
const bool premixStage1_
Definition: Phase2TrackerDigitizer.h:106
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cms::Phase2TrackerDigitizer::makeDigiSimLinks_
const bool makeDigiSimLinks_
Definition: Phase2TrackerDigitizer.h:107
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
cms::Phase2TrackerDigitizer::AlgorithmType::InnerPixel3D
cms::Phase2TrackerDigitizer::detectorUnits_
std::map< uint32_t, const Phase2TrackerGeomDetUnit * > detectorUnits_
Definition: Phase2TrackerDigitizer.h:102
cms::Phase2TrackerDigitizer::pDD_
edm::ESHandle< TrackerGeometry > pDD_
Definition: Phase2TrackerDigitizer.h:100
edm::Service< edm::RandomNumberGenerator >
iEvent
int iEvent
Definition: GenABIO.cc:224
cms::Phase2TrackerDigitizer::pSetup_
edm::ESHandle< MagneticField > pSetup_
Definition: Phase2TrackerDigitizer.h:101
edm::ProducesCollector::produces
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
Definition: ProducesCollector.h:52
cms::Phase2TrackerDigitizer::algomap_
std::map< AlgorithmType, std::unique_ptr< Phase2TrackerDigitizerAlgorithm > > algomap_
Definition: Phase2TrackerDigitizer.h:96
TrackerGeometry::ModuleType::Ph2PSS
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
TrackerGeometry::ModuleType::Ph1PXB
get
#define get
cms::Phase2TrackerDigitizer::ModuleTypeCache
std::unordered_map< uint32_t, TrackerGeometry::ModuleType > ModuleTypeCache
Definition: Phase2TrackerDigitizer.h:51
cms::Phase2TrackerDigitizer::hitsProducer_
const std::string hitsProducer_
Definition: Phase2TrackerDigitizer.h:97
GloballyPositioned::position
const PositionType & position() const
Definition: GloballyPositioned.h:36
mixOne_premix_on_sim_cfi.accumulator
accumulator
Definition: mixOne_premix_on_sim_cfi.py:167
eostools.move
def move(src, dest)
Definition: eostools.py:511
cms::Phase2TrackerDigitizer::AlgorithmType::TwoStrip
cms::Phase2TrackerDigitizer::addPixelCollection
void addPixelCollection(edm::Event &iEvent, const edm::EventSetup &iSetup, const bool ot_analog)
Definition: Phase2TrackerDigitizer.cc:274
Exception
Definition: hltDiff.cc:245
DigitizerUtility::DigiSimInfo
Definition: DigitizerUtility.h:124
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
cms::Phase2TrackerDigitizer::crossingSimHitIndexOffset_
std::map< std::string, size_t > crossingSimHitIndexOffset_
Offset to add to the index of each sim hit to account for which crossing it's in.
Definition: Phase2TrackerDigitizer.h:95
cms::Phase2TrackerDigitizer::theTkDigiGeomWatcher_
edm::ESWatcher< TrackerDigiGeometryRecord > theTkDigiGeomWatcher_
Definition: Phase2TrackerDigitizer.h:104
cms::Phase2TrackerDigitizer::trackerContainers_
const vstring trackerContainers_
Definition: Phase2TrackerDigitizer.h:98
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
TrackerGeometry::ModuleType::UNKNOWN
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
cms::Phase2TrackerDigitizer::AlgorithmType
AlgorithmType
Definition: Phase2TrackerDigitizer.h:75
edm::InputTag
Definition: InputTag.h:15
TrackerGeometry::ModuleType::Ph2PSP
PixelDigi::channelToPixel
static std::pair< int, int > channelToPixel(int ch)
Definition: PixelDigi.h:65
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
cms::Phase2TrackerDigitizer::AlgorithmType::InnerPixel