Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
gar::garg4::ParticleListAction Class Reference

#include <ParticleListAction.h>

Inheritance diagram for gar::garg4::ParticleListAction:

Classes

struct  ParticleInfo_t
 

Public Member Functions

 ParticleListAction (double energyCut, bool storeTrajectories=false, bool keepEMShowerDaughters=false, std::string EMShowerDaughterMatRegex=".*")
 
virtual ~ParticleListAction ()
 
virtual void BeginOfEventAction (const G4Event *)
 
virtual void EndOfEventAction (const G4Event *)
 
virtual void PreTrackingAction (const G4Track *)
 
virtual void PostTrackingAction (const G4Track *)
 
virtual void SteppingAction (const G4Step *)
 
void ParticleFilter (std::unique_ptr< PositionInVolumeFilter > &&filter)
 Grabs a particle filter. More...
 
void ResetTrackIDOffset ()
 
std::map< int, size_t > TrackIDToMCTruthIndexMap () const
 
sim::ParticleList * GetList () const
 
sim::ParticleList && YieldList ()
 

Static Public Member Functions

static int GetCurrentTrackID ()
 
static int GetTrackIDOffset ()
 
static bool IsDropped (simb::MCParticle const *p)
 returns whether the specified particle has been marked as dropped More...
 

Private Member Functions

int GetParentage (int trackid) const
 
void AddPointToCurrentParticle (TLorentzVector const &pos, TLorentzVector const &mom, std::string const &process)
 Adds a trajectory point to the current particle, and runs the filter. More...
 

Private Attributes

G4double fEnergyCut
 
ParticleInfo_t fCurrentParticle
 
sim::ParticleList * fParticleList
 
G4bool fstoreTrajectories
 Whether to store particle trajectories with each particle. More...
 
std::map< int, int > fParentIDMap
 key is current track ID, value is parent ID More...
 
std::map< int, size_t > fTrackIDToMCTruthIndex
 map track ID to index of MCTruth in input list More...
 
bool fKeepEMShowerDaughters
 whether to keep EM shower secondaries, tertiaries, etc More...
 
std::string fEMShowerDaughterMatRegex
 if keeping EM shower daughters, save only in media matching this More...
 
std::unique_ptr< PositionInVolumeFilterfFilter
 filter for particles to be kept More...
 

Static Private Attributes

static int fCurrentTrackID = sdp::NoParticleId
 
static int fTrackIDOffset = 0
 

Detailed Description

Definition at line 39 of file ParticleListAction.h.

Constructor & Destructor Documentation

gar::garg4::ParticleListAction::ParticleListAction ( double  energyCut,
bool  storeTrajectories = false,
bool  keepEMShowerDaughters = false,
std::string  EMShowerDaughterMatRegex = ".*" 
)

Definition at line 55 of file ParticleListAction.cxx.

59  : fEnergyCut (energyCut)
60  , fParticleList (new sim::ParticleList())
61  , fstoreTrajectories (storeTrajectories)
62  , fKeepEMShowerDaughters(keepEMShowerDaughters)
63  , fEMShowerDaughterMatRegex(EMShowerDaughterMatRegex)
64  {
65  fParentIDMap.clear();
66  }
std::map< int, int > fParentIDMap
key is current track ID, value is parent ID
std::string fEMShowerDaughterMatRegex
if keeping EM shower daughters, save only in media matching this
G4bool fstoreTrajectories
Whether to store particle trajectories with each particle.
bool fKeepEMShowerDaughters
whether to keep EM shower secondaries, tertiaries, etc
gar::garg4::ParticleListAction::~ParticleListAction ( )
virtual

Definition at line 70 of file ParticleListAction.cxx.

71  {
72  // Delete anything that we created with "new'.
73  delete fParticleList;
74  }

Member Function Documentation

void gar::garg4::ParticleListAction::AddPointToCurrentParticle ( TLorentzVector const &  pos,
TLorentzVector const &  mom,
std::string const &  process 
)
private

Adds a trajectory point to the current particle, and runs the filter.

Definition at line 541 of file ParticleListAction.cxx.

544  {
545 
546  // Add the first point in the trajectory.
548 
549  // also see if we can decide to keep the particle
550  if (!fCurrentParticle.keep)
551  fCurrentParticle.keep = fFilter->mustKeep(pos);
552 
553  } // ParticleListAction::AddPointToCurrentParticle()
void AddTrajectoryPoint(TLorentzVector const &position, TLorentzVector const &momentum)
Definition: MCParticle.h:257
std::unique_ptr< PositionInVolumeFilter > fFilter
filter for particles to be kept
def process(f, kind)
Definition: search.py:254
bool keep
if there was decision to keep
simb::MCParticle * particle
simple structure representing particle
void gar::garg4::ParticleListAction::BeginOfEventAction ( const G4Event *  )
virtual

Definition at line 78 of file ParticleListAction.cxx.

79  {
80  // Clear any previous particle information.
82  fParticleList->clear();
83  fParentIDMap.clear();
84  fTrackIDToMCTruthIndex.clear();
86 
87  }
std::map< int, int > fParentIDMap
key is current track ID, value is parent ID
static const int NoParticleId
Definition: sim.h:30
std::map< int, size_t > fTrackIDToMCTruthIndex
map track ID to index of MCTruth in input list
void clear()
Resets the information (does not release memory it does not own)
void gar::garg4::ParticleListAction::EndOfEventAction ( const G4Event *  )
virtual

Definition at line 486 of file ParticleListAction.cxx.

487  {
488  // Set up the utility class for the "for_each" algorithm. (We only
489  // need a separate set-up for the utility class because we need to
490  // give it the pointer to the particle list. We're using the STL
491  // "for_each" instead of the C++ "for loop" because it's supposed
492  // to be faster.
493  UpdateDaughterInformation updateDaughterInformation;
494  updateDaughterInformation.SetParticleList( fParticleList );
495 
496  // Update the daughter information for each particle in the list.
497  std::for_each(fParticleList->begin(),
498  fParticleList->end(),
499  updateDaughterInformation);
500  }
static int gar::garg4::ParticleListAction::GetCurrentTrackID ( )
inlinestatic

Definition at line 79 of file ParticleListAction.h.

sim::ParticleList * gar::garg4::ParticleListAction::GetList ( ) const

Definition at line 504 of file ParticleListAction.cxx.

505  {
506  // check if the ParticleNavigator has entries, and if
507  // so grab the highest track id value from it to
508  // add to the fTrackIDOffset
509  int highestID = 0;
510  for(auto pn = fParticleList->begin(); pn != fParticleList->end(); ++pn)
511  if( (*pn).first > highestID ) highestID = (*pn).first;
512 
513  fTrackIDOffset = highestID + 1;
514 
515  return fParticleList;
516  }
int gar::garg4::ParticleListAction::GetParentage ( int  trackid) const
private

Definition at line 93 of file ParticleListAction.cxx.

94  {
95  int parentid = sdp::NoParticleId;
96 
97  // search the fParentIDMap recursively until we have the parent id
98  // of the first EM particle that led to this one
100  while( itr != fParentIDMap.end() ){
101  MF_LOG_DEBUG("ParticleListAction")
102  << "parentage for " << trackid
103  << " " << (*itr).second;
104 
105  // set the parentid to the current parent ID, when the loop ends
106  // this id will be the first EM particle
107  parentid = (*itr).second;
108  itr = fParentIDMap.find(parentid);
109  }
110  MF_LOG_DEBUG("ParticleListAction") << "final parent ID " << parentid;
111 
112  return parentid;
113  }
std::map< int, int > fParentIDMap
key is current track ID, value is parent ID
intermediate_table::const_iterator const_iterator
static const int NoParticleId
Definition: sim.h:30
#define MF_LOG_DEBUG(id)
static int gar::garg4::ParticleListAction::GetTrackIDOffset ( )
inlinestatic

Definition at line 80 of file ParticleListAction.h.

bool gar::garg4::ParticleListAction::IsDropped ( simb::MCParticle const *  p)
static

returns whether the specified particle has been marked as dropped

Definition at line 48 of file ParticleListAction.cxx.

49  {
50  return !p || p->Trajectory().empty();
51  } // ParticleListAction::isDropped()
p
Definition: test.py:223
void gar::garg4::ParticleListAction::ParticleFilter ( std::unique_ptr< PositionInVolumeFilter > &&  filter)
inline

Grabs a particle filter.

Definition at line 74 of file ParticleListAction.h.

75  { fFilter = std::move(filter); }
std::unique_ptr< PositionInVolumeFilter > fFilter
filter for particles to be kept
def move(depos, offset)
Definition: depos.py:107
void gar::garg4::ParticleListAction::PostTrackingAction ( const G4Track *  aTrack)
virtual

Definition at line 330 of file ParticleListAction.cxx.

331  {
332  if (!fCurrentParticle.hasParticle()) return;
333 
334  // if we have found no reason to keep it, drop it!
335  // (we might still need parentage information though)
336  if (!fCurrentParticle.keep) {
337 
338  MF_LOG_VERBATIM("ParticleListAction")
339  << "dropping particle with track id "
341 
343  // after the particle is archived, it is deleted
345  return;
346  }
347 
348  if(aTrack){
349  fCurrentParticle.particle->SetWeight(aTrack->GetWeight());
350  if (aTrack->GetStep()->GetPostStepPoint()->GetProcessDefinedStep())
351  {
352  G4String process = aTrack->GetStep()->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName();
354  }
355  }
356 
357  return;
358  }
int TrackId() const
Definition: MCParticle.h:210
def process(f, kind)
Definition: search.py:254
void clear()
Resets the information (does not release memory it does not own)
void SetWeight(double wt)
Definition: MCParticle.h:271
void SetEndProcess(std::string s)
Definition: MCParticle.cxx:105
#define MF_LOG_VERBATIM(category)
bool keep
if there was decision to keep
simb::MCParticle * particle
simple structure representing particle
bool hasParticle() const
Returns whether there is a particle.
void gar::garg4::ParticleListAction::PreTrackingAction ( const G4Track *  track)
virtual

Definition at line 117 of file ParticleListAction.cxx.

118  {
119  // Particle type.
120  G4ParticleDefinition* particleDefinition = track->GetDefinition();
121  G4int pdgCode = particleDefinition->GetPDGEncoding();
122 
124  TGeoManager *geomanager = geo->ROOTGeoManager();
125 
126  // Get Geant4's ID number for this track. This will be the same
127  // ID number that we'll use in the ParticleList.
128  G4int trackID = track->GetTrackID() + fTrackIDOffset;
129  fCurrentTrackID = trackID;
130  size_t mcTruthIndex = 0;
131 
132  // And the particle's parent:
133  G4int parentID = track->GetParentID() + fTrackIDOffset;
134 
135  std::string process_name = "unknown";
136 
137  // Is there an MCTruth object associated with this G4Track? We
138  // have to go up a "chain" of information to find out:
139  const G4DynamicParticle* dynamicParticle = track->GetDynamicParticle();
140  const G4PrimaryParticle* primaryParticle = dynamicParticle->GetPrimaryParticle();
141  if ( primaryParticle ){
142  const G4VUserPrimaryParticleInformation* gppi = primaryParticle->GetUserInformation();
143  const g4b::PrimaryParticleInformation* ppi = dynamic_cast<const g4b::PrimaryParticleInformation*>(gppi);
144  if ( ppi != 0 ){
145  // If we've made it this far, a PrimaryParticleInformation
146  // object exists and we are using a primary particle, set the
147  // process name accordingly
148  process_name = "primary";
149 
150  // primary particles should have parentID = 0, even if there
151  // are multiple MCTruths for this event
152  parentID = 0;
153 
154  mcTruthIndex = ppi->MCTruthIndex();
155  } // end else no primary particle information
156  } // Is there a G4PrimaryParticle?
157  // If this is not a primary particle...
158  else{
159  // check if this particle was made in an EM shower, don't put it in the particle
160  // list as we don't care about secondaries, tertiaries, etc for these showers
161  // figure out what process is making this track - skip it if it is
162  // one of pair production, compton scattering, photoelectric effect
163  // bremstrahlung, annihilation, any ionization - reduces memory and the
164  // volume of the output files.
165 
166  // trj Dec. 4, 2019 -- add in a feature to optionally skip EM shower daughter MCParticle recording
167  // in dense media. This is so we can keep the shower daughters in TPC gas but not the calorimeters or rock
168 
169  process_name = track->GetCreatorProcess()->GetProcessName();
170  bool is_em_shower_daughter = ( process_name.find("conv") != std::string::npos ||
171  process_name.find("LowEnConversion") != std::string::npos ||
172  process_name.find("Pair") != std::string::npos ||
173  process_name.find("compt") != std::string::npos ||
174  process_name.find("Compt") != std::string::npos ||
175  process_name.find("Brem") != std::string::npos ||
176  process_name.find("phot") != std::string::npos ||
177  process_name.find("Photo") != std::string::npos ||
178  process_name.find("hIoni") != std::string::npos ||
179  process_name.find("eIoni") != std::string::npos ||
180  process_name.find("ionIoni") != std::string::npos ||
181  (process_name.find("Ion") != std::string::npos &&
182  process_name.find("mu") != std::string::npos) ||
183  process_name.find("annihil") != std::string::npos );
184  const G4ThreeVector& trackpos = track->GetPosition();
185  std::string matname = "";
186  auto geonode = geomanager->FindNode(trackpos[0]/CLHEP::cm,
187  trackpos[1]/CLHEP::cm,
188  trackpos[2]/CLHEP::cm);
189  if (geonode)
190  {
191  matname = geonode->GetMedium()->GetMaterial()->GetName();
192  }
193 
194  std::regex const re_material(fEMShowerDaughterMatRegex);
195 
196  if( is_em_shower_daughter &&
198  ! std::regex_match(matname, re_material)))
199  {
200 
201  // figure out the ultimate parentage of this particle
202  // first add this track id and its parent to the fParentIDMap
203  fParentIDMap[trackID] = parentID;
204 
205  fCurrentTrackID = -1 * this->GetParentage(trackID);
206 
207  // check that fCurrentTrackID is in the particle list - it is possible
208  // that this particle's parent is a particle that did not get tracked.
209  // An example is a partent that was made due to muMinusCaptureAtRest
210  // and the daughter was made by the phot process. The parent likely
211  // isn't saved in the particle list because it is below the energy cut
212  // which will put a bogus track id value into the list if we don't check it.
213  if(!fParticleList->KnownParticle(fCurrentTrackID))
215 
216  // clear current particle as we are not stepping this particle and
217  // adding trajectory points to it
219  return;
220 
221  } // end if not keeping EM shower daughters or skipping some processes
222 
223 
224  // Check the energy of the particle. If it falls below the energy
225  // cut, don't add it to our list.
226  G4double energy = track->GetKineticEnergy();
227  if( energy * CLHEP::MeV / CLHEP::GeV < fEnergyCut ){
229 
230  // do add the particle to the parent id map though
231  // and set the current track id to be it's ultimate parent
232  fParentIDMap[trackID] = parentID;
233 
234  fCurrentTrackID = -1 * this->GetParentage(trackID);
235 
236  return;
237  }
238 
239  //std::cout << "In GArG4 particle list action: ->" << matname << "<- " << fEMShowerDaughterMatRegex << std::endl;
240  //std::cout << "track position: " << trackpos[0]/CLHEP::cm << " " << trackpos[1]/CLHEP::cm << " " << trackpos[2]/CLHEP::cm << std::endl;
241  //std::cout << "Keeping mcparticle " << process_name << " " << energy << std::endl;
242 
243 
244  // check to see if the parent particle has been stored in the particle navigator
245  // if not, then see if it is possible to walk up the fParentIDMap to find the
246  // ultimate parent of this particle. Use that ID as the parent ID for this
247  // particle
248  if( !fParticleList->KnownParticle(parentID) ){
249  // do add the particle to the parent id map
250  // just in case it makes a daughter that we have to track as well
251  fParentIDMap[trackID] = parentID;
252  int pid = this->GetParentage(parentID);
253 
254  // if we still can't find the parent in the particle navigator,
255  // we have to give up
256  if( !fParticleList->KnownParticle(pid) ){
257  MF_LOG_WARNING("ParticleListAction")
258  << "can't find parent id: "
259  << parentID
260  << " in the particle list, or fParentIDMap."
261  << " Make "
262  << parentID
263  << " the mother ID for"
264  << " track ID "
265  << fCurrentTrackID
266  << " in the hope that it will aid debugging.";
267  }
268  else
269  parentID = pid;
270  }
271 
272  // Attempt to find the MCTruth index corresponding to the
273  // current particle. If the fCurrentTrackID is not in the
274  // map try the parent ID, if that is not there, throw an
275  // exception
277  mcTruthIndex = fTrackIDToMCTruthIndex.at(fCurrentTrackID);
278  else if(fTrackIDToMCTruthIndex.count(parentID) > 0 )
279  mcTruthIndex = fTrackIDToMCTruthIndex.at(parentID);
280  else
281  throw cet::exception("ParticleListAction")
282  << "Cannot find MCTruth index for track id "
283  << fCurrentTrackID
284  << " or "
285  << parentID;
286 
287  }// end if not a primary particle
288 
289  // This is probably the PDG mass, but just in case:
290  double mass = dynamicParticle->GetMass() * CLHEP::MeV / CLHEP::GeV;
291 
292  // Create the sim::Particle object.
295  pdgCode,
296  process_name,
297  parentID,
298  mass);
299 
300  // if we are not filtering, we have a decision already
301  if (!fFilter) fCurrentParticle.keep = true;
302 
303  // Polarization.
304  const G4ThreeVector& polarization = track->GetPolarization();
305  fCurrentParticle.particle->SetPolarization( TVector3(polarization.x(),
306  polarization.y(),
307  polarization.z()) );
308 
309  // Save the particle in the ParticleList.
311 
312  MF_LOG_DEBUG("ParticleListAction")
313  << "There are now "
314  << fParticleList->size()
315  << " particles in the list";
316 
318  MF_LOG_WARNING("ParticleListAction")
319  << "attempting to put "
320  << fCurrentTrackID
321  << " into fTrackIDToMCTruthIndex map "
322  << " particle is\n"
324 
325  fTrackIDToMCTruthIndex[fCurrentTrackID] = mcTruthIndex;
326 
327  }
static constexpr double cm
Definition: Units.h:68
int GetParentage(int trackid) const
std::string string
Definition: nybbler.cc:12
std::map< int, int > fParentIDMap
key is current track ID, value is parent ID
std::unique_ptr< PositionInVolumeFilter > fFilter
filter for particles to be kept
static constexpr double MeV
Definition: Units.h:129
static const int NoParticleId
Definition: sim.h:30
std::string fEMShowerDaughterMatRegex
if keeping EM shower daughters, save only in media matching this
void SetPolarization(const TVector3 &p)
Definition: MCParticle.h:269
static constexpr double GeV
Definition: Units.h:28
std::map< int, size_t > fTrackIDToMCTruthIndex
map track ID to index of MCTruth in input list
void clear()
Resets the information (does not release memory it does not own)
bool keep
if there was decision to keep
bool fKeepEMShowerDaughters
whether to keep EM shower secondaries, tertiaries, etc
#define MF_LOG_DEBUG(id)
simb::MCParticle * particle
simple structure representing particle
#define MF_LOG_WARNING(category)
LArSoft geometry interface.
Definition: ChannelGeo.h:16
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void gar::garg4::ParticleListAction::ResetTrackIDOffset ( )
inline

Definition at line 82 of file ParticleListAction.h.

void gar::garg4::ParticleListAction::SteppingAction ( const G4Step *  step)
virtual

Definition at line 362 of file ParticleListAction.cxx.

363  {
364 
365  if ( !fCurrentParticle.hasParticle() ) return;
366 
367  // For the most part, we just want to add the post-step
368  // information to the particle's trajectory. There's one
369  // exception: In PreTrackingAction, the correct time information
370  // is not available. So add the correct vertex information here.
371 
373 
374  // Get the pre/along-step information from the G4Step.
375  const G4StepPoint* preStepPoint = step->GetPreStepPoint();
376 
377  const G4ThreeVector position = preStepPoint->GetPosition();
378  G4double time = preStepPoint->GetGlobalTime();
379 
380  // Remember that GArSoft uses cm, ns, GeV.
381  TLorentzVector fourPos(position.x() / CLHEP::cm,
382  position.y() / CLHEP::cm,
383  position.z() / CLHEP::cm,
384  time);
385 
386  const G4ThreeVector momentum = preStepPoint->GetMomentum();
387  const G4double energy = preStepPoint->GetTotalEnergy();
388  TLorentzVector fourMom(momentum.x() * CLHEP::MeV / CLHEP::GeV,
389  momentum.y() * CLHEP::MeV / CLHEP::GeV,
390  momentum.z() * CLHEP::MeV / CLHEP::GeV,
391  energy * CLHEP::MeV / CLHEP::GeV);
392 
393  // Add the first point in the trajectory.
394  AddPointToCurrentParticle( fourPos, fourMom, "Start" );
395 
396  } // end if this is the first step
397 
398  if (step->GetPostStepPoint()->GetProcessDefinedStep())
399  {
400  G4String process = step->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName();
401 
402  // We store the initial creation point of the particle
403  // and its final position (ie where it has no more energy, or at least < 1 eV) no matter
404  // what, but whether we store the rest of the trajectory depends
405  // on the process, and on a user switch.
406  if ( fstoreTrajectories ){
407  // Get the post-step information from the G4Step.
408  const G4StepPoint* postStepPoint = step->GetPostStepPoint();
409 
410  const G4ThreeVector position = postStepPoint->GetPosition();
411  G4double time = postStepPoint->GetGlobalTime();
412 
413  // Remember that GArSoft uses cm, ns, GeV.
414  TLorentzVector fourPos(position.x() / CLHEP::cm,
415  position.y() / CLHEP::cm,
416  position.z() / CLHEP::cm,
417  time);
418 
419  const G4ThreeVector momentum = postStepPoint->GetMomentum();
420  const G4double energy = postStepPoint->GetTotalEnergy();
421  TLorentzVector fourMom( momentum.x() * CLHEP::MeV / CLHEP::GeV,
422  momentum.y() * CLHEP::MeV / CLHEP::GeV,
423  momentum.z() * CLHEP::MeV / CLHEP::GeV,
424  energy * CLHEP::MeV / CLHEP::GeV );
425 
426  // Add another point in the trajectory.
427  AddPointToCurrentParticle( fourPos, fourMom, std::string(process) );
428 
429  }
430  }
431  }
static constexpr double cm
Definition: Units.h:68
unsigned int NumberTrajectoryPoints() const
Definition: MCParticle.h:218
std::string string
Definition: nybbler.cc:12
static constexpr double MeV
Definition: Units.h:129
G4bool fstoreTrajectories
Whether to store particle trajectories with each particle.
def process(f, kind)
Definition: search.py:254
static constexpr double GeV
Definition: Units.h:28
void AddPointToCurrentParticle(TLorentzVector const &pos, TLorentzVector const &mom, std::string const &process)
Adds a trajectory point to the current particle, and runs the filter.
simb::MCParticle * particle
simple structure representing particle
def momentum(x1, x2, x3, scale=1.)
bool hasParticle() const
Returns whether there is a particle.
std::map< int, size_t > gar::garg4::ParticleListAction::TrackIDToMCTruthIndexMap ( ) const

Definition at line 535 of file ParticleListAction.cxx.

536  {
537  return fTrackIDToMCTruthIndex;
538  }
std::map< int, size_t > fTrackIDToMCTruthIndex
map track ID to index of MCTruth in input list
sim::ParticleList && gar::garg4::ParticleListAction::YieldList ( )

Definition at line 520 of file ParticleListAction.cxx.

521  {
522  // check if the ParticleNavigator has entries, and if
523  // so grab the highest track id value from it to
524  // add to the fTrackIDOffset
525  int highestID = 0;
526  for(auto pn = fParticleList->begin(); pn != fParticleList->end(); ++pn)
527  if( (*pn).first > highestID ) highestID = (*pn).first;
528 
529  fTrackIDOffset = highestID + 1;
530 
531  return std::move(*fParticleList);
532  } // ParticleList&& ParticleListAction::YieldList()
def move(depos, offset)
Definition: depos.py:107

Member Data Documentation

ParticleInfo_t gar::garg4::ParticleListAction::fCurrentParticle
private

information about the particle currently being simulated for a single particle.

Definition at line 103 of file ParticleListAction.h.

int gar::garg4::ParticleListAction::fCurrentTrackID = sdp::NoParticleId
staticprivate

track ID of the current particle, set to eve ID for EM shower particles

Definition at line 110 of file ParticleListAction.h.

std::string gar::garg4::ParticleListAction::fEMShowerDaughterMatRegex
private

if keeping EM shower daughters, save only in media matching this

Definition at line 115 of file ParticleListAction.h.

G4double gar::garg4::ParticleListAction::fEnergyCut
private

The minimum energy for a particle to be included in the list.

Definition at line 101 of file ParticleListAction.h.

std::unique_ptr<PositionInVolumeFilter> gar::garg4::ParticleListAction::fFilter
private

filter for particles to be kept

Definition at line 117 of file ParticleListAction.h.

bool gar::garg4::ParticleListAction::fKeepEMShowerDaughters
private

whether to keep EM shower secondaries, tertiaries, etc

Definition at line 114 of file ParticleListAction.h.

std::map<int, int> gar::garg4::ParticleListAction::fParentIDMap
private

key is current track ID, value is parent ID

Definition at line 108 of file ParticleListAction.h.

sim::ParticleList* gar::garg4::ParticleListAction::fParticleList
private

The accumulated particle information for all particles in the event.

Definition at line 105 of file ParticleListAction.h.

G4bool gar::garg4::ParticleListAction::fstoreTrajectories
private

Whether to store particle trajectories with each particle.

Definition at line 107 of file ParticleListAction.h.

int gar::garg4::ParticleListAction::fTrackIDOffset = 0
staticprivate

offset added to track ids when running over multiple MCTruth objects.

Definition at line 112 of file ParticleListAction.h.

std::map<int, size_t> gar::garg4::ParticleListAction::fTrackIDToMCTruthIndex
private

map track ID to index of MCTruth in input list

Definition at line 109 of file ParticleListAction.h.


The documentation for this class was generated from the following files: