|
ATLAS Offline Software
|
#include <TransportTool.h>
|
template<class T > |
StatusCode | retrieveTool (ToolHandle< T > &thandle) |
| templated Tool retrieval - gives unique handling & look and feel More...
|
|
Fatras AlgTool to create a ISFParticle at a volume entry/exit
- Author
- Sharka Todorova Sarka.Todorova -at- cern.ch
-
Andreas.Salzburger -at- cern.ch
Definition at line 54 of file ISF_Fatras/ISF_FatrasTools/src/TransportTool.h.
◆ TransportTool()
iFatras::TransportTool::TransportTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~TransportTool()
iFatras::TransportTool::~TransportTool |
( |
| ) |
|
|
virtual |
◆ finalize()
StatusCode iFatras::TransportTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode iFatras::TransportTool::initialize |
( |
| ) |
|
|
overridevirtual |
AlgTool initialize method.
Definition at line 101 of file ISF_Fatras/ISF_FatrasTools/src/TransportTool.cxx.
108 return StatusCode::FAILURE;
110 return StatusCode::FAILURE;
111 if (retrieveTool<Trk::ITimedExtrapolator>(
m_extrapolator).isFailure())
112 return StatusCode::FAILURE;
114 return StatusCode::FAILURE;
115 if (retrieveTool<ISF::IParticleFilter>(
m_trackFilter).isFailure())
116 return StatusCode::FAILURE;
117 if (retrieveTool<ISF::IParticleFilter>(
m_photonFilter).isFailure())
118 return StatusCode::FAILURE;
120 return StatusCode::FAILURE;
122 return StatusCode::FAILURE;
123 if (retrieveTool<iFatras::IProcessSamplingTool>(
m_samplingTool).isFailure())
124 return StatusCode::FAILURE;
129 return StatusCode::FAILURE;
135 return StatusCode::FAILURE;
138 return StatusCode::SUCCESS;
◆ process()
Creates a new ParticleState from a given ParticleState, universal transport tool.
Definition at line 155 of file ISF_Fatras/ISF_FatrasTools/src/TransportTool.cxx.
170 std::vector<Trk::HitInfo>*
hitVector =
nullptr;
172 int absPdg = abs(isp.
pdgCode());
173 bool photon = (absPdg == 22);
175 bool neutrino = (absPdg == 12) || (absPdg == 14) || (absPdg == 16);
190 ATH_MSG_VERBOSE(
"[ fatras transport ] Photon - use transport tool for photons");
192 }
else if ( neutrino ) {
193 ATH_MSG_VERBOSE(
"[ fatras transport ] Particle is neutrino -> particle ignored.");
196 ATH_MSG_VERBOSE(
"[ fatras transport ] Particle not charged - use transport tool for neutrals");
199 ATH_MSG_VERBOSE(
"[ fatras transport ] Particle is a lepton or charged hadron");
204 ATH_MSG_DEBUG(
"[ fatras transport ] Determined processor and filter.");
206 ATH_MSG_DEBUG(
"[ fatras transport ] Determined processor w/o filter.");
209 if ( !processor || (
filter && !
filter->passFilter(isp)) ) {
210 ATH_MSG_VERBOSE(
"[ fatras transport ] Filter not passed, ignore particle.");
214 ATH_MSG_VERBOSE(
"[ fatras transport ] The StackParticle passed filter - starting transport.");
220 ATH_MSG_VERBOSE(
"[ fatras transport ] Particle free path : " << freepath);
222 double tDec = freepath > 0. ? freepath : -1.;
238 if ( freepath>0. && freepath<0.01 ) {
240 ATH_MSG_VERBOSE(
"[ fatras transport ] Decay is triggered for input particle.");
246 int endProcess = decayProc;
247 m_validationTool->saveISFParticleInfo(isp,endProcess,&inputPar,timeLim.time,0.);
258 pathLim.updateMat(matLimit->
dCollected,13.,0.);
259 }
else if (absPdg!=999 && pHypothesis<99) {
267 std::unique_ptr<const Trk::TrackParameters> eParameters =
nullptr;
290 inputPar.associatedSurface()
291 .createUniqueTrackParameters(inputPar.
parameters()[0],
296 std::move(inputCov));
298 eParameters = processor->extrapolateWithPathLimit(*measuredInputPar,
344 int dProc = ( timeLim.tMax>0. && timeLim.tMax<=timeLim.time ) ? timeLim.process : 0;
345 int mProc = ( pathLim.x0Max>0. && ( pathLim.x0Max <= pathLim.x0Collected ||
346 (pathLim.process>100 && pathLim.x0Max <= pathLim.l0Collected))) ? pathLim.process : 0;
347 int endProcess = eParameters ? 0 : ( dProc > mProc ? dProc : mProc );
349 m_validationTool->saveISFParticleInfo(isp,endProcess,eParameters.get(),timeLim.time,pathLim.x0Collected);
376 if (uisp && timeLim.tMax>0. && timeLim.time >=timeLim.tMax ) {
378 ATH_MSG_VERBOSE(
"[ fatras transport ] Decay is triggered for input particle.");
384 ATH_MSG_VERBOSE(
"[ fatras transport ] Particle transported to detector boundary, return to stack, timing:" << uisp->
timeStamp());
◆ retrieveTool()
template<class T >
StatusCode iFatras::TransportTool::retrieveTool |
( |
ToolHandle< T > & |
thandle | ) |
|
|
inlineprivate |
templated Tool retrieval - gives unique handling & look and feel
Definition at line 76 of file ISF_Fatras/ISF_FatrasTools/src/TransportTool.h.
77 if (!thandle.empty() && thandle.retrieve().isFailure()){
78 ATH_MSG_FATAL(
"[ fatras setup ] Cannot retrieve " << thandle <<
". Abort.");
79 return StatusCode::FAILURE;
82 ATH_MSG_DEBUG(
"[ fatras setup ] Successfully retrieved " << thandle);
84 return StatusCode::SUCCESS;
◆ m_errorPropagation
bool iFatras::TransportTool::m_errorPropagation |
|
private |
◆ m_extrapolator
◆ m_hitsOff
bool iFatras::TransportTool::m_hitsOff |
|
private |
◆ m_iparticleHelper
◆ m_neutralHadronFilter
◆ m_particleDecayHelper
◆ m_pdgToParticleHypothesis
◆ m_photonFilter
◆ m_randomEngine
CLHEP::HepRandomEngine* iFatras::TransportTool::m_randomEngine |
|
private |
◆ m_randomEngineName
std::string iFatras::TransportTool::m_randomEngineName |
|
private |
◆ m_rndGenSvc
◆ m_samplingTool
◆ m_simHitCreatorID
◆ m_simHitCreatorMS
◆ m_trackFilter
◆ m_validationOutput
bool iFatras::TransportTool::m_validationOutput |
|
private |
◆ m_validationTool
The documentation for this class was generated from the following files:
void setNextGeoID(AtlasDetDescr::AtlasRegion geoID)
register the next AtlasDetDescr::AtlasRegion
Trk::ParticleHypothesis convert(int pdg, bool &stable, bool &exiting, double charge=1.) const
Converter method : PDG -> Particle Hyptothesis.
const Amg::Vector3D & position() const
Access method for the position.
void setProcess(int proc)
static ParticleClipboard & getInstance()
get the singleton instance
std::vector< FPGATrackSimHit > hitVector
int pdgCode() const
PDG value.
#define ATH_MSG_VERBOSE(x)
#define AmgSymMatrix(dim)
TrackParameters_v1 TrackParameters
const Amg::Vector3D & position() const
The current position of the ISFParticle.
AtlasDetDescr::AtlasRegion nextGeoID() const
next geoID the particle will be simulated in
void setGeneration(int gen)
constexpr double mass[PARTICLEHYPOTHESES]
the array of masses
Ensure that the ATLAS eigen extensions are properly loaded.
double timeStamp() const
Timestamp of the ISFParticle.
const Amg::Vector3D & momentum() const
The current momentum vector of the ISFParticle.
void setUserInformation(ParticleUserInformation *userInfo)
double charge() const
charge of the particle
const Amg::Vector3D & momentum() const
Access method for the momentum.
const MaterialPathInfo * materialLimit() const
#define ATH_MSG_WARNING(x)
void setParticle(const ISF::ISFParticle &p)
save a particle on the clipboard
const ParticleUserInformation * getUserInformation() const
get/set ParticleUserInformation