DD4hep  1.32.1
Detector Description Toolkit for High Energy Physics
EDM4hepFileReader.cpp
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : A.Sailer
11 //
12 //==========================================================================
13 
24 #include <CLHEP/Units/SystemOfUnits.h>
25 
26 #include <DDG4/EventParameters.h>
27 #include <DDG4/Factories.h>
28 #include <DDG4/FileParameters.h>
29 #include <DDG4/Geant4InputAction.h>
30 #include <DDG4/RunParameters.h>
31 
32 #include <edm4hep/Constants.h>
33 #include <edm4hep/EventHeaderCollection.h>
34 #include <edm4hep/MCParticleCollection.h>
35 #include <edm4hep/EDM4hepVersion.h>
36 #if EDM4HEP_BUILD_VERSION >= EDM4HEP_VERSION(0, 99, 3)
37 #include <edm4hep/GeneratorEventParametersCollection.h>
38 #endif
39 
40 #include <podio/Frame.h>
41 #include <podio/Reader.h>
42 
43 typedef dd4hep::detail::ReferenceBitMask<int> PropertyMask;
44 
45 
46 namespace dd4hep::sim {
47 
48  // we use the index of the objectID to identify particles
49  // we will not support MCParticles from different collections
50  using MCPARTICLE_MAP=std::map<int, int>;
51 
54  template <class T=podio::GenericParameters> void EventParameters::ingestParameters(T const& source) {
55  for(auto const& key: source.template getKeys<int>()) {
56  m_intValues[key] = source.template get<std::vector<int>>(key).value();
57  }
58  for(auto const& key: source.template getKeys<float>()) {
59  m_fltValues[key] = source.template get<std::vector<float>>(key).value();
60  }
61  for(auto const& key: source.template getKeys<double>()) {
62  m_dblValues[key] = source.template get<std::vector<double>>(key).value();
63  }
64  for(auto const& key: source.template getKeys<std::string>()) {
65  m_strValues[key] = source.template get<std::vector<std::string>>(key).value();
66  }
67  }
68 
71  template <class T=podio::GenericParameters> void RunParameters::ingestParameters(T const& source) {
72  for(auto const& key: source.template getKeys<int>()) {
73  m_intValues[key] = source.template get<std::vector<int>>(key).value();
74  }
75  for(auto const& key: source.template getKeys<float>()) {
76  m_fltValues[key] = source.template get<std::vector<float>>(key).value();
77  }
78  for(auto const& key: source.template getKeys<double>()) {
79  m_dblValues[key] = source.template get<std::vector<double>>(key).value();
80  }
81  for(auto const& key: source.template getKeys<std::string>()) {
82  m_strValues[key] = source.template get<std::vector<std::string>>(key).value();
83  }
84  }
85 
86  template <class T=podio::GenericParameters> void FileParameters::ingestParameters(T const& source) {
87  for(auto const& key: source.template getKeys<int>()) {
88  m_intValues[key] = source.template get<std::vector<int>>(key).value();
89  }
90  for(auto const& key: source.template getKeys<float>()) {
91  m_fltValues[key] = source.template get<std::vector<float>>(key).value();
92  }
93  for(auto const& key: source.template getKeys<double>()) {
94  m_dblValues[key] = source.template get<std::vector<double>>(key).value();
95  }
96  for(auto const& key: source.template getKeys<std::string>()) {
97  m_strValues[key] = source.template get<std::vector<std::string>>(key).value();
98  }
99  }
100 
102 
107  protected:
109  podio::Reader m_reader;
111  std::string m_collectionName;
114 
115  public:
117  EDM4hepFileReader(const std::string& nam);
118 
120  virtual EventReaderStatus setParameters(std::map< std::string, std::string >& parameters);
121 
123  virtual EventReaderStatus readParticles(int event_number, Vertices& vertices, std::vector<Particle*>& particles);
125  void registerRunParameters();
126 
127  };
128 
131  : Geant4EventReader(nam)
132  , m_reader(podio::makeReader(nam))
133  , m_collectionName("MCParticles")
134  , m_eventHeaderCollectionName("EventHeader")
135  {
136  printout(INFO,"EDM4hepFileReader","Created file reader. Try to open input %s",nam.c_str());
137  m_directAccess = true;
138  }
139 
141  try {
142  // get RunParameters or create new if not existent yet
143  auto* parameters = context()->run().extension<RunParameters>(false);
144  if (!parameters) {
145  parameters = new RunParameters();
146  context()->run().addExtension<RunParameters>(parameters);
147  }
148  try {
149  podio::Frame runFrame = m_reader.readFrame("runs", 0);
150  parameters->ingestParameters(runFrame.getParameters());
151  } catch (std::runtime_error& e) {
152  // we ignore if we do not have runs information
153  } catch(std::invalid_argument&) {
154  // we ignore if we do not have runs information
155  }
156  } catch(std::exception &e) {
157  printout(ERROR,"EDM4hepFileReader::registerRunParameters","Failed to register run parameters: %s", e.what());
158  }
159 
160  try {
161  auto *fileParameters = new FileParameters();
162  try {
163  podio::Frame metaFrame = m_reader.readFrame("metadata", 0);
164  fileParameters->ingestParameters(metaFrame.getParameters());
165  } catch (std::runtime_error& e) {
166  // we ignore if we do not have metadata information
167  } catch(std::invalid_argument&) {
168  // we ignore if we do not have metadata information
169  }
170  context()->run().addExtension<FileParameters>(fileParameters);
171  } catch(std::exception &e) {
172  printout(ERROR,"EDM4hepFileReader::registerRunParameters","Failed to register file parameters: %s", e.what());
173  }
174  }
175 
176  namespace {
178  inline int GET_ENTRY(MCPARTICLE_MAP const& mcparts, int partID) {
179  MCPARTICLE_MAP::const_iterator ip = mcparts.find(partID);
180  if ( ip == mcparts.end() ) {
181  throw std::runtime_error("Unknown particle identifier look-up!");
182  }
183  return (*ip).second;
184  }
185  }
186 
189  EDM4hepFileReader::readParticles(int event_number, Vertices& vertices, std::vector<Particle*>& particles) {
190  m_currEvent = event_number;
191  podio::Frame frame = m_reader.readFrame("events", event_number);
192  const auto& primaries = frame.get<edm4hep::MCParticleCollection>(m_collectionName);
193  int eventNumber = event_number, runNumber = 0;
194  if (primaries.isValid()) {
195  //Read the event header collection and add it to the context as an extension
196  const auto& eventHeaderCollection = frame.get<edm4hep::EventHeaderCollection>(m_eventHeaderCollectionName);
197  if(eventHeaderCollection.isValid() && eventHeaderCollection.size() == 1){
198  const auto& eh = eventHeaderCollection.at(0);
199  eventNumber = eh.getEventNumber();
200  runNumber = eh.getRunNumber();
201  try {
202  Geant4Context* ctx = context();
203  ctx->event().addExtension<edm4hep::MutableEventHeader>(new edm4hep::MutableEventHeader(eh.clone()));
204  } catch(std::exception& ) {}
205  // Create input event parameters context
206  try {
207  Geant4Context* ctx = context();
208  EventParameters *parameters = new EventParameters();
209  parameters->setRunNumber(runNumber);
210  parameters->setEventNumber(eventNumber);
211  parameters->ingestParameters(frame.getParameters());
212  ctx->event().addExtension<EventParameters>(parameters);
213  } catch(std::exception &) {}
214  } else {
215  printout(WARNING,"EDM4hepFileReader","No EventHeader collection found or too many event headers!");
216  try {
217  Geant4Context* ctx = context();
218  EventParameters *parameters = new EventParameters();
219  parameters->setRunNumber(0);
220  parameters->setEventNumber(event_number);
221  parameters->ingestParameters(frame.getParameters());
222  ctx->event().addExtension<EventParameters>(parameters);
223  } catch(std::exception &) {}
224  }
225 #if EDM4HEP_BUILD_VERSION >= EDM4HEP_VERSION(0, 99, 3)
226  // Attach the GeneratorEventParameters if they are available
227  const auto &genEvtParameters = frame.get<edm4hep::GeneratorEventParametersCollection>(edm4hep::labels::GeneratorEventParameters);
228  if (genEvtParameters.isValid()) {
229  if (genEvtParameters.size() >= 1) {
230  const auto genParams = genEvtParameters[0];
231  try {
232  auto *ctx = context();
233  ctx->event().addExtension(new edm4hep::MutableGeneratorEventParameters(genParams.clone()));
234  } catch (std::exception &) {}
235  }
236  if (genEvtParameters.size() > 1) {
237  printout(WARNING, "EDM4hepFileReader", "Multiple GeneratorEventParameters found in input file. Ignoring all but the first one!");
238  }
239  } else {
240  printout(DEBUG, "EDM4hepFileReader", "No GeneratorEventParameters found in input file");
241  }
242 #endif
243  printout(INFO,"EDM4hepFileReader","read collection %s from event %d in run %d ",
244  m_collectionName.c_str(), eventNumber, runNumber);
245 
246  } else {
247  return EVENT_READER_EOF;
248  }
249 
250  printout(INFO,"EDM4hepFileReader", "We read the particle collection");
251  int NHEP = primaries.size();
252  // check if there is at least one particle
253  if ( NHEP == 0 ) {
254  printout(WARNING,"EDM4hepFileReader", "We have no particles");
256  }
257 
258  MCPARTICLE_MAP mcparts;
259  std::vector<int> mcpcoll;
260  mcpcoll.resize(NHEP);
261  for(int i=0; i<NHEP; ++i ) {
262  edm4hep::MCParticle p = primaries.at(i);
263  mcparts[p.getObjectID().index] = i;
264  mcpcoll[i] = p.getObjectID().index;
265  }
266 
267  // build collection of MCParticles
268  for(int i=0; i<NHEP; ++i ) {
269  const auto& mcp = primaries.at(i);
270  Geant4ParticleHandle p(new Particle(i));
271  const auto mom = mcp.getMomentum();
272  const auto vsx = mcp.getVertex();
273  const auto vex = mcp.getEndpoint();
274  const int pdg = mcp.getPDG();
275 #ifdef EDM4HEP_MCPARTICLE_HAS_HELICITY
276  p->spin[0] = 0;
277  p->spin[1] = 0;
278  p->spin[2] = mcp.getHelicity();
279 #else
280  const auto spin = mcp.getSpin();
281  p->spin[0] = spin[0];
282  p->spin[1] = spin[1];
283  p->spin[2] = spin[2];
284 #endif
285  p->pdgID = pdg;
286  p->charge = int(mcp.getCharge()*3.0);
287  p->psx = mom[0]*CLHEP::GeV;
288  p->psy = mom[1]*CLHEP::GeV;
289  p->psz = mom[2]*CLHEP::GeV;
290  p->time = mcp.getTime()*CLHEP::ns;
291  p->properTime = mcp.getTime()*CLHEP::ns;
292  p->vsx = vsx[0]*CLHEP::mm;
293  p->vsy = vsx[1]*CLHEP::mm;
294  p->vsz = vsx[2]*CLHEP::mm;
295  p->vex = vex[0]*CLHEP::mm;
296  p->vey = vex[1]*CLHEP::mm;
297  p->vez = vex[2]*CLHEP::mm;
298  p->process = 0;
299  p->colorFlow[0] = 0;
300  p->colorFlow[1] = 0;
301  p->mass = mcp.getMass()*CLHEP::GeV;
302  const auto par = mcp.getParents(), &dau=mcp.getDaughters();
303  for(int num=dau.size(),k=0; k<num; ++k) {
304  edm4hep::MCParticle dau_k = dau[k];
305  p->daughters.insert(GET_ENTRY(mcparts,dau_k.getObjectID().index));
306  }
307  for(int num=par.size(),k=0; k<num; ++k) {
308  auto par_k = par[k];
309  p->parents.insert(GET_ENTRY(mcparts, par_k.getObjectID().index));
310  }
311 
312  PropertyMask status(p->status);
313  int genStatus = mcp.getGeneratorStatus();
314  // Copy raw generator status
315  p->genStatus = genStatus&G4PARTICLE_GEN_STATUS_MASK;
316  if(m_inputAction) {
317  // in some tests we do not set up the inputAction
318  m_inputAction->setGeneratorStatus(genStatus, status);
319  }
320 
321  //fg: we simply add all particles without parents as with their own vertex.
322  // This might include the incoming beam particles, e.g. in
323  // the case of lcio files written with Whizard2, which is slightly odd,
324  // however should be treated correctly in Geant4InputHandling.cpp.
325  // We no longer make an attempt to identify the incoming particles
326  // based on the generator status, as this varies widely with different
327  // generators.
328 
329  if ( p->parents.size() == 0 ) {
330 
331  Geant4Vertex* vtx = new Geant4Vertex ;
332  vertices.emplace_back( vtx );
333  vtx->x = p->vsx;
334  vtx->y = p->vsy;
335  vtx->z = p->vsz;
336  vtx->time = p->time;
337 
338  vtx->out.insert(p->id) ;
339  }
340 
341  if ( mcp.isCreatedInSimulation() ) status.set(G4PARTICLE_SIM_CREATED);
342  if ( mcp.isBackscatter() ) status.set(G4PARTICLE_SIM_BACKSCATTER);
343  if ( mcp.vertexIsNotEndpointOfParent() ) status.set(G4PARTICLE_SIM_PARENT_RADIATED);
344  if ( mcp.isDecayedInTracker() ) status.set(G4PARTICLE_SIM_DECAY_TRACKER);
345  if ( mcp.isDecayedInCalorimeter() ) status.set(G4PARTICLE_SIM_DECAY_CALO);
346  if ( mcp.hasLeftDetector() ) status.set(G4PARTICLE_SIM_LEFT_DETECTOR);
347  if ( mcp.isStopped() ) status.set(G4PARTICLE_SIM_STOPPED);
348  if ( mcp.isOverlay() ) status.set(G4PARTICLE_SIM_OVERLAY);
349  particles.emplace_back(p);
350  }
351  return EVENT_READER_OK;
352  }
353 
357  dd4hep::sim::EDM4hepFileReader::setParameters( std::map< std::string, std::string > & parameters ) {
358  _getParameterValue(parameters, "MCParticleCollectionName", m_collectionName, m_collectionName);
359  _getParameterValue(parameters, "EventHeaderCollectionName", m_eventHeaderCollectionName, m_eventHeaderCollectionName);
360  return EVENT_READER_OK;
361  }
362 
363 } //end dd4hep::sim
364 
dd4hep::sim::G4PARTICLE_SIM_CREATED
@ G4PARTICLE_SIM_CREATED
Definition: Geant4Particle.h:85
dd4hep::sim::EDM4hepFileReader::setParameters
virtual EventReaderStatus setParameters(std::map< std::string, std::string > &parameters)
Read parameters set for this action.
Definition: EDM4hepFileReader.cpp:357
dd4hep::sim::Geant4EventReader::EVENT_READER_EOF
@ EVENT_READER_EOF
Definition: Geant4InputAction.h:75
dd4hep::sim::Geant4Particle::vsz
double vsz
Definition: Geant4Particle.h:124
dd4hep::sim::Geant4EventReader::context
Geant4Context * context() const
Get the context (from the input action)
Definition: Geant4InputAction.cpp:41
dd4hep::sim::EDM4hepFileReader::EDM4hepFileReader
EDM4hepFileReader(const std::string &nam)
Initializing constructor.
Definition: EDM4hepFileReader.cpp:130
dd4hep::sim::G4PARTICLE_SIM_PARENT_RADIATED
@ G4PARTICLE_SIM_PARENT_RADIATED
Definition: Geant4Particle.h:91
dd4hep::sim::Geant4Vertex::y
double y
Definition: Geant4Vertex.h:53
dd4hep::sim::Geant4Particle::mass
double mass
Particle mass.
Definition: Geant4Particle.h:132
dd4hep::sim::Geant4Particle::vey
double vey
Definition: Geant4Particle.h:126
dd4hep::sim::Geant4EventReader::EventReaderStatus
EventReaderStatus
Status codes of the event reader object. Anything with NOT low-bit set is an error.
Definition: Geant4InputAction.h:68
dd4hep::exception
void exception(const std::string &src, const std::string &msg)
Definition: RootDictionary.h:69
dd4hep::sim::ExtensionParameters::m_strValues
std::map< std::string, std::vector< std::string > > m_strValues
Definition: ExtensionParameters.h:35
dd4hep::sim::Geant4Context::run
Geant4Run & run() const
Access the geant4 run – valid only between BeginRun() and EndRun()!
Definition: Geant4Context.cpp:72
dd4hep::sim::Geant4Particle::id
int id
not persistent
Definition: Geant4Particle.h:108
dd4hep::sim::EventParameters::setRunNumber
void setRunNumber(int runNumber)
Set the event parameters.
Definition: EventParameters.cpp:20
dd4hep::sim::EDM4hepFileReader::m_collectionName
std::string m_collectionName
Name of the MCParticle collection to read.
Definition: EDM4hepFileReader.cpp:111
dd4hep::sim::EDM4hepFileReader::readParticles
virtual EventReaderStatus readParticles(int event_number, Vertices &vertices, std::vector< Particle * > &particles)
Read an event and fill a vector of MCParticles.
Definition: EDM4hepFileReader.cpp:189
dd4hep::sim::Geant4Particle::pdgID
int pdgID
Definition: Geant4Particle.h:115
dd4hep::sim::EventParameters::setEventNumber
void setEventNumber(int eventNumber)
Definition: EventParameters.cpp:23
dd4hep::sim::Geant4Particle::psz
double psz
Definition: Geant4Particle.h:128
DECLARE_GEANT4_EVENT_READER_NS
#define DECLARE_GEANT4_EVENT_READER_NS(name_space, name)
Plugin defintion to create event reader objects.
Definition: Factories.h:240
dd4hep::sim::Geant4Context::event
Geant4Event & event() const
Access the geant4 event – valid only between BeginEvent() and EndEvent()!
Definition: Geant4Context.cpp:84
dd4hep::sim::G4PARTICLE_GEN_STATUS_MASK
@ G4PARTICLE_GEN_STATUS_MASK
Definition: Geant4Particle.h:83
m_reader
UriReader * m_reader
Pointer to URI reader.
Definition: DocumentHandler.cpp:154
dd4hep::sim::G4PARTICLE_SIM_BACKSCATTER
@ G4PARTICLE_SIM_BACKSCATTER
Definition: Geant4Particle.h:86
RunParameters.h
dd4hep::sim::Geant4EventReader::m_currEvent
int m_currEvent
Current event number.
Definition: Geant4InputAction.h:83
dd4hep::sim::RunParameters
Extension to pass input run data to output run data.
Definition: RunParameters.h:28
FileParameters.h
dd4hep::sim::Geant4EventReader::Particle
Geant4Particle Particle
Definition: Geant4InputAction.h:64
dd4hep::sim::G4PARTICLE_SIM_STOPPED
@ G4PARTICLE_SIM_STOPPED
Definition: Geant4Particle.h:89
EDM4hepFileReader
Plugin to read EDM4hep files.
EventParameters.h
dd4hep::sim::EDM4hepFileReader::m_reader
podio::Reader m_reader
Reference to reader object.
Definition: EDM4hepFileReader.cpp:109
dd4hep::sim::Geant4Run::addExtension
void * addExtension(unsigned long long int k, ExtensionEntry *e)
Add an extension object to the detector element.
Definition: Geant4Context.h:84
dd4hep::sim::EventParameters::ingestParameters
void ingestParameters(T const &source)
Copy the parameters from source.
Definition: EDM4hepFileReader.cpp:54
dd4hep::sim::Geant4Particle::vez
double vez
Definition: Geant4Particle.h:126
dd4hep::sim::G4PARTICLE_SIM_DECAY_CALO
@ G4PARTICLE_SIM_DECAY_CALO
Definition: Geant4Particle.h:87
dd4hep::sim::EDM4hepFileReader::registerRunParameters
void registerRunParameters()
Call to register the run parameters.
Definition: EDM4hepFileReader.cpp:140
dd4hep::sim::Geant4Vertex::x
double x
Vertex data.
Definition: Geant4Vertex.h:53
dd4hep::sim::Geant4Particle::colorFlow
int colorFlow[2]
Definition: Geant4Particle.h:117
dd4hep::sim::Geant4Particle::spin
float spin[3]
Definition: Geant4Particle.h:121
dd4hep::sim::Geant4Particle::genStatus
unsigned short genStatus
Definition: Geant4Particle.h:118
dd4hep::sim::ExtensionParameters::m_intValues
std::map< std::string, std::vector< int > > m_intValues
Definition: ExtensionParameters.h:33
dd4hep::sim::Geant4Particle::status
int status
Definition: Geant4Particle.h:116
dd4hep::sim::Geant4EventReader::m_directAccess
bool m_directAccess
Flag if direct event access is supported. To be explicitly set by subclass constructors.
Definition: Geant4InputAction.h:81
dd4hep::sim::G4PARTICLE_SIM_OVERLAY
@ G4PARTICLE_SIM_OVERLAY
Definition: Geant4Particle.h:92
dd4hep::sim::Geant4Particle::daughters
Particles daughters
The list of daughters of this MC particle.
Definition: Geant4Particle.h:140
dd4hep::sim::G4PARTICLE_SIM_DECAY_TRACKER
@ G4PARTICLE_SIM_DECAY_TRACKER
Definition: Geant4Particle.h:88
dd4hep::sim::FileParameters
Extension to pass input run data to output run data.
Definition: FileParameters.h:28
dd4hep::sim::ExtensionParameters::m_dblValues
std::map< std::string, std::vector< double > > m_dblValues
Definition: ExtensionParameters.h:36
dd4hep::sim::Geant4InputAction::setGeneratorStatus
void setGeneratorStatus(int generatorStatus, PropertyMask &status)
Convert the generator status into a common set of generator status bits.
dd4hep::sim::Geant4Particle::time
double time
Particle creation time.
Definition: Geant4Particle.h:134
dd4hep::sim::Geant4Particle::process
const G4VProcess * process
Reference to the G4VProcess, which created this track.
Definition: Geant4Particle.h:145
dd4hep::sim::Geant4EventReader::m_inputAction
Geant4InputAction * m_inputAction
The input action context.
Definition: Geant4InputAction.h:85
dd4hep::sim::Geant4EventReader
Basic geant4 event reader class. This interface/base-class must be implemented by concrete readers.
Definition: Geant4InputAction.h:60
dd4hep::sim::MCPARTICLE_MAP
std::map< int, int > MCPARTICLE_MAP
Definition: EDM4hepFileReader.cpp:50
dd4hep::sim::Geant4Vertex::out
Particles out
The list of outgoing particles.
Definition: Geant4Vertex.h:55
dd4hep::sim::Geant4Particle::vex
double vex
The end vertex.
Definition: Geant4Particle.h:126
dd4hep::sim::ExtensionParameters::m_fltValues
std::map< std::string, std::vector< float > > m_fltValues
Definition: ExtensionParameters.h:34
dd4hep::sim::Geant4Run::extension
T * extension(bool alert=true)
Access to type safe extension object. Exception is thrown if the object is invalid.
Definition: Geant4Context.h:95
dd4hep::sim::Geant4Particle::vsx
double vsx
The starting vertex.
Definition: Geant4Particle.h:124
dd4hep::sim::Geant4Particle::psx
double psx
The track momentum at the start vertex.
Definition: Geant4Particle.h:128
dd4hep::sim::Geant4Event::addExtension
void * addExtension(unsigned long long int k, ExtensionEntry *e)
Add an extension object to the detector element.
Definition: Geant4Context.h:140
Factories.h
dd4hep::sim::G4PARTICLE_SIM_LEFT_DETECTOR
@ G4PARTICLE_SIM_LEFT_DETECTOR
Definition: Geant4Particle.h:90
key
unsigned char key
Definition: AlignmentsCalculator.cpp:69
dd4hep::sim
Namespace for the Geant4 based simulation part of the AIDA detector description toolkit.
Definition: EDM4hepFileReader.cpp:46
Geant4InputAction.h
dd4hep::sim::EventParameters
Event extension to pass input event data to output event.
Definition: EventParameters.h:28
dd4hep::sim::Geant4EventReader::EVENT_READER_OK
@ EVENT_READER_OK
Definition: Geant4InputAction.h:70
dd4hep::sim::Geant4ParticleHandle
Data structure to access derived MC particle information.
Definition: Geant4Particle.h:181
dd4hep::sim::Geant4Vertex::time
double time
Definition: Geant4Vertex.h:53
dd4hep::sim::Geant4Particle::parents
Particles parents
The list of parents of this MC particle.
Definition: Geant4Particle.h:138
dd4hep::sim::Geant4Particle::vsy
double vsy
Definition: Geant4Particle.h:124
dd4hep::sim::Geant4Vertex::z
double z
Definition: Geant4Vertex.h:53
dd4hep::sim::Geant4EventReader::EVENT_READER_NO_PRIMARIES
@ EVENT_READER_NO_PRIMARIES
Definition: Geant4InputAction.h:72
dd4hep::sim::Geant4Vertex
Data structure to store the MC vertex information.
Definition: Geant4Vertex.h:45
dd4hep::sim::Geant4Particle::charge
char charge
Definition: Geant4Particle.h:119
PropertyMask
dd4hep::detail::ReferenceBitMask< int > PropertyMask
Definition: EDM4hepFileReader.cpp:43
dd4hep::sim::FileParameters::ingestParameters
void ingestParameters(T const &source)
Copy the parameters from source.
Definition: EDM4hepFileReader.cpp:86
dd4hep::sim::Geant4EventReader::Vertices
std::vector< Vertex * > Vertices
Definition: Geant4InputAction.h:66
dd4hep::sim::Geant4Particle::psy
double psy
Definition: Geant4Particle.h:128
dd4hep::sim::RunParameters::ingestParameters
void ingestParameters(T const &source)
Copy the parameters from source.
Definition: EDM4hepFileReader.cpp:71
dd4hep::sim::EDM4hepFileReader::m_eventHeaderCollectionName
std::string m_eventHeaderCollectionName
Name of the EventHeader collection to read.
Definition: EDM4hepFileReader.cpp:113
dd4hep::sim::Geant4Particle::properTime
double properTime
Proper time.
Definition: Geant4Particle.h:136
dd4hep::sim::Geant4Context
Generic context to extend user, run and event information.
Definition: Geant4Context.h:201