16 #ifndef XAOD_STANDALONE // For now metadata is Athena-only
25 const int type = acc_truthType(*
part);
26 int origin = acc_truthOrigin(*
part);
28 if(acc_bkgTruthOrigin.isAvailable(*
part)){
29 originbkg = acc_bkgTruthOrigin(*
part);
32 ATH_MSG_DEBUG(
"::isPrompt() : No bkgTruthOrigin decoration available. Returning false by default.");
44 case MCTruthPartClassifier::IsoElectron:
66 ATH_MSG_DEBUG(
"::isPrompt() : Only Electrons supported at the moment!");
78 bool isTruth3 =
false;
79 std::string key_T1 =
"TruthParticles";
80 std::string key_T3 =
"TruthBSM";
82 ATH_MSG_DEBUG(
"Contains " << key_T1 <<
": " << ((
evtStore()->contains<xAOD::TruthParticleContainer>( key_T1 ))?1:0));
83 ATH_MSG_DEBUG(
"Contains " << key_T3 <<
": " << ((
evtStore()->contains<xAOD::TruthParticleContainer>( key_T3 ))?1:0));
85 if(
evtStore()->contains<xAOD::TruthParticleContainer>( key_T1 )){
88 if (truthP->
empty()) {
ATH_MSG_WARNING(key_T1 <<
" is empty. Skipping FindSusyHP.");
return StatusCode::SUCCESS; }
90 else if(
evtStore()->contains<xAOD::TruthParticleContainer>( key_T3 )){
94 if (truthP->
empty()) {
ATH_MSG_WARNING(key_T3 <<
" is empty. Skipping FindSusyHP.");
return StatusCode::SUCCESS; }
97 ATH_MSG_WARNING(
"Neither " << key_T1 <<
" nor " << key_T3 <<
" are avaible. Skipping FindSusyHP.");
98 return StatusCode::SUCCESS;
108 return StatusCode::FAILURE;
110 if (truthP->
empty()) {
112 return StatusCode::FAILURE;
116 return StatusCode::FAILURE;
118 if (pdgid1 == 0 || pdgid2 == 0) {
121 return StatusCode::SUCCESS;
132 if(!truthP || truthP->
size()<2){
137 pdgid1 = (*truthP)[0]->pdgId();
138 pdgid2 = (*truthP)[1]->pdgId();
146 if (!truthP || truthP->
empty()) {
152 if ((
tp->absPdgId() > 1000000 &&
tp->absPdgId() < 1000007) ||
153 (
tp->absPdgId() > 1000010 &&
tp->absPdgId() < 1000017) ||
154 (
tp->absPdgId() > 2000000 &&
tp->absPdgId() < 2000007) ||
155 (
tp->absPdgId() > 2000010 &&
tp->absPdgId() < 2000017) ||
156 (
tp->absPdgId() > 1000020 &&
tp->absPdgId() < 1000040)) {
158 if (
tp->nParents() != 0) {
159 if (
tp->parent(0)->absPdgId() < 1000000) {
162 }
else if (!secondsp) {
186 if (!firstsp && !secondsp)
return true;
206 if (firstsp->
absPdgId() > 1000000) pdgid1 = firstsp->
pdgId();
207 if (secondsp->
absPdgId() > 1000000) pdgid2 = secondsp->
pdgId();
218 return StatusCode::FAILURE;
222 return StatusCode::FAILURE;
224 if (pdgid1 == 0 || pdgid2 == 0) {
227 return StatusCode::SUCCESS;
245 if ((
tp->absPdgId() > 1000000 &&
tp->absPdgId() < 1000007) ||
246 (
tp->absPdgId() > 1000010 &&
tp->absPdgId() < 1000017) ||
247 (
tp->absPdgId() > 2000000 &&
tp->absPdgId() < 2000007) ||
248 (
tp->absPdgId() > 2000010 &&
tp->absPdgId() < 2000017) ||
249 (
tp->absPdgId() > 1000020 &&
tp->absPdgId() < 1000040)) {
251 if (
tp->nParents() != 0) {
252 if (
tp->parent(0)->absPdgId() < 1000000) {
255 }
else if (!secondsp) {
279 if (!firstsp && !secondsp)
return true;
301 if (firstsp->
absPdgId() > 1000000) pdgid1 = firstsp->
pdgId();
302 if (secondsp->
absPdgId() > 1000000) pdgid2 = secondsp->
pdgId();
312 if (acc_signal(
input)) {
315 if (!
input.getAttribute(
"HadronConeExclTruthLabelID", truthlabel)) {
319 isBjet = std::abs(truthlabel) == 5;
323 dec_bjet_jetunc(
input) = isBjet;