CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
FBaseSimEvent Class Reference

#include <FBaseSimEvent.h>

Inheritance diagram for FBaseSimEvent:
FSimEvent

Public Member Functions

void addChargedTrack (int id)
 Add an id in the vector of charged tracks id's. More...
 
void addParticles (const HepMC::GenEvent &hev)
 Add the particles and their vertices to the list. More...
 
int addSimTrack (const RawParticle *p, int iv, int ig=-1, const HepMC::GenVertex *ev=nullptr)
 Add a new track to the Event and to the various lists. More...
 
int addSimVertex (const XYZTLorentzVector &decayVertex, int im=-1, FSimVertexType::VertexType type=FSimVertexType::ANY)
 Add a new vertex to the Event and to the various lists. More...
 
int chargedTrack (int id) const
 return "reconstructed" charged tracks index. More...
 
void clear ()
 clear the FBaseSimEvent content before the next event More...
 
const HepMC::GenParticle * embdGenpart (int i) const
 return MC track with a given id More...
 
const SimTrackembdTrack (int i) const
 return embedded track with given id More...
 
const SimVertexembdVertex (int i) const
 return embedded vertex with given id More...
 
const FSimVertexTypeembdVertexType (int i) const
 return embedded vertex type with given id More...
 
 FBaseSimEvent (const edm::ParameterSet &kine)
 Default constructor. More...
 
void fill (const HepMC::GenEvent &hev)
 fill the FBaseSimEvent from the current HepMC::GenEvent More...
 
void fill (const std::vector< SimTrack > &, const std::vector< SimVertex > &)
 fill the FBaseSimEvent from SimTrack's and SimVert'ices More...
 
const KineParticleFilterfilter () const
 
void initializePdt (const HepPDT::ParticleDataTable *aPdt)
 Initialize the particle data table. More...
 
unsigned int nChargedTracks () const
 Number of "reconstructed" charged tracks. More...
 
unsigned int nGenParts () const
 Number of generator particles. More...
 
unsigned int nTracks () const
 Number of tracks. More...
 
unsigned int nVertices () const
 Number of vertices. More...
 
void print () const
 print the FBaseSimEvent in an intelligible way More...
 
void printMCTruth (const HepMC::GenEvent &hev)
 print the original MCTruth event More...
 
const HepPDT::ParticleDataTabletheTable () const
 Get the pointer to the particle data table. More...
 
FSimTracktrack (int id) const
 Return track with given Id. More...
 
FSimVertexvertex (int id) const
 Return vertex with given Id. More...
 
FSimVertexTypevertexType (int id) const
 Return vertex with given Id. More...
 
 ~FBaseSimEvent ()
 usual virtual destructor More...
 

Protected Member Functions

std::vector< HepMC::GenParticle * > * genparts () const
 The pointer to the vector of GenParticle's. More...
 
std::vector< FSimTrack > * tracks () const
 The pointer to the vector of FSimTrack's. More...
 
std::vector< FSimVertex > * vertices () const
 The pointer to the vector of FSimVertex's. More...
 

Private Attributes

unsigned int initialSize
 
double lateVertexPosition
 
KineParticleFiltermyFilter
 The particle filter. More...
 
unsigned int nChargedParticleTracks
 
unsigned int nGenParticles
 
unsigned int nSimTracks
 
unsigned int nSimVertices
 
const ParticleDataTablepdt
 
double sigmaVerteX
 
double sigmaVerteY
 
double sigmaVerteZ
 
unsigned int theChargedSize
 
std::vector< unsigned > * theChargedTracks
 
FSimVertexTypeCollectiontheFSimVerticesType
 
std::vector< HepMC::GenParticle * > * theGenParticles
 
unsigned int theGenSize
 
std::vector< FSimTrack > * theSimTracks
 
std::vector< FSimVertex > * theSimVertices
 
unsigned int theTrackSize
 
unsigned int theVertexSize
 

Detailed Description

Definition at line 42 of file FBaseSimEvent.h.

Constructor & Destructor Documentation

◆ FBaseSimEvent()

FBaseSimEvent::FBaseSimEvent ( const edm::ParameterSet kine)

Default constructor.

Definition at line 32 of file FBaseSimEvent.cc.

References initialSize, lateVertexPosition, myFilter, theChargedSize, theChargedTracks, theFSimVerticesType, theGenParticles, theGenSize, theSimTracks, theSimVertices, theTrackSize, and theVertexSize.

34  // Initialize the vectors of particles and vertices
35  theGenParticles = new std::vector<HepMC::GenParticle*>();
36  theSimTracks = new std::vector<FSimTrack>;
37  theSimVertices = new std::vector<FSimVertex>;
38  theChargedTracks = new std::vector<unsigned>();
40 
41  // Reserve some size to avoid mutiple copies
42  /* */
43  theSimTracks->resize(initialSize);
44  theSimVertices->resize(initialSize);
52  /* */
53 
54  // Initialize the Particle filter
55  myFilter = new KineParticleFilter(kine);
56 
57  // Initialize the distance from (0,0,0) after which *generated* particles are
58  // no longer considered - because the mother could have interacted before.
59  // unit : cm x cm
60  lateVertexPosition = 2.5 * 2.5;
61 }
double lateVertexPosition
std::vector< FSimTrack > * theSimTracks
std::vector< unsigned > * theChargedTracks
unsigned int theTrackSize
unsigned int theVertexSize
KineParticleFilter * myFilter
The particle filter.
unsigned int nSimTracks
unsigned int theGenSize
unsigned int nSimVertices
std::vector< FSimVertexType > FSimVertexTypeCollection
collection of FSimVertexType objects
unsigned int nGenParticles
unsigned int initialSize
std::vector< FSimVertex > * theSimVertices
unsigned int theChargedSize
unsigned int nChargedParticleTracks
std::vector< HepMC::GenParticle * > * theGenParticles
FSimVertexTypeCollection * theFSimVerticesType

◆ ~FBaseSimEvent()

FBaseSimEvent::~FBaseSimEvent ( )

usual virtual destructor

Definition at line 63 of file FBaseSimEvent.cc.

References myFilter, theChargedTracks, theFSimVerticesType, theGenParticles, theSimTracks, and theSimVertices.

63  {
64  // Clear the vectors
65  theGenParticles->clear();
66  theSimTracks->clear();
67  theSimVertices->clear();
68  theChargedTracks->clear();
69  theFSimVerticesType->clear();
70 
71  // Delete
72  delete theGenParticles;
73  delete theSimTracks;
74  delete theSimVertices;
75  delete theChargedTracks;
76  delete theFSimVerticesType;
77  delete myFilter;
78 }
std::vector< FSimTrack > * theSimTracks
std::vector< unsigned > * theChargedTracks
KineParticleFilter * myFilter
The particle filter.
std::vector< FSimVertex > * theSimVertices
std::vector< HepMC::GenParticle * > * theGenParticles
FSimVertexTypeCollection * theFSimVerticesType

