ATLAS Offline Software
Loading...
Searching...
No Matches
CP::CalcPartonHistory Class Reference

#include <CalcPartonHistory.h>

Inheritance diagram for CP::CalcPartonHistory:
Collaboration diagram for CP::CalcPartonHistory:

Classes

struct  ZTauTauProduct
 One Z->tautau decay product: kinematics, PDG ID and whether it was found. More...
struct  ZTauTauDecay
 Z->tautau decay chain: taus[0] = tau- (Zdecay1), taus[1] = tau+ (Zdecay2); tauDecays[i][j] = decay product j+1 of taus[i]. More...

Public Member Functions

 CalcPartonHistory (const std::string &name, const std::vector< std::string > &truthCollections={"TruthTop"})
virtual ~CalcPartonHistory ()=default
 CalcPartonHistory (const CalcPartonHistory &rhs)=delete
 CalcPartonHistory (CalcPartonHistory &&rhs)=delete
CalcPartonHistory & operator= (const CalcPartonHistory &rhs)=delete
CalcPartonHistory & operator= (CalcPartonHistory &&rhs)=delete
void AddToParticleMap (const xAOD::TruthParticle *particle, const std::string &key)
bool ExistsInMap (const std::string &key) const
bool ExistsInKey (const std::string &key, const xAOD::TruthParticle *particle) const
bool Retrievep4 (const std::string &key, PtEtaPhiMVector &p4)
bool Retrievep4 (const std::string &key, PtEtaPhiMVector &p4, std::size_t idx)
bool Retrievep4Gamma (PtEtaPhiMVector &p4, int &parentpdgId)
bool RetrievepdgId (const std::string &key, std::vector< int > &pdgIds)
bool RetrievepdgId (const std::string &key, int &pdgId)
bool RetrievepdgId (const std::string &key, int &pdgId, std::size_t idx)
bool RetrieveParticleInfo (const std::string &prefix, std::vector< const xAOD::TruthParticle * > &particles)
bool RetrieveParticleInfo (const std::string &prefix, PtEtaPhiMVector &particle, int &pdgId)
bool RetrieveParticleInfo (const std::string &prefix, PtEtaPhiMVector &particle, int &pdgId, std::size_t idx)
bool RetrieveParticleInfo (const std::string &prefix, const std::string &alt_prefix, PtEtaPhiMVector &particle, int &pdgId)
bool RetrieveParticleInfo (const std::string &prefix, std::vector< PtEtaPhiMVector > &particles, std::vector< int > &pdgIds)
void Initialize4TopDecorators ()
void InitializeTopDecorators (bool fcnc=false)
void InitializeAntiTopDecorators (bool fcnc=false)
void InitializeBottomDecorators ()
void InitializeVectorBottomDecorators ()
void InitializeAntiBottomDecorators ()
void InitializeVectorAntiBottomDecorators ()
void InitializeCharmDecorators ()
void InitializeVectorCharmDecorators ()
void InitializeAntiCharmDecorators ()
void InitializeVectorAntiCharmDecorators ()
void InitializeTtbarDecorators ()
void InitializeHiggsDecorators ()
void InitializePhotonDecorators ()
void InitializeZDecorators (int nZs=1, bool extend=false)
void InitializeWDecorators (int nWs=1)
std::string GetParticleType (const xAOD::TruthParticle *particle)
void TraceParticle (const xAOD::TruthParticle *particle, std::vector< const xAOD::TruthParticle * > &currentPath, std::vector< std::vector< const xAOD::TruthParticle * > > &allPaths)
void TraceParticles (const xAOD::TruthParticleContainer *truthParticles)
void handleFSR (const xAOD::TruthParticle *particle, const std::string &newKey, std::string &key)
bool handleDecay (const xAOD::TruthParticle *particle, std::string &key, int decayID)
void FillParticleMap (std::vector< std::vector< const xAOD::TruthParticle * > > &allPaths)
void FillGenericPartonHistory (const std::string &retrievalstring, const std::string &decorationstring, const int idx)
void FillGenericPartonHistory (const std::vector< std::string > &retrievalStrings, const std::string &decorationstring, const int idx)
void FillGenericPartonHistory (const std::vector< std::string > &retrievalStrings, const std::string &decorationstring)
void FillGenericVectorPartonHistory (const std::string &retrievalstring, const std::string &decorationstring)
void FillGammaPartonHistory ()
void FillZPartonHistory (const std::string &parent, int nZs=1, const std::string &mode="resonant")
void FillZtautauPartonHistory (const std::string &parent, int nZs=1, const std::string &mode="resonant")
void FillWPartonHistory (const std::string &parent, int nWs=1, const std::string &mode="resonant")
void FillXPartonHistory (const std::string &parent, const std::string &symbolX)
void FillTopPartonHistory (bool fcnc=false)
void FillAntiTopPartonHistory (bool fcnc=false)
void FillHiggsPartonHistory (const std::string &mode)
void FillTtbarPartonHistory (bool fcnc=false)
void setHiggs (const std::string &fsr)
void setW (const std::string &fsr, int nWs)
bool getW (const std::string &str_lep, const std::string &str_nu, PtEtaPhiMVector &p1, int &pdgId1, PtEtaPhiMVector &p2, int &pdgId2)
void setZ (const std::string &fsr, int nZs)
void setZtautau (const std::string &fsr, int nZs)
bool getZ (const std::string &str_lep1, const std::string &str_lep2, PtEtaPhiMVector &p1, int &pdgId1, PtEtaPhiMVector &p2, int &pdgId2)
ZTauTauDecay getZFromTaus (const std::string &fsr)
void configure (const PartonSchemeConfig &config)
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function.
StatusCode execute ()
virtual void print () const
 Print the state of the tool.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
Additional helper functions, not directly mimicking Athena
template<class T>
const T * getProperty (const std::string &name) const
 Get one of the tool's properties.
const std::string & msg_level_name () const __attribute__((deprecated))
 A deprecated function for getting the message level's name.
const std::string & getName (const void *ptr) const
 Get the name of an object that is / should be in the event store.
SG::sgkey_t getKey (const void *ptr) const
 Get the (hashed) key of an object that is in the event store.

Protected Member Functions

virtual StatusCode linkTruthContainers (const xAOD::TruthParticleContainer *&tp)
virtual StatusCode runHistorySaver (const xAOD::TruthParticleContainer *truthParticles, const xAOD::EventInfo *ttbarPartonHistory)
virtual void initializeDecorators ()
StatusCode buildContainerFromMultipleCollections (const std::vector< std::string > &collections, const std::string &out_contName)
 used to build container from multiple collections in DAOD_PHYS we don't have the TruthParticles collection, so we have to build a TruthParticleContainer (named out_contName) by merging several collections; this is stored in the evtStore this method has to use some tricks, like the helper m_tempParticles ConstDataVector, due to the desing of DataVector, see https://twiki.cern.ch/twiki/bin/view/AtlasComputing/DataVector
StatusCode linkBosonCollections ()
 currently in DAOD_PHYS TruthTop have links to Ws from the TruthBoson collection, which have no link to their decay products; we have therefore to associate the W from the TruthBoson collections to those in the TruthBosonsWithDecayParticles collection.
const xAOD::TruthParticle * getTruthParticleLinkedFromDecoration (const xAOD::TruthParticle *part, const std::string &decorationName)
 helper method to handle retriveing the truth particle linked in the decoration of another particle
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

std::map< std::string, std::vector< const xAOD::TruthParticle * > > m_particleMap
PartonDecorator m_dec
const std::vector< std::string > m_truthCollections
Gaudi::Property< std::string > m_prefix
Gaudi::Property< std::string > m_symbolFCNC
PartonSchemeConfig m_config
 scheme configuration set via configure()
bool m_configured = false
 true after configure() has been called

Private Types

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t

Private Member Functions

StatusCode decorateCollectionWithLinksToAnotherCollection (const std::string &collectionToDecorate, const std::string &collectionToLink, const std::string &nameOfDecoration)
 helper method currently used in DAOD_PHYS to link particles from a given collection to the same particles included in another collection; needed because particles may be duplicated in different collections, but their navigation links may only be there in some of them...
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 28 of file CalcPartonHistory.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ CalcPartonHistory() [1/3]

CP::CalcPartonHistory::CalcPartonHistory ( const std::string & name,
const std::vector< std::string > & truthCollections = {"TruthTop"} )
explicit

Definition at line 40 of file CalcPartonHistory.cxx.

42 : asg::AsgTool(name), m_truthCollections(truthCollection) {}
const std::vector< std::string > m_truthCollections

◆ ~CalcPartonHistory()

virtual CP::CalcPartonHistory::~CalcPartonHistory ( )
virtualdefault

◆ CalcPartonHistory() [2/3]

CP::CalcPartonHistory::CalcPartonHistory ( const CalcPartonHistory & rhs)
delete

◆ CalcPartonHistory() [3/3]

CP::CalcPartonHistory::CalcPartonHistory ( CalcPartonHistory && rhs)
delete

Member Function Documentation

◆ AddToParticleMap()

void CP::CalcPartonHistory::AddToParticleMap ( const xAOD::TruthParticle * particle,
const std::string & key )

Definition at line 246 of file CalcPartonHistory.cxx.

247 {
248 if (!ExistsInKey(key, p))
249 m_particleMap[key].push_back(p);
250}
bool ExistsInKey(const std::string &key, const xAOD::TruthParticle *particle) const
std::map< std::string, std::vector< const xAOD::TruthParticle * > > m_particleMap

◆ buildContainerFromMultipleCollections()

StatusCode CP::CalcPartonHistory::buildContainerFromMultipleCollections ( const std::vector< std::string > & collections,
const std::string & out_contName )
protected

used to build container from multiple collections in DAOD_PHYS we don't have the TruthParticles collection, so we have to build a TruthParticleContainer (named out_contName) by merging several collections; this is stored in the evtStore this method has to use some tricks, like the helper m_tempParticles ConstDataVector, due to the desing of DataVector, see https://twiki.cern.ch/twiki/bin/view/AtlasComputing/DataVector

Definition at line 372 of file CalcPartonHistory.cxx.

