ATLAS Offline Software
Loading...
Searching...
No Matches
JetTruthLabelingTool Class Reference

#include <JetTruthLabelingTool.h>

Inheritance diagram for JetTruthLabelingTool:
Collaboration diagram for JetTruthLabelingTool:

Classes

struct  DecorHandles
 Track internally if the W,Z,Top labels should be done (for large-R). More...

Public Member Functions

 JetTruthLabelingTool (const std::string &name="JetTruthLabelingTool")
 default constructor - to be used in all derived classes
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function.
StatusCode decorate (const xAOD::JetContainer &jets) const override
 decorate truth label to a jet collection
void print () const override
 Print configured parameters.
const std::string & getLargeRJetTruthLabelName () const
 returns the name of large-R jet truth label
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
virtual StatusCode modify (xAOD::JetContainer &jets) const override final
 Concrete implementation of the function inherited from IJetModifier.
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 Types

enum class  TruthLabelConfiguration {
  R21Precision_2022v1 , R10TruthLabel_R22v1 , R10WZTruthLabel_R22v1 , R4TruthLabel ,
  R4TruthDressedWZLabel , R4InTimeTruthLabel , Unknown
}

Protected Member Functions

StatusCode labelTruthJets (DecorHandles &dh, const EventContext &ctx) const
 Label truth jet collection.
StatusCode labelTruthJets (DecorHandles &dh, const xAOD::JetContainer &jets, const EventContext &ctx) const
StatusCode labelRecoJets (DecorHandles &dh, const xAOD::JetContainer &jets, const EventContext &ctx) const
 Apply labels to all jets in a container.
int getTruthJetLabelGA (DecorHandles &dh, const xAOD::Jet &jet, const EventContext &ctx) const
 Get truth label using ghost-associated particles.
int getLabel (DecorHandles &dh, const xAOD::Jet &jet, bool matchH, bool matchW, bool matchZ, bool matchTop, const EventContext &ctx) const
 Get label based on matching and containment criteria.
float getWZSplit12Cut (float pt) const
 Get W/Z label Split12 cut.
float getTopSplit23Cut (float pt) const
 Get top label Split23 cut.
int getNGhostParticles (const xAOD::Jet &jet, const std::string &collection) const
 Get number of ghost associated particles.
TruthLabelConfiguration parseLabel (const std::string &label)
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

Gaudi::Property< std::string > m_jetContainerName {this, "RecoJetContainer", "", "Input reco jet container name"}
Gaudi::Property< std::string > m_truthLabelName {this, "TruthLabelName", "R10TruthLabel_R22v1", "Truth label name"}
Gaudi::Property< bool > m_isTruthJetCol {this, "IsTruthJetCollection", false, "Flag indicating whether input collection is a truth jet container"}
Gaudi::Property< bool > m_forceDeltaRMatch {this, "ForceDeltaRMatch", false, "Whether to force dR matching e.g. if GhostTruth is not available"}
SG::ReadHandleKey< xAOD::EventInfom_evtInfoKey {this, "EventInfoKey", "EventInfo", "Name of EventInfo object"}
SG::ReadHandleKey< xAOD::JetContainerm_truthJetCollectionKey {this, "TruthJetContainer", "", "Do not configure manually!"}
 parameters for truth labeling
SG::ReadHandleKey< xAOD::JetContainerm_truthGroomedJetCollectionKey {this, "TruthGroomedJetContainer", "", "Do not configure manually!"}
bool m_useGhostJetMatch {}
bool m_matchUngroomedParent {}
 Use ghost association to match reco to truth jets, dR otherwise.
bool m_getTruthGroomedJetValues {}
 Use the ungroomed reco jet parent to match to truth jet.
double m_dRTruthJet {}
 When truth jet matching to ungroomed truth, allow saving properties of groomed truth jets.
double m_recoGhostFrac {}
 dR to match truth jet to reco jet
double m_mLowTop {}
 Ghost pT fraction to match truth jet to reco jet.
double m_mLowW {}
 Lower mass cut for top label.
double m_mLowZ {}
 Lower mass cut for W label.
bool m_doLargeRLabels {true}
 Lower mass cut for Z label.
TruthLabelConfiguration m_truthLabelConfig = TruthLabelConfiguration::Unknown
SG::WriteDecorHandleKey< xAOD::JetContainerm_label_truthKey {this, "label_TruthKey", "", "Do not configure manually!"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_NB_truthKey {this, "NB_TruthKey", "", "Do not configure manually!"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_split12_truthKey {this, "Split12_TruthKey", "", "Do not configure manually!"}
SG::ReadDecorHandleKey< xAOD::JetContainerm_split23_truthKey {this, "Split23_TruthKey", "", "Do not configure manually!"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_label_recoKey {this, "label_RecoKey", "", "Do not configure manually!"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_NB_recoKey {this, "NB_RecoKey", "", "Do not configure manually!"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_truthSplit12_recoKey {this, "TruthSplit12_RecoKey", "", "Do not configure manually!"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_truthSplit23_recoKey {this, "TruthSplit23_RecoKey", "", "Do not configure manually!"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_matchedTruthJet_recoKey {this, "MatchedTruthJet_RecoKey", "", "Do not configure manually!"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_matchedTruthJetMass_recoKey {this, "MatchedTruthJetMass_RecoKey", "", "Do not configure manually!"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_matchedTruthJetPt_recoKey {this, "MatchedTruthJetPt_RecoKey", "", "Do not configure manually!"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_matchedTruthJetEta_recoKey { this, "MatchedTruthJetEta_RecoKey", "", "Do not configure manually!" }
SG::WriteDecorHandleKey< xAOD::JetContainerm_matchedTruthJetPhi_recoKey { this, "MatchedTruthJetPhi_RecoKey", "", "Do not configure manually!" }
SG::WriteDecorHandleKey< xAOD::JetContainerm_matchedTruthJetDR_recoKey { this, "MatchedTruthJetDR_RecoKey", "", "Do not configure manually!" }
SG::WriteDecorHandleKey< xAOD::JetContainerm_matchedTruthJetGF_recoKey { this, "MatchedTruthJetGF_RecoKey", "", "Do not configure manually!" }
SG::WriteDecorHandleKey< xAOD::JetContainerm_matchedTruthGroomedJetMass_recoKey {this, "MatchedTruthGroomedJetMass_RecoKey", "", "Do not configure manually!"}
SG::WriteDecorHandleKey< xAOD::JetContainerm_matchedTruthGroomedJetPt_recoKey {this, "MatchedTruthGroomedJetPt_RecoKey", "", "Do not configure manually!"}

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

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

Friends

struct DecorHandles

Detailed Description

Definition at line 24 of file JetTruthLabelingTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ TruthLabelConfiguration

Enumerator
R21Precision_2022v1 
R10TruthLabel_R22v1 
R10WZTruthLabel_R22v1 
R4TruthLabel 
R4TruthDressedWZLabel 
R4InTimeTruthLabel 
Unknown 

Definition at line 128 of file JetTruthLabelingTool.h.

128 {
129 R21Precision_2022v1,
130 R10TruthLabel_R22v1,
131 R10WZTruthLabel_R22v1,
132 R4TruthLabel,
133 R4TruthDressedWZLabel,
134 R4InTimeTruthLabel,
135 Unknown
136 };
@ Unknown
Definition TruthClasses.h:9

Constructor & Destructor Documentation

◆ JetTruthLabelingTool()

JetTruthLabelingTool::JetTruthLabelingTool ( const std::string & name = "JetTruthLabelingTool")

default constructor - to be used in all derived classes

Definition at line 14 of file JetTruthLabelingTool.cxx.

14 :
15 asg::AsgTool(name)
16{}

Member Function Documentation

◆ 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>

◆ decorate()

StatusCode JetTruthLabelingTool::decorate ( const xAOD::JetContainer & jets) const
overridevirtual

decorate truth label to a jet collection

Apply label to truth jet collections

Copy label to matched reco jets

Implements IJetDecorator.

Definition at line 254 of file JetTruthLabelingTool.cxx.

254 {
255 const EventContext& ctx = Gaudi::Hive::currentContext();
256 DecorHandles dh (*this, ctx);
257
259 if(m_isTruthJetCol) {
260 return labelTruthJets(dh, jets, ctx);
261 }
262
263 else if (!m_isTruthJetCol && !m_doLargeRLabels) {
264 return labelRecoJets(dh, jets, ctx);
265 }
266
268 else {
269 ATH_CHECK( labelTruthJets(dh, ctx) );
270 return labelRecoJets(dh, jets, ctx);
271 }
272
273 return StatusCode::SUCCESS;
274}
#define ATH_CHECK
Evaluate an expression and check for errors.
StatusCode labelRecoJets(DecorHandles &dh, const xAOD::JetContainer &jets, const EventContext &ctx) const
Apply labels to all jets in a container.
StatusCode labelTruthJets(DecorHandles &dh, const EventContext &ctx) const
Label truth jet collection.
Gaudi::Property< bool > m_isTruthJetCol
bool m_doLargeRLabels
Lower mass cut for Z label.
Track internally if the W,Z,Top labels should be done (for large-R).

◆ 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.

◆ 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

◆ 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 }
ServiceHandle< StoreGateSvc > & evtStore()

◆ getLabel()

int JetTruthLabelingTool::getLabel ( DecorHandles & dh,
const xAOD::Jet & jet,
bool matchH,
bool matchW,
bool matchZ,
bool matchTop,
const EventContext & ctx ) const
protected

Get label based on matching and containment criteria.

Booleans for containment selections

This method can be expanded to include custom label priorities

If it isn't matched to any heavy particles, is it QCD

Contained H->bb

Contained H->cc

Contained H->tautau

Other from H

Contained top

Contained W from a top

Contained W not from a top

Contained Z->bb

Contained Z->cc

Contained Z->tautau

Contained Z->qq

Uncontained top

Uncontained V

Definition at line 549 of file JetTruthLabelingTool.cxx.

555 {
556
557 // store GhostBHadronsFinal count
558 int nMatchB = getNGhostParticles( jet, "GhostBHadronsFinal" );
559 (*dh.nbHandle)(jet) = nMatchB;
560
562 bool is_bb = false;
563 bool is_cc = false;
564 bool is_tautauEl = false;
565 bool is_tautauMu = false;
566 bool is_tautauHad = false;
567 bool isTop = false;
568 bool isW = false;
569 bool isZ = false;
570
571 // Use R21Precision_2022v1 definition
573 SG::ReadDecorHandle<xAOD::JetContainer, float> split23Handle(m_split23_truthKey, ctx);
574 SG::ReadDecorHandle<xAOD::JetContainer, float> split12Handle(m_split12_truthKey, ctx);
575 is_bb = ( nMatchB > 1 );
576 isTop = ( matchTop && matchW && nMatchB > 0 && jet.m() / 1000. > m_mLowTop && split23Handle(jet) / 1000. > getTopSplit23Cut( jet.pt() / 1000. ) );
577 isW = matchW && nMatchB == 0 && jet.m() / 1000. > m_mLowW && split12Handle(jet) / 1000. > getWZSplit12Cut( jet.pt() / 1000. );
578 isZ = matchZ && jet.m() / 1000. > m_mLowZ && split12Handle(jet) / 1000. > getWZSplit12Cut( jet.pt() / 1000. );
579 }
580
581 // Use R10TruthLabel_R22v1 definition
583 // get extended ghost associated truth label
584 int extended_GA_label = -1;
585 if (not jet.getAttribute("HadronGhostExtendedTruthLabelID", extended_GA_label)) {
586 ATH_MSG_ERROR( "HadronGhostExtendedTruthLabelID not available for " + m_truthJetCollectionKey.key() );
587 }
588
589 SG::ReadDecorHandle<xAOD::JetContainer, float> split23Handle(m_split23_truthKey, ctx);
590 SG::ReadDecorHandle<xAOD::JetContainer, float> split12Handle(m_split12_truthKey, ctx);
591 is_bb = ( extended_GA_label == 55 );
592 is_cc = ( extended_GA_label == 44 );
593 is_tautauEl = ( extended_GA_label == 151511 );
594 is_tautauMu = ( extended_GA_label == 151513 );
595 is_tautauHad = ( extended_GA_label == 1515 );
596 isTop = ( matchTop && matchW && nMatchB > 0 && jet.m() / 1000. > m_mLowTop && split23Handle(jet) / 1000. > getTopSplit23Cut( jet.pt() / 1000. ) );
597 isW = matchW && nMatchB == 0 && jet.m() / 1000. > m_mLowW && split12Handle(jet) / 1000. > getWZSplit12Cut( jet.pt() / 1000. );
598 isZ = matchZ && jet.m() / 1000. > m_mLowZ && split12Handle(jet) / 1000. > getWZSplit12Cut( jet.pt() / 1000. );
599 }
600
601
603
604 /* The default priority of labels is:
605 * 1) Hbb/cc/tautau
606 * 2) Contained top
607 * 3) Contained W
608 * 4) Contained Zbb/cc/qq/tautau
609 * 5) Uncontained top
610 * 6) Uncontained V
611 */
612
614 if( !(matchTop || matchW || matchZ || matchH) ) {
616 }
617
618 // Higgs
619 if ( matchH ) {
621 if ( is_bb ) return LargeRJetTruthLabel::Hbb;
623 if ( is_cc ) return LargeRJetTruthLabel::Hcc;
625 if ( is_tautauEl ) return LargeRJetTruthLabel::HtautauEl;
626 if ( is_tautauMu ) return LargeRJetTruthLabel::HtautauMu;
627 if ( is_tautauHad ) return LargeRJetTruthLabel::HtautauHad;
630 }
631
633 if ( isTop ) return LargeRJetTruthLabel::tqqb;
634
635 if ( isW ) {
637 if ( matchTop ) return LargeRJetTruthLabel::Wqq_From_t;
640 }
641
642 if ( matchZ ) {
644 if ( is_bb ) return LargeRJetTruthLabel::Zbb;
646 if ( is_cc ) return LargeRJetTruthLabel::Zcc;
648 if ( is_tautauEl ) return LargeRJetTruthLabel::ZtautauEl;
649 if ( is_tautauMu ) return LargeRJetTruthLabel::ZtautauMu;
650 if ( is_tautauHad ) return LargeRJetTruthLabel::ZtautauHad;
651 }
652 if ( isZ ) {
655 }
656
658 if ( matchTop ) return LargeRJetTruthLabel::other_From_t;
659
662
663}
#define ATH_MSG_ERROR(x)
bool isW(const T &p)
Definition AtlasPID.h:382
bool isZ(const T &p)
Definition AtlasPID.h:379
bool isTop(const T &p)
Definition AtlasPID.h:185
double m_mLowZ
Lower mass cut for W label.
float getTopSplit23Cut(float pt) const
Get top label Split23 cut.
double m_mLowTop
Ghost pT fraction to match truth jet to reco jet.
TruthLabelConfiguration m_truthLabelConfig
float getWZSplit12Cut(float pt) const
Get W/Z label Split12 cut.
SG::ReadDecorHandleKey< xAOD::JetContainer > m_split23_truthKey
SG::ReadDecorHandleKey< xAOD::JetContainer > m_split12_truthKey
int getNGhostParticles(const xAOD::Jet &jet, const std::string &collection) const
Get number of ghost associated particles.
SG::ReadHandleKey< xAOD::JetContainer > m_truthJetCollectionKey
parameters for truth labeling
double m_mLowW
Lower mass cut for top label.
virtual double pt() const
The transverse momentum ( ) of the particle.
Definition Jet_v1.cxx:44
virtual double m() const
The invariant mass of the particle.
Definition Jet_v1.cxx:59
bool getAttribute(AttributeID type, T &value) const
Retrieve attribute moment by enum.

◆ getLargeRJetTruthLabelName()

const std::string & JetTruthLabelingTool::getLargeRJetTruthLabelName ( ) const
inline

returns the name of large-R jet truth label

Definition at line 43 of file JetTruthLabelingTool.h.

43 {
44 return m_truthLabelName;
45 };
Gaudi::Property< std::string > m_truthLabelName

◆ 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 }

◆ getNGhostParticles()

int JetTruthLabelingTool::getNGhostParticles ( const xAOD::Jet & jet,
const std::string & collection ) const
protected

Get number of ghost associated particles.

Definition at line 533 of file JetTruthLabelingTool.cxx.

533 {
534
535 int nMatchPart = 0;
536
537 if( !jet.getAttribute<int>( collection+"Count", nMatchPart ) ){
538
539 std::vector<const xAOD::TruthParticle*> ghostParts;
540 if( !jet.getAssociatedObjects<xAOD::TruthParticle>( collection, ghostParts ) ){
541 ATH_MSG_ERROR( collection + " cannot be retrieved! Truth label definition might be wrong" );
542 }
543 nMatchPart = ghostParts.size();
544 }
545
546 return nMatchPart;
547}
std::vector< const T * > getAssociatedObjects(const std::string &name) const
get associated objects as a vector<object> this compact form throws an exception if the object is not...
TruthParticle_v1 TruthParticle
Typedef to implementation.

◆ getProperty()

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

Get one of the tool's properties.

◆ getTopSplit23Cut()

float JetTruthLabelingTool::getTopSplit23Cut ( float pt) const
protected

Get top label Split23 cut.

The functional form and parameters come from optimization studies: https://indico.cern.ch/event/931498/contributions/3921872/attachments/2064188/3463746/JSS_25June.pdf

Definition at line 512 of file JetTruthLabelingTool.cxx.

512 {
513
516
517 float split23 = -999.0;
518
522
523 const float c0 = 3.3;
524 const float c1 = -6.98e-4;
525
526 split23 = std::exp( c0 + c1 * pt );
527
528 }
529
530 return split23;
531}

◆ getTruthJetLabelGA()

int JetTruthLabelingTool::getTruthJetLabelGA ( DecorHandles & dh,
const xAOD::Jet & jet,
const EventContext & ctx ) const
protected

Get truth label using ghost-associated particles.

Booleans to check ghost-associated heavy particles

Find ghost associated W bosons

Find ghost associated Z bosons

Find ghost associated H bosons

Find ghost associated top quarks

Definition at line 212 of file JetTruthLabelingTool.cxx.

215{
217 bool matchW = false;
218 bool matchZ = false;
219 bool matchH = false;
220 bool matchTop = false;
221
223 int nMatchW = getNGhostParticles( jet, "GhostWBosons" );
224
225 if ( nMatchW ) {
226 matchW = true;
227 }
228
230 int nMatchZ = getNGhostParticles( jet, "GhostZBosons" );
231
232 if ( nMatchZ ) {
233 matchZ = true;
234 }
235
237 int nMatchH = getNGhostParticles( jet, "GhostHBosons" );
238
239 if ( nMatchH ) {
240 matchH = true;
241 }
242
244 int nMatchTop = getNGhostParticles( jet, "GhostTQuarksFinal" );
245
246 if ( nMatchTop ) {
247 matchTop = true;
248 }
249
250 return getLabel( dh, jet, matchH, matchW, matchZ, matchTop, ctx );
251
252}
int getLabel(DecorHandles &dh, const xAOD::Jet &jet, bool matchH, bool matchW, bool matchZ, bool matchTop, const EventContext &ctx) const
Get label based on matching and containment criteria.

◆ getWZSplit12Cut()

float JetTruthLabelingTool::getWZSplit12Cut ( float pt) const
protected

Get W/Z label Split12 cut.

The functional form and parameters come from optimization studies: https://cds.cern.ch/record/2777009/files/ATL-PHYS-PUB-2021-029.pdf

Definition at line 494 of file JetTruthLabelingTool.cxx.

494 {
495
498
499 float split12 = -999.0;
500
502 const float c0 = 55.25;
503 const float c1 = -2.34e-3;
504
505 split12 = c0 * std::exp( c1 * pt );
506 }
507
508 return split12;
509
510}

◆ initialize()

StatusCode JetTruthLabelingTool::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...

Check if TruthLabelName is supported. If not, give an error and return FAILURE

Ghost Association values

Hard-code some values for R10TruthLabel_R21Precision_2022v1 and R10TruthLabel_R22v1

Hard-code some values for R10WZTruthLabel_R22v1

Hard code for small-R jets

Reimplemented from asg::AsgTool.

Definition at line 43 of file JetTruthLabelingTool.cxx.

43 {
44
45 ATH_MSG_INFO("Initializing " << name());
46
48
51 ATH_MSG_ERROR("TruthLabelName " << m_truthLabelName << " is not supported. Exiting...");
52 return StatusCode::FAILURE;
53 }
54
56 m_useGhostJetMatch = false;
57 m_recoGhostFrac = 0.75;
58
59 switch(m_truthLabelConfig) {
63 m_truthJetCollectionKey="AntiKt10TruthJets";
65 m_dRTruthJet = 0.75;
68 m_truthGroomedJetCollectionKey="AntiKt10TruthSoftDropBeta100Zcut10Jets";
69 } else {
71 }
72 break;
75 m_truthJetCollectionKey="AntiKt10TruthDressedWZJets";
77 m_dRTruthJet = 0.75;
78 m_mLowTop = 140.0;
79 m_mLowW = 50.0;
80 m_mLowZ = 50.0;
82 m_truthGroomedJetCollectionKey="AntiKt10TruthDressedWZSoftDropBeta100Zcut10Jets";
83 break;
84
89 switch (m_truthLabelConfig) {
91 m_truthJetCollectionKey = "AntiKt4TruthJets";
92 break;
94 m_truthJetCollectionKey = "AntiKt4TruthDressedWZJets";
95 break;
97 m_truthJetCollectionKey = "InTimeAntiKt4TruthJets";
98 break;
99 default: // Cannot hit anything else
100 break;
101 }
103 m_dRTruthJet = 0.3;
105 m_useGhostJetMatch = true;
106 m_doLargeRLabels = false;
107 break;
108 default:
109 ATH_MSG_ERROR(" Unhandled TruthLabelName " << m_truthLabelName << "! Exiting...");
110 return StatusCode::FAILURE;
111 }
112
114 m_useGhostJetMatch = false;
115 }
116
117 print();
118
121 m_split12_truthKey = m_truthJetCollectionKey.key() + ".Split12";
122 m_split23_truthKey = m_truthJetCollectionKey.key() + ".Split23";
123
124 if(!m_isTruthJetCol){
127 m_truthSplit12_recoKey = m_jetContainerName + "." + m_truthLabelName + "_TruthJetSplit12";
128 m_truthSplit23_recoKey = m_jetContainerName + "." + m_truthLabelName + "_TruthJetSplit23";
129
131 m_matchedTruthJetMass_recoKey = m_jetContainerName + "." + m_truthLabelName + "_MatchedTruthJetMass";
132 m_matchedTruthJetPt_recoKey = m_jetContainerName + "." + m_truthLabelName + "_MatchedTruthJetPt";
133 m_matchedTruthJetEta_recoKey = m_jetContainerName + "." + m_truthLabelName + "_MatchedTruthJetEta";
134 m_matchedTruthJetPhi_recoKey = m_jetContainerName + "." + m_truthLabelName + "_MatchedTruthJetPhi";
135 m_matchedTruthJetDR_recoKey = m_jetContainerName + "." + m_truthLabelName + "_MatchedTruthJetDR";
136 m_matchedTruthJetGF_recoKey = m_jetContainerName + "." + m_truthLabelName + "_MatchedTruthJetGF";
137
138 m_matchedTruthGroomedJetMass_recoKey = m_jetContainerName + "." + m_truthLabelName + "_MatchedTruthGroomedJetMass";
139 m_matchedTruthGroomedJetPt_recoKey = m_jetContainerName + "." + m_truthLabelName + "_MatchedTruthGroomedJetPt";
140 }
141
142 ATH_CHECK(m_evtInfoKey.initialize());
145
146 ATH_CHECK(m_label_truthKey.initialize());
147 ATH_CHECK(m_NB_truthKey.initialize());
148
151
156
164
167
168 return StatusCode::SUCCESS;
169}
#define ATH_MSG_INFO(x)
Gaudi::Property< std::string > m_jetContainerName
Gaudi::Property< bool > m_forceDeltaRMatch
bool m_getTruthGroomedJetValues
Use the ungroomed reco jet parent to match to truth jet.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_matchedTruthJetDR_recoKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_NB_truthKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_matchedTruthJetPt_recoKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_label_recoKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_matchedTruthJetEta_recoKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_matchedTruthJetPhi_recoKey
SG::ReadHandleKey< xAOD::JetContainer > m_truthGroomedJetCollectionKey
void print() const override
Print configured parameters.
SG::WriteDecorHandleKey< xAOD::JetContainer > m_matchedTruthJetMass_recoKey
double m_recoGhostFrac
dR to match truth jet to reco jet
SG::WriteDecorHandleKey< xAOD::JetContainer > m_matchedTruthJet_recoKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_truthSplit23_recoKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_matchedTruthJetGF_recoKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_truthSplit12_recoKey
SG::ReadHandleKey< xAOD::EventInfo > m_evtInfoKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_matchedTruthGroomedJetMass_recoKey
bool m_matchUngroomedParent
Use ghost association to match reco to truth jets, dR otherwise.
TruthLabelConfiguration parseLabel(const std::string &label)
SG::WriteDecorHandleKey< xAOD::JetContainer > m_label_truthKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_NB_recoKey
SG::WriteDecorHandleKey< xAOD::JetContainer > m_matchedTruthGroomedJetPt_recoKey
double m_dRTruthJet
When truth jet matching to ungroomed truth, allow saving properties of groomed truth jets.

◆ 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.

◆ labelRecoJets()

StatusCode JetTruthLabelingTool::labelRecoJets ( DecorHandles & dh,
const xAOD::JetContainer & jets,
const EventContext & ctx ) const
protected

Apply labels to all jets in a container.

Get parent ungroomed reco jet for matching

Find matched truth jet

If parent jet has been retrieved, calculate dR w.r.t. it instead

If m_dRTruthJet < 0, the closest truth jet is used as matched jet. Otherwise, only match if dR < m_dRTruthJet

Decorate truth label

Decorate additional information used for truth labeling

Definition at line 276 of file JetTruthLabelingTool.cxx.

278 {
279
280 SG::ReadHandle<xAOD::JetContainer> truthJets(m_truthJetCollectionKey, ctx);
281 SG::ReadHandle<xAOD::JetContainer> truthGroomedJets;
283 truthGroomedJets = SG::makeHandle(m_truthGroomedJetCollectionKey, ctx);
284 }
285 const SG::AuxElement::Accessor<int> nbAcc (m_truthLabelName + "_NB");
286 static const SG::ConstAccessor< ElementLink< xAOD::JetContainer > > ParentAcc ("Parent");
287 for(const xAOD::Jet *jet : jets) {
288
290 const xAOD::Jet* parent = nullptr;
292 ElementLink<xAOD::JetContainer> element_link = ParentAcc (*jet);
293 if ( element_link.isValid() ) {
294 parent = *element_link;
295 }
296 else {
297 ATH_MSG_ERROR("Unable to get a link to the parent jet! Returning a NULL pointer.");
298 return StatusCode::FAILURE;
299 }
300 }
302 float dRmin = 9999;
303 float ghostFracNominal = 9999;
304 const xAOD::Jet* matchTruthJet = nullptr;
305 float dRminGroomed = 9999;
306 const xAOD::Jet* matchTruthGroomedJet = nullptr;
307
308 // Ensure that the reco jet has at least one constituent
309 // (and thus a well-defined four-vector)
310 if(jet->numConstituents() > 0){
311 for ( const xAOD::Jet* truthJet : *truthJets ) {
312 // Calculate DR and GF values. Both are used regardless of the matching option.
313 // DR
314 float dR = jet->p4().DeltaR(truthJet->p4());
316 if (parent) dR = parent->p4().DeltaR(truthJet->p4());
317 if (m_useGhostJetMatch) {
318 // GF
319 static const SG::ConstAccessor<float> accGhostTruthPt("GhostTruthPt");
320 float ghostTruthPt = accGhostTruthPt(*jet);
321 float ghostPtFraction = (ghostTruthPt / (truthJet->pt()));
322 // GA matching. Upper bound applied for completeness, but realistically not needed.
323 if ((ghostPtFraction >= m_recoGhostFrac) && (ghostPtFraction <= (2 - m_recoGhostFrac))) {
324 if (std::abs(1 - ghostPtFraction) < std::abs(1 - ghostFracNominal)) {
325 matchTruthJet = truthJet;
326 ghostFracNominal = ghostPtFraction;
327 }
328 }
329 }
330 else {
331 // If m_dRTruthJet < 0, the closest truth jet is used as matched jet. Otherwise, only match if dR < m_dRTruthJet
332 if (m_dRTruthJet < 0 || dR < m_dRTruthJet ) {
333 if (dR < dRmin) {
334 dRmin = dR;
335 matchTruthJet = truthJet;
336 }
337 }
338 }
339
340 }
341 }
342
343
345 int truthJetNB = -1;
346 float truthJetSplit12 = -9999;
347 float truthJetSplit23 = -9999;
348
349 // Defaults to null EL
350 ElementLink<xAOD::JetContainer> truthJetEL{};
351 float truthJetMass = -9999;
352 float truthJetPt = -9999;
353 float truthJetEta = -9999;
354 float truthJetPhi = -9999;
355 float deltaR = -2;
356 float ghostFrac = -2;
357
358 if ( matchTruthJet ) {
359 // Can't use the WriteDecorHandle to read --- the decoration may have
360 // been added and locked by a previous algorithm.
361 // Not saving Truth jet decorations for small R
362 if (m_doLargeRLabels) {
363 SG::ConstAccessor<int> labelAcc(dh.labelHandle->auxid());
364 label = labelAcc(*matchTruthJet);
366 SG::ReadDecorHandle<xAOD::JetContainer, float> split23Handle(m_split23_truthKey, ctx);
367 if (split23Handle.isAvailable()) truthJetSplit23 = split23Handle(*matchTruthJet);
368 SG::ReadDecorHandle<xAOD::JetContainer, float> split12Handle(m_split12_truthKey, ctx);
369 if (split12Handle.isAvailable()) truthJetSplit12 = split12Handle(*matchTruthJet);
370 }
371 if (nbAcc.isAvailable(*matchTruthJet)) truthJetNB = nbAcc(*matchTruthJet);
372 }
373 truthJetEL = ElementLink<xAOD::JetContainer>(*truthJets,matchTruthJet->index(),ctx);
374 truthJetMass = matchTruthJet->m();
375 truthJetPt = matchTruthJet->pt();
376 truthJetEta = matchTruthJet->eta();
377 truthJetPhi = matchTruthJet->phi();
378 ghostFrac = ghostFracNominal;
379 deltaR = dRmin;
380 }
381
382 // Save Groomed Truth Jet variables
383 float truthGroomedJetMass = -9999;
384 float truthGroomedJetPt = -9999;
386 if ( matchTruthJet ) {
387 for ( const xAOD::Jet* truthGroomedJet : *truthGroomedJets ) {
388 ElementLink<xAOD::JetContainer> element_link = ParentAcc (*truthGroomedJet);
389 if ( !element_link.isValid() ) { continue; }
390 if ( matchTruthJet == *element_link ) {
391 matchTruthGroomedJet = truthGroomedJet;
392 break;
393 }
394 }
395 }
396 // If no matched jet found or matched jet has no corresponding groomed jet, use dR matching
397 if ( !matchTruthGroomedJet && parent != nullptr) {
398 for ( const xAOD::Jet* truthGroomedJet : *truthGroomedJets ) {
399 float dR = parent->p4().DeltaR(truthGroomedJet->p4());
401 if ( m_dRTruthJet < 0 || dR < m_dRTruthJet ) {
402 if ( dR < dRminGroomed ) {
403 dRminGroomed = dR;
404 matchTruthGroomedJet = truthGroomedJet;
405 }
406 }
407 }
408 }
409 if ( matchTruthGroomedJet ) {
410 truthGroomedJetMass = matchTruthGroomedJet->m();
411 truthGroomedJetPt = matchTruthGroomedJet->pt();
412 }
413 }
414
416 if (m_doLargeRLabels) {
417 (*dh.labelRecoHandle)(*jet) = label;
420 (*dh.split23Handle)(*jet) = truthJetSplit23;
421 (*dh.split12Handle)(*jet) = truthJetSplit12;
422 }
423
424 (*dh.nbRecoHandle)(*jet) = truthJetNB;
425 }
426
427 (*dh.matchedTruthJetHandle)(*jet) = truthJetEL;
428 (*dh.matchedTruthJetMassHandle)(*jet) = truthJetMass;
429 (*dh.matchedTruthJetPtHandle)(*jet) = truthJetPt;
430 (*dh.matchedTruthJetEtaHandle)(*jet) = truthJetEta;
431 (*dh.matchedTruthJetPhiHandle)(*jet) = truthJetPhi;
432 (*dh.matchedTruthJetDRHandle)(*jet) = deltaR;
433 (*dh.matchedTruthJetGFHandle)(*jet) = ghostFrac;
434
436 (*dh.matchedTruthGroomedMassHandle)(*jet) = truthGroomedJetMass;
437 (*dh.matchedTruthGroomedPtHandle)(*jet) = truthGroomedJetPt;
438 }
439 }
440
441 return StatusCode::SUCCESS;
442}
Scalar deltaR(const MatrixBase< Derived > &vec) const
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition Jet_v1.cxx:54
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition Jet_v1.cxx:49
std::string label(const std::string &format, int i)
Definition label.h:19
int enumToInt(const TypeEnum type)
SG::ConstAccessor< T, ALLOC > ConstAccessor
Definition AuxElement.h:570
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Jet_v1 Jet
Definition of the current "jet version".