Member Function Documentation

◆ addChargedTrack()

void FBaseSimEvent::addChargedTrack ( int  id)

Add an id in the vector of charged tracks id's.

Definition at line 651 of file FBaseSimEvent.cc.

References l1ctLayer2EG_cff::id, nChargedParticleTracks, theChargedSize, and theChargedTracks.

651  {
652  (*theChargedTracks)[nChargedParticleTracks++] = id;
654  theChargedSize *= 2;
656  }
657 }
std::vector< unsigned > * theChargedTracks
unsigned int theChargedSize
unsigned int nChargedParticleTracks

◆ addParticles()

void FBaseSimEvent::addParticles ( const HepMC::GenEvent hev)

Add the particles and their vertices to the list.

Some internal array to work with.

Definition at line 311 of file FBaseSimEvent.cc.

References funct::abs(), KineParticleFilter::acceptVertex(), addSimTrack(), addSimVertex(), FSimVertexType::DECAY_VERTEX, MillePedeFileConverter_cfg::e, GenParticle::GenParticle, lateVertexPosition, makeParticle(), objects.autophobj::motherId, myFilter, nGenParticles, nGenParts(), hltrates_dqm_sourceclient-live_cfg::offset, AlCaHLTBitMon_ParallelJobs::p, FSimVertex::position(), FSimVertexType::PRIMARY_VERTEX, BeamMonitor_cff::primaryVertex, theGenParticles, theGenSize, theTable(), and vertex().

Referenced by fill().

311  {
313  int genEventSize = myGenEvent.particles_size();
314  std::vector<int> myGenVertices(genEventSize, static_cast<int>(0));
315 
316  // If no particles, no work to be done !
317  if (myGenEvent.particles_empty())
318  return;
319 
320  // Are there particles in the FSimEvent already ?
321  int offset = nGenParts();
322 
323  // Primary vertex
324  HepMC::GenVertex* primaryVertex = *(myGenEvent.vertices_begin());
325 
326  // unit transformation (needs review)
327  XYZTLorentzVector primaryVertexPosition(primaryVertex->position().x() / 10.,
328  primaryVertex->position().y() / 10.,
329  primaryVertex->position().z() / 10.,
330  primaryVertex->position().t() / 10.);
331 
332  // This is the main vertex index
333  int mainVertex = addSimVertex(primaryVertexPosition, -1, FSimVertexType::PRIMARY_VERTEX);
334 
335  int initialBarcode = 0;
336  if (myGenEvent.particles_begin() != myGenEvent.particles_end()) {
337  initialBarcode = (*myGenEvent.particles_begin())->barcode();
338  }
339 
340  // Loop on the particles of the generated event
341  for (auto piter = myGenEvent.particles_begin(); piter != myGenEvent.particles_end(); ++piter) {
342  // This is the generated particle pointer - for the signal event only
343  HepMC::GenParticle* p = *piter;
344 
345  if (!offset) {
346  (*theGenParticles)[nGenParticles++] = p;
348  theGenSize *= 2;
349  theGenParticles->resize(theGenSize);
350  }
351  }
352 
353  // Reject particles with late origin vertex (i.e., coming from late decays)
354  // This should not happen, but one never knows what users may be up to!
355  // For example exotic particles might decay late - keep the decay products in the case.
356  XYZTLorentzVector productionVertexPosition(0., 0., 0., 0.);
357  HepMC::GenVertex* productionVertex = p->production_vertex();
358  if (productionVertex) {
359  unsigned productionMother = productionVertex->particles_in_size();
360  if (productionMother) {
361  unsigned motherId = (*(productionVertex->particles_in_const_begin()))->pdg_id();
362  if (motherId < 1000000)
363  productionVertexPosition = XYZTLorentzVector(productionVertex->position().x() / 10.,
364  productionVertex->position().y() / 10.,
365  productionVertex->position().z() / 10.,
366  productionVertex->position().t() / 10.);
367  }
368  }
369  if (!myFilter->acceptVertex(productionVertexPosition))
370  continue;
371 
372  int abspdgId = std::abs(p->pdg_id());
373  HepMC::GenVertex* endVertex = p->end_vertex();
374 
375  // Keep only:
376  // 1) Stable particles (watch out! New status code = 1001!)
377  bool testStable = p->status() % 1000 == 1;
378  // Declare stable standard particles that decay after a macroscopic path length
379  // (except if exotic)
380  if (p->status() == 2 && abspdgId < 1000000) {
381  if (endVertex) {
382  XYZTLorentzVector decayPosition = XYZTLorentzVector(endVertex->position().x() / 10.,
383  endVertex->position().y() / 10.,
384  endVertex->position().z() / 10.,
385  endVertex->position().t() / 10.);
386  // If the particle flew enough to be beyond the beam pipe enveloppe, just declare it stable
387  if (decayPosition.Perp2() > lateVertexPosition)
388  testStable = true;
389  }
390  }
391 
392  // 2) or particles with stable daughters (watch out! New status code = 1001!)
393  bool testDaugh = false;
394  if (!testStable && p->status() == 2 && endVertex && endVertex->particles_out_size()) {
395  HepMC::GenVertex::particles_out_const_iterator firstDaughterIt = endVertex->particles_out_const_begin();
396  HepMC::GenVertex::particles_out_const_iterator lastDaughterIt = endVertex->particles_out_const_end();
397  for (; firstDaughterIt != lastDaughterIt; ++firstDaughterIt) {
398  HepMC::GenParticle* daugh = *firstDaughterIt;
399  if (daugh->status() % 1000 == 1) {
400  // Check that it is not a "prompt electron or muon brem":
401  if (abspdgId == 11 || abspdgId == 13) {
402  if (endVertex) {
403  XYZTLorentzVector endVertexPosition = XYZTLorentzVector(endVertex->position().x() / 10.,
404  endVertex->position().y() / 10.,
405  endVertex->position().z() / 10.,
406  endVertex->position().t() / 10.);
407  // If the particle flew enough to be beyond the beam pipe enveloppe, just declare it stable
408  if (endVertexPosition.Perp2() < lateVertexPosition) {
409  break;
410  }
411  }
412  }
413  testDaugh = true;
414  break;
415  }
416  }
417  }
418 
419  // 3) or particles that fly more than one micron.
420  double dist = 0.;
421  if (!testStable && !testDaugh && p->production_vertex()) {
422  XYZTLorentzVector productionVertexPosition(p->production_vertex()->position().x() / 10.,
423  p->production_vertex()->position().y() / 10.,
424  p->production_vertex()->position().z() / 10.,
425  p->production_vertex()->position().t() / 10.);
426  dist = (primaryVertexPosition - productionVertexPosition).Vect().Mag2();
427  }
428  bool testDecay = (dist > 1e-8) ? true : false;
429 
430  // Save the corresponding particle and vertices
431  if (testStable || testDaugh || testDecay) {
432  /*
433  const HepMC::GenParticle* mother = p->production_vertex() ?
434  *(p->production_vertex()->particles_in_const_begin()) : 0;
435  */
436 
437  int motherBarcode = p->production_vertex() && p->production_vertex()->particles_in_const_begin() !=
438  p->production_vertex()->particles_in_const_end()
439  ? (*(p->production_vertex()->particles_in_const_begin()))->barcode()
440  : 0;
441 
442  int originVertex = motherBarcode && myGenVertices[motherBarcode - initialBarcode]
443  ? myGenVertices[motherBarcode - initialBarcode]
444  : mainVertex;
445 
446  XYZTLorentzVector momentum(p->momentum().px(), p->momentum().py(), p->momentum().pz(), p->momentum().e());
447  RawParticle part = makeParticle(theTable(), p->pdg_id(), momentum, vertex(originVertex).position());
448 
449  // Add the particle to the event and to the various lists
450 
451  int theTrack = testStable && p->end_vertex() ?
452  // The particle is scheduled to decay
453  addSimTrack(&part, originVertex, nGenParts() - offset, p->end_vertex())
454  :
455  // The particle is not scheduled to decay
456  addSimTrack(&part, originVertex, nGenParts() - offset);
457 
458  if (
459  // This one deals with particles with no end vertex
460  !p->end_vertex() ||
461  // This one deals with particles that have a pre-defined
462  // decay proper time, but have not decayed yet
463  (testStable && p->end_vertex() && !p->end_vertex()->particles_out_size())
464  // In both case, just don't add a end vertex in the FSimEvent
465  )
466  continue;
467 
468  // Add the vertex to the event and to the various lists
469  XYZTLorentzVector decayVertex = XYZTLorentzVector(p->end_vertex()->position().x() / 10.,
470  p->end_vertex()->position().y() / 10.,
471  p->end_vertex()->position().z() / 10.,
472  p->end_vertex()->position().t() / 10.);
473  // vertex(mainVertex).position();
474  int theVertex = addSimVertex(decayVertex, theTrack, FSimVertexType::DECAY_VERTEX);
475 
476  if (theVertex != -1)
477  myGenVertices[p->barcode() - initialBarcode] = theVertex;
478 
479  // There we are !
480  }
481  }
482 }
double lateVertexPosition
int addSimVertex(const XYZTLorentzVector &decayVertex, int im=-1, FSimVertexType::VertexType type=FSimVertexType::ANY)
Add a new vertex to the Event and to the various lists.
KineParticleFilter * myFilter
The particle filter.
int addSimTrack(const RawParticle *p, int iv, int ig=-1, const HepMC::GenVertex *ev=nullptr)
Add a new track to the Event and to the various lists.
unsigned int nGenParts() const
Number of generator particles.
Definition: FBaseSimEvent.h:84
unsigned int theGenSize
const HepPDT::ParticleDataTable * theTable() const
Get the pointer to the particle data table.
Definition: FBaseSimEvent.h:54
RawParticle makeParticle(HepPDT::ParticleDataTable const *, int id, const math::XYZTLorentzVector &p)
Definition: makeParticle.cc:28
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
unsigned int nGenParticles
bool acceptVertex(const math::XYZTLorentzVector &p) const
part
Definition: HCALResponse.h:20
const math::XYZTLorentzVector & position() const
Temporary (until CMSSW moves to Mathcore) - No ! Actually very useful.
Definition: FSimVertex.h:48
FSimVertex & vertex(int id) const
Return vertex with given Id.
std::vector< HepMC::GenParticle * > * theGenParticles
primaryVertex
hltOfflineBeamSpot for HLTMON
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:25

◆ addSimTrack()

int FBaseSimEvent::addSimTrack ( const RawParticle p,
int  iv,
int  ig = -1,
const HepMC::GenVertex *  ev = nullptr 
)

Add a new track to the Event and to the various lists.

Definition at line 484 of file FBaseSimEvent.cc.

References KineParticleFilter::acceptParticle(), FSimVertex::addDaughter(), FSimTrack::addDaughter(), makeMEIFBenchmarkPlots::ev, SimTrack::genpartIndex(), gpuVertexFinder::iv, pdg::mass(), objects.autophobj::motherId, myFilter, nSimTracks, AlCaHLTBitMon_ParallelJobs::p, class-composition::parent, mathSSE::sqrt(), theSimTracks, theTable(), theTrackSize, track(), and vertex().

Referenced by addParticles(), fill(), MaterialEffects::interact(), and TrajectoryManager::updateWithDaughters().

484  {
485  // Check that the particle is in the Famos "acceptance"
486  // Keep all primaries of pile-up events, though
487  if (!myFilter->acceptParticle(*p) && ig >= -1)
488  return -1;
489 
490  // The new track index
491  int trackId = nSimTracks++;
493  theTrackSize *= 2;
494  theSimTracks->resize(theTrackSize);
495  }
496 
497  // Attach the particle to the origin vertex, and to the mother
498  vertex(iv).addDaughter(trackId);
499  if (!vertex(iv).noParent()) {
500  track(vertex(iv).parent().id()).addDaughter(trackId);
501 
502  if (ig == -1) {
503  int motherId = track(vertex(iv).parent().id()).genpartIndex();
504  if (motherId < -1)
505  ig = motherId;
506  }
507  }
508 
509  // Some transient information for FAMOS internal use
510  (*theSimTracks)[trackId] =
511  ev ?
512  // A proper decay time is scheduled
513  FSimTrack(p,
514  iv,
515  ig,
516  trackId,
517  this,
518  ev->position().t() / 10. * pdg::mass(p->pid(), theTable()) / std::sqrt(p->momentum().Vect().Mag2()))
519  :
520  // No proper decay time is scheduled
521  FSimTrack(p, iv, ig, trackId, this);
522 
523  return trackId;
524 }
FSimTrack & track(int id) const
Return track with given Id.
int32_t *__restrict__ iv
std::vector< FSimTrack > * theSimTracks
unsigned int theTrackSize
KineParticleFilter * myFilter
The particle filter.
bool acceptParticle(const RawParticle &p) const
unsigned int nSimTracks
const HepPDT::ParticleDataTable * theTable() const
Get the pointer to the particle data table.
Definition: FBaseSimEvent.h:54
T sqrt(T t)
Definition: SSEVec.h:19
FSimVertex & vertex(int id) const
Return vertex with given Id.
double mass(int pdgID, const HepPDT::ParticleDataTable *pdt)
void addDaughter(int i)
Add a RecHit for a track on a layer.
Definition: FSimTrack.h:200
void addDaughter(int i)
Definition: FSimVertex.h:45
int genpartIndex() const
index of the corresponding Generator particle in the Event container (-1 if no Genpart) ...
Definition: SimTrack.h:37

◆ addSimVertex()

