Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
17 #ifndef XAOD_STANDALONE // For now metadata is Athena-only
26 const int type = acc_truthType(*
part);
27 int origin = acc_truthOrigin(*
part);
29 if(acc_bkgTruthOrigin.isAvailable(*
part)){
30 originbkg = acc_bkgTruthOrigin(*
part);
33 ATH_MSG_DEBUG(
"::isPrompt() : No bkgTruthOrigin decoration available. Returning false by default.");
45 case MCTruthPartClassifier::IsoElectron:
67 ATH_MSG_DEBUG(
"::isPrompt() : Only Electrons supported at the moment!");
79 bool isTruth3 =
false;
80 std::string key_T1 =
"TruthParticles";
81 std::string key_T3 =
"TruthBSM";
83 ATH_MSG_DEBUG(
"Contains " << key_T1 <<
": " << ((
evtStore()->contains<xAOD::TruthParticleContainer>( key_T1 ))?1:0));
84 ATH_MSG_DEBUG(
"Contains " << key_T3 <<
": " << ((
evtStore()->contains<xAOD::TruthParticleContainer>( key_T3 ))?1:0));
86 if(
evtStore()->contains<xAOD::TruthParticleContainer>( key_T1 )){
89 if (truthP->
empty()) {
ATH_MSG_WARNING(key_T1 <<
" is empty. Skipping FindSusyHP.");
return StatusCode::SUCCESS; }
91 else if(
evtStore()->contains<xAOD::TruthParticleContainer>( key_T3 )){
95 if (truthP->
empty()) {
ATH_MSG_WARNING(key_T3 <<
" is empty. Skipping FindSusyHP.");
return StatusCode::SUCCESS; }
98 ATH_MSG_WARNING(
"Neither " << key_T1 <<
" nor " << key_T3 <<
" are avaible. Skipping FindSusyHP.");
99 return StatusCode::SUCCESS;
109 return StatusCode::FAILURE;
111 if (truthP->
empty()) {
113 return StatusCode::FAILURE;
117 return StatusCode::FAILURE;
119 if (pdgid1 == 0 || pdgid2 == 0) {
122 return StatusCode::SUCCESS;
133 if(!truthP || truthP->
size()<2){
138 pdgid1 = (*truthP)[0]->pdgId();
139 pdgid2 = (*truthP)[1]->pdgId();
147 if (!truthP || truthP->
empty()) {
153 if (
tp->nParents() != 0) {
158 }
else if (!secondsp) {
182 if (!firstsp && !secondsp)
return true;
214 return StatusCode::FAILURE;
218 return StatusCode::FAILURE;
220 if (pdgid1 == 0 || pdgid2 == 0) {
223 return StatusCode::SUCCESS;
243 if (
tp->nParents() != 0) {
247 }
else if (!secondsp) {
271 if (!firstsp && !secondsp)
return true;
304 if (acc_signal(input)) {
307 if (!input.getAttribute(
"HadronConeExclTruthLabelID", truthlabel)) {
311 isBjet = std::abs(truthlabel) == 5;
315 dec_bjet_jetunc(input) = isBjet;
def retrieve(aClass, aKey=None)
bool isPrompt(const xAOD::IParticle *part) const override final
bool isGaugino(const T &p)
bool IsTruthBJet(const xAOD::Jet &input) const override final
Electron_v1 Electron
Definition of the current "egamma version".
const TruthParticle * truthParticle(size_t index) const
Get a pointer to one of the truth particles.
bool isSquark(const T &p)
Class providing the definition of the 4-vector interface.
bool is_same_particle(const T1 &p1, const T2 &p2)
Method to establish if two particles in the GenEvent actually represent the same particle.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
::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.
bool isSUSY(const T &p)
PDG rule 11d Fundamental supersymmetric particles are identified by adding a nonzero n to the particl...
size_t nChildren() const
Number of children of this particle.
size_t nTruthParticles() const
Get the number of truth particles.
const TruthParticle_v1 * child(size_t i) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
bool isSlepton(const T &p)
struct TBPatternUnitContext Muon
StatusCode FindSusyHP(int &pdgid1, int &pdgid2) const
static bool FindSusyHardProc(const xAOD::TruthParticleContainer *truthP, int &pdgid1, int &pdgid2, bool isTruth3=false)
#define ATH_MSG_WARNING(x)
int pdgId() const
PDG ID code.
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.