◆ labelTruthJets() [1/2]

StatusCode JetTruthLabelingTool::labelTruthJets ( DecorHandles & dh,
const EventContext & ctx ) const
protected

Label truth jet collection.

Retrieve appropriate truth jet container

Make sure the truth jet collection has been retrieved

Definition at line 444 of file JetTruthLabelingTool.cxx.

445 {
446
448 SG::ReadHandle<xAOD::JetContainer> truthJets(m_truthJetCollectionKey, ctx);
449
451 if ( !truthJets.isValid() ) {
452 ATH_MSG_ERROR("No truth jet container retrieved. Please make sure you are using a supported TruthLabelName.");
453 return StatusCode::FAILURE;
454 }
455
456 return labelTruthJets(dh, *truthJets, ctx);
457
458}

◆ labelTruthJets() [2/2]

StatusCode JetTruthLabelingTool::labelTruthJets ( DecorHandles & dh,
const xAOD::JetContainer & jets,
const EventContext & ctx ) const
protected

Make sure there is at least 1 jet in truth collection

Check if the truth jet collection already has labels applied

Get the EventInfo to identify Sherpa samples

Apply label to truth jet

Definition at line 460 of file JetTruthLabelingTool.cxx.

463{
465 if ( !(truthJets.size()) ) return StatusCode::SUCCESS;
466
468 if(dh.labelHandle->isAvailable()){
469 // Beware: if we get here, the configuration is probably not MT-compatible.
470 ATH_MSG_DEBUG("labelTruthJets: Truth jet collection already labelled with " << m_truthLabelName);
471 return StatusCode::SUCCESS;
472 }
473
475 SG::ReadHandle<xAOD::EventInfo> eventInfo(m_evtInfoKey, ctx);
476 if(!eventInfo.isValid()){
477 ATH_MSG_ERROR("Failed to retrieve event information.");
478 return StatusCode::FAILURE;
479 }
480
481 if(m_doLargeRLabels) {
484 for ( const xAOD::Jet *jet : truthJets ) {
485 ATH_MSG_DEBUG("Getting truth label using ghost-association");
486 label = getTruthJetLabelGA(dh, *jet, ctx);
487 (*dh.labelHandle)(*jet) = label;
488 }
489 }
490
491 return StatusCode::SUCCESS;
492}
#define ATH_MSG_DEBUG(x)
int getTruthJetLabelGA(DecorHandles &dh, const xAOD::Jet &jet, const EventContext &ctx) const
Get truth label using ghost-associated particles.

