|
ATLAS Offline Software
|
#include <InputConverter.h>
|
| InputConverter (const std::string &name, ISvcLocator *svc) |
| Constructor. More...
|
|
virtual | ~InputConverter () |
| Destructor. More...
|
|
virtual StatusCode | initialize () override final |
| Athena algtool Hooks. More...
|
|
virtual StatusCode | finalize () override final |
| Athena algtool Hook. More...
|
|
virtual StatusCode | convert (McEventCollection &inputGenEvents, ISF::ISFParticleContainer &simParticles) const override final |
| Convert selected particles from the given McEventCollection into ISFParticles and push them into the given ISFParticleContainer. More...
|
|
virtual StatusCode | convertHepMCToG4Event (const EventContext &ctx, McEventCollection &inputGenEvents, G4Event *&outputG4Event, McEventCollection &shadowGenEvents) const override final |
|
virtual StatusCode | convertHepMCToG4EventLegacy (const EventContext &ctx, McEventCollection &inputGenEvents, G4Event *&outputG4Event) const override final |
|
G4Event * | ISF_to_G4Event (const EventContext &ctx, const std::vector< ISF::ISFParticle * > &isp, HepMC::GenEvent *genEvent, HepMC::GenEvent *shadowGenEvent=nullptr, bool useHepMC=false) const override final |
| Converts vector of ISF::ISFParticles to G4Event. More...
|
|
|
const G4ParticleDefinition * | getG4ParticleDefinition (int pdgcode) const |
|
G4PrimaryParticle * | getDaughterG4PrimaryParticle (HepMC::GenParticle &gp, bool makeLinkToTruth=true) const |
|
G4PrimaryParticle * | getG4PrimaryParticle (ISF::ISFParticle &isp, bool useHepMC, HepMC::GenEvent *shadowGenEvent) const |
|
void | addG4PrimaryVertex (G4Event *g4evt, ISF::ISFParticle &isp, bool useHepMC, HepMC::GenEvent *shadowGenEvent) const |
|
void | processPredefinedDecays (const HepMC::GenParticlePtr &genpart, ISF::ISFParticle &isp, G4PrimaryParticle *g4particle, bool makeLinkToTruth=true) const |
|
bool | matchedGenParticles (const HepMC::ConstGenParticlePtr &p1, const HepMC::ConstGenParticlePtr &p2) const |
|
HepMC::GenParticlePtr | findShadowParticle (const HepMC::ConstGenParticlePtr &genParticle, HepMC::GenEvent *shadowGenEvent) const |
|
bool | isInsideG4WorldVolume (const ISF::ISFParticle &isp, const G4VSolid *worldSolid) const |
| Tests whether the given ISFParticle is within the Geant4 world volume. More...
|
|
double | getParticleMass (const HepMC::GenParticle &p) const |
| get right GenParticle mass More...
|
|
std::vector< HepMC::GenParticlePtr > | getSelectedParticles (HepMC::GenEvent &evnt, bool legacyOrdering=false) const |
| get all generator particles which pass filters More...
|
|
bool | passesFilters (const HepMC::GenParticle &p) const |
| check if the given particle passes all filters More...
|
|
ISF::ISFParticle * | convertParticle (const HepMC::GenParticlePtr &genPartPtr) const |
| convert GenParticle to ISFParticle More...
|
|
Convert simulation input collections to ISFParticles for subsequent ISF simulation.
- Author
- Elmar.Ritsch -at- cern.ch
Definition at line 46 of file InputConverter.h.
◆ InputConverter()
ISF::InputConverter::InputConverter |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svc |
|
) |
| |
Constructor.
Definition at line 50 of file InputConverter.cxx.
59 declareProperty(
"UseGeneratedParticleMass",
61 "Use particle mass assigned to GenParticle.");
63 declareProperty(
"GenParticleFilters",
65 "Tools for filtering out GenParticles.");
67 declareProperty(
"ParticlePropertyService",
69 "ParticlePropertyService to retrieve the PDT.");
◆ ~InputConverter()
ISF::InputConverter::~InputConverter |
( |
| ) |
|
|
virtual |
◆ addG4PrimaryVertex()
void ISF::InputConverter::addG4PrimaryVertex |
( |
G4Event * |
g4evt, |
|
|
ISF::ISFParticle & |
isp, |
|
|
bool |
useHepMC, |
|
|
HepMC::GenEvent * |
shadowGenEvent |
|
) |
| const |
|
private |
Definition at line 1142 of file InputConverter.cxx.
1156 ATH_MSG_ERROR(
"Failed to create G4PrimaryParticle for ISParticle (" << isp <<
")");
1161 G4PrimaryVertex *g4vertex =
new G4PrimaryVertex(isp.
position().x(),
1165 g4vertex->SetPrimary( g4particle );
1168 g4evt->AddPrimaryVertex( g4vertex );
◆ convert()
Convert selected particles from the given McEventCollection into ISFParticles and push them into the given ISFParticleContainer.
Definition at line 117 of file InputConverter.cxx.
120 for (
auto eventPtr : inputGenEvents ) {
122 if (eventPtr ==
nullptr) {
continue; }
126 " and event_number=" << eventPtr->event_number() );
129 bool legacyOrdering =
true;
136 for (
auto& genPartPtr : passedGenParticles ) {
137 ATH_MSG_VERBOSE(
"Picking up following GenParticle for conversion to ISFParticle: " << genPartPtr);
139 if (!simParticlePtr) {
140 ATH_MSG_ERROR(
"Error while trying to convert input generator particles. Aborting.");
141 return StatusCode::FAILURE;
144 simParticles.push_back(simParticlePtr);
150 ATH_MSG_DEBUG(
"Created initial simulation particle collection with size " << simParticles.size() );
152 return StatusCode::SUCCESS;
◆ convertHepMCToG4Event()
Definition at line 155 of file InputConverter.cxx.
162 std::make_move_iterator(
std::begin(simParticleList)),
163 std::make_move_iterator(
std::end(simParticleList))
165 if (!shadowGenEvents.
empty()) {
166 outputG4Event = this->
ISF_to_G4Event(ctx, simParticleVector, inputGenEvents.
back(), shadowGenEvents.
back());
169 outputG4Event = this->
ISF_to_G4Event(ctx, simParticleVector, inputGenEvents.
back(),
nullptr);
171 return StatusCode::SUCCESS;
◆ convertHepMCToG4EventLegacy()
StatusCode ISF::InputConverter::convertHepMCToG4EventLegacy |
( |
const EventContext & |
ctx, |
|
|
McEventCollection & |
inputGenEvents, |
|
|
G4Event *& |
outputG4Event |
|
) |
| const |
|
finaloverridevirtual |
Definition at line 175 of file InputConverter.cxx.
182 std::make_move_iterator(
std::begin(simParticleList)),
183 std::make_move_iterator(
std::end(simParticleList))
185 outputG4Event = this->
ISF_to_G4Event(ctx, simParticleVector, inputGenEvents.
back(),
nullptr);
186 return StatusCode::SUCCESS;
◆ convertParticle()
convert GenParticle to ISFParticle
get all generator particles which pass filters
particle origin (TODO: add proper GeoID, collision/cosmics)
Definition at line 283 of file InputConverter.cxx.
284 if (!genPartPtr) {
return nullptr; }
286 auto pVertex = genPartPtr->production_vertex();
288 ATH_MSG_ERROR(
"Unable to convert following generator particle due to missing production vertex for: " << genPartPtr);
291 auto parentEvent = genPartPtr->parent_event();
293 ATH_MSG_ERROR(
"Cannot convert a GenParticle without a parent GenEvent into an ISFParticle!!!");
297 const Amg::Vector3D pos(pVertex->position().x(), pVertex->position().y(), pVertex->position().z());
298 const auto& pMomentum(genPartPtr->momentum());
305 double e=pMomentum.e();
307 double px=pMomentum.px();
308 double py=pMomentum.py();
309 double pz=pMomentum.pz();
311 if (std::abs(
e-teste)>0.01*
e) {
312 ATH_MSG_WARNING(
"Difference in energy for: " << genPartPtr<<
" Morg="<<pMomentum.m()<<
" Mmod="<<
pMass<<
" Eorg="<<
e<<
" Emod="<<teste);
314 if (
MC::isDecayed(genPartPtr) && pVertex && genPartPtr->end_vertex()) {
315 const auto& prodVtx = genPartPtr->production_vertex()->position();
316 const auto& endVtx = genPartPtr->end_vertex()->position();
317 CLHEP::Hep3Vector dist3D(endVtx.x()-prodVtx.x(), endVtx.y()-prodVtx.y(), endVtx.z()-prodVtx.z());
320 CLHEP::HepLorentzVector
mom( pMomentum.x(), pMomentum.y(), pMomentum.z(), pMomentum.t() );
321 double gamma_org=
mom.gamma();
323 double gamma_new=
mom.gamma();
325 if (std::abs(gamma_new-gamma_org)/(gamma_new+gamma_org)>0.001) {
326 ATH_MSG_WARNING(
"Difference in boost gamma for Quasi stable particle "<<genPartPtr);
336 const int pPdgId = genPartPtr->pdg_id();
343 auto tBinding = std::make_unique<ISF::TruthBinding>(genPartPtr);
347 auto sParticle = std::make_unique<ISF::ISFParticle>( std::move(
pos),
352 genPartPtr->status(),
359 return sParticle.release();
◆ finalize()
StatusCode ISF::InputConverter::finalize |
( |
| ) |
|
|
finaloverridevirtual |
◆ findShadowParticle()
Definition at line 802 of file InputConverter.cxx.
804 if (!shadowGenEvent) {
805 ATH_MSG_FATAL (
"Found status==2 GenParticle with no end vertex and shadow GenEvent is missing - something is wrong here!");
810 const int shadowId = genParticle->attribute<HepMC3::IntAttribute>(
"ShadowParticleId")->
value();
811 for (
auto& shadowParticle : shadowGenEvent->particles()) {
812 if (shadowParticle->id() == shadowId &&
matchedGenParticles(genParticle, shadowParticle) ) {
return shadowParticle; }
814 return std::make_shared<HepMC::GenParticle>();
816 for (HepMC::GenEvent::particle_iterator pitr=shadowGenEvent->particles_begin(); pitr != shadowGenEvent->particles_end(); ++pitr) {
◆ getDaughterG4PrimaryParticle()
G4PrimaryParticle * ISF::InputConverter::getDaughterG4PrimaryParticle |
( |
HepMC::GenParticle & |
gp, |
|
|
bool |
makeLinkToTruth = true |
|
) |
| const |
|
private |
Definition at line 701 of file InputConverter.cxx.
707 if (particleDefinition==
nullptr) {
708 ATH_MSG_ERROR(
"ISF_to_G4Event particle conversion failed. ISF_Particle PDG code = " <<
genpart.pdg_id() <<
709 "\n This usually indicates a problem with the evgen step.\n" <<
710 "Please report this to the Generators group, mentioning the release and generator used for evgen and the PDG code above." );
716 auto &genpartMomentum =
genpart.momentum();
717 G4double
px = genpartMomentum.x();
718 G4double
py = genpartMomentum.y();
719 G4double
pz = genpartMomentum.z();
721 std::unique_ptr<G4PrimaryParticle> g4particle = std::make_unique<G4PrimaryParticle>(particleDefinition,
px,
py,
pz);
727 const auto& prodVtx =
genpart.production_vertex()->position();
728 const auto& endVtx =
genpart.end_vertex()->position();
734 CLHEP::Hep3Vector dist3D(endVtx.x()-prodVtx.x(), endVtx.y()-prodVtx.y(), endVtx.z()-prodVtx.z());
738 double pmag2=g4particle->GetTotalMomentum();
740 double e2=g4particle->GetTotalEnergy();
742 double beta2=pmag2/
e2;
759 for (
auto daughterIter=
genpart.end_vertex()->particles_out_const_begin();
760 daughterIter!=
genpart.end_vertex()->particles_out_const_end(); ++daughterIter ) {
762 ATH_MSG_VERBOSE (
"Attempting to add daughter particle: " << **daughterIter );
765 ATH_MSG_WARNING (
"Attempting to add daughter particle: " << **daughterIter );
768 if (!daughterG4Particle) {
769 ATH_MSG_ERROR(
"Bailing out of loop over daughters of particle due to errors - will not return G4Particle.");
772 g4particle->SetDaughter( daughterG4Particle );
776 if (makeLinkToTruth) {
778 std::unique_ptr<PrimaryParticleInformation> primaryPartInfo = std::make_unique<PrimaryParticleInformation>(&
genpart);
780 g4particle->SetUserInformation(primaryPartInfo.release());
784 return g4particle.release();
◆ getG4ParticleDefinition()
const G4ParticleDefinition * ISF::InputConverter::getG4ParticleDefinition |
( |
int |
pdgcode | ) |
const |
|
private |
Special cases for Geantinos
Standard particles
Definition at line 504 of file InputConverter.cxx.
508 return G4ChargedGeantino::Definition();
511 return G4Geantino::GeantinoDefinition();
514 G4ParticleTable *ptable = G4ParticleTable::GetParticleTable();
516 return ptable->FindParticle(pdgcode);
518 ATH_MSG_ERROR(
"getG4ParticleDefinition - Failed to retrieve G4ParticleTable!");
◆ getG4PrimaryParticle()
G4PrimaryParticle * ISF::InputConverter::getG4PrimaryParticle |
( |
ISF::ISFParticle & |
isp, |
|
|
bool |
useHepMC, |
|
|
HepMC::GenEvent * |
shadowGenEvent |
|
) |
| const |
|
private |
In the case that particles are being passed back to Geant4 then we may have particles which have already interacted, so we should set the regeneration number accordingly.
Definition at line 989 of file InputConverter.cxx.
996 description << G4String(
"getG4PrimaryParticle: ") +
"No ISF::TruthBinding associated with ISParticle (" << isp <<
")";
997 G4Exception(
"iGeant4::TransportTool",
"NoISFTruthBinding", FatalException,
description);
1005 if (particleDefinition==
nullptr) {
1006 ATH_MSG_ERROR(
"ISF_to_G4Event particle conversion failed. ISF_Particle PDG code = " << isp.
pdgCode() <<
1007 "\n This usually indicates a problem with the evgen step.\n" <<
1008 "Please report this to the Generators group, mentioning the release and generator used for evgen and the PDG code above." );
1017 if (useHepMC && currentGenPart) {
1018 auto ¤tGenPartMomentum = currentGenPart->momentum();
1019 px = currentGenPartMomentum.x();
1020 py = currentGenPartMomentum.y();
1021 pz = currentGenPartMomentum.z();
1024 auto &ispMomentum = isp.
momentum();
1025 px = ispMomentum.x();
1026 py = ispMomentum.y();
1027 pz = ispMomentum.z();
1030 std::unique_ptr<G4PrimaryParticle> g4particle = std::make_unique<G4PrimaryParticle>(particleDefinition,
px,
py,
pz);
1032 std::unique_ptr<PrimaryParticleInformation> primaryPartInfo = std::make_unique<PrimaryParticleInformation>(primaryGenpart,&isp);
1043 if ( currentGenPart ) {
1044 if (currentGenPart->end_vertex()) {
1047 ATH_MSG_ERROR (
"getG4PrimaryParticle(): GenParticle has a valid end GenVertexPtr!" );
1048 ATH_MSG_ERROR (
"getG4PrimaryParticle(): currentGenPart: " << currentGenPart <<
", barcode: " <<
HepMC::barcode(currentGenPart) );
1049 ATH_MSG_ERROR (
"getG4PrimaryParticle(): currentGenPart->end_vertex(): " << currentGenPart->end_vertex() <<
", barcode: " <<
HepMC::barcode(currentGenPart->end_vertex()) );
1050 ATH_MSG_FATAL (
"getG4PrimaryParticle(): Passing GenParticles with a valid end GenVertexPtr as input is no longer supported." );
1054 && !currentGenPart->end_vertex()) {
1058 auto A_part = currentGenPart->attribute<HepMC::ShadowParticle>(
"ShadowParticle");
1064 ATH_MSG_FATAL (
"Found a GenParticle with no matching GenParticle in the shadowGenEvent - something is wrong here!");
1067 if (!shadowPart->end_vertex()) {
1068 ATH_MSG_FATAL (
"Found status==2 shadow GenParticle with no end vertex - something is wrong here!");
1079 const double pmass = g4particle->GetMass();
1080 CLHEP::Hep3Vector gpv = g4particle->GetMomentum();
1081 double g4px=g4particle->GetMomentum().x();
1082 double g4py=g4particle->GetMomentum().y();
1083 double g4pz=g4particle->GetMomentum().z();
1091 px=currentGenPart->momentum().px();
1092 py=currentGenPart->momentum().py();
1093 pz=currentGenPart->momentum().pz();
1110 const double pe = std::sqrt(
mag2 + pmass*pmass);
1112 double originalEnergy=currentGenPart->momentum().e();
1113 if (originalEnergy>0.01) {
1114 if ((originalEnergy-
pe)/originalEnergy>0.01) {
1115 double genpx=currentGenPart->momentum().px();
1116 double genpy=currentGenPart->momentum().py();
1117 double genpz=currentGenPart->momentum().pz();
1118 double genp=sqrt(genpx*genpx + genpy*genpy + genpz*genpz);
1119 ATH_MSG_WARNING(
"Truth change in energy for: " << currentGenPart<<
" Morg="<<currentGenPart->momentum().m()<<
" Mmod="<<pmass<<
" Eorg="<<originalEnergy<<
" Emod="<<
pe<<
" porg="<<genp<<
" pmod="<<gpv.mag());
1124 auto& currentGenPart_nc = currentGenPart;
1126 auto* currentGenPart_nc = currentGenPart;
1128 currentGenPart_nc->set_momentum(HepMC::FourVector(
px,
py,
pz,
pe));
1136 g4particle->SetUserInformation(primaryPartInfo.release());
1138 return g4particle.release();
◆ getParticleMass()
get right GenParticle mass
Definition at line 389 of file InputConverter.cxx.
392 double mass =
part.generated_mass();
397 const int absPDG = std::abs(
part.pdg_id());
402 mass = pData->mass();
406 ATH_MSG_WARNING(
"Unable to find mass of particle with PDG ID '" << absPDG <<
"' in ParticleDataTable. Will set mass to generated_mass: " <<
mass);
◆ getSelectedParticles()
std::vector< HepMC::GenParticlePtr > ISF::InputConverter::getSelectedParticles |
( |
HepMC::GenEvent & |
evnt, |
|
|
bool |
legacyOrdering = false |
|
) |
| const |
|
private |
get all generator particles which pass filters
Definition at line 245 of file InputConverter.cxx.
246 auto allGenPartBegin = evnt.particles_begin();
247 auto allGenPartEnd = evnt.particles_end();
250 std::vector<HepMC::GenParticlePtr> passedGenParticles{};
254 if (legacyOrdering) {
257 auto vtxIt = evnt.vertices_begin();
258 auto vtxItEnd = evnt.vertices_end();
259 for ( ; vtxIt != vtxItEnd; ++vtxIt ) {
260 const auto vtxPtr = *vtxIt;
263 std::back_inserter(passedGenParticles),
270 std::back_inserter(passedGenParticles),
274 passedGenParticles.shrink_to_fit();
276 return passedGenParticles;
◆ initialize()
StatusCode ISF::InputConverter::initialize |
( |
| ) |
|
|
finaloverridevirtual |
Athena algtool Hooks.
Definition at line 82 of file InputConverter.cxx.
92 return StatusCode::FAILURE;
101 return StatusCode::SUCCESS;
◆ ISF_to_G4Event()
G4Event * ISF::InputConverter::ISF_to_G4Event |
( |
const EventContext & |
ctx, |
|
|
const std::vector< ISF::ISFParticle * > & |
isp, |
|
|
HepMC::GenEvent * |
genEvent, |
|
|
HepMC::GenEvent * |
shadowGenEvent = nullptr , |
|
|
bool |
useHepMC = false |
|
) |
| const |
|
finaloverride |
Converts vector of ISF::ISFParticles to G4Event.
Definition at line 469 of file InputConverter.cxx.
471 G4Event *g4evt =
new G4Event(ctx.eventID().event_number());
474 const G4VSolid *worldSolid = G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume()->GetLogicalVolume()->GetSolid();
479 ATH_MSG_WARNING(
"Unable to convert ISFParticle to G4PrimaryParticle!");
483 worldSolid->DumpInfo();
498 g4evt->SetUserInformation(atlasG4EvtUserInfo);
◆ isInsideG4WorldVolume()
Tests whether the given ISFParticle is within the Geant4 world volume.
Definition at line 1173 of file InputConverter.cxx.
1177 const G4ThreeVector g4Pos(
pos.x(),
pos.y(),
pos.z() );
1178 EInside insideStatus = worldSolid->Inside( g4Pos );
1180 bool insideWorld = insideStatus != kOutside;
◆ matchedGenParticles()
Definition at line 789 of file InputConverter.cxx.
793 && (
p1->status() ==
p2->status())
794 && (
p1->pdg_id() ==
p2->pdg_id())
795 && ((
p1->momentum().px()) == (
p2->momentum().px()))
796 && ((
p1->momentum().py()) == (
p2->momentum().py()))
797 && ((
p1->momentum().pz()) == (
p2->momentum().pz()))
◆ passesFilters()
check if the given particle passes all filters
Definition at line 442 of file InputConverter.cxx.
450 :
"false, will remove particle."));
◆ processPredefinedDecays()
Set the lifetime appropriately - this is slow but rigorous, and we don't want to end up with something like vertex time that we have to validate for every generator on earth...
Definition at line 907 of file InputConverter.cxx.
912 const auto& prodVtx =
genpart->production_vertex()->position();
913 const auto& endVtx =
genpart->end_vertex()->position();
915 CLHEP::Hep3Vector dist3D(endVtx.x()-prodVtx.x(), endVtx.y()-prodVtx.y(), endVtx.z()-prodVtx.z());
919 double pmag2=g4particle->GetTotalMomentum();
921 double e2=g4particle->GetTotalEnergy();
923 double beta2=pmag2/
e2;
924 double mass2=g4particle->GetMass();
929 const G4LorentzVector lv0( prodVtx.x(), prodVtx.y(), prodVtx.z(), prodVtx.t() );
930 const G4LorentzVector lv1( endVtx.x(), endVtx.y(), endVtx.z(), endVtx.t() );
933 G4LorentzVector dist4D(lv1);
936 double dist4Dgamma=std::numeric_limits<double>::infinity();
937 if (dist4D.t()>0 && dist4D.mag2()>0) {
938 dist4Dgamma=dist4D.gamma();
943 G4LorentzVector fourmom(g4particle->GetMomentum(),g4particle->GetTotalEnergy());
944 double fourmomgamma=std::numeric_limits<double>::infinity();
945 if (fourmom.t()>0 && fourmom.mag2()>0) {
946 fourmomgamma=fourmom.gamma();
951 ATH_MSG_VERBOSE(
"gammaVertex="<<dist4Dgamma<<
" gammamom="<<fourmomgamma<<
" gamma(beta)="<<1/std::sqrt(1-beta2)<<
" lifetime tau(beta)="<<std::sqrt(tau2)<<
" lifetime tau="<<tau);
961 ATH_MSG_WARNING(
"Detected primary particle with end vertex. This should only be the case if" );
962 ATH_MSG_WARNING(
"you are running with quasi-stable particle simulation enabled. This is not" );
963 ATH_MSG_WARNING(
"yet validated - you'd better know what you're doing. Will add the primary" );
970 for (
auto daughter: *(
genpart->end_vertex())) {
972 ATH_MSG_VERBOSE (
"Attempting to add daughter particle: " << daughter );
975 ATH_MSG_WARNING (
"Attempting to add daughter particle: " << daughter );
982 if (!daughterG4Particle) {
983 ATH_MSG_FATAL(
"Bailing out of loop over daughters due to errors.");
985 g4particle->SetDaughter( daughterG4Particle );
◆ m_genParticleFilters
◆ m_particleDataTable
const HepPDT::ParticleDataTable* ISF::InputConverter::m_particleDataTable |
|
private |
◆ m_particlePropSvc
ServiceHandle<IPartPropSvc> ISF::InputConverter::m_particlePropSvc |
|
private |
ParticlePropertyService and ParticleDataTable.
particle properties svc to retrieve PDT
Definition at line 123 of file InputConverter.h.
◆ m_quasiStableParticlesIncluded
bool ISF::InputConverter::m_quasiStableParticlesIncluded |
|
private |
◆ m_useGeneratedParticleMass
bool ISF::InputConverter::m_useGeneratedParticleMass |
|
private |
use GenParticle::generated_mass() in simulation
Definition at line 126 of file InputConverter.h.
◆ m_useShadowEvent
BooleanProperty ISF::InputConverter::m_useShadowEvent {this, "UseShadowEvent", false, "New approach to selecting particles for simulation" } |
|
private |
The documentation for this class was generated from the following files:
std::list< ISF::ISFParticle * > ISFParticleContainer
generic ISFParticle container (not necessarily a std::list!)
std::pair< AtlasDetDescr::AtlasRegion, ISF::SimSvcID > DetRegionSvcIDPair
the datatype to be used to store each individual particle hop
void SetLastProcessedTrackID(int trackID)
record the value of G4Track::GetTrackID() for the current G4Step.
This class is attached to G4Event objects as UserInformation. It holds a pointer to the HepMC::GenEve...
void SetLastProcessedStep(int stepNumber)
record value of the G4Track::GetCurrentStepNumber() for the current G4Step.
int generations(const T &p)
Method to return how many interactions a particle has undergone during simulation based on the status...
int signal_process_id(const GenEvent &e)
void SetHepMCEvent(HepMC::GenEvent *)
set m_theEvent, the pointer to the HepMC::GenEvent used to create the G4Event.
GenParticle * GenParticlePtr
int pdgCode() const
PDG value.
int GetRegenerationNr()
return the number of times the particle represented by the G4PrimaryParticle has undergone a non-dest...
#define ATH_MSG_VERBOSE(x)
int generations(const T &p)
Method to return how many interactions a particle has undergone during simulation (only to be used in...
const Amg::Vector3D & position() const
The current position of the ISFParticle.
const ISF::ISFParticle * GetISFParticle() const
return a pointer to the ISFParticle used to create the G4PrimaryParticle
std::vector< ISF::ISFParticle * > ISFParticleVector
ISFParticle vector.
Out copy_if(In first, const In &last, Out res, const Pred &p)
AthROOTErrorHandlerSvc * svc
const T * back() const
Access the last element in the collection as an rvalue.
const GenParticle * ConstGenParticlePtr
double timeStamp() const
Timestamp of the ISFParticle.
const Amg::Vector3D & momentum() const
The current momentum vector of the ISFParticle.
double charge(const T &p)
void SetRegenerationNr(int i)
update the number of times the particle represented by the G4PrimaryParticle has undergone a non-dest...
Eigen::Matrix< double, 3, 1 > Vector3D
HepMC::ConstGenParticlePtr GetHepMCParticle() const
return a pointer to the GenParticle used to create the G4PrimaryParticle
tuple genpart
Check that the actual generators, tune, and main PDF are consistent with the JO name.
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
#define ATH_MSG_WARNING(x)
bool isDecayed(const T &p)
Identify if the particle decayed.
Scalar mag2() const
mag2 method - forward to squaredNorm()
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
bool empty() const noexcept
Returns true if the collection is empty.
const TruthBinding * getTruthBinding() const
pointer to the simulation truth - optional, can be 0
std::string description
glabal timer - how long have I taken so far?
int GetParticleUniqueID() const