int FBaseSimEvent::addSimVertex ( const XYZTLorentzVector decayVertex,
int  im = -1,
FSimVertexType::VertexType  type = FSimVertexType::ANY 
)

Add a new vertex to the Event and to the various lists.

Definition at line 526 of file FBaseSimEvent.cc.

References KineParticleFilter::acceptVertex(), myFilter, nSimVertices, FSimTrack::setEndVertex(), theFSimVerticesType, theSimVertices, theVertexSize, track(), and findQualityFiles::v.

Referenced by addParticles(), fill(), MaterialEffects::interact(), TrajectoryManager::reconstruct(), and TrajectoryManager::updateWithDaughters().

526  {
527  // Check that the vertex is in the Famos "acceptance"
528  if (!myFilter->acceptVertex(v))
529  return -1;
530 
531  // The number of vertices
532  int vertexId = nSimVertices++;
534  theVertexSize *= 2;
535  theSimVertices->resize(theVertexSize);
537  }
538 
539  // Attach the end vertex to the particle (if accepted)
540  if (im != -1)
541  track(im).setEndVertex(vertexId);
542 
543  // Some transient information for FAMOS internal use
544  (*theSimVertices)[vertexId] = FSimVertex(v, im, vertexId, this);
545 
546  (*theFSimVerticesType)[vertexId] = FSimVertexType(type);
547 
548  return vertexId;
549 }
FSimTrack & track(int id) const
Return track with given Id.
unsigned int theVertexSize
KineParticleFilter * myFilter
The particle filter.
unsigned int nSimVertices
A FSimVertexType hold the information on the vertex origine.
std::vector< FSimVertex > * theSimVertices
bool acceptVertex(const math::XYZTLorentzVector &p) const
void setEndVertex(int endv)
Set the end vertex.
Definition: FSimTrack.h:167
FSimVertexTypeCollection * theFSimVerticesType

◆ chargedTrack()

int FBaseSimEvent::chargedTrack ( int  id) const

return "reconstructed" charged tracks index.

Definition at line 659 of file FBaseSimEvent.cc.

References l1ctLayer2EG_cff::id, nChargedParticleTracks, and theChargedTracks.

659  {
660  if (id >= 0 && id < (int)nChargedParticleTracks)
661  return (*theChargedTracks)[id];
662  else
663  return -1;
664 }
std::vector< unsigned > * theChargedTracks
unsigned int nChargedParticleTracks

◆ clear()

void FBaseSimEvent::clear ( void  )

clear the FBaseSimEvent content before the next event

Definition at line 644 of file FBaseSimEvent.cc.

References nChargedParticleTracks, nGenParticles, nSimTracks, and nSimVertices.

Referenced by fill().

644  {
645  nSimTracks = 0;
646  nSimVertices = 0;
647  nGenParticles = 0;
649 }
unsigned int nSimTracks
unsigned int nSimVertices
unsigned int nGenParticles
unsigned int nChargedParticleTracks

◆ embdGenpart()

const HepMC::GenParticle * FBaseSimEvent::embdGenpart ( int  i) const

return MC track with a given id

Definition at line 666 of file FBaseSimEvent.cc.

References mps_fire::i, and theGenParticles.

666 { return (*theGenParticles)[i]; }
std::vector< HepMC::GenParticle * > * theGenParticles

◆ embdTrack()

const SimTrack& FBaseSimEvent::embdTrack ( int  i) const
inline

return embedded track with given id

Referenced by FSimEvent::load().

◆ embdVertex()

const SimVertex& FBaseSimEvent::embdVertex ( int  i) const
inline

return embedded vertex with given id

Referenced by FSimEvent::load().

◆ embdVertexType()

const FSimVertexType& FBaseSimEvent::embdVertexType ( int  i) const
inline

return embedded vertex type with given id

Referenced by FSimEvent::load().

◆ fill() [1/2]

void FBaseSimEvent::fill ( const HepMC::GenEvent hev)

fill the FBaseSimEvent from the current HepMC::GenEvent

Definition at line 82 of file FBaseSimEvent.cc.

References addParticles(), and clear().

Referenced by FSimEvent::fill().

82  {
83  // Clear old vectors
84  clear();
85 
86  // Add the particles in the FSimEvent
87  addParticles(myGenEvent);
88 }
void addParticles(const HepMC::GenEvent &hev)
Add the particles and their vertices to the list.
void clear()
clear the FBaseSimEvent content before the next event

◆ fill() [2/2]

void FBaseSimEvent::fill ( const std::vector< SimTrack > &  simTracks,
const std::vector< SimVertex > &  simVertices 
)

fill the FBaseSimEvent from SimTrack's and SimVert'ices

Definition at line 90 of file FBaseSimEvent.cc.

References funct::abs(), addSimTrack(), addSimVertex(), FSimTrack::charge(), clear(), RawParticle::cos2ThetaV(), SimTrack::genpartIndex(), BaseParticlePropagator::getSuccess(), createfilelist::int, lateVertexPosition, makeParticle(), FSimTrack::momentum(), objects.autophobj::motherId, SimVertex::noParent(), FSimTrack::notYetToEndVertex(), nTracks(), L1TkPrimaryVertex_cfi::nVtx, SimVertex::parentIndex(), BaseParticlePropagator::particle(), FSimVertex::position(), position, FSimVertexType::PRIMARY_VERTEX, BeamMonitor_cff::primaryVertex, BaseParticlePropagator::propagateToEcalEntrance(), BaseParticlePropagator::propagateToHcalEntrance(), BaseParticlePropagator::propagateToHcalExit(), BaseParticlePropagator::propagateToHOLayer(), BaseParticlePropagator::propagateToPreshowerLayer1(), BaseParticlePropagator::propagateToPreshowerLayer2(), BaseParticlePropagator::propagateToVFcalEntrance(), FSimTrack::setEcal(), FSimTrack::setHcal(), FSimTrack::setHcalExit(), FSimTrack::setHO(), FSimTrack::setLayer1(), FSimTrack::setLayer2(), BaseParticlePropagator::setMagneticField(), FSimTrack::setVFcal(), TrackCandidateProducer_cfi::simTracks, HGCalValidator_cfi::simVertices, submitPVValidationJobs::t, theTable(), track(), SimTrack::trackerSurfaceMomentum(), SimTrack::trackerSurfacePosition(), CoreSimTrack::type(), FSimTrack::vertex(), vertex(), RawParticle::vertex(), SimTrack::vertIndex(), x, y, and z.

90  {
91  // Watch out there ! A SimVertex is in mm (stupid),
92  // while a FSimVertex is in cm (clever).
93 
94  clear();
95 
96  unsigned nVtx = simVertices.size();
97  unsigned nTks = simTracks.size();
98 
99  // Empty event, do nothin'
100  if (nVtx == 0)
101  return;
102 
103  // Two arrays for internal use.
104  std::vector<int> myVertices(nVtx, -1);
105  std::vector<int> myTracks(nTks, -1);
106 
107  // create a map associating geant particle id and position in the
108  // event SimTrack vector
109 
110  std::map<unsigned, unsigned> geantToIndex;
111  for (unsigned it = 0; it < simTracks.size(); ++it) {
112  geantToIndex[simTracks[it].trackId()] = it;
113  }
114 
115  // Create also a map associating a SimTrack with its endVertex
116  /*
117  std::map<unsigned, unsigned> endVertex;
118  for ( unsigned iv=0; iv<simVertices.size(); ++iv ) {
119  endVertex[ simVertices[iv].parentIndex() ] = iv;
120  }
121  */
122 
123  // Set the main vertex for the kine particle filter
124  // SimVertices were in mm until 110_pre2
125  // HepLorentzVector primaryVertex = simVertices[0].position()/10.;
126  // SImVertices are now in cm
127  // Also : position is copied until SimVertex switches to Mathcore.
128  // XYZTLorentzVector primaryVertex = simVertices[0].position();
129  // The next 5 lines to be then replaced by the previous line
131  simVertices[0].position().y(),
132  simVertices[0].position().z(),
133  simVertices[0].position().t());
134  //
135  //myFilter->setMainVertex(primaryVertex);
136  // Add the main vertex to the list.
137  addSimVertex(/*myFilter->vertex()*/ primaryVertex, -1, FSimVertexType::PRIMARY_VERTEX);
138  myVertices[0] = 0;
139 
140  for (unsigned trackId = 0; trackId < nTks; ++trackId) {
141  // The track
142  const SimTrack& track = simTracks[trackId];
143  // std::cout << std::endl << "SimTrack " << trackId << " " << track << std::endl;
144 
145  // The origin vertex
146  int vertexId = track.vertIndex();
147  const SimVertex& vertex = simVertices[vertexId];
148  //std::cout << "Origin vertex " << vertexId << " " << vertex << std::endl;
149 
150  // The mother track
151  int motherId = -1;
152  if (!vertex.noParent()) { // there is a parent to this vertex
153  // geant id of the mother
154  unsigned motherGeantId = vertex.parentIndex();
155  std::map<unsigned, unsigned>::iterator association = geantToIndex.find(motherGeantId);
156  if (association != geantToIndex.end())
157  motherId = association->second;
158  }
159  int originId = motherId == -1 ? -1 : myTracks[motherId];
160  //std::cout << "Origin id " << originId << std::endl;
161 
162  /*
163  if ( endVertex.find(trackId) != endVertex.end() )
164  std::cout << "End vertex id = " << endVertex[trackId] << std::endl;
165  else
166  std::cout << "No endVertex !!! " << std::endl;
167  std::cout << "Tracker surface position " << track.trackerSurfacePosition() << std::endl;
168  */
169 
170  // Add the vertex (if it does not already exist!)
172  vertex.position().px(), vertex.position().py(), vertex.position().pz(), vertex.position().e());
173  if (myVertices[vertexId] == -1)
174  // Momentum and position are copied until SimTrack and SimVertex
175  // switch to Mathcore.
176  // myVertices[vertexId] = addSimVertex(vertex.position(),originId);
177  // The next line to be then replaced by the previous line
178  myVertices[vertexId] = addSimVertex(position, originId);
179 
180  // Add the track (with protection for brem'ing electrons and muons)
181  int motherType = motherId == -1 ? 0 : simTracks[motherId].type();
182 
183  bool notBremInDetector = (abs(motherType) != 11 && std::abs(motherType) != 13) || motherType != track.type() ||
184  position.Perp2() < lateVertexPosition;
185 
186  if (notBremInDetector) {
187  // Momentum and position are copied until SimTrack and SimVertex
188  // switch to Mathcore.
189  // RawParticle part(track.momentum(), vertex.position());
190  // The next 3 lines to be then replaced by the previous line
191  XYZTLorentzVector momentum(
192  track.momentum().px(), track.momentum().py(), track.momentum().pz(), track.momentum().e());
194  //
195  //std::cout << "Ctau = " << part.PDGcTau() << std::endl;
196  // Don't save tracks that have decayed immediately but for which no daughters
197  // were saved (probably due to cuts on E, pT and eta)
198  // if ( part.PDGcTau() > 0.1 || endVertex.find(trackId) != endVertex.end() )
199  myTracks[trackId] = addSimTrack(&part, myVertices[vertexId], track.genpartIndex());
200  if (myTracks[trackId] >= 0) {
201  (*theSimTracks)[myTracks[trackId]].setTkPosition(track.trackerSurfacePosition());
202  (*theSimTracks)[myTracks[trackId]].setTkMomentum(track.trackerSurfaceMomentum());
203  }
204  } else {
205  myTracks[trackId] = myTracks[motherId];
206  if (myTracks[trackId] >= 0) {
207  (*theSimTracks)[myTracks[trackId]].setTkPosition(track.trackerSurfacePosition());
208  (*theSimTracks)[myTracks[trackId]].setTkMomentum(track.trackerSurfaceMomentum());
209  }
210  }
211  }
212 
213  // Now loop over the remaining end vertices !
214  for (unsigned vertexId = 0; vertexId < nVtx; ++vertexId) {
215  // if the vertex is already saved, just ignore.
216  if (myVertices[vertexId] != -1)
217  continue;
218 
219  // The yet unused vertex
220  const SimVertex& vertex = simVertices[vertexId];
221 
222  // The mother track
223  int motherId = -1;
224  if (!vertex.noParent()) { // there is a parent to this vertex
225 
226  // geant id of the mother
227  unsigned motherGeantId = vertex.parentIndex();
228  std::map<unsigned, unsigned>::iterator association = geantToIndex.find(motherGeantId);
229  if (association != geantToIndex.end())
230  motherId = association->second;
231  }
232  int originId = motherId == -1 ? -1 : myTracks[motherId];
233 
234  // Add the vertex
235  // Momentum and position are copied until SimTrack and SimVertex
236  // switch to Mathcore.
237  // myVertices[vertexId] = addSimVertex(vertex.position(),originId);
238  // The next 3 lines to be then replaced by the previous line
240  vertex.position().px(), vertex.position().py(), vertex.position().pz(), vertex.position().e());
241  myVertices[vertexId] = addSimVertex(position, originId);
242  }
243 
244  // Finally, propagate all particles to the calorimeters
245  BaseParticlePropagator myPart;
246  XYZTLorentzVector mom;
248 
249  // Loop over the tracks
250  for (int fsimi = 0; fsimi < (int)nTracks(); ++fsimi) {
251  FSimTrack& myTrack = track(fsimi);
252  double trackerSurfaceTime =
253  myTrack.vertex().position().t() + myTrack.momentum().e() / myTrack.momentum().pz() *
254  (myTrack.trackerSurfacePosition().z() - myTrack.vertex().position().z());
256  myTrack.trackerSurfacePosition().y(),
257  myTrack.trackerSurfacePosition().z(),
258  trackerSurfaceTime);
259  mom = XYZTLorentzVector(myTrack.trackerSurfaceMomentum().x(),
260  myTrack.trackerSurfaceMomentum().y(),
261  myTrack.trackerSurfaceMomentum().z(),
262  myTrack.trackerSurfaceMomentum().t());
263 
264  if (mom.T() > 0.) {
265  // The particle to be propagated
266  myPart = BaseParticlePropagator(RawParticle(mom, pos, myTrack.charge()), 0., 0., 4.);
267 
268  // Propagate to Preshower layer 1
269  myPart.propagateToPreshowerLayer1(false);
270  if (myTrack.notYetToEndVertex(myPart.particle().vertex()) && myPart.getSuccess() > 0)
271  myTrack.setLayer1(myPart.particle(), myPart.getSuccess());
272 
273  // Propagate to Preshower Layer 2
274  myPart.propagateToPreshowerLayer2(false);
275  if (myTrack.notYetToEndVertex(myPart.particle().vertex()) && myPart.getSuccess() > 0)
276  myTrack.setLayer2(myPart.particle(), myPart.getSuccess());
277 
278  // Propagate to Ecal Endcap
279  myPart.propagateToEcalEntrance(false);
280  if (myTrack.notYetToEndVertex(myPart.particle().vertex()))
281  myTrack.setEcal(myPart.particle(), myPart.getSuccess());
282 
283  // Propagate to HCAL entrance
284  myPart.propagateToHcalEntrance(false);
285  if (myTrack.notYetToEndVertex(myPart.particle().vertex()))
286  myTrack.setHcal(myPart.particle(), myPart.getSuccess());
287 
288  // Attempt propagation to HF for low pt and high eta
289  if (myPart.particle().cos2ThetaV() > 0.8 || mom.T() < 3.) {
290  // Propagate to VFCAL entrance
291  myPart.propagateToVFcalEntrance(false);
292  if (myTrack.notYetToEndVertex(myPart.particle().vertex()))
293  myTrack.setVFcal(myPart.particle(), myPart.getSuccess());
294 
295  // Otherwise propagate to the HCAL exit and HO.
296  } else {
297  // Propagate to HCAL exit
298  myPart.propagateToHcalExit(false);
299  if (myTrack.notYetToEndVertex(myPart.particle().vertex()))
300  myTrack.setHcalExit(myPart.particle(), myPart.getSuccess());
301  // Propagate to HOLayer entrance
302  myPart.setMagneticField(0);
303  myPart.propagateToHOLayer(false);
304  if (myTrack.notYetToEndVertex(myPart.particle().vertex()))
305  myTrack.setHO(myPart.particle(), myPart.getSuccess());
306  }
307  }
308  }
309 }
double lateVertexPosition
int addSimVertex(const XYZTLorentzVector &decayVertex, int im=-1, FSimVertexType::VertexType type=FSimVertexType::ANY)
Add a new vertex to the Event and to the various lists.
FSimTrack & track(int id) const
Return track with given Id.
bool propagateToPreshowerLayer1(bool first=true)
const math::XYZVectorD & trackerSurfacePosition() const
Definition: SimTrack.h:40
int addSimTrack(const RawParticle *p, int iv, int ig=-1, const HepMC::GenVertex *ev=nullptr)
Add a new track to the Event and to the various lists.
void setEcal(const RawParticle &pp, int success)
Set the ecal variables.
Definition: FSimTrack.cc:118
void setLayer2(const RawParticle &pp, int success)
Set the preshower layer2 variables.
Definition: FSimTrack.cc:112
void clear()
clear the FBaseSimEvent content before the next event
void setMagneticField(double b)
Set the magnetic field.
const FSimVertex vertex() const
Origin vertex.
unsigned int nTracks() const
Number of tracks.
Definition: FBaseSimEvent.h:78
const HepPDT::ParticleDataTable * theTable() const
Get the pointer to the particle data table.
Definition: FBaseSimEvent.h:54
RawParticle makeParticle(HepPDT::ParticleDataTable const *, int id, const math::XYZTLorentzVector &p)
Definition: makeParticle.cc:28
int type() const
particle type (HEP PDT convension)
Definition: CoreSimTrack.h:22
bool propagateToVFcalEntrance(bool first=true)
int vertIndex() const
index of the vertex in the Event container (-1 if no vertex)
Definition: SimTrack.h:33
void setLayer1(const RawParticle &pp, int success)
Set the preshower layer1 variables.
Definition: FSimTrack.cc:106
const XYZTLorentzVector & momentum() const
Temporary (until move of SimTrack to Mathcore) - No! Actually very useful.
Definition: FSimTrack.h:209
std::tuple< layerClusterToCaloParticle, caloParticleToLayerCluster > association
double cos2ThetaV() const
Definition: RawParticle.h:281
bool propagateToHcalExit(bool first=true)
float charge() const
charge
Definition: FSimTrack.h:56
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
RawParticle const & particle() const
The particle being propagated.
bool notYetToEndVertex(const XYZTLorentzVector &pos) const
Compare the end vertex position with another position.
Definition: FSimTrack.cc:85
bool propagateToEcalEntrance(bool first=true)
int getSuccess() const
Has propagation been performed and was barrel or endcap reached ?
part
Definition: HCALResponse.h:20
const math::XYZTLorentzVector & position() const
Temporary (until CMSSW moves to Mathcore) - No ! Actually very useful.
Definition: FSimVertex.h:48
void setHcalExit(const RawParticle &pp, int success)
Set the hcal exit variables.
Definition: FSimTrack.cc:136
bool propagateToHcalEntrance(bool first=true)
FSimVertex & vertex(int id) const
Return vertex with given Id.
static int position[264][3]
Definition: ReadPGInfo.cc:289
void setHO(const RawParticle &pp, int success)
Set the ho variables.
Definition: FSimTrack.cc:141
void setVFcal(const RawParticle &pp, int success)
Set the hcal variables.
Definition: FSimTrack.cc:130
const math::XYZTLorentzVectorD & trackerSurfaceMomentum() const
Definition: SimTrack.h:42
void setHcal(const RawParticle &pp, int success)
Set the hcal variables.
Definition: FSimTrack.cc:124
bool noParent() const
Definition: SimVertex.h:30
bool propagateToHOLayer(bool first=true)
primaryVertex
hltOfflineBeamSpot for HLTMON
int parentIndex() const
Definition: SimVertex.h:29
bool propagateToPreshowerLayer2(bool first=true)
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:25
const XYZTLorentzVector & vertex() const
the vertex fourvector
Definition: RawParticle.h:320
int genpartIndex() const
index of the corresponding Generator particle in the Event container (-1 if no Genpart) ...
Definition: SimTrack.h:37

◆ filter()

const KineParticleFilter& FBaseSimEvent::filter ( ) const
inline

Definition at line 121 of file FBaseSimEvent.h.

References myFilter.

Referenced by TrajectoryManager::reconstruct().

121 { return *myFilter; }
KineParticleFilter * myFilter
The particle filter.

◆ genparts()

std::vector<HepMC::GenParticle*>* FBaseSimEvent::genparts ( ) const
inlineprotected

The pointer to the vector of GenParticle's.

Definition at line 131 of file FBaseSimEvent.h.

References theGenParticles.

131 { return theGenParticles; }
std::vector< HepMC::GenParticle * > * theGenParticles

◆ initializePdt()

void FBaseSimEvent::initializePdt ( const HepPDT::ParticleDataTable aPdt)

Initialize the particle data table.

Definition at line 80 of file FBaseSimEvent.cc.

References pdt.

80 { pdt = aPdt; }
const ParticleDataTable * pdt

◆ nChargedTracks()

unsigned int FBaseSimEvent::nChargedTracks ( ) const
inline

Number of "reconstructed" charged tracks.

Definition at line 87 of file FBaseSimEvent.h.

References nChargedParticleTracks.

87 { return nChargedParticleTracks; }
unsigned int nChargedParticleTracks

◆ nGenParts()

unsigned int FBaseSimEvent::nGenParts ( ) const
inline

Number of generator particles.

Definition at line 84 of file FBaseSimEvent.h.

References nGenParticles.

Referenced by addParticles(), and FSimEvent::nGenParts().

84 { return nGenParticles; }
unsigned int nGenParticles

◆ nTracks()

unsigned int FBaseSimEvent::nTracks ( ) const
inline

Number of tracks.

Definition at line 78 of file FBaseSimEvent.h.

References nSimTracks.

Referenced by fill(), FSimEvent::nTracks(), and print().

78 { return nSimTracks; }
unsigned int nSimTracks

◆ nVertices()

unsigned int FBaseSimEvent::nVertices ( ) const
inline

Number of vertices.

Definition at line 81 of file FBaseSimEvent.h.

References nSimVertices.

Referenced by FSimEvent::nVertices(), and print().

81 { return nSimVertices; }
unsigned int nSimVertices

◆ print()

void FBaseSimEvent::print ( void  ) const

print the FBaseSimEvent in an intelligible way

Definition at line 632 of file FBaseSimEvent.cc.

References gather_cfg::cout, mps_fire::i, createfilelist::int, nTracks(), nVertices(), track(), and vertexType().

Referenced by CalorimetryManager::reconstruct().

632  {
633  std::cout << " Id Gen Name eta phi pT E Vtx1 "
634  << " x y z "
635  << "Moth Vtx2 eta phi R Z Daughters Ecal?" << std::endl;
636 
637  for (int i = 0; i < (int)nTracks(); i++)
638  std::cout << track(i) << std::endl;
639 
640  for (int i = 0; i < (int)nVertices(); i++)
641  std::cout << "i = " << i << " " << vertexType(i) << std::endl;
642 }
FSimTrack & track(int id) const
Return track with given Id.
unsigned int nVertices() const
Number of vertices.
Definition: FBaseSimEvent.h:81
unsigned int nTracks() const
Number of tracks.
Definition: FBaseSimEvent.h:78
FSimVertexType & vertexType(int id) const
Return vertex with given Id.

◆ printMCTruth()

void FBaseSimEvent::printMCTruth ( const HepMC::GenEvent hev)

print the original MCTruth event

Definition at line 551 of file FBaseSimEvent.cc.

References class-composition::children, gather_cfg::cout, PVValHelper::eta, alignBH_cfg::fixed, GenParticle::GenParticle, l1ctLayer2EG_cff::id, dqmdumpme::k, Skims_PA_cff::name, AlCaHLTBitMon_ParallelJobs::p, LHEGenericFilter_cfi::ParticleID, pdt, and AlCaHLTBitMon_QueryRunRegistry::string.

551  {
552  std::cout << "Id Gen Name eta phi pT E Vtx1 "
553  << " x y z "
554  << "Moth Vtx2 eta phi R Z Da1 Da2 Ecal?" << std::endl;
555 
556  for (HepMC::GenEvent::particle_const_iterator piter = myGenEvent.particles_begin();
557  piter != myGenEvent.particles_end();
558  ++piter) {
559  HepMC::GenParticle* p = *piter;
560  /* */
561  int partId = p->pdg_id();
563 
564  if (pdt->particle(ParticleID(partId)) != nullptr) {
565  name = (pdt->particle(ParticleID(partId)))->name();
566  } else {
567  name = "none";
568  }
569 
570  XYZTLorentzVector momentum1(p->momentum().px(), p->momentum().py(), p->momentum().pz(), p->momentum().e());
571 
572  int vertexId1 = 0;
573 
574  if (!p->production_vertex())
575  continue;
576 
577  XYZVector vertex1(p->production_vertex()->position().x() / 10.,
578  p->production_vertex()->position().y() / 10.,
579  p->production_vertex()->position().z() / 10.);
580  vertexId1 = p->production_vertex()->barcode();
581 
582  std::cout.setf(std::ios::fixed, std::ios::floatfield);
583  std::cout.setf(std::ios::right, std::ios::adjustfield);
584 
585  std::cout << std::setw(4) << p->barcode() << " " << name;
586 
587  for (unsigned int k = 0; k < 11 - name.length() && k < 12; k++)
588  std::cout << " ";
589 
590  double eta = momentum1.eta();
591  if (eta > +10.)
592  eta = +10.;
593  if (eta < -10.)
594  eta = -10.;
595  std::cout << std::setw(6) << std::setprecision(2) << eta << " " << std::setw(6) << std::setprecision(2)
596  << momentum1.phi() << " " << std::setw(7) << std::setprecision(2) << momentum1.pt() << " " << std::setw(7)
597  << std::setprecision(2) << momentum1.e() << " " << std::setw(4) << vertexId1 << " " << std::setw(6)
598  << std::setprecision(1) << vertex1.x() << " " << std::setw(6) << std::setprecision(1) << vertex1.y()
599  << " " << std::setw(6) << std::setprecision(1) << vertex1.z() << " ";
600 
601  const HepMC::GenParticle* mother = *(p->production_vertex()->particles_in_const_begin());
602 
603  if (mother)
604  std::cout << std::setw(4) << mother->barcode() << " ";
605  else
606  std::cout << " ";
607 
608  if (p->end_vertex()) {
609  XYZTLorentzVector vertex2(p->end_vertex()->position().x() / 10.,
610  p->end_vertex()->position().y() / 10.,
611  p->end_vertex()->position().z() / 10.,
612  p->end_vertex()->position().t() / 10.);
613  int vertexId2 = p->end_vertex()->barcode();
614 
615  std::vector<const HepMC::GenParticle*> children;
616  HepMC::GenVertex::particles_out_const_iterator firstDaughterIt = p->end_vertex()->particles_out_const_begin();
617  HepMC::GenVertex::particles_out_const_iterator lastDaughterIt = p->end_vertex()->particles_out_const_end();
618  for (; firstDaughterIt != lastDaughterIt; ++firstDaughterIt) {
619  children.push_back(*firstDaughterIt);
620  }
621 
622  std::cout << std::setw(4) << vertexId2 << " " << std::setw(6) << std::setprecision(2) << vertex2.eta() << " "
623  << std::setw(6) << std::setprecision(2) << vertex2.phi() << " " << std::setw(5) << std::setprecision(1)
624  << vertex2.pt() << " " << std::setw(6) << std::setprecision(1) << vertex2.z() << " ";
625  for (unsigned id = 0; id < children.size(); ++id)
626  std::cout << std::setw(4) << children[id]->barcode() << " ";
627  }
628  std::cout << std::endl;
629  }
630 }
const ParticleDataTable * pdt
math::XYZVector XYZVector
Definition: RawParticle.h:26
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:25

◆ theTable()

const HepPDT::ParticleDataTable* FBaseSimEvent::theTable ( ) const
inline

Get the pointer to the particle data table.

Definition at line 54 of file FBaseSimEvent.h.

References pdt.

Referenced by addParticles(), addSimTrack(), fill(), FSimTrack::FSimTrack(), CalorimetryManager::MuonMipSimulation(), and TrajectoryManager::reconstruct().

54 { return pdt; }
const ParticleDataTable * pdt

◆ track()

FSimTrack& FBaseSimEvent::track ( int  id) const
inline

◆ tracks()

std::vector<FSimTrack>* FBaseSimEvent::tracks ( void  ) const
inlineprotected

The pointer to the vector of FSimTrack's.

Definition at line 125 of file FBaseSimEvent.h.

References theSimTracks.

125 { return theSimTracks; }
std::vector< FSimTrack > * theSimTracks

◆ vertex()

FSimVertex& FBaseSimEvent::vertex ( int  id) const
inline

Return vertex with given Id.

Referenced by addParticles(), addSimTrack(), Tau.Tau::dxy(), fill(), and TrajectoryManager::updateWithDaughters().

◆ vertexType()

FSimVertexType& FBaseSimEvent::vertexType ( int  id) const
inline

Return vertex with given Id.

Referenced by print().

◆ vertices()

std::vector<FSimVertex>* FBaseSimEvent::vertices ( ) const
inlineprotected

The pointer to the vector of FSimVertex's.

Definition at line 128 of file FBaseSimEvent.h.

References theSimVertices.

128 { return theSimVertices; }
std::vector< FSimVertex > * theSimVertices

Member Data Documentation

◆ initialSize

unsigned int FBaseSimEvent::initialSize
private

Definition at line 150 of file FBaseSimEvent.h.

Referenced by FBaseSimEvent().

◆ lateVertexPosition

double FBaseSimEvent::lateVertexPosition
private

Definition at line 161 of file FBaseSimEvent.h.

Referenced by addParticles(), FBaseSimEvent(), and fill().

◆ myFilter

KineParticleFilter* FBaseSimEvent::myFilter
private

The particle filter.

Definition at line 153 of file FBaseSimEvent.h.

Referenced by addParticles(), addSimTrack(), addSimVertex(), FBaseSimEvent(), filter(), and ~FBaseSimEvent().

◆ nChargedParticleTracks

unsigned int FBaseSimEvent::nChargedParticleTracks
private

Definition at line 144 of file FBaseSimEvent.h.

Referenced by addChargedTrack(), chargedTrack(), clear(), and nChargedTracks().

◆ nGenParticles

unsigned int FBaseSimEvent::nGenParticles
private

Definition at line 143 of file FBaseSimEvent.h.

Referenced by addParticles(), clear(), and nGenParts().

◆ nSimTracks

unsigned int FBaseSimEvent::nSimTracks
private

Definition at line 141 of file FBaseSimEvent.h.

Referenced by addSimTrack(), clear(), and nTracks().

◆ nSimVertices

unsigned int FBaseSimEvent::nSimVertices
private

Definition at line 142 of file FBaseSimEvent.h.

Referenced by addSimVertex(), clear(), and nVertices().

◆ pdt

const ParticleDataTable* FBaseSimEvent::pdt
private

Definition at line 159 of file FBaseSimEvent.h.

Referenced by initializePdt(), printMCTruth(), and theTable().

◆ sigmaVerteX

double FBaseSimEvent::sigmaVerteX
private

Definition at line 155 of file FBaseSimEvent.h.

◆ sigmaVerteY

double FBaseSimEvent::sigmaVerteY
private

Definition at line 156 of file FBaseSimEvent.h.

◆ sigmaVerteZ

double FBaseSimEvent::sigmaVerteZ
private

Definition at line 157 of file FBaseSimEvent.h.

◆ theChargedSize

unsigned int FBaseSimEvent::theChargedSize
private

Definition at line 149 of file FBaseSimEvent.h.

Referenced by addChargedTrack(), and FBaseSimEvent().

◆ theChargedTracks

std::vector<unsigned>* FBaseSimEvent::theChargedTracks
private

Definition at line 139 of file FBaseSimEvent.h.

Referenced by addChargedTrack(), chargedTrack(), FBaseSimEvent(), and ~FBaseSimEvent().

◆ theFSimVerticesType

FSimVertexTypeCollection* FBaseSimEvent::theFSimVerticesType
private

Definition at line 136 of file FBaseSimEvent.h.

Referenced by addSimVertex(), FBaseSimEvent(), and ~FBaseSimEvent().

◆ theGenParticles

std::vector<HepMC::GenParticle*>* FBaseSimEvent::theGenParticles
private

Definition at line 137 of file FBaseSimEvent.h.

Referenced by addParticles(), embdGenpart(), FBaseSimEvent(), genparts(), and ~FBaseSimEvent().

◆ theGenSize

unsigned int FBaseSimEvent::theGenSize
private

Definition at line 148 of file FBaseSimEvent.h.

Referenced by addParticles(), and FBaseSimEvent().

◆ theSimTracks

std::vector<FSimTrack>* FBaseSimEvent::theSimTracks
private

Definition at line 134 of file FBaseSimEvent.h.

Referenced by addSimTrack(), FBaseSimEvent(), tracks(), and ~FBaseSimEvent().

◆ theSimVertices

std::vector<FSimVertex>* FBaseSimEvent::theSimVertices
private

Definition at line 135 of file FBaseSimEvent.h.

Referenced by addSimVertex(), FBaseSimEvent(), vertices(), and ~FBaseSimEvent().

◆ theTrackSize

unsigned int FBaseSimEvent::theTrackSize
private

Definition at line 146 of file FBaseSimEvent.h.

Referenced by addSimTrack(), and FBaseSimEvent().

◆ theVertexSize

unsigned int FBaseSimEvent::theVertexSize
private

Definition at line 147 of file FBaseSimEvent.h.

Referenced by addSimVertex(), and FBaseSimEvent().