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 hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () 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.reset(new CalorimetryManager(nullptr,
135  iConfig.getParameter<edm::ParameterSet>("Calorimetry"),
136  iConfig.getParameter<edm::ParameterSet>("MaterialEffectsForMuonsInECAL"),
137  iConfig.getParameter<edm::ParameterSet>("MaterialEffectsForMuonsInHCAL"),
138  iConfig.getParameter<edm::ParameterSet>("GFlash")));
139  }
140 
141  //----------------
142  // register products
143  //----------------
144 
145  // SimTracks and SimVertices
146  produces<edm::SimTrackContainer>();
147  produces<edm::SimVertexContainer>();
148  // products of interaction models, i.e. simHits
149  for (auto& interactionModel : interactionModels_) {
150  interactionModel->registerProducts(producesCollector());
151  }
152  produces<edm::PCaloHitContainer>("EcalHitsEB");
153  produces<edm::PCaloHitContainer>("EcalHitsEE");
154  produces<edm::PCaloHitContainer>("EcalHitsES");
155  produces<edm::PCaloHitContainer>("HcalHits");
156  produces<edm::SimTrackContainer>("MuonSimTracks");
157 }

References beamerCreator::create(), Exception, get, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), interactionModelMap_, interactionModels_, ecalBarrelClusterFastTimer_cfi::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 159 of file FastSimProducer.cc.

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

References _randomEngine.

◆ createFSimTrack()

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

Definition at line 371 of file FastSimProducer.cc.

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

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 369 of file FastSimProducer.cc.

369 { _randomEngine.reset(); }

References _randomEngine.

◆ produce()

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

Definition at line 163 of file FastSimProducer.cc.

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

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
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:73
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:371
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:154
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:670
edm::ParameterSet
Definition: ParameterSet.h:36
CalorimetryManager
Definition: CalorimetryManager.h:45
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:656
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:28
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
ecalBarrelClusterFastTimer_cfi.modelName
modelName
Definition: ecalBarrelClusterFastTimer_cfi.py:10
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:113
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
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
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:49
FastSimProducer::watchCaloTopology_
edm::ESWatcher< CaloTopologyRecord > watchCaloTopology_
Definition: FastSimProducer.cc:87