![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
17 InDetTrackTruthOriginTool::InDetTrackTruthOriginTool(
const std::string&
name) :
21 #ifndef XAOD_STANDALONE
22 declareInterface<IInDetTrackTruthOriginTool>(
this);
25 declareProperty(
"matchingProbabilityCut", m_matchingProbabilityCut = 0.5);
27 declareProperty(
"truthParticleLinkName", m_truthParticleLinkName =
"truthParticleLink");
28 declareProperty(
"truthMatchProbabilityAuxName", m_truthMatchProbabilityAuxName =
"truthMatchProbability");
33 InDetTrackTruthOriginTool::~InDetTrackTruthOriginTool() =
default;
37 return StatusCode::SUCCESS;
47 truthParticleLinkAcc (
"truthParticleLink");
119 else if(
parent->isStrangeMeson() &&
parent->nChildren() == 2) {
128 else if(
parent->isStrangeBaryon() &&
parent->nChildren() == 2) {
137 else if(
parent->isHadron() &&
parent->nChildren() == 2) {
142 else if(
parent->nChildren() > 2) {
171 float truthProb = tmpAcc( *
track );
184 ATH_MSG_ERROR(
"InDetTrackTruthOriginTool configured for full pile-up truth but could not retrieve TruthEvents container");
186 const xAOD::TruthEvent*
event = truthEventContainer ? truthEventContainer->
at(0) :
nullptr;
189 const auto&
links =
event->truthParticleLinks();
191 bool isFromHSProdVtx =
false;
192 for (
const auto& link :
links){
193 if(link.isValid() && truth == *link){
194 isFromHSProdVtx =
true;
222 if ( truth ==
nullptr )
return false;
224 if (
depth > 30 )
return false;
226 if( flav != 5 && flav != 4 && flav != 15 )
return false;
232 if( flav == 15 && abs(truth->
pdgId()) == 15 )
return true;
237 if(
parent == truth ) continue ;
248 if(truth->
nParents() != 1)
return -3;
256 if (
parent ==
nullptr)
return -4;
273 if(
parent->nChildren() > 2)
return -1;
def retrieve(aClass, aKey=None)
const TruthParticle_v1 * parent(size_t i=0) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
@ depth
pointing depth of the shower as calculated in egammaqgcld
bool isElectron() const
Whether the particle is an electron (or positron)
bool isCharmHadron() const
Determine if the PID is that of a c-hadron.
DUMMY Primary Vertex Finder.
Helper class to provide constant type-safe access to aux data.
bool isValid() const
Test to see if the link can be dereferenced.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
size_t nParents() const
Number of parents of this particle.
POOL::TEvent event(POOL::TEvent::kClassAccess)
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a truth particle in the MC record.
Class describing a signal truth event in the MC record.
ElementLink implementation for ROOT usage.
bool isBottomHadron() const
Determine if the PID is that of a b-hadron.
bool isFragmentation(int origin)
not from B, D, or any secondary
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Class describing a TrackParticle.
const T * at(size_type n) const
Access an element, as an rvalue.
Helper class to provide constant type-safe access to aux data.
int pdgId() const
PDG ID code.