17#ifndef XAOD_STANDALONE
33 ATH_MSG_DEBUG(
"::isPrompt() : No bkgTruthOrigin decoration available. Returning false by default.");
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";
89 if (truthP->
empty()) {
ATH_MSG_WARNING(key_T1 <<
" is empty. Skipping FindSusyHP.");
return StatusCode::SUCCESS; }
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;
307 if (!input.getAttribute(
"HadronConeExclTruthLabelID", truthlabel)) {
311 isBjet = std::abs(truthlabel) == 5;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
ATLAS-specific HepMC functions.
ServiceHandle< StoreGateSvc > & evtStore()
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.
Helper class to provide type-safe access to aux data.
static bool FindSusyHardProc(const xAOD::TruthParticleContainer *truthP, int &pdgid1, int &pdgid2, bool isTruth3=false)
StatusCode FindSusyHP(int &pdgid1, int &pdgid2) const
bool IsTruthBJet(const xAOD::Jet &input) const override final
Class providing the definition of the 4-vector interface.
const TruthParticle * truthParticle(size_t index) const
Get a pointer to one of the truth particles.
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.
int pdgId() const
PDG ID code.
size_t nChildren() const
Number of children of this particle.
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
bool is_same_particle(const T1 &p1, const T2 &p2)
Method to establish if two particles in the GenEvent actually represent the same particle.
bool isSlepton(const T &p)
bool isSquark(const T &p)
PDG rule 11d Fundamental supersymmetric particles are identified by adding a nonzero n to the particl...
bool isGaugino(const T &p)
static const SG::Decorator< char > dec_bjet_jetunc("bjet_jetunc")
static const SG::ConstAccessor< int > acc_truthType("truthType")
static const SG::ConstAccessor< int > acc_truthOrigin("truthOrigin")
static const SG::ConstAccessor< int > acc_bkgTruthOrigin("bkgTruthOrigin")
static const SG::ConstAccessor< char > acc_signal("signal")
@ Muon
The object is a muon.
@ Electron
The object is an electron.
Jet_v1 Jet
Definition of the current "jet version".
TruthEvent_v1 TruthEvent
Typedef to implementation.
TruthParticle_v1 TruthParticle
Typedef to implementation.
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.