◆ modify()

virtual StatusCode IJetDecorator::modify ( xAOD::JetContainer & jets) const
inlinefinaloverridevirtualinherited

Concrete implementation of the function inherited from IJetModifier.

Implements IJetModifier.

Definition at line 32 of file IJetDecorator.h.

32{return decorate(jets);};
virtual StatusCode decorate(const xAOD::JetContainer &jets) const =0
Decorate a jet collection without otherwise modifying it.

◆ 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 }

◆ 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.

◆ parseLabel()

JetTruthLabelingTool::TruthLabelConfiguration JetTruthLabelingTool::parseLabel ( const std::string & label)
protected

Definition at line 19 of file JetTruthLabelingTool.cxx.

19 {
20
21 if (name == "R10TruthLabel_R21Precision_2022v1")
23
24 if (name == "R10TruthLabel_R22v1")
26
27 if (name == "R10WZTruthLabel_R22v1")
29
30 if (name == "R4TruthLabel")
32
33 if (name == "R4TruthDressedWZLabel")
35
36 if (name == "R4InTimeTruthLabel")
38
40}

◆ print()

void JetTruthLabelingTool::print ( ) const
overridevirtual

Print configured parameters.

Reimplemented from asg::AsgTool.

Definition at line 171 of file JetTruthLabelingTool.cxx.

171 {
172 ATH_MSG_INFO("Parameters for " << name());
173
174 ATH_MSG_INFO("xAOD information:");
175 ATH_MSG_INFO("TruthLabelName: " << m_truthLabelName);
176 ATH_MSG_INFO("TruthJetCollectionName: " << m_truthJetCollectionKey.key());
177 ATH_MSG_INFO("dRTruthJet: " << std::to_string(m_dRTruthJet));
178
180 ATH_MSG_INFO("truthGroomedJetCollectionName: " << m_truthGroomedJetCollectionKey.key());
181 }
182}

◆ 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 }

◆ 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 >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ 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.

◆ 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

◆ DecorHandles

friend struct DecorHandles
friend

Definition at line 95 of file JetTruthLabelingTool.h.

Member Data Documentation

◆ 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_doLargeRLabels

bool JetTruthLabelingTool::m_doLargeRLabels {true}
protected

Lower mass cut for Z label.

Definition at line 68 of file JetTruthLabelingTool.h.

68{true};

◆ m_dRTruthJet

double JetTruthLabelingTool::m_dRTruthJet {}
protected

When truth jet matching to ungroomed truth, allow saving properties of groomed truth jets.

Definition at line 63 of file JetTruthLabelingTool.h.

63{};

◆ m_evtInfoKey

SG::ReadHandleKey<xAOD::EventInfo> JetTruthLabelingTool::m_evtInfoKey {this, "EventInfoKey", "EventInfo", "Name of EventInfo object"}
protected

Definition at line 55 of file JetTruthLabelingTool.h.

55{this, "EventInfoKey", "EventInfo", "Name of EventInfo object"};

◆ 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_forceDeltaRMatch

Gaudi::Property<bool> JetTruthLabelingTool::m_forceDeltaRMatch {this, "ForceDeltaRMatch", false, "Whether to force dR matching e.g. if GhostTruth is not available"}
protected

Definition at line 53 of file JetTruthLabelingTool.h.

53{this, "ForceDeltaRMatch", false, "Whether to force dR matching e.g. if GhostTruth is not available"};

◆ m_getTruthGroomedJetValues

bool JetTruthLabelingTool::m_getTruthGroomedJetValues {}
protected

Use the ungroomed reco jet parent to match to truth jet.

Definition at line 62 of file JetTruthLabelingTool.h.

62{};

◆ m_isTruthJetCol

Gaudi::Property<bool> JetTruthLabelingTool::m_isTruthJetCol {this, "IsTruthJetCollection", false, "Flag indicating whether input collection is a truth jet container"}
protected

Definition at line 52 of file JetTruthLabelingTool.h.

52{this, "IsTruthJetCollection", false, "Flag indicating whether input collection is a truth jet container"};

◆ m_jetContainerName

Gaudi::Property<std::string> JetTruthLabelingTool::m_jetContainerName {this, "RecoJetContainer", "", "Input reco jet container name"}
protected

Definition at line 49 of file JetTruthLabelingTool.h.

49{this, "RecoJetContainer", "", "Input reco jet container name"};

◆ m_label_recoKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_label_recoKey {this, "label_RecoKey", "", "Do not configure manually!"}
protected

Definition at line 146 of file JetTruthLabelingTool.h.

146{this, "label_RecoKey", "", "Do not configure manually!"};

◆ m_label_truthKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_label_truthKey {this, "label_TruthKey", "", "Do not configure manually!"}
protected

Definition at line 141 of file JetTruthLabelingTool.h.

141{this, "label_TruthKey", "", "Do not configure manually!"};

◆ m_matchedTruthGroomedJetMass_recoKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_matchedTruthGroomedJetMass_recoKey {this, "MatchedTruthGroomedJetMass_RecoKey", "", "Do not configure manually!"}
protected

Definition at line 159 of file JetTruthLabelingTool.h.

159{this, "MatchedTruthGroomedJetMass_RecoKey", "", "Do not configure manually!"};

◆ m_matchedTruthGroomedJetPt_recoKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_matchedTruthGroomedJetPt_recoKey {this, "MatchedTruthGroomedJetPt_RecoKey", "", "Do not configure manually!"}
protected

Definition at line 160 of file JetTruthLabelingTool.h.

160{this, "MatchedTruthGroomedJetPt_RecoKey", "", "Do not configure manually!"};

◆ m_matchedTruthJet_recoKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_matchedTruthJet_recoKey {this, "MatchedTruthJet_RecoKey", "", "Do not configure manually!"}
protected

Definition at line 151 of file JetTruthLabelingTool.h.

151{this, "MatchedTruthJet_RecoKey", "", "Do not configure manually!"};

◆ m_matchedTruthJetDR_recoKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_matchedTruthJetDR_recoKey { this, "MatchedTruthJetDR_RecoKey", "", "Do not configure manually!" }
protected

Definition at line 156 of file JetTruthLabelingTool.h.

156{ this, "MatchedTruthJetDR_RecoKey", "", "Do not configure manually!" };

◆ m_matchedTruthJetEta_recoKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_matchedTruthJetEta_recoKey { this, "MatchedTruthJetEta_RecoKey", "", "Do not configure manually!" }
protected

Definition at line 154 of file JetTruthLabelingTool.h.

154{ this, "MatchedTruthJetEta_RecoKey", "", "Do not configure manually!" };

◆ m_matchedTruthJetGF_recoKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_matchedTruthJetGF_recoKey { this, "MatchedTruthJetGF_RecoKey", "", "Do not configure manually!" }
protected

Definition at line 157 of file JetTruthLabelingTool.h.

157{ this, "MatchedTruthJetGF_RecoKey", "", "Do not configure manually!" };

◆ m_matchedTruthJetMass_recoKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_matchedTruthJetMass_recoKey {this, "MatchedTruthJetMass_RecoKey", "", "Do not configure manually!"}
protected

Definition at line 152 of file JetTruthLabelingTool.h.

152{this, "MatchedTruthJetMass_RecoKey", "", "Do not configure manually!"};

◆ m_matchedTruthJetPhi_recoKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_matchedTruthJetPhi_recoKey { this, "MatchedTruthJetPhi_RecoKey", "", "Do not configure manually!" }
protected

Definition at line 155 of file JetTruthLabelingTool.h.

155{ this, "MatchedTruthJetPhi_RecoKey", "", "Do not configure manually!" };

◆ m_matchedTruthJetPt_recoKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_matchedTruthJetPt_recoKey {this, "MatchedTruthJetPt_RecoKey", "", "Do not configure manually!"}
protected

Definition at line 153 of file JetTruthLabelingTool.h.

153{this, "MatchedTruthJetPt_RecoKey", "", "Do not configure manually!"};

◆ m_matchUngroomedParent

bool JetTruthLabelingTool::m_matchUngroomedParent {}
protected

Use ghost association to match reco to truth jets, dR otherwise.

Definition at line 61 of file JetTruthLabelingTool.h.

61{};

◆ m_mLowTop

double JetTruthLabelingTool::m_mLowTop {}
protected

Ghost pT fraction to match truth jet to reco jet.

Definition at line 65 of file JetTruthLabelingTool.h.

65{};

◆ m_mLowW

double JetTruthLabelingTool::m_mLowW {}
protected

Lower mass cut for top label.

Definition at line 66 of file JetTruthLabelingTool.h.

66{};

◆ m_mLowZ

double JetTruthLabelingTool::m_mLowZ {}
protected

Lower mass cut for W label.

Definition at line 67 of file JetTruthLabelingTool.h.

67{};

◆ m_NB_recoKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_NB_recoKey {this, "NB_RecoKey", "", "Do not configure manually!"}
protected

Definition at line 147 of file JetTruthLabelingTool.h.

147{this, "NB_RecoKey", "", "Do not configure manually!"};

◆ m_NB_truthKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_NB_truthKey {this, "NB_TruthKey", "", "Do not configure manually!"}
protected

Definition at line 142 of file JetTruthLabelingTool.h.

142{this, "NB_TruthKey", "", "Do not configure manually!"};

◆ m_recoGhostFrac

double JetTruthLabelingTool::m_recoGhostFrac {}
protected

dR to match truth jet to reco jet

Definition at line 64 of file JetTruthLabelingTool.h.

64{};

◆ m_split12_truthKey

SG::ReadDecorHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_split12_truthKey {this, "Split12_TruthKey", "", "Do not configure manually!"}
protected

Definition at line 143 of file JetTruthLabelingTool.h.

143{this, "Split12_TruthKey", "", "Do not configure manually!"};

◆ m_split23_truthKey

SG::ReadDecorHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_split23_truthKey {this, "Split23_TruthKey", "", "Do not configure manually!"}
protected

Definition at line 144 of file JetTruthLabelingTool.h.

144{this, "Split23_TruthKey", "", "Do not configure manually!"};

◆ m_truthGroomedJetCollectionKey

SG::ReadHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_truthGroomedJetCollectionKey {this, "TruthGroomedJetContainer", "", "Do not configure manually!"}
protected

Definition at line 59 of file JetTruthLabelingTool.h.

59{this, "TruthGroomedJetContainer", "", "Do not configure manually!"};

◆ m_truthJetCollectionKey

SG::ReadHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_truthJetCollectionKey {this, "TruthJetContainer", "", "Do not configure manually!"}
protected

parameters for truth labeling

Definition at line 58 of file JetTruthLabelingTool.h.

58{this, "TruthJetContainer", "", "Do not configure manually!"};

◆ m_truthLabelConfig

TruthLabelConfiguration JetTruthLabelingTool::m_truthLabelConfig = TruthLabelConfiguration::Unknown
protected

Definition at line 139 of file JetTruthLabelingTool.h.

◆ m_truthLabelName

Gaudi::Property<std::string> JetTruthLabelingTool::m_truthLabelName {this, "TruthLabelName", "R10TruthLabel_R22v1", "Truth label name"}
protected

Definition at line 50 of file JetTruthLabelingTool.h.

50{this, "TruthLabelName", "R10TruthLabel_R22v1", "Truth label name"};

◆ m_truthSplit12_recoKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_truthSplit12_recoKey {this, "TruthSplit12_RecoKey", "", "Do not configure manually!"}
protected

Definition at line 148 of file JetTruthLabelingTool.h.

148{this, "TruthSplit12_RecoKey", "", "Do not configure manually!"};

◆ m_truthSplit23_recoKey

SG::WriteDecorHandleKey<xAOD::JetContainer> JetTruthLabelingTool::m_truthSplit23_recoKey {this, "TruthSplit23_RecoKey", "", "Do not configure manually!"}
protected

Definition at line 149 of file JetTruthLabelingTool.h.

149{this, "TruthSplit23_RecoKey", "", "Do not configure manually!"};

◆ m_useGhostJetMatch

bool JetTruthLabelingTool::m_useGhostJetMatch {}
protected

Definition at line 60 of file JetTruthLabelingTool.h.

60{};

◆ 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: