CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
FastSimProducer Class Reference

The core class of the new SimplifiedGeometryPropagator. More...

Inheritance diagram for FastSimProducer:
edm::stream::EDProducer<>

Public Member Functions

 FastSimProducer (const edm::ParameterSet &)
 
 ~FastSimProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Member Functions

void beginStream (edm::StreamID id) override
 
virtual FSimTrack createFSimTrack (fastsim::Particle *particle, fastsim::ParticleManager *particleManager, HepPDT::ParticleDataTable const &particleTable)
 
void endStream () override
 
void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

std::unique_ptr< RandomEngineAndDistribution_randomEngine
 The random engine. More...
 
double beamPipeRadius_
 The radius of the beampipe. More...
 
fastsim::Geometry caloGeometry_
 Hack to interface "old" calo to "new" tracking. More...
 
fastsim::Decayer decayer_
 Handles decays of non-stable particles using pythia. More...
 
double deltaRchargedMother_
 Cut on deltaR for ClosestChargedDaughter algorithm (FastSim tracking) More...
 
edm::EDGetTokenT< edm::HepMCProductgenParticlesToken_
 Token to get the genParticles. More...
 
fastsim::Geometry geometry_
 The definition of the tracker according to python config. More...
 
std::map< std::string, fastsim::InteractionModel * > interactionModelMap_
 Each interaction model has a unique name. More...
 
std::vector< std::unique_ptr< fastsim::InteractionModel > > interactionModels_
 All defined interaction models. More...
 
std::unique_ptr< CalorimetryManagermyCalorimetry
 
fastsim::ParticleFilter particleFilter_
 Decides which particles have to be propagated. More...
 
bool simulateCalorimetry
 
bool simulateMuons
 
edm::ESWatcher< CaloGeometryRecordwatchCaloGeometry_
 
edm::ESWatcher< CaloTopologyRecordwatchCaloTopology_
 

Static Private Attributes

static const std::string MESSAGECATEGORY = "FastSimulation"
 Category of debugging messages ("FastSimulation") More...
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

The core class of the new SimplifiedGeometryPropagator.

Coordinates the propagation of all particles, this means it does the following loop: 1) Get particle from ParticleManager 2) Call LayerNavigator to move particle to next intersection with layer 3) Loop over all the interactions and add secondaries to the event 4) Repeat steps 2), 3) until particle left the tracker, lost all its energy or is about to decay 5) If particle is about to decay: do decay and add secondaries to the event 6) Restart from 1) with the next particle 7) If last particle was propagated add SimTracks, SimVertices, SimHits,... to the event

Definition at line 64 of file FastSimProducer.cc.

Constructor & Destructor Documentation

◆ FastSimProducer()

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

Definition at line 99 of file FastSimProducer.cc.

100  : genParticlesToken_(consumes<edm::HepMCProduct>(iConfig.getParameter<edm::InputTag>("src"))),
101  geometry_(iConfig.getParameter<edm::ParameterSet>("trackerDefinition")),
102  caloGeometry_(iConfig.getParameter<edm::ParameterSet>("caloDefinition")),
103  beamPipeRadius_(iConfig.getParameter<double>("beamPipeRadius")),
104  deltaRchargedMother_(iConfig.getParameter<double>("deltaRchargedMother")),
105  particleFilter_(iConfig.getParameter<edm::ParameterSet>("particleFilter")),
106  _randomEngine(nullptr),
107  simulateCalorimetry(iConfig.getParameter<bool>("simulateCalorimetry")),
108  simulateMuons(iConfig.getParameter<bool>("simulateMuons")) {
109  //----------------
110  // define interaction models
111  //---------------
112 
113  const edm::ParameterSet& modelCfgs = iConfig.getParameter<edm::ParameterSet>("interactionModels");
114  for (const std::string& modelName : modelCfgs.getParameterNames()) {
115  const edm::ParameterSet& modelCfg = modelCfgs.getParameter<edm::ParameterSet>(modelName);
116  std::string modelClassName(modelCfg.getParameter<std::string>("className"));
117  // Use plugin-factory to create model
118  std::unique_ptr<fastsim::InteractionModel> interactionModel(
119  fastsim::InteractionModelFactory::get()->create(modelClassName, modelName, modelCfg));
120  if (!interactionModel.get()) {
121  throw cms::Exception("FastSimProducer") << "InteractionModel " << modelName << " could not be created";
122  }
123  // Add model to list
124  interactionModels_.push_back(std::move(interactionModel));
125  // and create the map
127  }
128 
129  //----------------
130  // calorimetry
131  //---------------
132 
133  if (simulateCalorimetry) {
134  myCalorimetry =
135  std::make_unique<CalorimetryManager>(nullptr,
136  iConfig.getParameter<edm::ParameterSet>("Calorimetry"),
137  iConfig.getParameter<edm::ParameterSet>("MaterialEffectsForMuonsInECAL"),
138  iConfig.getParameter<edm::ParameterSet>("MaterialEffectsForMuonsInHCAL"),
139  iConfig.getParameter<edm::ParameterSet>("GFlash"));
140  }
141 
142  //----------------
143  // register products
144  //----------------
145 
146  // SimTracks and SimVertices
147  produces<edm::SimTrackContainer>();
148  produces<edm::SimVertexContainer>();
149  // products of interaction models, i.e. simHits
150  for (auto& interactionModel : interactionModels_) {
151  interactionModel->registerProducts(producesCollector());
152  }
153  produces<edm::PCaloHitContainer>("EcalHitsEB");
154  produces<edm::PCaloHitContainer>("EcalHitsEE");
155  produces<edm::PCaloHitContainer>("EcalHitsES");
156  produces<edm::PCaloHitContainer>("HcalHits");
157  produces<edm::SimTrackContainer>("MuonSimTracks");
158 }

References beamerCreator::create(), Exception, get, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), interactionModelMap_, interactionModels_, HLTEgPhaseIITestSequence_cff::modelName, eostools::move(), myCalorimetry, simulateCalorimetry, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~FastSimProducer()

FastSimProducer::~FastSimProducer ( )
inlineoverride

Definition at line 67 of file FastSimProducer.cc.

67 { ; }

Member Function Documentation

◆ beginStream()

void FastSimProducer::beginStream ( edm::StreamID  id)
overrideprivate

Definition at line 160 of file FastSimProducer.cc.

160  {
161  _randomEngine = std::make_unique<RandomEngineAndDistribution>(id);
162 }

References _randomEngine.

◆ createFSimTrack()

FSimTrack FastSimProducer::createFSimTrack ( fastsim::Particle particle,
fastsim::ParticleManager particleManager,
HepPDT::ParticleDataTable const &  particleTable 
)
privatevirtual

Definition at line 372 of file FastSimProducer.cc.

374  {
375  FSimTrack myFSimTrack(particle->pdgId(),
376  particleManager->getSimTrack(particle->simTrackIndex()).momentum(),
377  particle->simVertexIndex(),
378  particle->genParticleIndex(),
379  particle->simTrackIndex(),
380  particle->charge(),
381  particle->position(),
382  particle->momentum(),
383  particleManager->getSimVertex(particle->simVertexIndex()));
384 
385  // move the particle through the caloLayers
386  fastsim::LayerNavigator caloLayerNavigator(caloGeometry_);
387  const fastsim::SimplifiedGeometry* caloLayer = nullptr;
388 
389  // moveParticleToNextLayer(..) returns 0 in case that particle decays
390  // in this case particle is propagated up to its decay vertex
391  while (caloLayerNavigator.moveParticleToNextLayer(*particle, caloLayer)) {
392  LogDebug(MESSAGECATEGORY) << " moved to next caloLayer: " << *caloLayer;
393  LogDebug(MESSAGECATEGORY) << " new state: " << *particle;
394 
395  // break after 25 ns: only happens for particles stuck in loops
396  if (particle->position().T() > 50) {
397  caloLayer = nullptr;
398  break;
399  }
400 
402  // Define ParticlePropagators (RawParticle) needed for CalorimetryManager and save them
404 
405  RawParticle PP = makeParticle(&particleTable, particle->pdgId(), particle->momentum(), particle->position());
406 
407  // no material
408  if (caloLayer->getThickness(particle->position(), particle->momentum()) < 1E-10) {
409  // unfortunately needed for CalorimetryManager
410  if (caloLayer->getCaloType() == fastsim::SimplifiedGeometry::ECAL) {
411  if (!myFSimTrack.onEcal()) {
412  myFSimTrack.setEcal(PP, 0);
413  }
414  } else if (caloLayer->getCaloType() == fastsim::SimplifiedGeometry::HCAL) {
415  if (!myFSimTrack.onHcal()) {
416  myFSimTrack.setHcal(PP, 0);
417  }
418  } else if (caloLayer->getCaloType() == fastsim::SimplifiedGeometry::VFCAL) {
419  if (!myFSimTrack.onVFcal()) {
420  myFSimTrack.setVFcal(PP, 0);
421  }
422  }
423 
424  // not necessary to continue propagation
425  if (caloLayer->getCaloType() == fastsim::SimplifiedGeometry::VFCAL) {
426  myFSimTrack.setGlobal();
427  caloLayer = nullptr;
428  break;
429  }
430 
431  continue;
432  }
433 
434  // Stupid variable used by the old propagator
435  // For details check BaseParticlePropagator.h
436  int success = 0;
437  if (caloLayer->isForward()) {
438  success = 2;
439  // particle moves inwards
440  if (particle->position().Z() * particle->momentum().Z() < 0) {
441  success *= -1;
442  }
443  } else {
444  success = 1;
445  // particle moves inwards
446  if (particle->momentum().X() * particle->position().X() + particle->momentum().Y() * particle->position().Y() <
447  0) {
448  success *= -1;
449  }
450  }
451 
452  // Save the hit
454  if (!myFSimTrack.onLayer1()) {
455  myFSimTrack.setLayer1(PP, success);
456  }
457  }
458 
460  if (!myFSimTrack.onLayer2()) {
461  myFSimTrack.setLayer2(PP, success);
462  }
463  }
464 
465  if (caloLayer->getCaloType() == fastsim::SimplifiedGeometry::ECAL) {
466  if (!myFSimTrack.onEcal()) {
467  myFSimTrack.setEcal(PP, success);
468  }
469  }
470 
471  if (caloLayer->getCaloType() == fastsim::SimplifiedGeometry::HCAL) {
472  if (!myFSimTrack.onHcal()) {
473  myFSimTrack.setHcal(PP, success);
474  }
475  }
476 
477  if (caloLayer->getCaloType() == fastsim::SimplifiedGeometry::VFCAL) {
478  if (!myFSimTrack.onVFcal()) {
479  myFSimTrack.setVFcal(PP, success);
480  }
481  }
482 
483  // Particle reached end of detector
484  if (caloLayer->getCaloType() == fastsim::SimplifiedGeometry::VFCAL) {
485  myFSimTrack.setGlobal();
486  caloLayer = nullptr;
487  break;
488  }
489 
490  LogDebug(MESSAGECATEGORY) << "--------------------------------"
491  << "\n-------------------------------";
492  }
493 
494  // do decays
495  // don't have to worry about daughters if particle already within the calorimetry
496  // since they will be rejected by the vertex cut of the ParticleFilter
497  if (!particle->isStable() && particle->remainingProperLifeTimeC() < 1E-10) {
498  LogDebug(MESSAGECATEGORY) << "Decaying particle...";
499  std::vector<std::unique_ptr<fastsim::Particle> > secondaries;
500  decayer_.decay(*particle, secondaries, _randomEngine->theEngine());
501  LogDebug(MESSAGECATEGORY) << " decay has " << secondaries.size() << " products";
502  particleManager->addSecondaries(particle->position(), particle->simTrackIndex(), secondaries);
503  }
504 
505  return myFSimTrack;
506 }

References _randomEngine, fastsim::ParticleManager::addSecondaries(), caloGeometry_, fastsim::Particle::charge(), fastsim::Decayer::decay(), decayer_, fastsim::SimplifiedGeometry::ECAL, fastsim::Particle::genParticleIndex(), fastsim::SimplifiedGeometry::getCaloType(), fastsim::ParticleManager::getSimTrack(), fastsim::ParticleManager::getSimVertex(), fastsim::SimplifiedGeometry::getThickness(), fastsim::SimplifiedGeometry::HCAL, fastsim::SimplifiedGeometry::isForward(), fastsim::Particle::isStable(), LogDebug, makeParticle(), MESSAGECATEGORY, fastsim::Particle::momentum(), fastsim::LayerNavigator::moveParticleToNextLayer(), FSimTrack::onEcal(), FSimTrack::onHcal(), FSimTrack::onLayer1(), FSimTrack::onLayer2(), FSimTrack::onVFcal(), fastsim::Particle::pdgId(), fastsim::Particle::position(), fastsim::SimplifiedGeometry::PRESHOWER1, fastsim::SimplifiedGeometry::PRESHOWER2, fastsim::Particle::remainingProperLifeTimeC(), FSimTrack::setEcal(), FSimTrack::setGlobal(), FSimTrack::setHcal(), FSimTrack::setLayer1(), FSimTrack::setLayer2(), FSimTrack::setVFcal(), fastsim::Particle::simTrackIndex(), fastsim::Particle::simVertexIndex(), summarizeEdmComparisonLogfiles::success, and fastsim::SimplifiedGeometry::VFCAL.

Referenced by produce().

◆ endStream()

void FastSimProducer::endStream ( )
overrideprivate

Definition at line 370 of file FastSimProducer.cc.

370 { _randomEngine.reset(); }

References _randomEngine.

◆ produce()

void FastSimProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 164 of file FastSimProducer.cc.

164  {
165  LogDebug(MESSAGECATEGORY) << " produce";
166 
169 
170  // Define containers for SimTracks, SimVertices
171  std::unique_ptr<edm::SimTrackContainer> simTracks_(new edm::SimTrackContainer);
172  std::unique_ptr<edm::SimVertexContainer> simVertices_(new edm::SimVertexContainer);
173 
174  // Get the particle data table (in case lifetime or charge of GenParticles not set)
176  iSetup.getData(pdt);
177 
178  // Get the GenParticle collection
181 
182  // Load the ParticleManager which returns the particles that have to be propagated
183  // Creates a fastsim::Particle out of a GenParticle/secondary
184  fastsim::ParticleManager particleManager(*genParticles->GetEvent(),
185  *pdt,
189  *simTracks_,
190  *simVertices_);
191 
192  // Initialize the calorimeter geometry
193  if (simulateCalorimetry) {
194  if (watchCaloGeometry_.check(iSetup) || watchCaloTopology_.check(iSetup)) {
196  iSetup.get<CaloGeometryRecord>().get(pG);
197  myCalorimetry->getCalorimeter()->setupGeometry(*pG);
198 
199  edm::ESHandle<CaloTopology> theCaloTopology;
200  iSetup.get<CaloTopologyRecord>().get(theCaloTopology);
201  myCalorimetry->getCalorimeter()->setupTopology(*theCaloTopology);
202  myCalorimetry->getCalorimeter()->initialize(geometry_.getMagneticFieldZ(math::XYZTLorentzVector(0., 0., 0., 0.)));
203 
204  myCalorimetry->getHFShowerLibrary()->initHFShowerLibrary(iSetup);
205  }
206 
207  // Important: this also cleans the calorimetry information from the last event
208  myCalorimetry->initialize(_randomEngine.get());
209  }
210 
211  // The vector of SimTracks needed for the CalorimetryManager
212  std::vector<FSimTrack> myFSimTracks;
213 
214  LogDebug(MESSAGECATEGORY) << "################################"
215  << "\n###############################";
216 
217  // loop over particles
218  for (std::unique_ptr<fastsim::Particle> particle = particleManager.nextParticle(*_randomEngine); particle != nullptr;
219  particle = particleManager.nextParticle(*_randomEngine)) {
220  LogDebug(MESSAGECATEGORY) << "\n moving NEXT particle: " << *particle;
221 
222  // -----------------------------
223  // This condition is necessary because of hack for calorimetry
224  // -> The CalorimetryManager should also be implemented based on this new FastSim classes (Particle.h) in a future project.
225  // A second loop (below) loops over all parts of the calorimetry in order to create a track of the old FastSim class FSimTrack.
226  // The condition below (R<128, z<302) makes sure that the particle geometrically is outside the tracker boundaries
227  // -----------------------------
228 
229  if (particle->position().Perp2() < 128. * 128. && std::abs(particle->position().Z()) < 302.) {
230  // move the particle through the layers
231  fastsim::LayerNavigator layerNavigator(geometry_);
232  const fastsim::SimplifiedGeometry* layer = nullptr;
233 
234  // moveParticleToNextLayer(..) returns 0 in case that particle decays
235  // in this case particle is propagated up to its decay vertex
236  while (layerNavigator.moveParticleToNextLayer(*particle, layer)) {
237  LogDebug(MESSAGECATEGORY) << " moved to next layer: " << *layer;
238  LogDebug(MESSAGECATEGORY) << " new state: " << *particle;
239 
240  // Hack to interface "old" calo to "new" tracking
241  // Particle reached calorimetry so stop further propagation
243  layer = nullptr;
244  // particle no longer is on a layer
245  particle->resetOnLayer();
246  break;
247  }
248 
249  // break after 25 ns: only happens for particles stuck in loops
250  if (particle->position().T() > 25) {
251  layer = nullptr;
252  // particle no longer is on a layer
253  particle->resetOnLayer();
254  break;
255  }
256 
257  // perform interaction between layer and particle
258  // do only if there is actual material
259  if (layer->getThickness(particle->position(), particle->momentum()) > 1E-10) {
260  int nSecondaries = 0;
261  // loop on interaction models
262  for (fastsim::InteractionModel* interactionModel : layer->getInteractionModels()) {
263  LogDebug(MESSAGECATEGORY) << " interact with " << *interactionModel;
264  std::vector<std::unique_ptr<fastsim::Particle> > secondaries;
265  interactionModel->interact(*particle, *layer, secondaries, *_randomEngine);
266  nSecondaries += secondaries.size();
267  particleManager.addSecondaries(particle->position(), particle->simTrackIndex(), secondaries, layer);
268  }
269 
270  // kinematic cuts: particle might e.g. lost all its energy
271  if (!particleFilter_.acceptsEn(*particle)) {
272  // Add endvertex if particle did not create any secondaries
273  if (nSecondaries == 0)
274  particleManager.addEndVertex(particle.get());
275  layer = nullptr;
276  break;
277  }
278  }
279 
280  LogDebug(MESSAGECATEGORY) << "--------------------------------"
281  << "\n-------------------------------";
282  }
283 
284  // do decays
285  if (!particle->isStable() && particle->remainingProperLifeTimeC() < 1E-10) {
286  LogDebug(MESSAGECATEGORY) << "Decaying particle...";
287  std::vector<std::unique_ptr<fastsim::Particle> > secondaries;
288  decayer_.decay(*particle, secondaries, _randomEngine->theEngine());
289  LogDebug(MESSAGECATEGORY) << " decay has " << secondaries.size() << " products";
290  particleManager.addSecondaries(particle->position(), particle->simTrackIndex(), secondaries);
291  continue;
292  }
293 
294  LogDebug(MESSAGECATEGORY) << "################################"
295  << "\n###############################";
296  }
297 
298  // -----------------------------
299  // Hack to interface "old" calorimetry with "new" propagation in tracker
300  // The CalorimetryManager has to know which particle could in principle hit which parts of the calorimeter
301  // I think it's a bit strange to propagate the particle even further (and even decay it) if it already hits
302  // some part of the calorimetry but this is how the code works...
303  // -----------------------------
304 
305  if (particle->position().Perp2() >= 128. * 128. || std::abs(particle->position().Z()) >= 302.) {
306  LogDebug(MESSAGECATEGORY) << "\n moving particle to calorimetry: " << *particle;
307 
308  // create FSimTrack (this is the object the old propagation uses)
309  myFSimTracks.push_back(createFSimTrack(particle.get(), &particleManager, *pdt));
310  // particle was decayed
311  if (!particle->isStable() && particle->remainingProperLifeTimeC() < 1E-10) {
312  continue;
313  }
314 
315  LogDebug(MESSAGECATEGORY) << "################################"
316  << "\n###############################";
317  }
318 
319  // -----------------------------
320  // End Hack
321  // -----------------------------
322 
323  LogDebug(MESSAGECATEGORY) << "################################"
324  << "\n###############################";
325  }
326 
327  // store simTracks and simVertices
328  iEvent.put(std::move(simTracks_));
329  iEvent.put(std::move(simVertices_));
330  // store products of interaction models, i.e. simHits
331  for (auto& interactionModel : interactionModels_) {
332  interactionModel->storeProducts(iEvent);
333  }
334 
335  // -----------------------------
336  // Calorimetry Manager
337  // -----------------------------
338  if (simulateCalorimetry) {
339  for (auto myFSimTrack : myFSimTracks) {
340  myCalorimetry->reconstructTrack(myFSimTrack, _randomEngine.get());
341  }
342  }
343 
344  // -----------------------------
345  // Store Hits
346  // -----------------------------
347  std::unique_ptr<edm::PCaloHitContainer> p4(new edm::PCaloHitContainer);
348  std::unique_ptr<edm::PCaloHitContainer> p5(new edm::PCaloHitContainer);
349  std::unique_ptr<edm::PCaloHitContainer> p6(new edm::PCaloHitContainer);
350  std::unique_ptr<edm::PCaloHitContainer> p7(new edm::PCaloHitContainer);
351 
352  std::unique_ptr<edm::SimTrackContainer> m1(new edm::SimTrackContainer);
353 
354  if (simulateCalorimetry) {
355  myCalorimetry->loadFromEcalBarrel(*p4);
356  myCalorimetry->loadFromEcalEndcap(*p5);
357  myCalorimetry->loadFromPreshower(*p6);
358  myCalorimetry->loadFromHcal(*p7);
359  if (simulateMuons) {
360  myCalorimetry->harvestMuonSimTracks(*m1);
361  }
362  }
363  iEvent.put(std::move(p4), "EcalHitsEB");
364  iEvent.put(std::move(p5), "EcalHitsEE");
365  iEvent.put(std::move(p6), "EcalHitsES");
366  iEvent.put(std::move(p7), "HcalHits");
367  iEvent.put(std::move(m1), "MuonSimTracks");
368 }

References _randomEngine, funct::abs(), fastsim::ParticleFilter::acceptsEn(), beamPipeRadius_, caloGeometry_, edm::ESWatcher< T >::check(), createFSimTrack(), fastsim::Decayer::decay(), decayer_, deltaRchargedMother_, genParticles2HepMC_cfi::genParticles, genParticlesToken_, geometry_, edm::EventSetup::get(), get, fastsim::SimplifiedGeometry::getCaloType(), edm::EventSetup::getData(), fastsim::SimplifiedGeometry::getInteractionModels(), fastsim::Geometry::getMagneticFieldZ(), fastsim::SimplifiedGeometry::getThickness(), iEvent, interactionModelMap_, interactionModels_, LogDebug, MESSAGECATEGORY, eostools::move(), fastsim::LayerNavigator::moveParticleToNextLayer(), myCalorimetry, p4, particleFilter_, simulateCalorimetry, simulateMuons, fastsim::SimplifiedGeometry::TRACKERBOUNDARY, fastsim::Geometry::update(), watchCaloGeometry_, and watchCaloTopology_.

Member Data Documentation

◆ _randomEngine

std::unique_ptr<RandomEngineAndDistribution> FastSimProducer::_randomEngine
private

The random engine.

Definition at line 83 of file FastSimProducer.cc.

Referenced by beginStream(), createFSimTrack(), endStream(), and produce().

◆ beamPipeRadius_

double FastSimProducer::beamPipeRadius_
private

The radius of the beampipe.

Definition at line 80 of file FastSimProducer.cc.

Referenced by produce().

◆ caloGeometry_

fastsim::Geometry FastSimProducer::caloGeometry_
private

Hack to interface "old" calo to "new" tracking.

Definition at line 79 of file FastSimProducer.cc.

Referenced by createFSimTrack(), and produce().

◆ decayer_

fastsim::Decayer FastSimProducer::decayer_
private

Handles decays of non-stable particles using pythia.

Definition at line 91 of file FastSimProducer.cc.

Referenced by createFSimTrack(), and produce().

◆ deltaRchargedMother_

double FastSimProducer::deltaRchargedMother_
private

Cut on deltaR for ClosestChargedDaughter algorithm (FastSim tracking)

Definition at line 81 of file FastSimProducer.cc.

Referenced by produce().

◆ genParticlesToken_

edm::EDGetTokenT<edm::HepMCProduct> FastSimProducer::genParticlesToken_
private

Token to get the genParticles.

Definition at line 77 of file FastSimProducer.cc.

Referenced by produce().

◆ geometry_

fastsim::Geometry FastSimProducer::geometry_
private

The definition of the tracker according to python config.

Definition at line 78 of file FastSimProducer.cc.

Referenced by produce().

◆ interactionModelMap_

std::map<std::string, fastsim::InteractionModel*> FastSimProducer::interactionModelMap_
private

Each interaction model has a unique name.

Definition at line 93 of file FastSimProducer.cc.

Referenced by FastSimProducer(), and produce().

◆ interactionModels_

std::vector<std::unique_ptr<fastsim::InteractionModel> > FastSimProducer::interactionModels_
private

All defined interaction models.

Definition at line 92 of file FastSimProducer.cc.

Referenced by FastSimProducer(), and produce().

◆ MESSAGECATEGORY

const std::string FastSimProducer::MESSAGECATEGORY = "FastSimulation"
staticprivate

Category of debugging messages ("FastSimulation")

Definition at line 94 of file FastSimProducer.cc.

Referenced by createFSimTrack(), and produce().

◆ myCalorimetry

std::unique_ptr<CalorimetryManager> FastSimProducer::myCalorimetry
private

Definition at line 88 of file FastSimProducer.cc.

Referenced by FastSimProducer(), and produce().

◆ particleFilter_

fastsim::ParticleFilter FastSimProducer::particleFilter_
private

Decides which particles have to be propagated.

Definition at line 82 of file FastSimProducer.cc.

Referenced by produce().

◆ simulateCalorimetry

bool FastSimProducer::simulateCalorimetry
private

Definition at line 85 of file FastSimProducer.cc.

Referenced by FastSimProducer(), and produce().

◆ simulateMuons

bool FastSimProducer::simulateMuons
private

Definition at line 89 of file FastSimProducer.cc.

Referenced by produce().

◆ watchCaloGeometry_

edm::ESWatcher<CaloGeometryRecord> FastSimProducer::watchCaloGeometry_
private

Definition at line 86 of file FastSimProducer.cc.

Referenced by produce().

◆ watchCaloTopology_

edm::ESWatcher<CaloTopologyRecord> FastSimProducer::watchCaloTopology_
private

Definition at line 87 of file FastSimProducer.cc.

Referenced by produce().

edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
fastsim::Particle::momentum
const math::XYZTLorentzVector & momentum() const
Return momentum of the particle.
Definition: Particle.h:143
RawParticle
Definition: RawParticle.h:37
genParticles2HepMC_cfi.genParticles
genParticles
Definition: genParticles2HepMC_cfi.py:4
makeParticle
RawParticle makeParticle(HepPDT::ParticleDataTable const *, int id, const math::XYZTLorentzVector &p)
Definition: makeParticle.cc:28
FastSimProducer::interactionModels_
std::vector< std::unique_ptr< fastsim::InteractionModel > > interactionModels_
All defined interaction models.
Definition: FastSimProducer.cc:92
FastSimProducer::interactionModelMap_
std::map< std::string, fastsim::InteractionModel * > interactionModelMap_
Each interaction model has a unique name.
Definition: FastSimProducer.cc:93
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
fastsim::SimplifiedGeometry
Implementation of a generic detector layer (base class for forward/barrel layers).
Definition: SimplifiedGeometry.h:35
fastsim::SimplifiedGeometry::getCaloType
CaloType getCaloType() const
Hack to interface "old" Calorimetry with "new" Tracker.
Definition: SimplifiedGeometry.h:65
FastSimProducer::decayer_
fastsim::Decayer decayer_
Handles decays of non-stable particles using pythia.
Definition: FastSimProducer.cc:91
CaloTopologyRecord
Definition: CaloTopologyRecord.h:10
fastsim::Particle::simTrackIndex
int simTrackIndex() const
Return index of the SimTrack.
Definition: Particle.h:153
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: beamerCreator.py:44
FastSimProducer::myCalorimetry
std::unique_ptr< CalorimetryManager > myCalorimetry
Definition: FastSimProducer.cc:88
edm::Handle< edm::HepMCProduct >
FastSimProducer::_randomEngine
std::unique_ptr< RandomEngineAndDistribution > _randomEngine
The random engine.
Definition: FastSimProducer.cc:83
fastsim::InteractionModel
Base class for any interaction model between a particle and a tracker layer.
Definition: InteractionModel.h:29
HLTEgPhaseIITestSequence_cff.modelName
modelName
Definition: HLTEgPhaseIITestSequence_cff.py:16
FastSimProducer::particleFilter_
fastsim::ParticleFilter particleFilter_
Decides which particles have to be propagated.
Definition: FastSimProducer.cc:82
fastsim::SimplifiedGeometry::getThickness
virtual const double getThickness(const math::XYZTLorentzVector &position) const =0
Return thickness of the layer at a given position.
fastsim::ParticleManager
Manages GenParticles and Secondaries from interactions.
Definition: ParticleManager.h:36
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
fastsim::SimplifiedGeometry::HCAL
Definition: SimplifiedGeometry.h:59
FastSimProducer::createFSimTrack
virtual FSimTrack createFSimTrack(fastsim::Particle *particle, fastsim::ParticleManager *particleManager, HepPDT::ParticleDataTable const &particleTable)
Definition: FastSimProducer.cc:372
fastsim::LayerNavigator
Handles/tracks (possible) intersections of particle's trajectory and tracker layers.
Definition: LayerNavigator.h:48
fastsim::Geometry::getMagneticFieldZ
double getMagneticFieldZ(const math::XYZTLorentzVector &position) const
Initializes the tracker geometry.
Definition: Geometry.cc:155
edm::ESHandle< HepPDT::ParticleDataTable >
summarizeEdmComparisonLogfiles.success
success
Definition: summarizeEdmComparisonLogfiles.py:115
FastSimProducer::caloGeometry_
fastsim::Geometry caloGeometry_
Hack to interface "old" calo to "new" tracking.
Definition: FastSimProducer.cc:79
FastSimProducer::genParticlesToken_
edm::EDGetTokenT< edm::HepMCProduct > genParticlesToken_
Token to get the genParticles.
Definition: FastSimProducer.cc:77
fastsim::SimplifiedGeometry::TRACKERBOUNDARY
Definition: SimplifiedGeometry.h:59
fastsim::Particle::position
const math::XYZTLorentzVector & position() const
Return position of the particle.
Definition: Particle.h:140
fastsim::Particle::isStable
bool isStable() const
Returns true if particle is considered stable.
Definition: Particle.h:171
FastSimProducer::beamPipeRadius_
double beamPipeRadius_
The radius of the beampipe.
Definition: FastSimProducer.cc:80
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
fastsim::SimplifiedGeometry::getInteractionModels
const std::vector< InteractionModel * > & getInteractionModels() const
Return the vector of all interaction models that are assigned with a layer.
Definition: SimplifiedGeometry.h:146
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
edm::ParameterSet
Definition: ParameterSet.h:47
fastsim::ParticleManager::getSimVertex
const SimVertex getSimVertex(unsigned i)
Returns the position of a given SimVertex. Needed for interfacing the code with the old calorimetry.
Definition: ParticleManager.h:82
fastsim::Particle::pdgId
int pdgId() const
Return pdgId of the particle.
Definition: Particle.h:134
FastSimProducer::watchCaloGeometry_
edm::ESWatcher< CaloGeometryRecord > watchCaloGeometry_
Definition: FastSimProducer.cc:86
edm::ParameterSet::getParameterNames
std::vector< std::string > getParameterNames() const
Definition: ParameterSet.cc:663
iEvent
int iEvent
Definition: GenABIO.cc:224
fastsim::Decayer::decay
void decay(const Particle &particle, std::vector< std::unique_ptr< Particle > > &secondaries, CLHEP::HepRandomEngine &engine) const
Decay particle using pythia.
Definition: Decayer.cc:29
fastsim::Particle::charge
double charge() const
Return charge of the particle.
Definition: Particle.h:137
p4
double p4[4]
Definition: TauolaWrapper.h:92
fastsim::ParticleManager::addSecondaries
void addSecondaries(const math::XYZTLorentzVector &vertexPosition, int motherSimTrackId, std::vector< std::unique_ptr< Particle > > &secondaries, const SimplifiedGeometry *layer=nullptr)
Adds secondaries that are produced by any of the interactions (or particle decay) to the buffer.
Definition: ParticleManager.cc:119
fastsim::Particle::genParticleIndex
int genParticleIndex() const
Return index of the particle in the genParticle vector.
Definition: Particle.h:165
fastsim::ParticleManager::getSimTrack
const SimTrack getSimTrack(unsigned i)
Returns a given SimTrack. Needed for interfacing the code with the old calorimetry.
Definition: ParticleManager.h:85
get
#define get
FastSimProducer::geometry_
fastsim::Geometry geometry_
The definition of the tracker according to python config.
Definition: FastSimProducer.cc:78
FastSimProducer::MESSAGECATEGORY
static const std::string MESSAGECATEGORY
Category of debugging messages ("FastSimulation")
Definition: FastSimProducer.cc:94
FastSimProducer::simulateCalorimetry
bool simulateCalorimetry
Definition: FastSimProducer.cc:85
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:120
eostools.move
def move(src, dest)
Definition: eostools.py:511
fastsim::SimplifiedGeometry::PRESHOWER1
Definition: SimplifiedGeometry.h:59
edm::SimTrackContainer
std::vector< SimTrack > SimTrackContainer
Definition: SimTrackContainer.h:12
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
Exception
Definition: hltDiff.cc:246
fastsim::SimplifiedGeometry::VFCAL
Definition: SimplifiedGeometry.h:59
FastSimProducer::simulateMuons
bool simulateMuons
Definition: FastSimProducer.cc:89
fastsim::ParticleFilter::acceptsEn
bool acceptsEn(const Particle &particle) const
Kinematic cuts on the particle.
Definition: ParticleFilter.cc:61
fastsim::Particle::remainingProperLifeTimeC
double remainingProperLifeTimeC() const
Return the particle's remaining proper lifetime[in ct].
Definition: Particle.h:150
edm::PCaloHitContainer
std::vector< PCaloHit > PCaloHitContainer
Definition: PCaloHitContainer.h:8
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
fastsim::SimplifiedGeometry::ECAL
Definition: SimplifiedGeometry.h:59
fastsim::SimplifiedGeometry::isForward
virtual bool isForward() const =0
Returns false/true depending if the object is a (non-abstract) barrel/forward layer.
FSimTrack
Definition: FSimTrack.h:30
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
FastSimProducer::deltaRchargedMother_
double deltaRchargedMother_
Cut on deltaR for ClosestChargedDaughter algorithm (FastSim tracking)
Definition: FastSimProducer.cc:81
edm::SimVertexContainer
std::vector< SimVertex > SimVertexContainer
Definition: SimVertexContainer.h:12
edm::InputTag
Definition: InputTag.h:15
fastsim::Particle::simVertexIndex
int simVertexIndex() const
Return index of the origin vertex.
Definition: Particle.h:159
fastsim::SimplifiedGeometry::PRESHOWER2
Definition: SimplifiedGeometry.h:59
fastsim::Geometry::update
void update(const edm::EventSetup &iSetup, const std::map< std::string, InteractionModel * > &interactionModelMap)
Initializes the tracker geometry.
Definition: Geometry.cc:50
FastSimProducer::watchCaloTopology_
edm::ESWatcher< CaloTopologyRecord > watchCaloTopology_
Definition: FastSimProducer.cc:87