374 {
375 // In DAOD_PHYS there is no single TruthParticles collection, so we merge
376 // several dedicated collections (e.g. TruthTop,
377 // TruthBosonsWithDecayParticles) into one working container stored in the
378 // event store.
379 //
380 // The merge must avoid double-counting: the same particle can appear in
381 // multiple collections (e.g. the b from a top appears in both TruthTop and
382 // TruthBottom). We therefore keep only "root" particles — those that are not
383 // a descendant of any other candidate in the merged pool. TraceParticles then
384 // walks down from these roots, naturally visiting all descendants regardless
385 // of which original collection they came from.
386 auto out_cont =
387 std::make_unique<ConstDataVector<DataVector<xAOD::TruthParticle_v1>>>(
389 std::vector<const xAOD::TruthParticle*> p_candidates;
390 std::vector<const xAOD::TruthParticle*> p_parents;
391 std::unordered_set<int> candidateUids;
392
393 for (const std::string& collection : collections) {
394 const xAOD::TruthParticleContainer* cont = nullptr;
395 ANA_CHECK(evtStore()->retrieve(cont, collection));
396 for (const xAOD::TruthParticle* p : *cont) {
397 if (p) {
398 p_candidates.push_back(p);
399 candidateUids.insert(p->uid());
400 }
401 }
402 }
403 // Collect the uids of all candidates that descend from another (non-PDF)
404 // candidate, walking the decay tree of each candidate once. All copies of
405 // duplicated particles are walked, as their navigation links may differ.
406 std::unordered_set<int> descendantUids;
407 std::vector<const xAOD::TruthParticle*> stack;
408 for (const xAOD::TruthParticle* ancestor : p_candidates) {
410 continue;
411 stack.assign(1, ancestor);
412 while (!stack.empty()) {
413 const xAOD::TruthParticle* p = stack.back();
414 stack.pop_back();
415 for (std::size_t i = 0; i < p->nChildren(); ++i) {
416 const xAOD::TruthParticle* child = p->child(i);
417 if (!child)
418 continue;
419 if (candidateUids.count(child->uid()))
420 descendantUids.insert(child->uid());
421 stack.push_back(child);
422 }
423 }
424 }
425 // Retain only particles that have no ancestor among the other candidates.
426 // Particles present in several collections (same uid) are kept only once,
427 // using the copy from the first collection that contains them.
428 std::unordered_set<int> rootUids;
429 for (const xAOD::TruthParticle* potential_parent : p_candidates) {
430 if (!PartonHistoryUtils::isQuarkFromPDF(potential_parent) &&
431 !descendantUids.count(potential_parent->uid()) &&
432 rootUids.insert(potential_parent->uid()).second)
433 p_parents.push_back(potential_parent);
434 }
435 out_cont->insert(out_cont->end(), p_parents.begin(), p_parents.end());
436 StatusCode save = TDS()->record(std::move(out_cont), out_contName);
437 if (!save)
438 return StatusCode::FAILURE;
439 return StatusCode::SUCCESS;
440}
#define TDS()
#define ANA_CHECK(EXP)
check whether the given expression was successful
ServiceHandle< StoreGateSvc > & evtStore()
int uid() const
Unique ID.
bool isQuarkFromPDF(const xAOD::TruthParticle *particle)
::StatusCode StatusCode
StatusCode definition for legacy code.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
save(self, fileName="./columbo.out")
Definition checkTP.py:176
TruthParticle_v1 TruthParticle
Typedef to implementation.
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.

◆ configure()

void CP::CalcPartonHistory::configure ( const PartonSchemeConfig & config)

Definition at line 495 of file CalcPartonHistory.cxx.

495 {
497 m_configured = true;
498}
bool m_configured
true after configure() has been called
PartonSchemeConfig m_config
scheme configuration set via configure()

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ decorateCollectionWithLinksToAnotherCollection()

StatusCode CP::CalcPartonHistory::decorateCollectionWithLinksToAnotherCollection ( const std::string & collectionToDecorate,
const std::string & collectionToLink,
const std::string & nameOfDecoration )
private

helper method currently used in DAOD_PHYS to link particles from a given collection to the same particles included in another collection; needed because particles may be duplicated in different collections, but their navigation links may only be there in some of them...

Definition at line 448 of file CalcPartonHistory.cxx.

450 {
451 const SG::Decorator<const xAOD::TruthParticle*> dec(nameOfDecoration);
452 const xAOD::TruthParticleContainer* cont1 = nullptr;
453 const xAOD::TruthParticleContainer* cont2 = nullptr;
454 ANA_CHECK(evtStore()->retrieve(cont1, collectionToDecorate));
455 ANA_CHECK(evtStore()->retrieve(cont2, collectionToLink));
456 std::unordered_map<int, const xAOD::TruthParticle*> byUid;
457 byUid.reserve(cont2->size());
458 for (const auto* q : *cont2)
459 byUid.emplace(q->uid(), q);
460 for (const auto* p : *cont1) {
461 const xAOD::TruthParticle* link = nullptr;
462 auto it = byUid.find(p->uid());
463 if (it != byUid.end() && it->second->pdgId() == p->pdgId())
464 link = it->second;
465 dec(*p) = link;
466 }
467 return StatusCode::SUCCESS;
468}
size_type size() const noexcept
Returns the number of elements in the collection.
SG::Decorator< T, ALLOC > Decorator
Helper class to provide type-safe access to aux data, specialized for JaggedVecElt.
Definition AuxElement.h:576
pointer & link(pointer p) const
Return a reference to the link for an element.

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode CP::CalcPartonHistory::execute ( )

Definition at line 361 of file CalcPartonHistory.cxx.

361 {
362 const xAOD::TruthParticleContainer* truthParticles{nullptr};
363 ANA_CHECK(linkTruthContainers(truthParticles));
364
365 const xAOD::EventInfo* partonHistory = nullptr;
366 ANA_CHECK(evtStore()->retrieve(partonHistory, "EventInfo"));
367
368 ANA_CHECK(runHistorySaver(truthParticles, partonHistory));
369 return StatusCode::SUCCESS;
370}
virtual StatusCode runHistorySaver(const xAOD::TruthParticleContainer *truthParticles, const xAOD::EventInfo *ttbarPartonHistory)
virtual StatusCode linkTruthContainers(const xAOD::TruthParticleContainer *&tp)
EventInfo_v1 EventInfo
Definition of the latest event info version.

◆ ExistsInKey()

bool CP::CalcPartonHistory::ExistsInKey ( const std::string & key,
const xAOD::TruthParticle * particle ) const

Definition at line 49 of file CalcPartonHistory.cxx.

50 {
51 // Checks whether a given particle exists in the vector for the given key.
52 if (const auto* v = findVector(m_particleMap, key)) {
53 return std::find(v->begin(), v->end(), p) != v->end();
54 }
55 return false;
56}

◆ ExistsInMap()

bool CP::CalcPartonHistory::ExistsInMap ( const std::string & key) const

Definition at line 44 of file CalcPartonHistory.cxx.

44 {
45 // Checks whether a given key exists in the particle map.
46 return m_particleMap.find(key) != m_particleMap.end();
47}

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ FillAntiTopPartonHistory()

void CP::CalcPartonHistory::FillAntiTopPartonHistory ( bool fcnc = false)

Definition at line 73 of file CalcTopPartonHistory.cxx.

73 {
74 FillGenericPartonHistory("MC_tbar_beforeFSR", "MC_tbar_beforeFSR", 0);
75 FillGenericPartonHistory("MC_tbar_afterFSR", "MC_tbar_afterFSR", 0);
76 if (fcnc) {
77 PtEtaPhiMVector v;
78 int pdgId = 0;
79 const std::array<std::string, 2> fsrStates{ "beforeFSR", "afterFSR" };
80 const std::array<std::string, 3> flavors{ "bbar", "cbar", "ubar" }; // "ubar" kept for future-proofing
81
82 for (const auto& fsrState : fsrStates) {
83 const auto outputTag = "MC_qbar_" + fsrState + "_from_tbar";
84 bool found = false;
85 for (const auto& flavor : flavors) {
86 const auto key = m_prefix + "_" + ("MC_tbar_" + flavor + "_" + fsrState);
87 if (RetrieveParticleInfo(key, v, pdgId)) {
88 m_dec.decorateParticle(outputTag, v, pdgId);
89 found = true;
90 break;
91 }
92 }
93 if (!found) m_dec.decorateDefault(outputTag);
94 }
96 } else {
97 FillGenericPartonHistory("MC_tbar_bbar_beforeFSR",
98 "MC_bbar_beforeFSR_from_tbar", 0);
99 FillGenericPartonHistory("MC_tbar_bbar_afterFSR",
100 "MC_bbar_afterFSR_from_tbar", 0);
101 FillWPartonHistory("tbar");
102 }
103}
Gaudi::Property< std::string > m_symbolFCNC
bool RetrieveParticleInfo(const std::string &prefix, std::vector< const xAOD::TruthParticle * > &particles)
Gaudi::Property< std::string > m_prefix
void FillWPartonHistory(const std::string &parent, int nWs=1, const std::string &mode="resonant")
void FillXPartonHistory(const std::string &parent, const std::string &symbolX)
void FillGenericPartonHistory(const std::string &retrievalstring, const std::string &decorationstring, const int idx)

◆ FillGammaPartonHistory()

void CP::CalcPartonHistory::FillGammaPartonHistory ( )

Definition at line 14 of file CalcPhotonPartonHistory.cxx.

14 {
15 PtEtaPhiMVector gamma;
16 int gamma_origin = 0;
17
18 m_dec.decorateDefault("MC_gamma");
19
20 if (Retrievep4Gamma(gamma, gamma_origin))
21 m_dec.decorateParticle("MC_gamma", gamma);
22
23 m_dec.decorateCustom("MC_gamma_origin", gamma_origin);
24}
bool Retrievep4Gamma(PtEtaPhiMVector &p4, int &parentpdgId)

◆ FillGenericPartonHistory() [1/3]

void CP::CalcPartonHistory::FillGenericPartonHistory ( const std::string & retrievalstring,
const std::string & decorationstring,
const int idx )

Definition at line 14 of file CalcGenericPartonHistory.cxx.

16 {
17 PtEtaPhiMVector v;
18 int pdgId = 0;
19 m_dec.decorateDefault(decorationstring);
20 if (RetrieveParticleInfo(m_prefix + "_" + retrievalstring, v, pdgId, idx))
21 m_dec.decorateParticle(decorationstring, v, pdgId);
22}

◆ FillGenericPartonHistory() [2/3]

void CP::CalcPartonHistory::FillGenericPartonHistory ( const std::vector< std::string > & retrievalStrings,
const std::string & decorationstring )

Definition at line 38 of file CalcGenericPartonHistory.cxx.

40 {
41 FillGenericPartonHistory(retrievalStrings, decorationstring, 0);
42}

◆ FillGenericPartonHistory() [3/3]

void CP::CalcPartonHistory::FillGenericPartonHistory ( const std::vector< std::string > & retrievalStrings,
const std::string & decorationstring,
const int idx )

Definition at line 24 of file CalcGenericPartonHistory.cxx.

26 {
27 PtEtaPhiMVector v;
28 int pdgId = 0;
29 m_dec.decorateDefault(decorationstring);
30 for (const auto& retrievalString : retrievalStrings) {
31 if (RetrieveParticleInfo(m_prefix + "_" + retrievalString, v, pdgId, idx)) {
32 m_dec.decorateParticle(decorationstring, v, pdgId);
33 break;
34 }
35 }
36}

◆ FillGenericVectorPartonHistory()

void CP::CalcPartonHistory::FillGenericVectorPartonHistory ( const std::string & retrievalstring,
const std::string & decorationstring )

Definition at line 44 of file CalcGenericPartonHistory.cxx.

45 {
46 std::vector<PtEtaPhiMVector> v;
47 std::vector<int> pdgId;
48 m_dec.decorateVectorDefault(decorationstring);
49 if (RetrieveParticleInfo(m_prefix + "_" + retrievalstring, v, pdgId))
50 m_dec.decorateVectorParticle(decorationstring, v, pdgId);
51}

◆ FillHiggsPartonHistory()

void CP::CalcPartonHistory::FillHiggsPartonHistory ( const std::string & mode)

Definition at line 56 of file CalcHiggsPartonHistory.cxx.

56 {
57 // {particle map key, decoration name}, both without the "MC_" prefix and
58 // the FSR-stage suffix.
59 static constexpr std::array<std::pair<const char*, const char*>, 7>
60 higgsParticles{{{"H", "H"},
61 {"HDecay1", "Hdecay1"},
62 {"HDecay2", "Hdecay2"},
63 {"HDecay1Decay1", "Hdecay1_decay1"},
64 {"HDecay1Decay2", "Hdecay1_decay2"},
65 {"HDecay2Decay1", "Hdecay2_decay1"},
66 {"HDecay2Decay2", "Hdecay2_decay2"}}};
67 static constexpr std::array<const char*, 2> fsrStages{
68 {"_beforeFSR", "_afterFSR"}};
69
70 // Defaults for all branches regardless of mode.
71 for (const char* fsr : fsrStages)
72 for (const auto& [key, decoration] : higgsParticles)
73 m_dec.decorateDefault("MC_" + std::string(decoration) + fsr);
74
75 if (mode == "resonant" || mode == "single_top") {
76 // FillGenericPartonHistory retrieval strings are bare suffixes.
77 for (const char* fsr : fsrStages) {
78 for (const auto& [key, decoration] : higgsParticles) {
79 const std::string decorationName =
80 "MC_" + std::string(decoration) + fsr;
81 if (mode == "resonant") {
82 FillGenericPartonHistory("MC_" + std::string(key) + fsr,
83 decorationName, 0);
84 } else {
85 FillGenericPartonHistory({"MC_" + std::string(key) + fsr,
86 "MC_b_" + std::string(key) + fsr,
87 "MC_bbar_" + std::string(key) + fsr},
88 decorationName, 0);
89 }
90 }
91 }
92 } else if (mode == "non_resonant_WW") {
93 setHiggs("beforeFSR");
94 setHiggs("afterFSR");
95 }
96}
void setHiggs(const std::string &fsr)

◆ FillParticleMap()

void CP::CalcPartonHistory::FillParticleMap ( std::vector< std::vector< const xAOD::TruthParticle * > > & allPaths)

Definition at line 282 of file CalcPartonHistory.cxx.

283 {
284 // Converts the raw decay paths produced by TraceParticles into the
285 // m_particleMap used by all Retrieve* and Fill* methods.
286 //
287 // Key construction: each path is walked particle by particle, accumulating
288 // a string key of the form
289 // "<prefix>_MC_<type1>_<type2>_..._<beforeFSR|afterFSR>". For example, a b
290 // quark from a top gives "MySch_MC_t_b_beforeFSR". Decay products of W/Z/H
291 // get an additional "Decay<N>" segment to distinguish the two daughters, e.g.
292 // "MySch_MC_t_WDecay1_beforeFSR".
293 //
294 // Handlers (first match wins for each particle in the path):
295 // handleDecay — daughters of W/Z/H: appends "Decay<N>" and records
296 // beforeFSR/afterFSR
297 // handleFSR — all other particles: the first copy of an FSR chain
298 // appends the type suffix and records beforeFSR (and
299 // afterFSR if it does not radiate); the last copy (same PDG
300 // as parent) records afterFSR under the current key
301 m_particleMap.clear();
302
303 for (const auto& path : allPaths) {
304 // m_particleMap keys always include the prefix, built once here.
305 std::string key = m_prefix + "_" + "MC";
306
307 for (const auto* p : path) {
308 // beforeFSR: this node has an identical child (it will radiate).
309 // afterFSR: this node's parent has the same PDG ID (it was radiated
310 // from).
311 const bool beforeFSR = PartonHistoryUtils::hasIdenticalChild(p);
312 const bool afterFSR = PartonHistoryUtils::hasParentPdgId(p);
313
314 // Determine which child index this particle is under its parent; used to
315 // label W/Z/H decay daughters as Decay1, Decay2. Falls back to sign of
316 // pdgId (negative → 2) if parent navigation is unavailable.
317 int decayID = (p->pdgId() < 0) ? 2 : 1;
318 if (p->nParents() != 0 && p->parent(0)) {
319 const auto* par = p->parent(0);
320 for (std::size_t i = 0; i < par->nChildren(); ++i) {
321 if (par->child(i) == p) {
322 decayID = static_cast<int>(i) + 1;
323 break;
324 }
325 }
326 }
327
328 const std::string new_key = GetParticleType(p);
329
330 // Skip pure intermediate FSR nodes that are neither the first nor last
331 // in the FSR chain — they carry no additional physics information.
332 if (beforeFSR && afterFSR)
333 continue;
334 if (handleDecay(p, key, decayID))
335 continue;
336 handleFSR(p, new_key, key);
337 }
338 }
339}
std::string GetParticleType(const xAOD::TruthParticle *particle)
void handleFSR(const xAOD::TruthParticle *particle, const std::string &newKey, std::string &key)
bool handleDecay(const xAOD::TruthParticle *particle, std::string &key, int decayID)
bool hasIdenticalChild(const xAOD::TruthParticle *particle)
bool hasParentPdgId(const xAOD::TruthParticle *particle, int PdgId)

◆ FillTopPartonHistory()

void CP::CalcPartonHistory::FillTopPartonHistory ( bool fcnc = false)

Definition at line 43 of file CalcTopPartonHistory.cxx.

43 {
44 FillGenericPartonHistory("MC_t_beforeFSR", "MC_t_beforeFSR", 0);
45 FillGenericPartonHistory("MC_t_afterFSR", "MC_t_afterFSR", 0);
46 if (fcnc) {
47 PtEtaPhiMVector v;
48 int pdgId = 0;
49 const std::array<std::string, 2> fsrStates{ "beforeFSR", "afterFSR" };
50 const std::array<std::string, 3> flavors{ "b", "c", "u" }; // The u-quark is currently not stored in the DAOD_PHYS
51 // truth record, but it's kept here for future-proofing.
52 for (const auto& fsrState : fsrStates) {
53 const auto outputTag = "MC_q_" + fsrState + "_from_t";
54 bool found = false;
55 for (const auto& flavor : flavors) {
56 const auto key = m_prefix + "_" + ("MC_t_" + flavor + "_" + fsrState);
57 if (RetrieveParticleInfo(key, v, pdgId)) {
58 m_dec.decorateParticle(outputTag, v, pdgId);
59 found = true;
60 break;
61 }
62 }
63 if (!found) m_dec.decorateDefault(outputTag);
64 }
66 } else {
67 FillGenericPartonHistory("MC_t_b_beforeFSR", "MC_b_beforeFSR_from_t", 0);
68 FillGenericPartonHistory("MC_t_b_afterFSR", "MC_b_afterFSR_from_t", 0);
70 }
71}

◆ FillTtbarPartonHistory()

void CP::CalcPartonHistory::FillTtbarPartonHistory ( bool fcnc = false)

Definition at line 105 of file CalcTopPartonHistory.cxx.

105 {
106 std:: string qSymbol = fcnc ? "q" : "b";
107 std:: string qbarSymbol = fcnc ? "qbar" : "bbar";
108 std::string bosonSymbol = fcnc ? "X" : "W";
109 // Assumes FillTopPartonHistory and FillAntiTopPartonHistory have already run.
110 PtEtaPhiMVector ttbar;
111 PtEtaPhiMVector t_beforeFSR, tbar_beforeFSR, t_afterFSR, tbar_afterFSR;
112 PtEtaPhiMVector WpDecay1, WpDecay2, WmDecay1, WmDecay2, b, bbar;
113
114 // m_dec.decorate* takes bare names; Retrievep4 takes full m_particleMap keys.
115 m_dec.decorateDefaultNoPdgId("MC_ttbar_beforeFSR");
116 m_dec.decorateDefaultNoPdgId("MC_ttbar_afterFSR");
117 m_dec.decorateDefaultNoPdgId("MC_ttbar_fromDecay_beforeFSR");
118 m_dec.decorateDefaultNoPdgId("MC_ttbar_fromDecay_afterFSR");
119
120 if (Retrievep4(m_prefix + "_" + "MC_t_beforeFSR", t_beforeFSR) &&
121 Retrievep4(m_prefix + "_" + "MC_tbar_beforeFSR", tbar_beforeFSR)) {
122 ttbar = t_beforeFSR + tbar_beforeFSR;
123 m_dec.decorateParticle("MC_ttbar_beforeFSR", ttbar);
124 }
125
126 if (Retrievep4(m_prefix + "_" + "MC_t_afterFSR", t_afterFSR) &&
127 Retrievep4(m_prefix + "_" + "MC_tbar_afterFSR", tbar_afterFSR)) {
128 ttbar = t_afterFSR + tbar_afterFSR;
129 m_dec.decorateParticle("MC_ttbar_afterFSR", ttbar);
130 }
131
132 if (Retrievep4(m_prefix + "_" + "MC_t_" + bosonSymbol + "Decay1_beforeFSR", WpDecay1) &&
133 Retrievep4(m_prefix + "_" + "MC_t_" + bosonSymbol + "Decay2_beforeFSR", WpDecay2) &&
134 Retrievep4(m_prefix + "_" + "MC_tbar_" + bosonSymbol + "Decay1_beforeFSR", WmDecay1) &&
135 Retrievep4(m_prefix + "_" + "MC_tbar_" + bosonSymbol + "Decay2_beforeFSR", WmDecay2) &&
136 Retrievep4(m_prefix + "_" + "MC_t_" + qSymbol + "_beforeFSR", b) &&
137 Retrievep4(m_prefix + "_" + "MC_tbar_" + qbarSymbol + "_beforeFSR", bbar)) {
138 ttbar = WpDecay1 + WpDecay2 + WmDecay1 + WmDecay2 + b + bbar;
139 m_dec.decorateParticle("MC_ttbar_fromDecay_beforeFSR", ttbar);
140 }
141
142 if (Retrievep4(m_prefix + "_" + "MC_t_" + bosonSymbol + "Decay1_afterFSR", WpDecay1) &&
143 Retrievep4(m_prefix + "_" + "MC_t_" + bosonSymbol + "Decay2_afterFSR", WpDecay2) &&
144 Retrievep4(m_prefix + "_" + "MC_tbar_" + bosonSymbol + "Decay1_afterFSR", WmDecay1) &&
145 Retrievep4(m_prefix + "_" + "MC_tbar_" + bosonSymbol + "Decay2_afterFSR", WmDecay2) &&
146 Retrievep4(m_prefix + "_" + "MC_t_" + qSymbol + "_afterFSR", b) &&
147 Retrievep4(m_prefix + "_" + "MC_tbar_" + qbarSymbol + "_afterFSR", bbar)) {
148 ttbar = WpDecay1 + WpDecay2 + WmDecay1 + WmDecay2 + b + bbar;
149 m_dec.decorateParticle("MC_ttbar_fromDecay_afterFSR", ttbar);
150 }
151}
bool Retrievep4(const std::string &key, PtEtaPhiMVector &p4)

◆ FillWPartonHistory()

void CP::CalcPartonHistory::FillWPartonHistory ( const std::string & parent,
int nWs = 1,
const std::string & mode = "resonant" )

Definition at line 114 of file CalcWPartonHistory.cxx.

115 {
116 std::string parentstring = parent.empty() ? "" : "_from_" + parent;
117 // Bare suffix for FillGenericPartonHistory (it prepends m_prefix + "_"
118 // internally).
119 std::string prefix = "MC_" + (parent.empty() ? "W" : parent + "_W");
120
121 if (mode == "resonant") {
122 if (nWs == 1) {
123 if (parent.empty())
124 m_dec.decorateCustom(
125 "MC_W_IsOnShell",
126 ExistsInMap(m_prefix + "_" + prefix + "_beforeFSR") ? 1 : 0);
127 FillGenericPartonHistory(prefix + "_beforeFSR",
128 "MC_W_beforeFSR" + parentstring, 0);
129 FillGenericPartonHistory(prefix + "Decay1_beforeFSR",
130 "MC_Wdecay1_beforeFSR" + parentstring, 0);
131 FillGenericPartonHistory(prefix + "Decay2_beforeFSR",
132 "MC_Wdecay2_beforeFSR" + parentstring, 0);
133 FillGenericPartonHistory(prefix + "_afterFSR",
134 "MC_W_afterFSR" + parentstring, 0);
135 FillGenericPartonHistory(prefix + "Decay1_afterFSR",
136 "MC_Wdecay1_afterFSR" + parentstring, 0);
137 FillGenericPartonHistory(prefix + "Decay2_afterFSR",
138 "MC_Wdecay2_afterFSR" + parentstring, 0);
139 } else {
140 for (int idx = 0; idx < nWs; idx++) {
141 const std::string idxStr = std::to_string(idx + 1);
142 if (parent.empty())
143 m_dec.decorateCustom("MC_W" + idxStr + "_IsOnShell", 1);
144 FillGenericPartonHistory(prefix + "_beforeFSR",
145 "MC_W" + idxStr + "_beforeFSR" + parentstring,
146 0);
148 prefix + "Decay1_beforeFSR",
149 "MC_W" + idxStr + "decay1_beforeFSR" + parentstring, 0);
151 prefix + "Decay2_beforeFSR",
152 "MC_W" + idxStr + "decay2_beforeFSR" + parentstring, 0);
153 FillGenericPartonHistory(prefix + "_afterFSR",
154 "MC_W" + idxStr + "_afterFSR" + parentstring,
155 0);
157 prefix + "Decay1_afterFSR",
158 "MC_W" + idxStr + "decay1_afterFSR" + parentstring, 0);
160 prefix + "Decay2_afterFSR",
161 "MC_W" + idxStr + "decay2_afterFSR" + parentstring, 0);
162 }
163 }
164 } else if (mode == "non_resonant") {
165 if (parent.empty()) {
166 if (nWs == 1) {
167 m_dec.decorateCustom("MC_W_IsOnShell", 0);
168 } else {
169 for (int idx = 0; idx < nWs; idx++)
170 m_dec.decorateCustom("MC_W" + std::to_string(idx + 1) + "_IsOnShell",
171 0);
172 }
173 }
174 setW("beforeFSR", nWs);
175 setW("afterFSR", nWs);
176 }
177}
void setW(const std::string &fsr, int nWs)
bool ExistsInMap(const std::string &key) const

◆ FillXPartonHistory()

void CP::CalcPartonHistory::FillXPartonHistory ( const std::string & parent,
const std::string & symbolX )

Definition at line 17 of file CalcTopPartonHistory.cxx.

18 {
19 PtEtaPhiMVector v;
20 int pdgId = 0;
21 const std::array<std::string, 2> fsrStates{ "beforeFSR", "afterFSR" };
22 const std::array<std::pair<std::string, std::string>, 3> particleTags{{
23 {"", "X"},
24 {"Decay1", "Xdecay1"},
25 {"Decay2", "Xdecay2"},
26 }};
27
28 for (const auto& fsrState : fsrStates) {
29 for (const auto& [sourceSuffix, outputSuffix] : particleTags) {
30 const auto outputTag = "MC_" + outputSuffix + "_" + fsrState + "_from_" + parent;
31 const auto sourcePrefix = "MC_" + parent + "_";
32
33 if (RetrieveParticleInfo(m_prefix + "_" + sourcePrefix + "W" + sourceSuffix + "_" + fsrState, v, pdgId))
34 m_dec.decorateParticle(outputTag, v, pdgId);
35 else if (RetrieveParticleInfo(m_prefix + "_" + sourcePrefix + symbolX + sourceSuffix + "_" + fsrState, v, pdgId))
36 m_dec.decorateParticle(outputTag, v, pdgId);
37 else
38 m_dec.decorateDefault(outputTag);
39 }
40 }
41}

◆ FillZPartonHistory()

void CP::CalcPartonHistory::FillZPartonHistory ( const std::string & parent,
int nZs = 1,
const std::string & mode = "resonant" )

Definition at line 175 of file CalcZPartonHistory.cxx.

176 {
177 std::string parentstring = parent.empty() ? "" : "_from_" + parent;
178 // mapPrefix: full m_particleMap key base (with m_prefix) — used only for
179 // ExistsInMap.
180 std::string mapPrefix =
181 m_prefix + "_" + "MC_" + (parent.empty() ? "Z" : parent + "_Z");
182 // decPrefix: bare suffix passed to FillGenericPartonHistory as
183 // retrievalstring; FillGenericPartonHistory prepends m_prefix + "_"
184 // internally.
185 std::string decPrefix = "MC_" + (parent.empty() ? "Z" : parent + "_Z");
186
187 if (mode == "resonant") {
188 if (nZs == 1) {
189 if (ExistsInMap(mapPrefix + "_beforeFSR")) {
190 m_dec.decorateCustom("MC_Z_IsOnShell", 1);
191 FillGenericPartonHistory(decPrefix + "_beforeFSR",
192 "MC_Z" + parentstring + "_beforeFSR", 0);
193 FillGenericPartonHistory(decPrefix + "Decay1_beforeFSR",
194 "MC_Zdecay1" + parentstring + "_beforeFSR", 0);
195 FillGenericPartonHistory(decPrefix + "Decay2_beforeFSR",
196 "MC_Zdecay2" + parentstring + "_beforeFSR", 0);
197 FillGenericPartonHistory(decPrefix + "_afterFSR",
198 "MC_Z" + parentstring + "_afterFSR", 0);
199 FillGenericPartonHistory(decPrefix + "Decay1_afterFSR",
200 "MC_Zdecay1" + parentstring + "_afterFSR", 0);
201 FillGenericPartonHistory(decPrefix + "Decay2_afterFSR",
202 "MC_Zdecay2" + parentstring + "_afterFSR", 0);
203 } else {
204 setZ("beforeFSR", nZs);
205 setZ("afterFSR", nZs);
206 }
207 } else {
208 for (int idx = 0; idx < nZs; idx++) {
209 const std::string idxStr = std::to_string(idx + 1);
210 m_dec.decorateCustom("MC_Z" + idxStr + "_IsOnShell", 1);
211 FillGenericPartonHistory(decPrefix + "_beforeFSR",
212 "MC_Z" + idxStr + parentstring + "_beforeFSR",
213 idx);
215 decPrefix + "Decay1_beforeFSR",
216 "MC_Z" + idxStr + "decay1" + parentstring + "_beforeFSR", idx);
218 decPrefix + "Decay2_beforeFSR",
219 "MC_Z" + idxStr + "decay2" + parentstring + "_beforeFSR", idx);
220 FillGenericPartonHistory(decPrefix + "_afterFSR",
221 "MC_Z" + idxStr + parentstring + "_afterFSR",
222 idx);
224 decPrefix + "Decay1_afterFSR",
225 "MC_Z" + idxStr + "decay1" + parentstring + "_afterFSR", idx);
227 decPrefix + "Decay2_afterFSR",
228 "MC_Z" + idxStr + "decay2" + parentstring + "_afterFSR", idx);
229 }
230 }
231 } else if (mode == "non_resonant") {
232 setZ("beforeFSR", nZs);
233 setZ("afterFSR", nZs);
234 }
235}
void setZ(const std::string &fsr, int nZs)

◆ FillZtautauPartonHistory()

void CP::CalcPartonHistory::FillZtautauPartonHistory ( const std::string & parent,
int nZs = 1,
const std::string & mode = "resonant" )

Definition at line 237 of file CalcZPartonHistory.cxx.

239 {
240 std::string parentstring = parent.empty() ? "" : "_from_" + parent;
241 // decPrefix: bare suffix for FillGenericPartonHistory retrieval strings.
242 std::string decPrefix = "MC_" + (parent.empty() ? "Z" : parent + "_Z");
243
244 FillZPartonHistory(parent, nZs, mode);
245 m_dec.decorateCustom("MC_Z_IsOnShell",
246 0); // default; overwritten to 1 below if resonant
247 if (mode == "resonant") {
248 if (nZs == 1) {
249 m_dec.decorateCustom("MC_Z_IsOnShell", 1);
251 decPrefix + "Decay1_Decay1_beforeFSR",
252 "MC_Zdecay1_decay1" + parentstring + "_beforeFSR", 0);
254 decPrefix + "Decay1_Decay2_beforeFSR",
255 "MC_Zdecay1_decay2" + parentstring + "_beforeFSR", 0);
257 decPrefix + "Decay1_Decay3_beforeFSR",
258 "MC_Zdecay1_decay3" + parentstring + "_beforeFSR", 0);
259 FillGenericPartonHistory(decPrefix + "Decay1_Decay1_afterFSR",
260 "MC_Zdecay1_decay1" + parentstring + "_afterFSR",
261 0);
262 FillGenericPartonHistory(decPrefix + "Decay1_Decay2_afterFSR",
263 "MC_Zdecay1_decay2" + parentstring + "_afterFSR",
264 0);
265 FillGenericPartonHistory(decPrefix + "Decay1_Decay3_afterFSR",
266 "MC_Zdecay1_decay3" + parentstring + "_afterFSR",
267 0);
268 } else {
269 for (int idx = 0; idx < nZs; idx++) {
270 const std::string idxStr = std::to_string(idx + 1);
271 m_dec.decorateCustom("MC_Z" + idxStr + "_IsOnShell", 1);
273 decPrefix + "Decay1_Decay1_beforeFSR",
274 "MC_Z" + idxStr + "decay1_decay1" + parentstring + "_beforeFSR",
275 idx);
277 decPrefix + "Decay1_Decay2_beforeFSR",
278 "MC_Z" + idxStr + "decay1_decay2" + parentstring + "_beforeFSR",
279 idx);
281 decPrefix + "Decay1_Decay3_beforeFSR",
282 "MC_Z" + idxStr + "decay1_decay3" + parentstring + "_beforeFSR",
283 idx);
285 decPrefix + "Decay1_Decay1_afterFSR",
286 "MC_Z" + idxStr + "decay1_decay1" + parentstring + "_afterFSR",
287 idx);
289 decPrefix + "Decay1_Decay2_afterFSR",
290 "MC_Z" + idxStr + "decay1_decay2" + parentstring + "_afterFSR",
291 idx);
293 decPrefix + "Decay1_Decay3_afterFSR",
294 "MC_Z" + idxStr + "decay1_decay3" + parentstring + "_afterFSR",
295 idx);
296 }
297 }
298 } else if (mode == "non_resonant") {
299 setZtautau("beforeFSR", nZs);
300 setZtautau("afterFSR", nZs);
301 }
302}
void FillZPartonHistory(const std::string &parent, int nZs=1, const std::string &mode="resonant")
void setZtautau(const std::string &fsr, int nZs)

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void * ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119 {
120
121#ifdef XAOD_STANDALONE
122 // In case we use @c xAOD::Event, we have a direct function call
123 // for this.
124 return evtStore()->event()->getKey( ptr );
125#else
126 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127 return ( proxy == nullptr ? 0 : proxy->sgkey() );
128#endif // XAOD_STANDALONE
129 }

◆ getName()

const std::string & asg::AsgTool::getName ( const void * ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106 {
107
108#ifdef XAOD_STANDALONE
109 // In case we use @c xAOD::Event, we have a direct function call
110 // for this.
111 return evtStore()->event()->getName( ptr );
112#else
113 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114 static const std::string dummy = "";
115 return ( proxy == nullptr ? dummy : proxy->name() );
116#endif // XAOD_STANDALONE
117 }

◆ GetParticleType()

std::string CP::CalcPartonHistory::GetParticleType ( const xAOD::TruthParticle * particle)

Definition at line 167 of file CalcPartonHistory.cxx.

168 {
169 static const std::unordered_map<int, std::string> pdgMap = {
170 {1, "_q"}, {2, "_q"}, {3, "_q"}, {-1, "_qbar"},
171 {-2, "_qbar"}, {-3, "_qbar"}, {6, "_t"}, {-6, "_tbar"},
172 {5, "_b"}, {-5, "_bbar"}, {4, "_c"}, {-4, "_cbar"},
173 {25, "_H"}, {24, "_W"}, {-24, "_W"}, {23, "_Z"},
174 {22, "_gamma"}, {21, "_g"}, {11, "_l"}, {13, "_l"},
175 {15, "_l"}, {-11, "_lbar"}, {-13, "_lbar"}, {-15, "_lbar"},
176 {12, "_nu"}, {14, "_nu"}, {16, "_nu"}, {-12, "_nubar"},
177 {-14, "_nubar"}, {-16, "_nubar"}, {2212, "_p"}, {1103, "_dd"},
178 {2101, "_ud"}, {2103, "_ud"}, {2203, "_uu"}, {3101, "_sd"},
179 {3103, "_sd"}, {3201, "_su"}, {3203, "_su"}, {3303, "_ss"},
180 {4101, "_cd"}, {4103, "_cd"}, {4201, "_cu"}, {4203, "_cu"},
181 {4301, "_cs"}, {4303, "_cs"}, {4403, "_cc"}, {5101, "_bd"},
182 {5103, "_bd"}, {5201, "_bu"}, {5203, "_bu"}, {5301, "_bs"},
183 {5303, "_bs"}, {5401, "_bc"}, {5403, "_bc"}, {5503, "_bb"}};
184 int pdgId = particle->pdgId();
185 auto it = pdgMap.find(pdgId);
186 return it != pdgMap.end() ? it->second : "_" + std::to_string(pdgId);
187}
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses

◆ getProperty()

template<class T>
const T * asg::AsgTool::getProperty ( const std::string & name) const
inherited

Get one of the tool's properties.

◆ getTruthParticleLinkedFromDecoration()

const xAOD::TruthParticle * CP::CalcPartonHistory::getTruthParticleLinkedFromDecoration ( const xAOD::TruthParticle * part,
const std::string & decorationName )
protected

helper method to handle retriveing the truth particle linked in the decoration of another particle

Definition at line 471 of file CalcPartonHistory.cxx.

472 {
474 if (!acc.isAvailable(*part))
475 return part;
476 const xAOD::TruthParticle* link = acc(*part);
477 return link ? link : part;
478}
SG::ConstAccessor< T, ALLOC > ConstAccessor
Definition AuxElement.h:570
static const SG::AuxElement::Accessor< ElementLink< IParticleContainer > > acc("originalObjectLink")
Object used for setting/getting the dynamic decoration in question.

◆ getW()

bool CP::CalcPartonHistory::getW ( const std::string & str_lep,
const std::string & str_nu,
PtEtaPhiMVector & p1,
int & pdgId1,
PtEtaPhiMVector & p2,
int & pdgId2 )

Definition at line 15 of file CalcWPartonHistory.cxx.

17 {
18 // Off-shell / non-resonant W reconstruction from lepton + neutrino
19 // candidates. Loops over all (lepton, neutrino) pairs and returns the first
20 // pair that passes the three conditions below. The caller is responsible for
21 // passing the correct lepton/neutrino flavour keys (e.g. MC_lbar + MC_nu for
22 // W+).
23 std::vector<const xAOD::TruthParticle*> W_offshell_decay1_candidates;
24 std::vector<const xAOD::TruthParticle*> W_offshell_decay2_candidates;
25 // str_lep/str_nu are full m_particleMap keys (caller passes m_prefix + "_" +
26 // ...)
27 bool has_candidates =
28 (RetrieveParticleInfo(str_lep, W_offshell_decay1_candidates) &&
29 RetrieveParticleInfo(str_nu, W_offshell_decay2_candidates));
30 if (has_candidates) {
31 for (const auto* particle_1 : W_offshell_decay1_candidates) {
32 for (const auto* particle_2 : W_offshell_decay2_candidates) {
33 // Condition 1: Opposite charge — lepton and neutrino must have
34 // opposite-sign pdgIds (e.g. e- has pdgId=11, νe has pdgId=12; product
35 // is positive, so we require the product to be negative for a valid W
36 // decay pair).
37 if ((particle_1->pdgId() * particle_2->pdgId()) > 0)
38 continue;
39 // Condition 2: Same lepton generation — |pdgId| of the neutrino must
40 // be that of the lepton plus 1 (11 & 12, 13 & 14, 15 & 16); a
41 // symmetric difference would also accept e.g. (mu, nu_e).
42 if (particle_2->absPdgId() - particle_1->absPdgId() != 1)
43 continue;
44 // Condition 3: Reject shower particles — particles produced during
45 // parton showering are assigned UIDs above 10100 by the generator.
46 // We require at least one of the pair to be a hard-scatter particle
47 // (UID ≤ 10100) to avoid picking up shower leptons.
48 if (particle_1->uid() > 10100 && particle_2->uid() > 10100)
49 continue;
50
51 p1 = GetPtEtaPhiMfromTruth(particle_1);
52 pdgId1 = particle_1->pdgId();
53 p2 = GetPtEtaPhiMfromTruth(particle_2);
54 pdgId2 = particle_2->pdgId();
55 return true;
56 }
57 }
58 }
59 return false;
60}
ROOT::Math::PtEtaPhiMVector GetPtEtaPhiMfromTruth(const xAOD::TruthParticle *TruthParticle)

◆ getZ()

bool CP::CalcPartonHistory::getZ ( const std::string & str_lep1,
const std::string & str_lep2,
PtEtaPhiMVector & p1,
int & pdgId1,
PtEtaPhiMVector & p2,
int & pdgId2 )

Definition at line 20 of file CalcZPartonHistory.cxx.

22 {
23 // Off-shell / non-resonant Z reconstruction from two same-flavour
24 // opposite-sign lepton candidates. Uses MCTruthClassifier decorations
25 // (classifierParticleOrigin, classifierParticleType) to restrict to
26 // prompt, isolated leptons from a Z decay, rejecting fakes and non-prompt
27 // background. Only electrons and muons are considered (not taus); for
28 // Z→ττ use getZFromTaus instead. Returns the first pair that passes all
29 // conditions (same convention as getW).
30 static const SG::ConstAccessor<unsigned int> acc_classifierParticleOrigin(
31 "classifierParticleOrigin");
32 static const SG::ConstAccessor<unsigned int> acc_classifierParticleType(
33 "classifierParticleType");
34 std::vector<const xAOD::TruthParticle*> Z_offshell_decay1_candidates;
35 std::vector<const xAOD::TruthParticle*> Z_offshell_decay2_candidates;
36 // str_lep1/2 are full m_particleMap keys (caller passes m_prefix + "_" + ...)
37 bool has_candidates =
38 (RetrieveParticleInfo(str_lep1, Z_offshell_decay1_candidates) &&
39 RetrieveParticleInfo(str_lep2, Z_offshell_decay2_candidates));
40 if (has_candidates) {
41 for (const auto* pDecay1 : Z_offshell_decay1_candidates) {
42 for (const auto* pDecay2 : Z_offshell_decay2_candidates) {
43 // Condition 1: Opposite charge — pdgId product must be negative
44 // (e.g. e-=11, e+=−11 → product −121 < 0).
45 if ((pDecay1->pdgId() * pDecay2->pdgId()) > 0)
46 continue;
47 // Condition 2: Same flavour — both leptons must have the same |pdgId|
48 // (e.g. both electrons or both muons).
49 if (pDecay1->absPdgId() != pDecay2->absPdgId())
50 continue;
51 // Leptons without MCTruthClassifier decorations cannot be classified
52 // and are skipped.
53 if (!acc_classifierParticleOrigin.isAvailable(*pDecay1) ||
54 !acc_classifierParticleOrigin.isAvailable(*pDecay2) ||
55 !acc_classifierParticleType.isAvailable(*pDecay1) ||
56 !acc_classifierParticleType.isAvailable(*pDecay2))
57 continue;
58 const unsigned int o1 = acc_classifierParticleOrigin(*pDecay1);
59 const unsigned int o2 = acc_classifierParticleOrigin(*pDecay2);
60 const unsigned int t1 = acc_classifierParticleType(*pDecay1);
61 const unsigned int t2 = acc_classifierParticleType(*pDecay2);
62 // Condition 3: Origin ZBoson from MCTruthClassifier. Ensures both
63 // leptons are truth-matched to a Z decay and not to backgrounds such
64 // as photon conversions or heavy-flavour semileptonic decays.
67 continue;
68 // Condition 4: Type IsoElectron or IsoMuon from MCTruthClassifier.
69 // Selects prompt isolated leptons, rejecting non-isolated or
70 // non-prompt contributions.
75 continue;
76
77 p1 = GetPtEtaPhiMfromTruth(pDecay1);
78 pdgId1 = pDecay1->pdgId();
79 p2 = GetPtEtaPhiMfromTruth(pDecay2);
80 pdgId2 = pDecay2->pdgId();
81 return true;
82 }
83 }
84 }
85 return false;
86}
std::vector< ALFA_RawDataContainer_p1 > t2
std::vector< ALFA_RawDataCollection_p1 > t1

◆ getZFromTaus()

CalcPartonHistory::ZTauTauDecay CP::CalcPartonHistory::getZFromTaus ( const std::string & fsr)

Definition at line 88 of file CalcZPartonHistory.cxx.

89 {
90 // taus[0] is the tau- ("l"), taus[1] the tau+ ("lbar"). Their decay
91 // products decay1..3 are the charged lepton followed by the two neutrinos.
92 // All keys are full m_particleMap keys once the prefix is prepended.
93 static constexpr std::array<const char*, 2> tauKeys{{"MC_l_", "MC_lbar_"}};
94 static constexpr std::array<std::array<const char*, 3>, 2> tauDecayKeys{
95 {{{"MC_l_l_", "MC_l_nubar_", "MC_l_nu_"}},
96 {{"MC_lbar_lbar_", "MC_lbar_nu_", "MC_lbar_nubar_"}}}};
97
99 for (std::size_t i = 0; i < tauKeys.size(); ++i) {
100 std::vector<const xAOD::TruthParticle*> tau_candidates;
101 if (RetrieveParticleInfo(m_prefix + "_" + tauKeys[i] + fsr,
102 tau_candidates)) {
103 result.taus[i] = {GetPtEtaPhiMfromTruth(tau_candidates.at(0)),
104 tau_candidates.at(0)->pdgId(), true};
105 }
106 // The tau decay products are only used if all three are found.
107 std::array<std::vector<const xAOD::TruthParticle*>, 3> decay_candidates;
108 bool has_decay_candidates = true;
109 for (std::size_t j = 0; j < decay_candidates.size(); ++j) {
110 has_decay_candidates =
111 has_decay_candidates &&
112 RetrieveParticleInfo(m_prefix + "_" + tauDecayKeys[i][j] + fsr,
113 decay_candidates[j]);
114 }
115 if (has_decay_candidates) {
116 for (std::size_t j = 0; j < decay_candidates.size(); ++j) {
117 result.tauDecays[i][j] = {
118 GetPtEtaPhiMfromTruth(decay_candidates[j].at(0)),
119 decay_candidates[j].at(0)->pdgId(), true};
120 }
121 }
122 }
123 return result;
124}
mapped_type at(key_type key) const
Look up an element in the map.
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
Z->tautau decay chain: taus[0] = tau- (Zdecay1), taus[1] = tau+ (Zdecay2); tauDecays[i][j] = decay pr...

◆ handleDecay()

bool CP::CalcPartonHistory::handleDecay ( const xAOD::TruthParticle * particle,
std::string & key,
int decayID )

Definition at line 265 of file CalcPartonHistory.cxx.

266 {
267 // Only daughters of a W/Z/H (not FSR copies of the boson itself).
272 return false;
273
274 const std::string decayStr = "Decay" + std::to_string(decayID);
275 key += decayStr;
276 AddToParticleMap(p, key + kBeforeFSR);
278 AddToParticleMap(p, key + kAfterFSR);
279 return true;
280}
void AddToParticleMap(const xAOD::TruthParticle *particle, const std::string &key)
bool hasParentAbsPdgId(const xAOD::TruthParticle *particle, int absPdgId)

◆ handleFSR()

void CP::CalcPartonHistory::handleFSR ( const xAOD::TruthParticle * particle,
const std::string & newKey,
std::string & key )

Definition at line 252 of file CalcPartonHistory.cxx.

253 {
254 // Last copy of an FSR chain: stored under the key of its first copy.
256 AddToParticleMap(p, key + kAfterFSR);
257 return;
258 }
259 key += newKey;
260 AddToParticleMap(p, key + kBeforeFSR);
262 AddToParticleMap(p, key + kAfterFSR);
263}

◆ initialize()

StatusCode CP::CalcPartonHistory::initialize ( void )
overridevirtual

Dummy implementation of the initialisation function.

It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...

Reimplemented from asg::AsgTool.

Definition at line 355 of file CalcPartonHistory.cxx.

355 {
356 m_dec.setPrefix(m_prefix);
358 return StatusCode::SUCCESS;
359}
virtual void initializeDecorators()

◆ Initialize4TopDecorators()

void CP::CalcPartonHistory::Initialize4TopDecorators ( )

Definition at line 11 of file PartonHistoryDecorators.cxx.

11 {
12 for (int idx = 1; idx <= 2; idx++) {
13 m_dec.initializePtEtaPhiMDecorator("MC_t" + std::to_string(idx) +
14 "_beforeFSR");
15 m_dec.initializePtEtaPhiMDecorator("MC_b_beforeFSR_from_t" +
16 std::to_string(idx));
17 m_dec.initializePtEtaPhiMDecorator("MC_W_beforeFSR_from_t" +
18 std::to_string(idx));
19 m_dec.initializePtEtaPhiMDecorator("MC_Wdecay1_beforeFSR_from_t" +
20 std::to_string(idx));
21 m_dec.initializePtEtaPhiMDecorator("MC_Wdecay2_beforeFSR_from_t" +
22 std::to_string(idx));
23
24 m_dec.initializePtEtaPhiMDecorator("MC_t" + std::to_string(idx) +
25 "_afterFSR");
26 m_dec.initializePtEtaPhiMDecorator("MC_b_afterFSR_from_t" +
27 std::to_string(idx));
28 m_dec.initializePtEtaPhiMDecorator("MC_W_afterFSR_from_t" +
29 std::to_string(idx));
30 m_dec.initializePtEtaPhiMDecorator("MC_Wdecay1_afterFSR_from_t" +
31 std::to_string(idx));
32 m_dec.initializePtEtaPhiMDecorator("MC_Wdecay2_afterFSR_from_t" +
33 std::to_string(idx));
34
35 m_dec.initializePtEtaPhiMDecorator("MC_tbar" + std::to_string(idx) +
36 "_beforeFSR");
37 m_dec.initializePtEtaPhiMDecorator("MC_bbar_beforeFSR_from_tbar" +
38 std::to_string(idx));
39 m_dec.initializePtEtaPhiMDecorator("MC_W_beforeFSR_from_tbar" +
40 std::to_string(idx));
41 m_dec.initializePtEtaPhiMDecorator("MC_Wdecay1_beforeFSR_from_tbar" +
42 std::to_string(idx));
43 m_dec.initializePtEtaPhiMDecorator("MC_Wdecay2_beforeFSR_from_tbar" +
44 std::to_string(idx));
45
46 m_dec.initializePtEtaPhiMDecorator("MC_tbar" + std::to_string(idx) +
47 "_afterFSR");
48 m_dec.initializePtEtaPhiMDecorator("MC_bbar_afterFSR_from_tbar" +
49 std::to_string(idx));
50 m_dec.initializePtEtaPhiMDecorator("MC_W_afterFSR_from_tbar" +
51 std::to_string(idx));
52 m_dec.initializePtEtaPhiMDecorator("MC_Wdecay1_afterFSR_from_tbar" +
53 std::to_string(idx));
54 m_dec.initializePtEtaPhiMDecorator("MC_Wdecay2_afterFSR_from_tbar" +
55 std::to_string(idx));
56
57 m_dec.initializeIntDecorator("MC_t" + std::to_string(idx) +
58 "_beforeFSR_pdgId");
59 m_dec.initializeIntDecorator("MC_b_beforeFSR_from_t" + std::to_string(idx) +
60 "_pdgId");
61 m_dec.initializeIntDecorator("MC_W_beforeFSR_from_t" + std::to_string(idx) +
62 "_pdgId");
63 m_dec.initializeIntDecorator("MC_Wdecay1_beforeFSR_from_t" +
64 std::to_string(idx) + "_pdgId");
65 m_dec.initializeIntDecorator("MC_Wdecay2_beforeFSR_from_t" +
66 std::to_string(idx) + "_pdgId");
67
68 m_dec.initializeIntDecorator("MC_t" + std::to_string(idx) +
69 "_afterFSR_pdgId");
70 m_dec.initializeIntDecorator("MC_b_afterFSR_from_t" + std::to_string(idx) +
71 "_pdgId");
72 m_dec.initializeIntDecorator("MC_W_afterFSR_from_t" + std::to_string(idx) +
73 "_pdgId");
74 m_dec.initializeIntDecorator("MC_Wdecay1_afterFSR_from_t" +
75 std::to_string(idx) + "_pdgId");
76 m_dec.initializeIntDecorator("MC_Wdecay2_afterFSR_from_t" +
77 std::to_string(idx) + "_pdgId");
78
79 m_dec.initializeIntDecorator("MC_tbar" + std::to_string(idx) +
80 "_beforeFSR_pdgId");
81 m_dec.initializeIntDecorator("MC_bbar_beforeFSR_from_tbar" +
82 std::to_string(idx) + "_pdgId");
83 m_dec.initializeIntDecorator("MC_W_beforeFSR_from_tbar" +
84 std::to_string(idx) + "_pdgId");
85 m_dec.initializeIntDecorator("MC_Wdecay1_beforeFSR_from_tbar" +
86 std::to_string(idx) + "_pdgId");
87 m_dec.initializeIntDecorator("MC_Wdecay2_beforeFSR_from_tbar" +
88 std::to_string(idx) + "_pdgId");
89
90 m_dec.initializeIntDecorator("MC_tbar" + std::to_string(idx) +
91 "_afterFSR_pdgId");
92 m_dec.initializeIntDecorator("MC_bbar_afterFSR_from_tbar" +
93 std::to_string(idx) + "_pdgId");
94 m_dec.initializeIntDecorator("MC_W_afterFSR_from_tbar" +
95 std::to_string(idx) + "_pdgId");
96 m_dec.initializeIntDecorator("MC_Wdecay1_afterFSR_from_tbar" +
97 std::to_string(idx) + "_pdgId");
98 m_dec.initializeIntDecorator("MC_Wdecay2_afterFSR_from_tbar" +
99 std::to_string(idx) + "_pdgId");
100 }
101}

◆ InitializeAntiBottomDecorators()

void CP::CalcPartonHistory::InitializeAntiBottomDecorators ( )

Definition at line 175 of file PartonHistoryDecorators.cxx.

175 {
176 m_dec.initializePtEtaPhiMDecorator("MC_bbar_beforeFSR");
177 m_dec.initializePtEtaPhiMDecorator("MC_bbar_afterFSR");
178
179 m_dec.initializeIntDecorator("MC_bbar_beforeFSR_pdgId");
180 m_dec.initializeIntDecorator("MC_bbar_afterFSR_pdgId");
181}

◆ InitializeAntiCharmDecorators()

void CP::CalcPartonHistory::InitializeAntiCharmDecorators ( )

Definition at line 207 of file PartonHistoryDecorators.cxx.

207 {
208 m_dec.initializePtEtaPhiMDecorator("MC_cbar_beforeFSR");
209 m_dec.initializePtEtaPhiMDecorator("MC_cbar_afterFSR");
210
211 m_dec.initializeIntDecorator("MC_cbar_beforeFSR_pdgId");
212 m_dec.initializeIntDecorator("MC_cbar_afterFSR_pdgId");
213}

◆ InitializeAntiTopDecorators()

void CP::CalcPartonHistory::InitializeAntiTopDecorators ( bool fcnc = false)

Definition at line 131 of file PartonHistoryDecorators.cxx.

131 {
132 std:: string quarkSymbol = fcnc ? "qbar" : "bbar";
133 std::string bosonSymbol = fcnc ? "X" : "W";
134 m_dec.initializePtEtaPhiMDecorator("MC_tbar_beforeFSR");
135 m_dec.initializePtEtaPhiMDecorator("MC_" + quarkSymbol + "_beforeFSR_from_tbar");
136 m_dec.initializePtEtaPhiMDecorator("MC_" + bosonSymbol + "_beforeFSR_from_tbar");
137 m_dec.initializePtEtaPhiMDecorator("MC_" + bosonSymbol + "decay1_beforeFSR_from_tbar");
138 m_dec.initializePtEtaPhiMDecorator("MC_" + bosonSymbol + "decay2_beforeFSR_from_tbar");
139
140 m_dec.initializePtEtaPhiMDecorator("MC_tbar_afterFSR");
141 m_dec.initializePtEtaPhiMDecorator("MC_" + quarkSymbol + "_afterFSR_from_tbar");
142 m_dec.initializePtEtaPhiMDecorator("MC_" + bosonSymbol + "_afterFSR_from_tbar");
143 m_dec.initializePtEtaPhiMDecorator("MC_" + bosonSymbol + "decay1_afterFSR_from_tbar");
144 m_dec.initializePtEtaPhiMDecorator("MC_" + bosonSymbol + "decay2_afterFSR_from_tbar");
145
146 m_dec.initializeIntDecorator("MC_tbar_beforeFSR_pdgId");
147 m_dec.initializeIntDecorator("MC_" + quarkSymbol + "_beforeFSR_from_tbar_pdgId");
148 m_dec.initializeIntDecorator("MC_" + bosonSymbol + "_beforeFSR_from_tbar_pdgId");
149 m_dec.initializeIntDecorator("MC_" + bosonSymbol + "decay1_beforeFSR_from_tbar_pdgId");
150 m_dec.initializeIntDecorator("MC_" + bosonSymbol + "decay2_beforeFSR_from_tbar_pdgId");
151
152 m_dec.initializeIntDecorator("MC_tbar_afterFSR_pdgId");
153 m_dec.initializeIntDecorator("MC_" + quarkSymbol + "_afterFSR_from_tbar_pdgId");
154 m_dec.initializeIntDecorator("MC_" + bosonSymbol + "_afterFSR_from_tbar_pdgId");
155 m_dec.initializeIntDecorator("MC_" + bosonSymbol + "decay1_afterFSR_from_tbar_pdgId");
156 m_dec.initializeIntDecorator("MC_" + bosonSymbol + "decay2_afterFSR_from_tbar_pdgId");
157}

◆ InitializeBottomDecorators()

void CP::CalcPartonHistory::InitializeBottomDecorators ( )

Definition at line 159 of file PartonHistoryDecorators.cxx.

159 {
160 m_dec.initializePtEtaPhiMDecorator("MC_b_beforeFSR");
161 m_dec.initializePtEtaPhiMDecorator("MC_b_afterFSR");
162
163 m_dec.initializeIntDecorator("MC_b_beforeFSR_pdgId");
164 m_dec.initializeIntDecorator("MC_b_afterFSR_pdgId");
165}

◆ InitializeCharmDecorators()

void CP::CalcPartonHistory::InitializeCharmDecorators ( )

Definition at line 191 of file PartonHistoryDecorators.cxx.

191 {
192 m_dec.initializePtEtaPhiMDecorator("MC_c_beforeFSR");
193 m_dec.initializePtEtaPhiMDecorator("MC_c_afterFSR");
194
195 m_dec.initializeIntDecorator("MC_c_beforeFSR_pdgId");
196 m_dec.initializeIntDecorator("MC_c_afterFSR_pdgId");
197}

◆ initializeDecorators()

void CP::CalcPartonHistory::initializeDecorators ( )
protectedvirtual

Definition at line 500 of file CalcPartonHistory.cxx.

500 {
501 if (!m_configured)
502 return;
503
504 for (const auto& group : m_config.decoratorGroups) {
505 switch (group) {
508 break;
511 break;
514 break;
517 break;
520 break;
523 break;
526 break;
529 break;
532 break;
535 break;
538 break;
541 break;
544 break;
547 break;
550 break;
553 break;
554 }
555 }
556
557 for (const auto& zw : m_config.decoratorZWs) {
558 if (zw.type == DecoratorZW::Z)
559 InitializeZDecorators(zw.count, zw.extended);
560 else
561 InitializeWDecorators(zw.count);
562 }
563
564 for (const auto& fill : m_config.genericFills) {
565 if (fill.isVector) {
566 m_dec.initializeVectorPtEtaPhiMDecorator(fill.decorationKey);
567 m_dec.initializeVectorIntDecorator(fill.decorationKey + "_pdgId");
568 } else {
569 m_dec.initializePtEtaPhiMDecorator(fill.decorationKey);
570 m_dec.initializeIntDecorator(fill.decorationKey + "_pdgId");
571 }
572 }
573
574 for (const auto& fill : m_config.isOnShellFills)
575 m_dec.initializeIntDecorator(fill.decorationKey);
576}
void InitializeZDecorators(int nZs=1, bool extend=false)
void InitializeTopDecorators(bool fcnc=false)
void InitializeAntiTopDecorators(bool fcnc=false)
@ TopFCNC
InitializeTopDecorators(true).
@ FourTop
Initialize4TopDecorators().
@ VectorAntiBottom
InitializeVectorAntiBottomDecorators().
@ VectorAntiCharm
InitializeVectorAntiCharmDecorators().
@ Bottom
InitializeBottomDecorators().
@ Charm
InitializeCharmDecorators().
@ AntiTopFCNC
InitializeAntiTopDecorators(true).
@ AntiCharm
InitializeAntiCharmDecorators().
@ VectorBottom
InitializeVectorBottomDecorators().
@ Ttbar
InitializeTtbarDecorators().
@ VectorCharm
InitializeVectorCharmDecorators().
@ Higgs
InitializeHiggsDecorators().
@ Top
InitializeTopDecorators().
@ AntiBottom
InitializeAntiBottomDecorators().
@ AntiTop
InitializeAntiTopDecorators().
@ Photon
InitializePhotonDecorators().
enum CP::DecoratorZW::Type Z
void fill(H5::Group &out_file, size_t iterations)

◆ InitializeHiggsDecorators()

void CP::CalcPartonHistory::InitializeHiggsDecorators ( )

Definition at line 245 of file PartonHistoryDecorators.cxx.

245 {
246 m_dec.initializePtEtaPhiMDecorator("MC_H_beforeFSR");
247 m_dec.initializePtEtaPhiMDecorator("MC_Hdecay1_beforeFSR");
248 m_dec.initializePtEtaPhiMDecorator("MC_Hdecay2_beforeFSR");
249 m_dec.initializePtEtaPhiMDecorator("MC_Hdecay1_decay1_beforeFSR");
250 m_dec.initializePtEtaPhiMDecorator("MC_Hdecay2_decay1_beforeFSR");
251 m_dec.initializePtEtaPhiMDecorator("MC_Hdecay1_decay2_beforeFSR");
252 m_dec.initializePtEtaPhiMDecorator("MC_Hdecay2_decay2_beforeFSR");
253
254 m_dec.initializePtEtaPhiMDecorator("MC_H_afterFSR");
255 m_dec.initializePtEtaPhiMDecorator("MC_Hdecay1_afterFSR");
256 m_dec.initializePtEtaPhiMDecorator("MC_Hdecay2_afterFSR");
257 m_dec.initializePtEtaPhiMDecorator("MC_Hdecay1_decay1_afterFSR");
258 m_dec.initializePtEtaPhiMDecorator("MC_Hdecay2_decay1_afterFSR");
259 m_dec.initializePtEtaPhiMDecorator("MC_Hdecay1_decay2_afterFSR");
260 m_dec.initializePtEtaPhiMDecorator("MC_Hdecay2_decay2_afterFSR");
261
262 m_dec.initializeIntDecorator("MC_H_beforeFSR_pdgId");
263 m_dec.initializeIntDecorator("MC_Hdecay1_beforeFSR_pdgId");
264 m_dec.initializeIntDecorator("MC_Hdecay2_beforeFSR_pdgId");
265 m_dec.initializeIntDecorator("MC_Hdecay1_decay1_beforeFSR_pdgId");
266 m_dec.initializeIntDecorator("MC_Hdecay2_decay1_beforeFSR_pdgId");
267 m_dec.initializeIntDecorator("MC_Hdecay1_decay2_beforeFSR_pdgId");
268 m_dec.initializeIntDecorator("MC_Hdecay2_decay2_beforeFSR_pdgId");
269
270 m_dec.initializeIntDecorator("MC_H_afterFSR_pdgId");
271 m_dec.initializeIntDecorator("MC_Hdecay1_afterFSR_pdgId");
272 m_dec.initializeIntDecorator("MC_Hdecay2_afterFSR_pdgId");
273 m_dec.initializeIntDecorator("MC_Hdecay1_decay1_afterFSR_pdgId");
274 m_dec.initializeIntDecorator("MC_Hdecay2_decay1_afterFSR_pdgId");
275 m_dec.initializeIntDecorator("MC_Hdecay1_decay2_afterFSR_pdgId");
276 m_dec.initializeIntDecorator("MC_Hdecay2_decay2_afterFSR_pdgId");
277}

◆ InitializePhotonDecorators()

void CP::CalcPartonHistory::InitializePhotonDecorators ( )

Definition at line 239 of file PartonHistoryDecorators.cxx.

239 {
240 m_dec.initializePtEtaPhiMDecorator("MC_gamma");
241 m_dec.initializeIntDecorator("MC_gamma_origin");
242 m_dec.initializeIntDecorator("MC_gamma_pdgId");
243}

◆ InitializeTopDecorators()

void CP::CalcPartonHistory::InitializeTopDecorators ( bool fcnc = false)

Definition at line 103 of file PartonHistoryDecorators.cxx.

103 {
104 std:: string quarkSymbol = fcnc ? "q" : "b";
105 std::string bosonSymbol = fcnc ? "X" : "W";
106 m_dec.initializePtEtaPhiMDecorator("MC_t_beforeFSR");
107 m_dec.initializePtEtaPhiMDecorator("MC_" + quarkSymbol + "_beforeFSR_from_t");
108 m_dec.initializePtEtaPhiMDecorator("MC_" + bosonSymbol + "_beforeFSR_from_t");
109 m_dec.initializePtEtaPhiMDecorator("MC_" + bosonSymbol + "decay1_beforeFSR_from_t");
110 m_dec.initializePtEtaPhiMDecorator("MC_" + bosonSymbol + "decay2_beforeFSR_from_t");
111
112 m_dec.initializePtEtaPhiMDecorator("MC_t_afterFSR");
113 m_dec.initializePtEtaPhiMDecorator("MC_" + quarkSymbol + "_afterFSR_from_t");
114 m_dec.initializePtEtaPhiMDecorator("MC_" + bosonSymbol + "_afterFSR_from_t");
115 m_dec.initializePtEtaPhiMDecorator("MC_" + bosonSymbol + "decay1_afterFSR_from_t");
116 m_dec.initializePtEtaPhiMDecorator("MC_" + bosonSymbol + "decay2_afterFSR_from_t");
117
118 m_dec.initializeIntDecorator("MC_t_beforeFSR_pdgId");
119 m_dec.initializeIntDecorator("MC_" + quarkSymbol + "_beforeFSR_from_t_pdgId");
120 m_dec.initializeIntDecorator("MC_" + bosonSymbol + "_beforeFSR_from_t_pdgId");
121 m_dec.initializeIntDecorator("MC_" + bosonSymbol + "decay1_beforeFSR_from_t_pdgId");
122 m_dec.initializeIntDecorator("MC_" + bosonSymbol + "decay2_beforeFSR_from_t_pdgId");
123
124 m_dec.initializeIntDecorator("MC_t_afterFSR_pdgId");
125 m_dec.initializeIntDecorator("MC_" + quarkSymbol + "_afterFSR_from_t_pdgId");
126 m_dec.initializeIntDecorator("MC_" + bosonSymbol + "_afterFSR_from_t_pdgId");
127 m_dec.initializeIntDecorator("MC_" + bosonSymbol + "decay1_afterFSR_from_t_pdgId");
128 m_dec.initializeIntDecorator("MC_" + bosonSymbol + "decay2_afterFSR_from_t_pdgId");
129}

◆ InitializeTtbarDecorators()

void CP::CalcPartonHistory::InitializeTtbarDecorators ( )

Definition at line 223 of file PartonHistoryDecorators.cxx.

223 {
224 m_dec.initializeFloatDecorator(
225 {"MC_ttbar_beforeFSR_m", "MC_ttbar_beforeFSR_pt",
226 "MC_ttbar_beforeFSR_eta", "MC_ttbar_beforeFSR_phi"});
227 m_dec.initializeFloatDecorator(
228 {"MC_ttbar_fromDecay_beforeFSR_m", "MC_ttbar_fromDecay_beforeFSR_pt",
229 "MC_ttbar_fromDecay_beforeFSR_eta", "MC_ttbar_fromDecay_beforeFSR_phi"});
230
231 m_dec.initializeFloatDecorator({"MC_ttbar_afterFSR_m", "MC_ttbar_afterFSR_pt",
232 "MC_ttbar_afterFSR_eta",
233 "MC_ttbar_afterFSR_phi"});
234 m_dec.initializeFloatDecorator(
235 {"MC_ttbar_fromDecay_afterFSR_m", "MC_ttbar_fromDecay_afterFSR_pt",
236 "MC_ttbar_fromDecay_afterFSR_eta", "MC_ttbar_fromDecay_afterFSR_phi"});
237}

◆ InitializeVectorAntiBottomDecorators()

void CP::CalcPartonHistory::InitializeVectorAntiBottomDecorators ( )

Definition at line 183 of file PartonHistoryDecorators.cxx.

183 {
184 m_dec.initializeVectorPtEtaPhiMDecorator("MC_bbar_beforeFSR");
185 m_dec.initializeVectorPtEtaPhiMDecorator("MC_bbar_afterFSR");
186
187 m_dec.initializeVectorIntDecorator("MC_bbar_beforeFSR_pdgId");
188 m_dec.initializeVectorIntDecorator("MC_bbar_afterFSR_pdgId");
189}

◆ InitializeVectorAntiCharmDecorators()

void CP::CalcPartonHistory::InitializeVectorAntiCharmDecorators ( )

Definition at line 215 of file PartonHistoryDecorators.cxx.

215 {
216 m_dec.initializeVectorPtEtaPhiMDecorator("MC_cbar_beforeFSR");
217 m_dec.initializeVectorPtEtaPhiMDecorator("MC_cbar_afterFSR");
218
219 m_dec.initializeVectorIntDecorator("MC_cbar_beforeFSR_pdgId");
220 m_dec.initializeVectorIntDecorator("MC_cbar_afterFSR_pdgId");
221}

◆ InitializeVectorBottomDecorators()

void CP::CalcPartonHistory::InitializeVectorBottomDecorators ( )

Definition at line 167 of file PartonHistoryDecorators.cxx.

167 {
168 m_dec.initializeVectorPtEtaPhiMDecorator("MC_b_beforeFSR");
169 m_dec.initializeVectorPtEtaPhiMDecorator("MC_b_afterFSR");
170
171 m_dec.initializeVectorIntDecorator("MC_b_beforeFSR_pdgId");
172 m_dec.initializeVectorIntDecorator("MC_b_afterFSR_pdgId");
173}

◆ InitializeVectorCharmDecorators()

void CP::CalcPartonHistory::InitializeVectorCharmDecorators ( )

Definition at line 199 of file PartonHistoryDecorators.cxx.

199 {
200 m_dec.initializeVectorPtEtaPhiMDecorator("MC_c_beforeFSR");
201 m_dec.initializeVectorPtEtaPhiMDecorator("MC_c_afterFSR");
202
203 m_dec.initializeVectorIntDecorator("MC_c_beforeFSR_pdgId");
204 m_dec.initializeVectorIntDecorator("MC_c_afterFSR_pdgId");
205}

◆ InitializeWDecorators()

void CP::CalcPartonHistory::InitializeWDecorators ( int nWs = 1)

Definition at line 338 of file PartonHistoryDecorators.cxx.

338 {
339 std::vector<std::string> Ws;
340 if (n_Ws == 1)
341 Ws.push_back("W");
342 else {
343 for (int i = 1; i <= n_Ws; i++) {
344 Ws.push_back("W" + std::to_string(i));
345 }
346 }
347 for (auto& W : Ws) {
348 m_dec.initializePtEtaPhiMDecorator("MC_" + W + "_beforeFSR");
349 m_dec.initializePtEtaPhiMDecorator("MC_" + W + "decay1_beforeFSR");
350 m_dec.initializePtEtaPhiMDecorator("MC_" + W + "decay2_beforeFSR");
351
352 m_dec.initializePtEtaPhiMDecorator("MC_" + W + "_afterFSR");
353 m_dec.initializePtEtaPhiMDecorator("MC_" + W + "decay1_afterFSR");
354 m_dec.initializePtEtaPhiMDecorator("MC_" + W + "decay2_afterFSR");
355
356 m_dec.initializeIntDecorator("MC_" + W + "_beforeFSR_pdgId");
357 m_dec.initializeIntDecorator("MC_" + W + "decay1_beforeFSR_pdgId");
358 m_dec.initializeIntDecorator("MC_" + W + "decay2_beforeFSR_pdgId");
359
360 m_dec.initializeIntDecorator("MC_" + W + "_afterFSR_pdgId");
361 m_dec.initializeIntDecorator("MC_" + W + "decay1_afterFSR_pdgId");
362 m_dec.initializeIntDecorator("MC_" + W + "decay2_afterFSR_pdgId");
363
364 m_dec.initializeIntDecorator("MC_" + W + "_IsOnShell");
365 }
366}
@ W
FillWPartonHistory.

◆ InitializeZDecorators()

void CP::CalcPartonHistory::InitializeZDecorators ( int nZs = 1,
bool extend = false )

Definition at line 279 of file PartonHistoryDecorators.cxx.

279 {
280 std::vector<std::string> Zs;
281 if (n_Zs == 1)
282 Zs.push_back("Z");
283 else {
284 for (int i = 1; i <= n_Zs; i++)
285 Zs.push_back("Z" + std::to_string(i));
286 }
287 for (auto& Z : Zs) {
288 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "_beforeFSR");
289 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "decay1_beforeFSR");
290 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "decay2_beforeFSR");
291
292 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "_afterFSR");
293 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "decay1_afterFSR");
294 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "decay2_afterFSR");
295
296 m_dec.initializeIntDecorator("MC_" + Z + "_beforeFSR_pdgId");
297 m_dec.initializeIntDecorator("MC_" + Z + "decay1_beforeFSR_pdgId");
298 m_dec.initializeIntDecorator("MC_" + Z + "decay2_beforeFSR_pdgId");
299
300 m_dec.initializeIntDecorator("MC_" + Z + "_afterFSR_pdgId");
301 m_dec.initializeIntDecorator("MC_" + Z + "decay1_afterFSR_pdgId");
302 m_dec.initializeIntDecorator("MC_" + Z + "decay2_afterFSR_pdgId");
303
304 if (extend) {
305 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "decay1_decay1_beforeFSR");
306 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "decay1_decay2_beforeFSR");
307 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "decay1_decay3_beforeFSR");
308 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "decay2_decay1_beforeFSR");
309 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "decay2_decay2_beforeFSR");
310 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "decay2_decay3_beforeFSR");
311
312 m_dec.initializeIntDecorator("MC_" + Z + "decay1_decay1_beforeFSR_pdgId");
313 m_dec.initializeIntDecorator("MC_" + Z + "decay1_decay2_beforeFSR_pdgId");
314 m_dec.initializeIntDecorator("MC_" + Z + "decay1_decay3_beforeFSR_pdgId");
315 m_dec.initializeIntDecorator("MC_" + Z + "decay2_decay1_beforeFSR_pdgId");
316 m_dec.initializeIntDecorator("MC_" + Z + "decay2_decay2_beforeFSR_pdgId");
317 m_dec.initializeIntDecorator("MC_" + Z + "decay2_decay3_beforeFSR_pdgId");
318
319 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "decay1_decay1_afterFSR");
320 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "decay1_decay2_afterFSR");
321 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "decay1_decay3_afterFSR");
322 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "decay2_decay1_afterFSR");
323 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "decay2_decay2_afterFSR");
324 m_dec.initializePtEtaPhiMDecorator("MC_" + Z + "decay2_decay3_afterFSR");
325
326 m_dec.initializeIntDecorator("MC_" + Z + "decay1_decay1_afterFSR_pdgId");
327 m_dec.initializeIntDecorator("MC_" + Z + "decay1_decay2_afterFSR_pdgId");
328 m_dec.initializeIntDecorator("MC_" + Z + "decay1_decay3_afterFSR_pdgId");
329 m_dec.initializeIntDecorator("MC_" + Z + "decay2_decay1_afterFSR_pdgId");
330 m_dec.initializeIntDecorator("MC_" + Z + "decay2_decay2_afterFSR_pdgId");
331 m_dec.initializeIntDecorator("MC_" + Z + "decay2_decay3_afterFSR_pdgId");
332 }
333
334 m_dec.initializeIntDecorator("MC_" + Z + "_IsOnShell");
335 }
336}
@ Z
FillZPartonHistory.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ linkBosonCollections()

StatusCode CP::CalcPartonHistory::linkBosonCollections ( )
protected

currently in DAOD_PHYS TruthTop have links to Ws from the TruthBoson collection, which have no link to their decay products; we have therefore to associate the W from the TruthBoson collections to those in the TruthBosonsWithDecayParticles collection.

This method will use the helper method decorateCollectionWithLinksToAnotherCollection to decorate bosons in the TruthBoson collection with "CustomLinkedTruthBosonWithDecayParticles", which is a link to the same bosons in the TruthBosonsWithDecayParticles collection

Definition at line 442 of file CalcPartonHistory.cxx.

442 {
444 "TruthBoson", "TruthBosonsWithDecayParticles",
445 "CustomLinkedTruthBosonWithDecayParticles");
446}
StatusCode decorateCollectionWithLinksToAnotherCollection(const std::string &collectionToDecorate, const std::string &collectionToLink, const std::string &nameOfDecoration)
helper method currently used in DAOD_PHYS to link particles from a given collection to the same parti...

◆ linkTruthContainers()

StatusCode CP::CalcPartonHistory::linkTruthContainers ( const xAOD::TruthParticleContainer *& tp)
protectedvirtual

Definition at line 480 of file CalcPartonHistory.cxx.

481 {
482 const std::string key = m_prefix + "_TruthParticles";
484 const auto& collections =
485 m_configured ? m_config.truthCollections : m_truthCollections;
487 ANA_CHECK(evtStore()->retrieve(tp, key));
489 return StatusCode::SUCCESS;
490 }
491 ANA_CHECK(evtStore()->retrieve(tp, key));
492 return StatusCode::SUCCESS;
493}
StatusCode buildContainerFromMultipleCollections(const std::vector< std::string > &collections, const std::string &out_contName)
used to build container from multiple collections in DAOD_PHYS we don't have the TruthParticles colle...
StatusCode linkBosonCollections()
currently in DAOD_PHYS TruthTop have links to Ws from the TruthBoson collection, which have no link t...
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:116

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101 {
102
103 return MSG::name( msg().level() );
104 }
MsgStream & msg() const
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ operator=() [1/2]

CalcPartonHistory & CP::CalcPartonHistory::operator= ( CalcPartonHistory && rhs)
delete

◆ operator=() [2/2]

CalcPartonHistory & CP::CalcPartonHistory::operator= ( const CalcPartonHistory & rhs)
delete

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ Retrievep4() [1/2]

bool CP::CalcPartonHistory::Retrievep4 ( const std::string & key,
PtEtaPhiMVector & p4 )

Definition at line 58 of file CalcPartonHistory.cxx.

59 {
60 return Retrievep4(key, p4, 0);
61}

◆ Retrievep4() [2/2]

bool CP::CalcPartonHistory::Retrievep4 ( const std::string & key,
PtEtaPhiMVector & p4,
std::size_t idx )

Definition at line 63 of file CalcPartonHistory.cxx.

64 {
65 const auto* v = findVector(m_particleMap, key);
66 if (!v || idx >= v->size())
67 return false;
68 p4 = GetPtEtaPhiMfromTruth(v->at(idx));
69 return true;
70}

◆ Retrievep4Gamma()

bool CP::CalcPartonHistory::Retrievep4Gamma ( PtEtaPhiMVector & p4,
int & parentpdgId )

Definition at line 72 of file CalcPartonHistory.cxx.

72 {
73 // Finds the highest-pT photon among all m_particleMap entries. Photons are
74 // stored either under "..._gamma_<beforeFSR|afterFSR>" keys or, when they
75 // come from a W/Z/H decay vertex, under "...Decay<N>_<beforeFSR|afterFSR>".
76 const xAOD::TruthParticle* bestPhoton = nullptr;
77 for (const auto& entry : m_particleMap) {
78 for (const auto* p : entry.second) {
79 if (p && p->pdgId() == 22 && (!bestPhoton || p->pt() > bestPhoton->pt()))
80 bestPhoton = p;
81 }
82 }
83 if (!bestPhoton) {
84 parentpdgId = 0;
85 return false;
86 }
87 p4 = GetPtEtaPhiMfromTruth(bestPhoton);
88 // Skip identical-photon copies to find the particle that emitted it.
90 bestPhoton->nParents() > 0 ? bestPhoton->parent(0) : nullptr;
91 while (parent && parent->pdgId() == 22)
92 parent = parent->nParents() > 0 ? parent->parent(0) : nullptr;
93 parentpdgId = parent ? parent->pdgId() : 0;
94 return true;
95}
const TruthParticle_v1 * parent(size_t i) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
size_t nParents() const
Number of parents of this particle.

◆ RetrieveParticleInfo() [1/5]

bool CP::CalcPartonHistory::RetrieveParticleInfo ( const std::string & prefix,
const std::string & alt_prefix,
PtEtaPhiMVector & particle,
int & pdgId )

Definition at line 158 of file CalcPartonHistory.cxx.

161 {
162 if (Retrievep4(prefix, particle) && RetrievepdgId(prefix, pdgId))
163 return true;
164 return Retrievep4(alt_prefix, particle) && RetrievepdgId(alt_prefix, pdgId);
165}
bool RetrievepdgId(const std::string &key, std::vector< int > &pdgIds)

◆ RetrieveParticleInfo() [2/5]

bool CP::CalcPartonHistory::RetrieveParticleInfo ( const std::string & prefix,
PtEtaPhiMVector & particle,
int & pdgId )

Definition at line 146 of file CalcPartonHistory.cxx.

148 {
149 return RetrieveParticleInfo(prefix, particle, pdgId, 0);
150}

◆ RetrieveParticleInfo() [3/5]

bool CP::CalcPartonHistory::RetrieveParticleInfo ( const std::string & prefix,
PtEtaPhiMVector & particle,
int & pdgId,
std::size_t idx )

Definition at line 152 of file CalcPartonHistory.cxx.

154 {
155 return Retrievep4(prefix, particle, idx) && RetrievepdgId(prefix, pdgId, idx);
156}

◆ RetrieveParticleInfo() [4/5]

bool CP::CalcPartonHistory::RetrieveParticleInfo ( const std::string & prefix,
std::vector< const xAOD::TruthParticle * > & particles )

Definition at line 122 of file CalcPartonHistory.cxx.

123 {
124 const auto* v = findVector(m_particleMap, prefix);
125 if (!v)
126 return false;
127 out.insert(out.end(), v->begin(), v->end());
128 return true;
129}

◆ RetrieveParticleInfo() [5/5]

bool CP::CalcPartonHistory::RetrieveParticleInfo ( const std::string & prefix,
std::vector< PtEtaPhiMVector > & particles,
std::vector< int > & pdgIds )

Definition at line 131 of file CalcPartonHistory.cxx.

133 {
134 const auto* v = findVector(m_particleMap, prefix);
135 if (!v)
136 return false;
137 particles.reserve(particles.size() + v->size());
138 pdgIds.reserve(pdgIds.size() + v->size());
139 for (const auto* p : *v) {
140 particles.push_back(GetPtEtaPhiMfromTruth(p));
141 pdgIds.push_back(p->pdgId());
142 }
143 return true;
144}

◆ RetrievepdgId() [1/3]

bool CP::CalcPartonHistory::RetrievepdgId ( const std::string & key,
int & pdgId )

Definition at line 97 of file CalcPartonHistory.cxx.

97 {
98 return RetrievepdgId(key, pdgId, 0);
99}

◆ RetrievepdgId() [2/3]

bool CP::CalcPartonHistory::RetrievepdgId ( const std::string & key,
int & pdgId,
std::size_t idx )

Definition at line 113 of file CalcPartonHistory.cxx.

114 {
115 const auto* v = findVector(m_particleMap, key);
116 if (!v || idx >= v->size())
117 return false;
118 pdgId = v->at(idx)->pdgId();
119 return true;
120}

◆ RetrievepdgId() [3/3]

bool CP::CalcPartonHistory::RetrievepdgId ( const std::string & key,
std::vector< int > & pdgIds )

Definition at line 101 of file CalcPartonHistory.cxx.

102 {
103 const auto* v = findVector(m_particleMap, key);
104 if (!v)
105 return false;
106 pdgIds.reserve(pdgIds.size() + v->size());
107 for (const auto* p : *v)
108 if (p)
109 pdgIds.push_back(p->pdgId());
110 return true;
111}

◆ runHistorySaver()

StatusCode CP::CalcPartonHistory::runHistorySaver ( const xAOD::TruthParticleContainer * truthParticles,
const xAOD::EventInfo * ttbarPartonHistory )
protectedvirtual

Definition at line 578 of file CalcPartonHistory.cxx.

580 {
581
582 // Register the EventInfo for this event; all m_dec.decorate*() calls
583 // will write to it automatically.
584 m_dec.setEventInfo(partonHistory);
585
586 TraceParticles(truthParticles);
587
588 for (const auto& op : m_config.specialFills) {
589 switch (op.type) {
592 break;
595 break;
598 break;
601 break;
604 break;
607 break;
609 FillZPartonHistory(op.parent, op.count, op.mode);
610 break;
612 FillZtautauPartonHistory(op.parent, op.count, op.mode);
613 break;
615 FillWPartonHistory(op.parent, op.count, op.mode);
616 break;
618 FillHiggsPartonHistory(op.mode);
619 break;
622 break;
623 }
624 }
625
626 for (const auto& fill : m_config.genericFills) {
627 if (fill.isVector) {
628 FillGenericVectorPartonHistory(fill.retrievalKeys.at(0),
629 fill.decorationKey);
630 } else if (fill.retrievalKeys.size() == 1) {
631 FillGenericPartonHistory(fill.retrievalKeys.at(0), fill.decorationKey,
632 fill.idx);
633 } else {
634 FillGenericPartonHistory(fill.retrievalKeys, fill.decorationKey,
635 fill.idx);
636 }
637 }
638
639 for (const auto& fill : m_config.isOnShellFills) {
640 bool onShell = false;
641 for (const auto& key : fill.retrievalKeys) {
642 if (ExistsInMap(m_prefix + "_" + key)) {
643 onShell = true;
644 break;
645 }
646 }
647 m_dec.decorateCustom(fill.decorationKey, onShell ? 1 : 0);
648 }
649
650 return StatusCode::SUCCESS;
651}
void FillGenericVectorPartonHistory(const std::string &retrievalstring, const std::string &decorationstring)
void FillHiggsPartonHistory(const std::string &mode)
void FillTopPartonHistory(bool fcnc=false)
void FillZtautauPartonHistory(const std::string &parent, int nZs=1, const std::string &mode="resonant")
void TraceParticles(const xAOD::TruthParticleContainer *truthParticles)
void FillTtbarPartonHistory(bool fcnc=false)
void FillAntiTopPartonHistory(bool fcnc=false)
@ TopFCNC
FillTopPartonHistory(true).
@ AntiTopFCNC
FillAntiTopPartonHistory(true).
@ Ttbar
FillTtbarPartonHistory.
@ Ztautau
FillZtautauPartonHistory.
@ Higgs
FillHiggsPartonHistory.
@ Top
FillTopPartonHistory.
@ AntiTop
FillAntiTopPartonHistory.
@ Gamma
FillGammaPartonHistory.

◆ setHiggs()

void CP::CalcPartonHistory::setHiggs ( const std::string & fsr)

Definition at line 19 of file CalcHiggsPartonHistory.cxx.

19 {
20 PtEtaPhiMVector H;
21 PtEtaPhiMVector Wm, Wm_decay1, Wm_decay2;
22 PtEtaPhiMVector Wp, Wp_decay1, Wp_decay2;
23 int Wm_decay1_pdgId, Wm_decay2_pdgId;
24 int Wp_decay1_pdgId, Wp_decay2_pdgId;
25
26 // W+: pass full m_particleMap keys to getW; bare names to m_dec.*
27 bool has_Wp =
28 getW(m_prefix + "_" + "MC_lbar_" + fsr, m_prefix + "_" + "MC_nu_" + fsr,
29 Wp_decay1, Wp_decay1_pdgId, Wp_decay2, Wp_decay2_pdgId);
30 if (has_Wp) {
31 Wp = Wp_decay1 + Wp_decay2;
32 m_dec.decorateParticle("MC_Hdecay1_" + fsr, Wp, 24);
33 m_dec.decorateParticle("MC_Hdecay1_decay1_" + fsr, Wp_decay1,
34 Wp_decay1_pdgId);
35 m_dec.decorateParticle("MC_Hdecay1_decay2_" + fsr, Wp_decay2,
36 Wp_decay2_pdgId);
37 }
38 // W-
39 bool has_Wm =
40 getW(m_prefix + "_" + "MC_l_" + fsr, m_prefix + "_" + "MC_nubar_" + fsr,
41 Wm_decay1, Wm_decay1_pdgId, Wm_decay2, Wm_decay2_pdgId);
42 if (has_Wm) {
43 Wm = Wm_decay1 + Wm_decay2;
44 m_dec.decorateParticle("MC_Hdecay2_" + fsr, Wm, -24);
45 m_dec.decorateParticle("MC_Hdecay2_decay1_" + fsr, Wm_decay1,
46 Wm_decay1_pdgId);
47 m_dec.decorateParticle("MC_Hdecay2_decay2_" + fsr, Wm_decay2,
48 Wm_decay2_pdgId);
49 }
50 if (has_Wm && has_Wp) {
51 H = Wp + Wm;
52 m_dec.decorateParticle("MC_H_" + fsr, H, 25);
53 }
54}
#define H(x, y, z)
Definition MD5.cxx:114
bool getW(const std::string &str_lep, const std::string &str_nu, PtEtaPhiMVector &p1, int &pdgId1, PtEtaPhiMVector &p2, int &pdgId2)

◆ setW()

void CP::CalcPartonHistory::setW ( const std::string & fsr,
int nWs )

Definition at line 62 of file CalcWPartonHistory.cxx.

62 {
63 PtEtaPhiMVector W;
64 PtEtaPhiMVector Wm, Wm_decay1, Wm_decay2;
65 PtEtaPhiMVector Wp, Wp_decay1, Wp_decay2;
66 int Wm_decay1_pdgId, Wm_decay2_pdgId;
67 int Wp_decay1_pdgId, Wp_decay2_pdgId;
68
69 if (nWs == 1) {
70 // W+: pass full m_particleMap keys to getW; bare names to m_dec.*
71 bool has_Wp =
72 getW(m_prefix + "_" + "MC_lbar_" + fsr, m_prefix + "_" + "MC_nu_" + fsr,
73 Wp_decay1, Wp_decay1_pdgId, Wp_decay2, Wp_decay2_pdgId);
74 if (has_Wp) {
75 Wp = Wp_decay1 + Wp_decay2;
76 m_dec.decorateParticle("MC_W_" + fsr, Wp, 24);
77 m_dec.decorateParticle("MC_Wdecay1_" + fsr, Wp_decay1, Wp_decay1_pdgId);
78 m_dec.decorateParticle("MC_Wdecay2_" + fsr, Wp_decay2, Wp_decay2_pdgId);
79 }
80 // W-
81 bool has_Wm =
82 getW(m_prefix + "_" + "MC_l_" + fsr, m_prefix + "_" + "MC_nubar_" + fsr,
83 Wm_decay1, Wm_decay1_pdgId, Wm_decay2, Wm_decay2_pdgId);
84 if (has_Wm) {
85 Wm = Wm_decay1 + Wm_decay2;
86 m_dec.decorateParticle("MC_W_" + fsr, Wm, -24);
87 m_dec.decorateParticle("MC_Wdecay1_" + fsr, Wm_decay1, Wm_decay1_pdgId);
88 m_dec.decorateParticle("MC_Wdecay2_" + fsr, Wm_decay2, Wm_decay2_pdgId);
89 }
90 } else if (nWs == 2) {
91 // W+
92 bool has_Wp =
93 getW(m_prefix + "_" + "MC_lbar_" + fsr, m_prefix + "_" + "MC_nu_" + fsr,
94 Wp_decay1, Wp_decay1_pdgId, Wp_decay2, Wp_decay2_pdgId);
95 if (has_Wp) {
96 Wp = Wp_decay1 + Wp_decay2;
97 m_dec.decorateParticle("MC_W1_" + fsr, Wp, 24);
98 m_dec.decorateParticle("MC_W1decay1_" + fsr, Wp_decay1, Wp_decay1_pdgId);
99 m_dec.decorateParticle("MC_W1decay2_" + fsr, Wp_decay2, Wp_decay2_pdgId);
100 }
101 // W-
102 bool has_Wm =
103 getW(m_prefix + "_" + "MC_l_" + fsr, m_prefix + "_" + "MC_nubar_" + fsr,
104 Wm_decay1, Wm_decay1_pdgId, Wm_decay2, Wm_decay2_pdgId);
105 if (has_Wm) {
106 Wm = Wm_decay1 + Wm_decay2;
107 m_dec.decorateParticle("MC_W2_" + fsr, Wm, -24);
108 m_dec.decorateParticle("MC_W2decay1_" + fsr, Wm_decay1, Wm_decay1_pdgId);
109 m_dec.decorateParticle("MC_W2decay2_" + fsr, Wm_decay2, Wm_decay2_pdgId);
110 }
111 }
112}

◆ setZ()

void CP::CalcPartonHistory::setZ ( const std::string & fsr,
int nZs )

Definition at line 127 of file CalcZPartonHistory.cxx.

127 {
128 PtEtaPhiMVector Z, Z_decay1, Z_decay2;
129 int Z_decay1_pdgId, Z_decay2_pdgId;
130 m_dec.decorateCustom("MC_Z_IsOnShell", 0);
131 // getZ receives full m_particleMap keys; m_dec.decorate* receives bare names.
132 bool has_Z =
133 getZ(m_prefix + "_" + "MC_l_" + fsr, m_prefix + "_" + "MC_lbar_" + fsr,
134 Z_decay1, Z_decay1_pdgId, Z_decay2, Z_decay2_pdgId);
135 if (nZs == 1) {
136 if (has_Z) {
137 Z = Z_decay1 + Z_decay2;
138 m_dec.decorateParticle("MC_Z_" + fsr, Z, 23);
139 m_dec.decorateParticle("MC_Zdecay1_" + fsr, Z_decay1, Z_decay1_pdgId);
140 m_dec.decorateParticle("MC_Zdecay2_" + fsr, Z_decay2, Z_decay2_pdgId);
141 }
142 } else
143 ANA_MSG_ERROR("Reconstruction of multiple Zs is not supported yet!");
144}
#define ANA_MSG_ERROR(xmsg,...)
Macro printing error messages.
bool getZ(const std::string &str_lep1, const std::string &str_lep2, PtEtaPhiMVector &p1, int &pdgId1, PtEtaPhiMVector &p2, int &pdgId2)

◆ setZtautau()

void CP::CalcPartonHistory::setZtautau ( const std::string & fsr,
int nZs )

Definition at line 147 of file CalcZPartonHistory.cxx.

147 {
148 const ZTauTauDecay decay = getZFromTaus(fsr);
149 const bool has_Z = decay.taus[0].found && decay.taus[1].found;
150 if (nZs == 1) {
151 if (has_Z) {
152 m_dec.decorateParticle("MC_Z_" + fsr,
153 decay.taus[0].p4 + decay.taus[1].p4, 23);
154 for (std::size_t i = 0; i < decay.taus.size(); ++i) {
155 const std::string zDecay = "MC_Zdecay" + std::to_string(i + 1);
156 m_dec.decorateParticle(zDecay + "_" + fsr, decay.taus[i].p4,
157 decay.taus[i].pdgId);
158 for (std::size_t j = 0; j < decay.tauDecays[i].size(); ++j) {
159 const std::string name =
160 zDecay + "_decay" + std::to_string(j + 1) + "_" + fsr;
161 const ZTauTauProduct& product = decay.tauDecays[i][j];
162 // Tau decay products that were not found (e.g. hadronic tau
163 // decays) get the sentinel defaults rather than a zero vector.
164 if (product.found)
165 m_dec.decorateParticle(name, product.p4, product.pdgId);
166 else
167 m_dec.decorateDefault(name);
168 }
169 }
170 }
171 } else
172 ANA_MSG_ERROR("Reconstruction of multiple Zs is not supported yet!");
173}
ZTauTauDecay getZFromTaus(const std::string &fsr)
One Z->tautau decay product: kinematics, PDG ID and whether it was found.

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ TraceParticle()

void CP::CalcPartonHistory::TraceParticle ( const xAOD::TruthParticle * particle,
std::vector< const xAOD::TruthParticle * > & currentPath,
std::vector< std::vector< const xAOD::TruthParticle * > > & allPaths )

Definition at line 189 of file CalcPartonHistory.cxx.

191 {
192 // Recursively builds decay paths from p down to stable particles.
193 // Each completed root-to-leaf path is appended to allPaths and later
194 // processed by FillParticleMap to assign m_particleMap keys.
195 //
196 // FSR handling: a particle that radiates before decaying appears as a chain
197 // of identical PDG-ID nodes (e.g. t → t → t → W b). findAfterFSR() follows
198 // that chain to the last node before the actual decay vertex, so the path
199 // records the pre- and post-FSR instances rather than every intermediate.
200 //
201 // W linking (DAOD_PHYS only): TruthTop links to Ws in TruthBoson, which
202 // carry no decay products. When we encounter such a W (isAfterFSR &&
203 // |pdg|==24) we swap it for the corresponding entry in
204 // TruthBosonsWithDecayParticles via the
205 // "CustomLinkedTruthBosonWithDecayParticles" decoration so that the subsequent
206 // child traversal finds the W decay products.
208 return;
209
210 // If this W node has no identical child (i.e. it is the after-FSR instance)
211 // but lacks decay products, swap to the linked decay-product-bearing copy.
212 if (PartonHistoryUtils::isAfterFSR(p) && std::abs(p->pdgId()) == 24) {
214 p, "CustomLinkedTruthBosonWithDecayParticles");
215 }
216
217 path.push_back(p);
218
219 // Leaf node: record the completed path.
220 if (p->nChildren() == 0) {
221 allPaths.push_back(path);
222 path.pop_back();
223 return;
224 }
225
227 // Same W-linking fix for the after-FSR node reached by findAfterFSR().
228 if (std::abs(afterFSR->pdgId()) == 24) {
230 afterFSR, "CustomLinkedTruthBosonWithDecayParticles");
231 }
232
233 if (afterFSR != p) {
234 // There was FSR: continue the path from the post-FSR node.
235 TraceParticle(afterFSR, path, allPaths);
236 } else {
237 // No FSR: branch into each child (e.g. W→lν gives two sub-paths).
238 for (std::size_t i = 0; i < afterFSR->nChildren(); ++i) {
239 if (const auto* c = afterFSR->child(i))
240 TraceParticle(c, path, allPaths);
241 }
242 }
243 path.pop_back();
244}
const xAOD::TruthParticle * getTruthParticleLinkedFromDecoration(const xAOD::TruthParticle *part, const std::string &decorationName)
helper method to handle retriveing the truth particle linked in the decoration of another particle
void TraceParticle(const xAOD::TruthParticle *particle, std::vector< const xAOD::TruthParticle * > &currentPath, std::vector< std::vector< const xAOD::TruthParticle * > > &allPaths)
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.
const xAOD::TruthParticle * findAfterFSR(const xAOD::TruthParticle *particle)
Return particle after FSR (before the decay vertex).
bool isAfterFSR(const xAOD::TruthParticle *particle)
Determine whether particle is afterFSR.
bool isBrokenTop(const xAOD::TruthParticle *particle)
Looking for tops without children -> must be broken.
path
python interpreter configuration --------------------------------------—
Definition athena.py:130

◆ TraceParticles()

void CP::CalcPartonHistory::TraceParticles ( const xAOD::TruthParticleContainer * truthParticles)

Definition at line 341 of file CalcPartonHistory.cxx.

342 {
343 std::vector<std::vector<const xAOD::TruthParticle*>> allPaths;
344 allPaths.reserve(truthParticles->size());
345 for (const xAOD::TruthParticle* p : *truthParticles) {
347 continue;
348 std::vector<const xAOD::TruthParticle*> path;
349 path.reserve(16);
350 TraceParticle(p, path, allPaths);
351 }
352 FillParticleMap(allPaths);
353}
void FillParticleMap(std::vector< std::vector< const xAOD::TruthParticle * > > &allPaths)
bool hasParticleIdenticalParent(const xAOD::TruthParticle *particle)
Return true when particle is a top before FSR.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_config

PartonSchemeConfig CP::CalcPartonHistory::m_config
protected

scheme configuration set via configure()

Definition at line 183 of file CalcPartonHistory.h.

◆ m_configured

bool CP::CalcPartonHistory::m_configured = false
protected

true after configure() has been called

Definition at line 184 of file CalcPartonHistory.h.

◆ m_dec

PartonDecorator CP::CalcPartonHistory::m_dec
protected

Definition at line 162 of file CalcPartonHistory.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_particleMap

std::map<std::string, std::vector<const xAOD::TruthParticle*> > CP::CalcPartonHistory::m_particleMap
protected

Definition at line 161 of file CalcPartonHistory.h.

◆ m_prefix

Gaudi::Property<std::string> CP::CalcPartonHistory::m_prefix
protected
Initial value:
{
this, "prefix", "", "Prefix to apply to all names to avoid overwriting"}

Definition at line 165 of file CalcPartonHistory.h.

165 {
166 this, "prefix", "", "Prefix to apply to all names to avoid overwriting"};

◆ m_symbolFCNC

Gaudi::Property<std::string> CP::CalcPartonHistory::m_symbolFCNC
protected
Initial value:
{
this, "symbolFCNC", "",
"Symbol for FCNC, valid only for 'TtbarFCNC' history"}

Definition at line 167 of file CalcPartonHistory.h.

167 {
168 this, "symbolFCNC", "",
169 "Symbol for FCNC, valid only for 'TtbarFCNC' history"};

◆ m_truthCollections

const std::vector<std::string> CP::CalcPartonHistory::m_truthCollections
protected

Definition at line 164 of file CalcPartonHistory.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: