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.

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 }

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

◆ ~FBaseSimEvent()

FBaseSimEvent::~FBaseSimEvent ( )

usual virtual destructor

Definition at line 63 of file FBaseSimEvent.cc.

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 }

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

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.

651  {
652  (*theChargedTracks)[nChargedParticleTracks++] = id;
654  theChargedSize *= 2;
656  }
657 }

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

◆ 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.

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 }

References funct::abs(), addSimTrack(), addSimVertex(), FSimVertexType::DECAY_VERTEX, MillePedeFileConverter_cfg::e, GenParticle::GenParticle, lateVertexPosition, makeParticle(), objects.autophobj::motherId, 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().

◆ 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.

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 }

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

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

◆ 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.

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 }

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

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

◆ chargedTrack()

int FBaseSimEvent::chargedTrack ( int  id) const

return "reconstructed" charged tracks index.

Definition at line 659 of file FBaseSimEvent.cc.

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

References triggerObjects_cff::id, nChargedParticleTracks, and theChargedTracks.

◆ clear()

void FBaseSimEvent::clear ( void  )

clear the FBaseSimEvent content before the next event

Definition at line 644 of file FBaseSimEvent.cc.

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

References nChargedParticleTracks, nGenParticles, nSimTracks, and nSimVertices.

Referenced by fill().

◆ embdGenpart()

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

return MC track with a given id

Definition at line 666 of file FBaseSimEvent.cc.

666 { return (*theGenParticles)[i]; }

References mps_fire::i, and 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.

82  {
83  // Clear old vectors
84  clear();
85 
86  // Add the particles in the FSimEvent
87  addParticles(myGenEvent);
88 }

References addParticles(), and clear().

Referenced by FSimEvent::fill().

◆ 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.

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 }

References funct::abs(), addSimTrack(), addSimVertex(), TrackValidation_cff::association, FSimTrack::charge(), clear(), RawParticle::cos2ThetaV(), SimTrack::genpartIndex(), BaseParticlePropagator::getSuccess(), createfilelist::int, lateVertexPosition, makeParticle(), FSimTrack::momentum(), objects.autophobj::motherId, SimVertex::noParent(), FSimTrack::notYetToEndVertex(), nTracks(), 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, OrderedSet::t, theTable(), track(), SimTrack::trackerSurfaceMomentum(), SimTrack::trackerSurfacePosition(), CoreSimTrack::type(), FSimTrack::vertex(), vertex(), RawParticle::vertex(), SimTrack::vertIndex(), x, y, and z.

◆ filter()

const KineParticleFilter& FBaseSimEvent::filter ( ) const
inline

Definition at line 121 of file FBaseSimEvent.h.

121 { return *myFilter; }

References myFilter.

Referenced by TrajectoryManager::reconstruct().

◆ 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.

131 { return theGenParticles; }

References theGenParticles.

◆ initializePdt()

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

Initialize the particle data table.

Definition at line 80 of file FBaseSimEvent.cc.

80 { pdt = aPdt; }

References pdt.

Referenced by FamosManager::setupGeometryAndField().

◆ nChargedTracks()

unsigned int FBaseSimEvent::nChargedTracks ( ) const
inline

Number of "reconstructed" charged tracks.

Definition at line 87 of file FBaseSimEvent.h.

87 { return nChargedParticleTracks; }

References nChargedParticleTracks.

◆ nGenParts()

unsigned int FBaseSimEvent::nGenParts ( ) const
inline

Number of generator particles.

Definition at line 84 of file FBaseSimEvent.h.

84 { return nGenParticles; }

References nGenParticles.

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

◆ nTracks()

unsigned int FBaseSimEvent::nTracks ( ) const
inline

Number of tracks.

Definition at line 78 of file FBaseSimEvent.h.

78 { return nSimTracks; }

References nSimTracks.

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

◆ nVertices()

unsigned int FBaseSimEvent::nVertices ( ) const
inline

Number of vertices.

Definition at line 81 of file FBaseSimEvent.h.

81 { return nSimVertices; }

References nSimVertices.

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

◆ print()

void FBaseSimEvent::print ( void  ) const

print the FBaseSimEvent in an intelligible way

Definition at line 632 of file FBaseSimEvent.cc.

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 }

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

Referenced by CalorimetryManager::reconstruct().

◆ printMCTruth()

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

print the original MCTruth event

Definition at line 551 of file FBaseSimEvent.cc.

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 }

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

◆ theTable()

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

Get the pointer to the particle data table.

Definition at line 54 of file FBaseSimEvent.h.

54 { return pdt; }

References pdt.

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

◆ 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.

125 { return theSimTracks; }

References 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.

128 { return theSimVertices; }

References 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 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().

myFilter
Definition: myFilter.h:12
BaseParticlePropagator::propagateToHcalExit
bool propagateToHcalExit(bool first=true)
Definition: BaseParticlePropagator.cc:528
DDAxes::y
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
FSimTrack::charge
float charge() const
charge
Definition: FSimTrack.h:56
RawParticle
Definition: RawParticle.h:37
mps_fire.i
i
Definition: mps_fire.py:355
FSimVertexType
A FSimVertexType hold the information on the vertex origine.
Definition: FSimVertexType.h:18
BaseParticlePropagator::propagateToEcalEntrance
bool propagateToEcalEntrance(bool first=true)
Definition: BaseParticlePropagator.cc:450
SimVertex
Definition: SimVertex.h:5
FBaseSimEvent::theFSimVerticesType
FSimVertexTypeCollection * theFSimVerticesType
Definition: FBaseSimEvent.h:136
BaseParticlePropagator::particle
RawParticle const & particle() const
The particle being propagated.
Definition: BaseParticlePropagator.h:164
SimVertex::parentIndex
int parentIndex() const
Definition: SimVertex.h:29
FBaseSimEvent::theSimVertices
std::vector< FSimVertex > * theSimVertices
Definition: FBaseSimEvent.h:135
FBaseSimEvent::vertexType
FSimVertexType & vertexType(int id) const
Return vertex with given Id.
FSimTrack::setLayer1
void setLayer1(const RawParticle &pp, int success)
Set the preshower layer1 variables.
Definition: FSimTrack.cc:106
FSimTrack::setEcal
void setEcal(const RawParticle &pp, int success)
Set the ecal variables.
Definition: FSimTrack.cc:118
FBaseSimEvent::theVertexSize
unsigned int theVertexSize
Definition: FBaseSimEvent.h:147
FSimTrack::setEndVertex
void setEndVertex(int endv)
Set the end vertex.
Definition: FSimTrack.h:167
makeParticle
RawParticle makeParticle(HepPDT::ParticleDataTable const *, int id, const math::XYZTLorentzVector &p)
Definition: makeParticle.cc:28
RawParticle::vertex
const XYZTLorentzVector & vertex() const
the vertex fourvector
Definition: RawParticle.h:320
class-composition.children
children
Definition: class-composition.py:88
FBaseSimEvent::vertex
FSimVertex & vertex(int id) const
Return vertex with given Id.
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
FBaseSimEvent::lateVertexPosition
double lateVertexPosition
Definition: FBaseSimEvent.h:161
gather_cfg.cout
cout
Definition: gather_cfg.py:144
pos
Definition: PixelAliasList.h:18
FSimVertexType::PRIMARY_VERTEX
Definition: FSimVertexType.h:24
SimTrack::trackerSurfaceMomentum
const math::XYZTLorentzVectorD & trackerSurfaceMomentum() const
Definition: SimTrack.h:39
FBaseSimEvent::clear
void clear()
clear the FBaseSimEvent content before the next event
Definition: FBaseSimEvent.cc:644
FBaseSimEvent::addParticles
void addParticles(const HepMC::GenEvent &hev)
Add the particles and their vertices to the list.
Definition: FBaseSimEvent.cc:311
FBaseSimEvent::nVertices
unsigned int nVertices() const
Number of vertices.
Definition: FBaseSimEvent.h:81
XYZVector
math::XYZVector XYZVector
Definition: RawParticle.h:26
TrackCandidateProducer_cfi.simTracks
simTracks
Definition: TrackCandidateProducer_cfi.py:15
BaseParticlePropagator::getSuccess
int getSuccess() const
Has propagation been performed and was barrel or endcap reached ?
Definition: BaseParticlePropagator.h:296
DDAxes::x
XYZTLorentzVector
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:25
findQualityFiles.v
v
Definition: findQualityFiles.py:179
FSimVertex
Definition: FSimVertex.h:19
FSimTrack::setVFcal
void setVFcal(const RawParticle &pp, int success)
Set the hcal variables.
Definition: FSimTrack.cc:130
BaseParticlePropagator
Definition: BaseParticlePropagator.h:82
BeamMonitor_cff.primaryVertex
primaryVertex
hltOfflineBeamSpot for HLTMON
Definition: BeamMonitor_cff.py:7
BaseParticlePropagator::propagateToHcalEntrance
bool propagateToHcalEntrance(bool first=true)
Definition: BaseParticlePropagator.cc:476
pdg::mass
double mass(int pdgID, const HepPDT::ParticleDataTable *pdt)
Definition: pdg_functions.cc:18
part
part
Definition: HCALResponse.h:20
FBaseSimEvent::track
FSimTrack & track(int id) const
Return track with given Id.
BaseParticlePropagator::propagateToPreshowerLayer2
bool propagateToPreshowerLayer2(bool first=true)
Definition: BaseParticlePropagator.cc:431
PVValHelper::eta
Definition: PVValidationHelpers.h:69
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
FBaseSimEvent::nSimVertices
unsigned int nSimVertices
Definition: FBaseSimEvent.h:142
DDAxes::z
FBaseSimEvent::initialSize
unsigned int initialSize
Definition: FBaseSimEvent.h:150
BaseParticlePropagator::propagateToHOLayer
bool propagateToHOLayer(bool first=true)
Definition: BaseParticlePropagator.cc:545
dqmdumpme.k
k
Definition: dqmdumpme.py:60
OrderedSet.t
t
Definition: OrderedSet.py:90
FBaseSimEvent::theTable
const HepPDT::ParticleDataTable * theTable() const
Get the pointer to the particle data table.
Definition: FBaseSimEvent.h:54
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FSimVertex::addDaughter
void addDaughter(int i)
Definition: FSimVertex.h:45
FSimTrack::addDaughter
void addDaughter(int i)
Add a RecHit for a track on a layer.
Definition: FSimTrack.h:200
FBaseSimEvent::theChargedTracks
std::vector< unsigned > * theChargedTracks
Definition: FBaseSimEvent.h:139
FBaseSimEvent::myFilter
KineParticleFilter * myFilter
The particle filter.
Definition: FBaseSimEvent.h:153
FBaseSimEvent::addSimTrack
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.
Definition: FBaseSimEvent.cc:484
SimTrack::trackerSurfacePosition
const math::XYZVectorD & trackerSurfacePosition() const
Definition: SimTrack.h:37
FSimTrack::vertex
const FSimVertex vertex() const
Origin vertex.
FBaseSimEvent::nGenParts
unsigned int nGenParts() const
Number of generator particles.
Definition: FBaseSimEvent.h:84
FSimVertex::position
const math::XYZTLorentzVector & position() const
Temporary (until CMSSW moves to Mathcore) - No ! Actually very useful.
Definition: FSimVertex.h:48
RawParticle::cos2ThetaV
double cos2ThetaV() const
Definition: RawParticle.h:281
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
createfilelist.int
int
Definition: createfilelist.py:10
FBaseSimEvent::theSimTracks
std::vector< FSimTrack > * theSimTracks
Definition: FBaseSimEvent.h:134
FBaseSimEvent::nSimTracks
unsigned int nSimTracks
Definition: FBaseSimEvent.h:141
BaseParticlePropagator::propagateToPreshowerLayer1
bool propagateToPreshowerLayer1(bool first=true)
Definition: BaseParticlePropagator.cc:412
SimVertex::noParent
bool noParent() const
Definition: SimVertex.h:30
FBaseSimEvent::theChargedSize
unsigned int theChargedSize
Definition: FBaseSimEvent.h:149
CoreSimTrack::type
int type() const
particle type (HEP PDT convension)
Definition: CoreSimTrack.h:22
FSimVertexType::DECAY_VERTEX
Definition: FSimVertexType.h:28
FSimTrack::momentum
const XYZTLorentzVector & momentum() const
Temporary (until move of SimTrack to Mathcore) - No! Actually very useful.
Definition: FSimTrack.h:209
TrackValidation_cff.association
association
Definition: TrackValidation_cff.py:286
BaseParticlePropagator::setMagneticField
void setMagneticField(double b)
Set the magnetic field.
Definition: BaseParticlePropagator.h:299
FBaseSimEvent::theTrackSize
unsigned int theTrackSize
Definition: FBaseSimEvent.h:146
FSimTrack::setHO
void setHO(const RawParticle &pp, int success)
Set the ho variables.
Definition: FSimTrack.cc:141
objects.autophobj.motherId
motherId
Definition: autophobj.py:237
type
type
Definition: HCALResponse.h:21
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
FSimTrack::setHcal
void setHcal(const RawParticle &pp, int success)
Set the hcal variables.
Definition: FSimTrack.cc:124
SimTrack
Definition: SimTrack.h:6
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
FBaseSimEvent::nChargedParticleTracks
unsigned int nChargedParticleTracks
Definition: FBaseSimEvent.h:144
SimTrack::vertIndex
int vertIndex() const
index of the vertex in the Event container (-1 if no vertex)
Definition: SimTrack.h:30
FSimTrack::setHcalExit
void setHcalExit(const RawParticle &pp, int success)
Set the hcal exit variables.
Definition: FSimTrack.cc:136
BaseParticlePropagator::propagateToVFcalEntrance
bool propagateToVFcalEntrance(bool first=true)
Definition: BaseParticlePropagator.cc:505
KineParticleFilter
Definition: KineParticleFilter.h:11
FBaseSimEvent::nTracks
unsigned int nTracks() const
Number of tracks.
Definition: FBaseSimEvent.h:78
FSimTrack::notYetToEndVertex
bool notYetToEndVertex(const XYZTLorentzVector &pos) const
Compare the end vertex position with another position.
Definition: FSimTrack.cc:85
FSimVertexTypeCollection
std::vector< FSimVertexType > FSimVertexTypeCollection
collection of FSimVertexType objects
Definition: FSimVertexTypeFwd.h:7
FSimTrack
Definition: FSimTrack.h:30
FBaseSimEvent::addSimVertex
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.
Definition: FBaseSimEvent.cc:526
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HGCalValidator_cfi.simVertices
simVertices
Definition: HGCalValidator_cfi.py:43
FBaseSimEvent::nGenParticles
unsigned int nGenParticles
Definition: FBaseSimEvent.h:143
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:78
SimTrack::genpartIndex
int genpartIndex() const
index of the corresponding Generator particle in the Event container (-1 if no Genpart)
Definition: SimTrack.h:34
class-composition.parent
parent
Definition: class-composition.py:88
LHEGenericFilter_cfi.ParticleID
ParticleID
Definition: LHEGenericFilter_cfi.py:6
FBaseSimEvent::pdt
const ParticleDataTable * pdt
Definition: FBaseSimEvent.h:159
FBaseSimEvent::theGenParticles
std::vector< HepMC::GenParticle * > * theGenParticles
Definition: FBaseSimEvent.h:137
FBaseSimEvent::theGenSize
unsigned int theGenSize
Definition: FBaseSimEvent.h:148
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
FSimTrack::setLayer2
void setLayer2(const RawParticle &pp, int success)
Set the preshower layer2 variables.
Definition: FSimTrack.cc:112