LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ParticleListAction.cxx File Reference

Use Geant4's user "hooks" to maintain a list of particles generated by Geant4. More...

#include "larsim/LegacyLArG4/ParticleListAction.h"
#include "lardataobj/Simulation/sim.h"
#include "nug4/G4Base/PrimaryParticleInformation.h"
#include "nug4/ParticleNavigation/ParticleList.h"
#include "cetlib_except/exception.h"
#include "messagefacility/MessageLogger/MessageLogger.h"
#include "Geant4/G4DynamicParticle.hh"
#include "Geant4/G4ParticleDefinition.hh"
#include "Geant4/G4PrimaryParticle.hh"
#include "Geant4/G4Step.hh"
#include "Geant4/G4StepPoint.hh"
#include "Geant4/G4String.hh"
#include "Geant4/G4ThreeVector.hh"
#include "Geant4/G4Track.hh"
#include "Geant4/G4VProcess.hh"
#include "Geant4/G4VUserPrimaryParticleInformation.hh"
#include <TLorentzVector.h>
#include <algorithm>
#include <cassert>

Go to the source code of this file.

Classes

class  larg4::UpdateDaughterInformation
 

Namespaces

 larg4
 Geant4 interface.
 

Variables

double globalTime
 
double velocity_G4
 
double velocity_step
 
bool entra = true
 

Detailed Description

Use Geant4's user "hooks" to maintain a list of particles generated by Geant4.

Author
selig.nosp@m.man@.nosp@m.nevis.nosp@m..col.nosp@m.umbia.nosp@m..edu

Design considerations

This class relies on the MCTruth index from g4b::PrimaryParticleInformation to operate correctly. This index is an integer value that corresponds to an MCTruth object, as accessed through art::Handle<std::vector<simb::MCTruth>> objects. However, the order in which MCTruth objects are processed must be consistent between this service and the MCTruthEventAction service, which creates the PrimaryParticleInformation object, otherwise the Assns objects created here will be incorrect.

Through art 3.09, one can rely on the order returned by a given Event::getMany call to be predictable and consistent within the same program. However, this behavior should not necessarily be relied upon, and a different implementation of this class would insulate users from such details, making the implementation simpler. One should determine whether storing an art::ProductID object along with an MCTruthIndex might be more helpful.

Author
selig.nosp@m.man@.nosp@m.nevis.nosp@m..col.nosp@m.umbia.nosp@m..edu

Definition in file ParticleListAction.cxx.

Variable Documentation

bool entra = true

Definition at line 37 of file ParticleListAction.cxx.