|
ATLAS Offline Software
|
#include <ParticleBrokerDynamicOnReadIn.h>
|
PublicToolHandle< IEntryLayerTool > | m_entryLayerTool {this, "EntryLayerTool", "iGeant4::EntryLayerTool/ISF_EntryLayerTool"} |
| AthenaTool responsible for writing Calo/Muon Entry/Exit Layer collection. More...
|
|
PublicToolHandle< IParticleOrderingTool > | m_orderingTool {this, "ParticleOrderingTool", ""} |
| AthenaTool responsible for proritizing the particles and determine their simulation order. More...
|
|
ServiceHandle< IGeoIDSvc > | m_geoIDSvc {this, "GeoIDSvc", ""} |
| the geo identifier service used to route the particle into the right SimulationSelector chain More...
|
|
IGeoIDSvc * | m_geoIDSvcQuick {} |
| minimize Gaudi overhead More...
|
|
BooleanProperty | m_forceGeoIDSvc {this, "AlwaysUseGeoIDSvc", false} |
| always use GeoIDSvc to determine GeoID of given particles More...
|
|
BooleanProperty | m_validateGeoID {this, "ValidateGeoIDs", false} |
| always use GeoIDSvc to check correctness of GeoIDs already assigned to particles More...
|
|
ISFParticleOrderedQueue | m_particles |
| the particle container storing all particles which need to be simulated More...
|
|
ISFParticleVector | m_popParticles |
| the vector of particles returned for simulation (via popVector() ) More...
|
|
SimSelectorArray | m_simSelector [AtlasDetDescr::fNumAtlasRegions] |
| the simulation selectors per geoID (the actual routing chain) More...
|
|
SimSelectorSet | m_simSelectorSet |
| used to remove multiple uses of the same selector More...
|
|
std::string | m_screenOutputPrefix {"isf >> "} |
| Screen output refinement. More...
|
|
std::string | m_screenEmptyPrefix {""} |
|
BooleanProperty | m_doSelectorCPUMon {this, "SimSelectorCPUMonitoring", false} |
| Benchmarking. More...
|
|
PMonUtils::CustomBenchmark * | m_benchPDGCode {} |
|
PMonUtils::CustomBenchmark * | m_benchGeoID {} |
|
BooleanProperty | m_validationOutput {this, "ValidationOutput", false, "If turned on, write out a ROOT tree."} |
| validation mode: create ROOT Tree with additional information More...
|
|
ServiceHandle< ITHistSvc > | m_thistSvc {this, "THistService", "THistSvc"} |
| the histogram service More...
|
|
StringProperty | m_validationStream {this, "ValidationStreamName", "ParticleBroker"} |
| validation THist stream name More...
|
|
TTree * | m_t_pushPosition {} |
| the actual validation histograms and ROOT trees More...
|
|
TTree * | m_t_entryLayerPos [ISF::fNumAtlasEntryLayers] |
|
int | m_val_pdg {0} |
| memory containing the entries for the ROOT tree More...
|
|
float | m_val_p {0.f} |
|
float | m_val_x {0.f} |
|
float | m_val_y {0.f} |
|
float | m_val_z {0.f} |
|
ISF particle broker responsible to flag particles with their corresponding simulator. On detector boundaries, simulators hand back all particles that pass them via the push() method.
- Author
- Andreas.Salzburger -at- cern.ch , Elmar.Ritsch -at- cern.ch
Definition at line 53 of file ParticleBrokerDynamicOnReadIn.h.
◆ ParticleBrokerDynamicOnReadIn() [1/2]
ISF::ParticleBrokerDynamicOnReadIn::ParticleBrokerDynamicOnReadIn |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~ParticleBrokerDynamicOnReadIn()
ISF::ParticleBrokerDynamicOnReadIn::~ParticleBrokerDynamicOnReadIn |
( |
| ) |
|
|
virtual |
◆ ParticleBrokerDynamicOnReadIn() [2/2]
ISF::ParticleBrokerDynamicOnReadIn::ParticleBrokerDynamicOnReadIn |
( |
| ) |
|
|
private |
◆ dump()
StatusCode ISF::ParticleBrokerDynamicOnReadIn::dump |
( |
| ) |
const |
◆ fillPosValTree()
void ISF::ParticleBrokerDynamicOnReadIn::fillPosValTree |
( |
TTree * |
tree, |
|
|
const ISFParticle & |
particle |
|
) |
| |
|
private |
◆ finalizeEvent()
StatusCode ISF::ParticleBrokerDynamicOnReadIn::finalizeEvent |
( |
| ) |
|
|
virtual |
Finalize the event in the broker service.
Finalize the event in the stackSvc.
Definition at line 299 of file ParticleBrokerDynamicOnReadIn.cxx.
304 for ( ; fSimSelIter != fSimSelIterEnd; ++fSimSelIter )
305 (*fSimSelIter)->endEvent();
307 return StatusCode::SUCCESS;
◆ identifySimID()
go through the chain of SimulationSelectors and return the SimulatoID of the first SimulationSelector that selects the particle
Definition at line 208 of file ParticleBrokerDynamicOnReadIn.cxx.
217 bool selected =
false;
232 for ( ; !selected && (selectorIt != selectorItEnd) ; ++selectorIt) {
234 selected = (*selectorIt)->selfSelect( *
p);
◆ initialize()
StatusCode ISF::ParticleBrokerDynamicOnReadIn::initialize |
( |
| ) |
|
Athena algorithm's interface methods.
framework methods
Definition at line 46 of file ParticleBrokerDynamicOnReadIn.cxx.
76 "push() particle positions",
79 "CaloEntryLayer positions",
82 "MuonEntryLayer positions",
85 "MuonExitLayer positions",
90 return StatusCode::SUCCESS;
◆ initializeEvent()
StatusCode ISF::ParticleBrokerDynamicOnReadIn::initializeEvent |
( |
ISFParticleContainer && |
simParticles | ) |
|
Initialize the particle broker.
Initialize the stackSvc and the truthSvc.
Definition at line 247 of file ParticleBrokerDynamicOnReadIn.cxx.
260 ATH_MSG_DEBUG(
"Number of unique SimulationSelctors registered: "
266 simSelector->beginEvent();
271 for (
auto& particlePointer : simParticles ) {
285 size_t order = simParticles.size();
287 for (
auto& particlePtr: simParticles ) {
294 return StatusCode::SUCCESS;
◆ numParticles()
size_t ISF::ParticleBrokerDynamicOnReadIn::numParticles |
( |
| ) |
const |
|
inlinevirtual |
◆ popVector()
◆ push()
add a new particle to the stack and inherit ISF properties from the given ancestor ISF particel (usually the particle which ISF handed over to the simulator)
add a new particle to the stack and link it to its parent
Definition at line 312 of file ParticleBrokerDynamicOnReadIn.cxx.
316 ISFParticle &
particle = *particlePtr;
322 if (!particlePtr->getTruthBinding()) {
323 ATH_MSG_WARNING(
"The provided new ISFParticle had no TruthBinding ! Copying over the one from the parent ISFParticle.");
324 particle.setTruthBinding(
new TruthBinding(*parentPtr->getTruthBinding()));
355 ATH_MSG_WARNING(
"Validating GeoID: GeoIDSvc resolves a particle's position to a different GeoID than stored in the particle:");
356 ATH_MSG_WARNING(
" assigned=" << geoID <<
" GeoIDSvc=" << identifiedGeoID);
364 <<
". Dropping this particle.");
◆ registerPosValTree()
StatusCode ISF::ParticleBrokerDynamicOnReadIn::registerPosValTree |
( |
const char * |
treeName, |
|
|
const char * |
treeDescr, |
|
|
TTree *& |
tree |
|
) |
| |
|
private |
◆ registerSimSelector()
Register an array of SimulationSelectors.
Definition at line 95 of file ParticleBrokerDynamicOnReadIn.cxx.
98 if ( simSelectorTools.retrieve().isFailure() ) {
100 return StatusCode::FAILURE;
110 for ( ; fSimSelIter != fSimSelIterEnd; ++fSimSelIter ) {
111 ISimulationSelector *curSelector = &**fSimSelIter;
113 curSelector->initializeSelector();
118 return StatusCode::SUCCESS;
◆ selectAndStore()
go through the chain of SimulationSelectors and let the first one which selects the particle decide which simulation the particle will be assigned to
Definition at line 169 of file ParticleBrokerDynamicOnReadIn.cxx.
180 <<
" to simulator with ID=" << selectedSimID <<
".");
182 p->setNextSimID( selectedSimID);
◆ updateAllSelectors()
void ISF::ParticleBrokerDynamicOnReadIn::updateAllSelectors |
( |
const ISFParticle & |
particle | ) |
|
|
private |
update all unfrozen simSelectors with the given particle
update all SimulationSelectors in the routing chain with the given particle
Definition at line 160 of file ParticleBrokerDynamicOnReadIn.cxx.
◆ m_benchGeoID
◆ m_benchPDGCode
◆ m_doSelectorCPUMon
BooleanProperty ISF::ParticleBrokerDynamicOnReadIn::m_doSelectorCPUMon {this, "SimSelectorCPUMonitoring", false} |
|
private |
◆ m_entryLayerTool
PublicToolHandle<IEntryLayerTool> ISF::ParticleBrokerDynamicOnReadIn::m_entryLayerTool {this, "EntryLayerTool", "iGeant4::EntryLayerTool/ISF_EntryLayerTool"} |
|
private |
◆ m_forceGeoIDSvc
BooleanProperty ISF::ParticleBrokerDynamicOnReadIn::m_forceGeoIDSvc {this, "AlwaysUseGeoIDSvc", false} |
|
private |
◆ m_geoIDSvc
◆ m_geoIDSvcQuick
IGeoIDSvc* ISF::ParticleBrokerDynamicOnReadIn::m_geoIDSvcQuick {} |
|
private |
◆ m_orderingTool
PublicToolHandle<IParticleOrderingTool> ISF::ParticleBrokerDynamicOnReadIn::m_orderingTool {this, "ParticleOrderingTool", ""} |
|
private |
◆ m_particles
◆ m_popParticles
◆ m_screenEmptyPrefix
std::string ISF::ParticleBrokerDynamicOnReadIn::m_screenEmptyPrefix {""} |
|
private |
◆ m_screenOutputPrefix
std::string ISF::ParticleBrokerDynamicOnReadIn::m_screenOutputPrefix {"isf >> "} |
|
private |
◆ m_simSelector
◆ m_simSelectorSet
◆ m_t_entryLayerPos
◆ m_t_pushPosition
TTree* ISF::ParticleBrokerDynamicOnReadIn::m_t_pushPosition {} |
|
private |
◆ m_thistSvc
ServiceHandle<ITHistSvc> ISF::ParticleBrokerDynamicOnReadIn::m_thistSvc {this, "THistService", "THistSvc"} |
|
private |
◆ m_val_p
float ISF::ParticleBrokerDynamicOnReadIn::m_val_p {0.f} |
|
private |
◆ m_val_pdg
int ISF::ParticleBrokerDynamicOnReadIn::m_val_pdg {0} |
|
private |
◆ m_val_x
float ISF::ParticleBrokerDynamicOnReadIn::m_val_x {0.f} |
|
private |
◆ m_val_y
float ISF::ParticleBrokerDynamicOnReadIn::m_val_y {0.f} |
|
private |
◆ m_val_z
float ISF::ParticleBrokerDynamicOnReadIn::m_val_z {0.f} |
|
private |
◆ m_validateGeoID
BooleanProperty ISF::ParticleBrokerDynamicOnReadIn::m_validateGeoID {this, "ValidateGeoIDs", false} |
|
private |
◆ m_validationOutput
BooleanProperty ISF::ParticleBrokerDynamicOnReadIn::m_validationOutput {this, "ValidationOutput", false, "If turned on, write out a ROOT tree."} |
|
private |
◆ m_validationStream
StringProperty ISF::ParticleBrokerDynamicOnReadIn::m_validationStream {this, "ValidationStreamName", "ParticleBroker"} |
|
private |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
BooleanProperty m_validationOutput
validation mode: create ROOT Tree with additional information
ServiceHandle< ITHistSvc > m_thistSvc
the histogram service
SimSelectorSet m_simSelectorSet
used to remove multiple uses of the same selector
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
BooleanProperty m_doSelectorCPUMon
Benchmarking.
PMonUtils::CustomBenchmark * m_benchPDGCode
AtlasDetDescr::AtlasRegion identifyAndRegNextGeoID(ISFParticle &sp) const
Find the AtlasRegion that the particle will enter with its next infinitesimal step along the given di...
StatusCode registerPosValTree(const char *treeName, const char *treeDescr, TTree *&tree)
setup the ROOT TTrees for THistSvc in validation mode
std::priority_queue< ISF::ISFParticle *, ISF::ISFParticleVector, ISF::ISFParticleOrdering > ISFParticleOrderedQueue
the actual particle priority_queue
#define ATH_MSG_VERBOSE(x)
static const char * getName(int region)
IGeoIDSvc * m_geoIDSvcQuick
minimize Gaudi overhead
StringProperty m_validationStream
validation THist stream name
TTree * m_t_entryLayerPos[ISF::fNumAtlasEntryLayers]
ISFParticleVector m_popParticles
the vector of particles returned for simulation (via popVector() )
PMonUtils::CustomBenchmark * m_benchGeoID
void fillPosValTree(TTree *tree, const ISFParticle &particle)
fill the TTree with the (x,y,z) coordinates of the given ISFParticle
#define validEntryLayer(layer)
TTree * m_t_pushPosition
the actual validation histograms and ROOT trees
ServiceHandle< IGeoIDSvc > m_geoIDSvc
the geo identifier service used to route the particle into the right SimulationSelector chain
ISF::SimSvcID identifySimID(const ISF::ISFParticle *p)
go through the chain of SimulationSelectors and return the SimulatoID of the first SimulationSelector...
ISFParticleOrderedQueue m_particles
the particle container storing all particles which need to be simulated
PublicToolHandle< IEntryLayerTool > m_entryLayerTool
AthenaTool responsible for writing Calo/Muon Entry/Exit Layer collection.
AthROOTErrorHandlerSvc * svc
virtual AtlasDetDescr::AtlasRegion identifyNextGeoID(const Amg::Vector3D &pos, const Amg::Vector3D &dir) const =0
Find the AtlasRegion that the particle will enter with its next infinitesimal step along the given di...
Eigen::Matrix< double, 3, 1 > Vector3D
void selectAndStore(ISFParticle *p)
go through the chain of SimulationSelectors and let the first one which selects the particle decide w...
int m_val_pdg
memory containing the entries for the ROOT tree
uint8_t SimSvcID
Simulation service ID datatype.
#define assertAtlasRegion(region)
#define ATH_MSG_WARNING(x)
BooleanProperty m_forceGeoIDSvc
always use GeoIDSvc to determine GeoID of given particles
SimSelectorArray m_simSelector[AtlasDetDescr::fNumAtlasRegions]
the simulation selectors per geoID (the actual routing chain)
PublicToolHandle< IParticleOrderingTool > m_orderingTool
AthenaTool responsible for proritizing the particles and determine their simulation order.
BooleanProperty m_validateGeoID
always use GeoIDSvc to check correctness of GeoIDs already assigned to particles
std::string m_screenOutputPrefix
Screen output refinement.
#define validAtlasRegion(region)
static unsigned int getBenchReadyPdgCode(const ISFParticle &p)
get PMonUtils::CustomBenchmarkGuard ready PDGCode of the given ISFParticle -> returns abs(pdgCode) if...
void updateAllSelectors(const ISFParticle &particle)
update all unfrozen simSelectors with the given particle