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

#include <EnergyCorrelatorGeneralizedRatiosTool.h>

Inheritance diagram for EnergyCorrelatorGeneralizedRatiosTool:
Collaboration diagram for EnergyCorrelatorGeneralizedRatiosTool:

Classes

struct  moments_t

Public Member Functions

 EnergyCorrelatorGeneralizedRatiosTool (const std::string &name)
 Constructor.
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function.
int modifyJet (xAOD::Jet &jet) const override
 Modify a single jet. This is obsolete and set to be removed.
virtual StatusCode modify (xAOD::JetContainer &jets) const
 Loop over calls to modifyJet.
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

bool SetupDecoration (fastjet::PseudoJet &pseudojet, const xAOD::Jet &jet, bool requireJetStructure=false) const
bool checkForConstituents (const xAOD::Jet &jet) const
fastjet::PseudoJet buildPseudoJet (const xAOD::Jet &jet, bool requireJetStructure=false) const
fastjet::PseudoJet buildPseudoJet (const std::vector< const xAOD::IParticle * > &iparticles) const
virtual void print () const
 Print the state of the tool.
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::string m_inputContainer
std::string m_prefix

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

bool m_doM3
 Configurable as properties.
bool m_doN3
bool m_doLSeries
std::vector< float > m_rawBetaVals
bool m_doDichroic
 Vector of input values before cleaning.
std::map< float, moments_tm_moments
 Map of moment accessors and decorators using beta as the key.
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > m_acc_ECFG_2_1_2
 ConstAccessors for L-series ECFs.
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > m_acc_ECFG_3_1_1
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > m_acc_ECFG_3_2_1
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > m_acc_ECFG_3_2_2
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > m_acc_ECFG_3_3_1
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > m_acc_ECFG_4_2_2
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > m_acc_ECFG_4_4_1
std::unique_ptr< SG::AuxElement::Decorator< float > > m_dec_L1
 Decorator for L-series ECFRs.
std::unique_ptr< SG::AuxElement::Decorator< float > > m_dec_L2
std::unique_ptr< SG::AuxElement::Decorator< float > > m_dec_L3
std::unique_ptr< SG::AuxElement::Decorator< float > > m_dec_L4
std::unique_ptr< SG::AuxElement::Decorator< float > > m_dec_L5
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


The default behavior of this tool is to use beta = 1.0, but multiple values of beta can be used simultaneously. The property BetaList should be passed a list of floats. Values of < 0 or > 10 may result in problematic output variable names and all values will be rounded to the nearest 0.1. No suffix will be added to the outputs for beta = 1.0 and for other values a suffix of _BetaN will be added where N = int(10*beta).

The DoDichroic option adds dichroic energy correlator ratios described

on page 120 in https://arxiv.org/abs/1803.07977

Definition at line 25 of file EnergyCorrelatorGeneralizedRatiosTool.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

◆ EnergyCorrelatorGeneralizedRatiosTool()

EnergyCorrelatorGeneralizedRatiosTool::EnergyCorrelatorGeneralizedRatiosTool ( const std::string & name)

Constructor.

Definition at line 8 of file EnergyCorrelatorGeneralizedRatiosTool.cxx.

Member Function Documentation

◆ buildPseudoJet() [1/2]

fastjet::PseudoJet JetSubStructureMomentToolsBase::buildPseudoJet ( const std::vector< const xAOD::IParticle * > & iparticles) const
protectedinherited

Definition at line 59 of file JetSubStructureMomentToolsBase.cxx.

59 {
60 std::vector<fastjet::PseudoJet> pjs;
61 pjs.reserve(iparticles.size());
62 for (const auto *iparticle : iparticles)
63 pjs.emplace_back(iparticle->p4());
64 return fastjet::join(pjs);
65}

◆ buildPseudoJet() [2/2]

fastjet::PseudoJet JetSubStructureMomentToolsBase::buildPseudoJet ( const xAOD::Jet & jet,
bool requireJetStructure = false ) const
protectedinherited

Definition at line 54 of file JetSubStructureMomentToolsBase.cxx.

54 {
55 std::vector<fastjet::PseudoJet> constit_pseudojets = jet::JetConstituentFiller::constituentPseudoJets(jet,true,requireJetStructure);
56 return fastjet::join(constit_pseudojets);
57}
static PseudoJetVector constituentPseudoJets(const xAOD::Jet &jet, bool ignoreGhosts=true, bool requireJetStructure=false)
Returns the jet's constituents as a vector of PseudoJet if ignoreGhosts==true, ghost constituents are...

◆ checkForConstituents()

bool JetSubStructureMomentToolsBase::checkForConstituents ( const xAOD::Jet & jet) const
inlineprotectedinherited

Definition at line 33 of file JetSubStructureMomentToolsBase.h.

33 {
34 if(jet.numConstituents() == 0) {
35 ATH_MSG_WARNING("Attempting to use a substructure tool on a jet that has no constituent");
36 return false;
37 } else {
38 return true;
39 }
40 }
#define ATH_MSG_WARNING(x)
size_t numConstituents() const
Number of constituents in this jets (this is valid even when reading a file where the constituents ha...
Definition Jet_v1.cxx:153

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

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

◆ 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::TEvent 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::TEvent, 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()

◆ 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::TEvent 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::TEvent, 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 }

◆ getProperty()

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

Get one of the tool's properties.

◆ initialize()

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

Call base class initialize to fix up m_prefix

Add beta = 1.0 by default

Clean up input list of beta values

Round to the nearest 0.1

Skip negative values of beta

Store value. std::map::emplace prevents duplicate entries

Print out list of beta values to debug stream

Initialize accessors for L-series

Initialize decorators for L-series

Reimplemented from asg::AsgTool.

Definition at line 18 of file EnergyCorrelatorGeneralizedRatiosTool.cxx.

18 {
19
22
24 m_moments.emplace( 1.0, moments_t(1.0, m_prefix) );
25
27 for( float beta : m_rawBetaVals ) {
28
30 float betaFix = round( beta * 10.0 ) / 10.0;
31 if( std::abs(beta-betaFix) > 1.0e-5 ) ATH_MSG_DEBUG( "beta = " << beta << " has been rounded to " << betaFix );
32
34 if( betaFix < 0.0 ) {
35 ATH_MSG_WARNING( "beta must be positive. Skipping beta = " << beta );
36 continue;
37 }
38
40 m_moments.emplace( betaFix, moments_t(betaFix, m_prefix) );
41
42 }
43
45 for( auto const& moment : m_moments ) {
46 ATH_MSG_DEBUG( "Including beta = " << moment.first );
47 }
48
50 m_acc_ECFG_2_1_2 = std::make_unique< SG::AuxElement::Accessor<float> >(m_prefix+"ECFG_2_1_2");
51 m_acc_ECFG_3_1_1 = std::make_unique< SG::AuxElement::Accessor<float> >(m_prefix+"ECFG_3_1_1");
52 m_acc_ECFG_3_2_1 = std::make_unique< SG::AuxElement::Accessor<float> >(m_prefix+"ECFG_3_2_1");
53 m_acc_ECFG_3_2_2 = std::make_unique< SG::AuxElement::Accessor<float> >(m_prefix+"ECFG_3_2_2");
54 m_acc_ECFG_3_3_1 = std::make_unique< SG::AuxElement::Accessor<float> >(m_prefix+"ECFG_3_3_1");
55 m_acc_ECFG_4_2_2 = std::make_unique< SG::AuxElement::Accessor<float> >(m_prefix+"ECFG_4_2_2");
56 m_acc_ECFG_4_4_1 = std::make_unique< SG::AuxElement::Accessor<float> >(m_prefix+"ECFG_4_4_1");
57
59 m_dec_L1 = std::make_unique< SG::AuxElement::Decorator<float> >(m_prefix+"L1");
60 m_dec_L2 = std::make_unique< SG::AuxElement::Decorator<float> >(m_prefix+"L2");
61 m_dec_L3 = std::make_unique< SG::AuxElement::Decorator<float> >(m_prefix+"L3");
62 m_dec_L4 = std::make_unique< SG::AuxElement::Decorator<float> >(m_prefix+"L4");
63 m_dec_L5 = std::make_unique< SG::AuxElement::Decorator<float> >(m_prefix+"L5");
64
65 return StatusCode::SUCCESS;
66
67}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
std::unique_ptr< SG::AuxElement::Decorator< float > > m_dec_L5
std::unique_ptr< SG::AuxElement::Decorator< float > > m_dec_L2
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > m_acc_ECFG_3_3_1
std::unique_ptr< SG::AuxElement::Decorator< float > > m_dec_L1
Decorator for L-series ECFRs.
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > m_acc_ECFG_4_2_2
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > m_acc_ECFG_3_2_1
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > m_acc_ECFG_4_4_1
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > m_acc_ECFG_3_2_2
std::unique_ptr< SG::AuxElement::Decorator< float > > m_dec_L4
std::unique_ptr< SG::AuxElement::Decorator< float > > m_dec_L3
std::map< float, moments_t > m_moments
Map of moment accessors and decorators using beta as the key.
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > m_acc_ECFG_2_1_2
ConstAccessors for L-series ECFs.
std::unique_ptr< SG::AuxElement::ConstAccessor< float > > m_acc_ECFG_3_1_1
StatusCode initialize()
Dummy implementation of the initialisation function.
float round(const float toRound, const unsigned int decimals)
Definition Mdt.cxx:27

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

◆ modify()

StatusCode JetModifierBase::modify ( xAOD::JetContainer & jets) const
virtualinherited

Loop over calls to modifyJet.

Implements IJetModifier.

Reimplemented in CenterOfMassShapesTool, EnergyCorrelatorGeneralizedTool, EnergyCorrelatorTool, HIJetClusterIndexAssociationTool, HIJetConstituentSubtractionTool, HIJetDiscriminatorTool, HIJetDRAssociationTool, KTSplittingScaleTool, NSubjettinessTool, and QwTool.

Definition at line 19 of file JetModifierBase.cxx.

19 {
20 for ( xAOD::JetContainer::iterator ijet=jets.begin(); ijet!=jets.end(); ++ijet) {
21 modifyJet(**ijet);
22 }
23 return StatusCode::SUCCESS;
24}
DataModel_detail::iterator< DataVector > iterator
Definition DataVector.h:842
virtual int modifyJet(xAOD::Jet &jet) const
Modify a single jet. This is obsolete and set to be removed.

◆ modifyJet()

int EnergyCorrelatorGeneralizedRatiosTool::modifyJet ( xAOD::Jet & jet) const
overridevirtual

Modify a single jet. This is obsolete and set to be removed.

Check to make sure all of the necessary ECFG decorations are available

M2

Prevent div-0

M3

Prevent div-0

N2

Prevent div-0

N3

Prevent div-0


L-series ECFG ratios (experimental for ttH t/H discrimination)

The exponents E are determined in order to make the ratios dimensionless

E = (a*n) / (b*m) for an ECFG_X_Y_Z, a=Y, n=Z

e.g. for L1 ecfg_3_3_1 / ecfg_2_1_2

E = (3*1) / (1*2) = 3./2.

Prevent div-0

Prevent div-0

Prevent div-0

Reimplemented from JetModifierBase.

Definition at line 69 of file EnergyCorrelatorGeneralizedRatiosTool.cxx.

69 {
70
71 for( auto const& moment : m_moments ) {
72
73 std::string suffix = moment.second.suffix;
74
76 if( !moment.second.acc_ECFG_2_1->isAvailable(jet) ) {
77 ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECFG_2_1" << suffix << "' is not available. Exiting." );
78 return 1;
79 }
80
81 if( !moment.second.acc_ECFG_3_2->isAvailable(jet) ) {
82 ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECFG_3_2" << suffix << "' is not available. Exiting." );
83 return 1;
84 }
85
86 if( m_doM3 || m_doN3 ) {
87 if( !moment.second.acc_ECFG_3_1->isAvailable(jet) ) {
88 ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECFG_3_1" << suffix << "' is not available. Exiting." );
89 return 1;
90 }
91 }
92
93 if( m_doM3 ) {
94 if( !moment.second.acc_ECFG_4_1->isAvailable(jet) ) {
95 ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECFG_4_1" << suffix << "' is not available. Exiting." );
96 return 1;
97 }
98 }
99
100 if( m_doN3 ) {
101 if( !moment.second.acc_ECFG_4_2->isAvailable(jet) ) {
102 ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECFG_4_2" << suffix << "' is not available. Exiting." );
103 return 1;
104 }
105 }
106
107 if( m_doDichroic ) {
108 if( !moment.second.acc_ECFG_2_1_ungroomed->isAvailable(jet) ) {
109 ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECFG_2_1_ungroomed" << suffix << "' is not available. Exiting." );
110 return 1;
111 }
112
113 if( !moment.second.acc_ECFG_3_1_ungroomed->isAvailable(jet) ) {
114 ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECFG_3_1_ungroomed" << suffix << "' is not available. Exiting." );
115 return 1;
116 }
117
118 if( !moment.second.acc_ECFG_3_2_ungroomed->isAvailable(jet) ) {
119 ATH_MSG_WARNING( "Energy correlation function " << m_prefix << "ECFG_3_2_ungroomed" << suffix << "' is not available. Exiting." );
120 return 1;
121 }
122 }
123
124 float ecfg_2_1 = (*moment.second.acc_ECFG_2_1)(jet);
125 float ecfg_3_1 = (*moment.second.acc_ECFG_3_1)(jet);
126 float ecfg_3_2 = (*moment.second.acc_ECFG_3_2)(jet);
127 float ecfg_4_1 = (*moment.second.acc_ECFG_4_2)(jet);
128 float ecfg_4_2 = (*moment.second.acc_ECFG_4_2)(jet);
129
130 float ecfg_2_1_ungroomed = -999.0;
131 float ecfg_3_1_ungroomed = -999.0;
132 float ecfg_3_2_ungroomed = -999.0;
133
134 if( m_doDichroic ) {
135 ecfg_2_1_ungroomed = (*moment.second.acc_ECFG_2_1_ungroomed)(jet);
136 ecfg_3_1_ungroomed = (*moment.second.acc_ECFG_3_1_ungroomed)(jet);
137 ecfg_3_2_ungroomed = (*moment.second.acc_ECFG_3_2_ungroomed)(jet);
138 }
139
140 float M2 = -999.0;
141 float M3 = -999.0;
142
143 float N2 = -999.0;
144 float N3 = -999.0;
145
146 float M2_dichroic = -999.0;
147 float N2_dichroic = -999.0;
148
150 if( ecfg_2_1 > 1e-8 )
151 {
152
153 M2 = ecfg_3_1 / ecfg_2_1;
154
155 if( ecfg_3_1_ungroomed > 1e-8 )
156 {
157 M2_dichroic = ecfg_3_1_ungroomed / ecfg_2_1;
158 }
159
160 }
161
163 if( m_doM3 && ecfg_3_1 > 1e-8 )
164 {
165 M3 = ecfg_4_1 / ecfg_3_1;
166 }
167
169 if( ecfg_2_1 > 1e-8 )
170 {
171
172 N2 = ecfg_3_2 / pow( ecfg_2_1, 2.0 );
173
174 if( ecfg_3_2_ungroomed > 1e-8 && ecfg_2_1_ungroomed > 1e-8 )
175 {
176 N2_dichroic = ecfg_3_2_ungroomed / ( ecfg_2_1_ungroomed * ecfg_2_1 );
177 }
178
179 }
180
182 if( m_doN3 && ecfg_3_1 > 1e-8 )
183 {
184 N3 = ecfg_4_2 / pow( ecfg_3_1, 2.0 );
185 }
186
187 (*moment.second.dec_M2)(jet) = M2;
188 (*moment.second.dec_M3)(jet) = M3;
189
190 (*moment.second.dec_N2)(jet) = N2;
191 (*moment.second.dec_N3)(jet) = N3;
192
193 (*moment.second.dec_M2_dichroic)(jet) = M2_dichroic;
194 (*moment.second.dec_N2_dichroic)(jet) = N2_dichroic;
195
196 }
197
212
213 float L1 = -999.0;
214 float L2 = -999.0;
215 float L3 = -999.0;
216 float L4 = -999.0;
217 float L5 = -999.0;
218
219 if( m_doLSeries ) {
220
221 if( !m_acc_ECFG_2_1_2->isAvailable(jet) ||
222 !m_acc_ECFG_3_1_1->isAvailable(jet) ||
223 !m_acc_ECFG_3_2_1->isAvailable(jet) ||
224 !m_acc_ECFG_3_2_2->isAvailable(jet) ||
225 !m_acc_ECFG_3_3_1->isAvailable(jet) ||
226 !m_acc_ECFG_4_2_2->isAvailable(jet) ||
227 !m_acc_ECFG_4_4_1->isAvailable(jet) ) {
228 ATH_MSG_WARNING("L series energy correlation functions with prefix '" << m_prefix << "' are not all available. Exiting..");
229 return 1;
230 }
231
232 float ecfg_2_1_2 = (*m_acc_ECFG_2_1_2)(jet);
233 float ecfg_3_1_1 = (*m_acc_ECFG_3_1_1)(jet);
234 float ecfg_3_2_1 = (*m_acc_ECFG_3_2_1)(jet);
235 float ecfg_3_2_2 = (*m_acc_ECFG_3_2_2)(jet);
236 float ecfg_3_3_1 = (*m_acc_ECFG_3_3_1)(jet);
237 float ecfg_4_2_2 = (*m_acc_ECFG_4_2_2)(jet);
238 float ecfg_4_4_1 = (*m_acc_ECFG_4_4_1)(jet);
239
240 if( ecfg_2_1_2 > 1e-8 )
241 {
242 L1 = ecfg_3_2_1 / pow( ecfg_2_1_2, 1.0 );
243 L2 = ecfg_3_3_1 / pow( ecfg_2_1_2, (3.0/2.0) );
244 }
245
246 if( ecfg_3_3_1 > 1e-8 )
247 {
248 L3 = ecfg_3_1_1 / pow( ecfg_3_3_1, (1.0/3.0) );
249 L4 = ecfg_3_2_2 / pow( ecfg_3_3_1, (4.0/3.0) );
250 }
251
252 if( ecfg_4_4_1 > 1e-8 )
253 {
254 L5 = ecfg_4_2_2 / pow( ecfg_4_4_1, 1.0 );
255 }
256
257
258 }
259
260 (*m_dec_L1)(jet) = L1;
261 (*m_dec_L2)(jet) = L2;
262 (*m_dec_L3)(jet) = L3;
263 (*m_dec_L4)(jet) = L4;
264 (*m_dec_L5)(jet) = L5;
265
266 return 0;
267
268}
constexpr int pow(int base, int exp) noexcept

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

◆ print()

void JetSubStructureMomentToolsBase::print ( ) const
protectedvirtualinherited

Print the state of the tool.

Reimplemented from asg::AsgTool.

Reimplemented in KtDeltaRTool, and LundVariablesTool.

Definition at line 67 of file JetSubStructureMomentToolsBase.cxx.

67 {
68 ATH_MSG_INFO("Properties for JetSubStructureMomentTool " << name());
69 ATH_MSG_INFO("InputContainer: " << m_inputContainer);
70 ATH_MSG_INFO("Prefix: " << m_prefix);
71}
#define ATH_MSG_INFO(x)

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

◆ SetupDecoration()

bool JetSubStructureMomentToolsBase::SetupDecoration ( fastjet::PseudoJet & pseudojet,
const xAOD::Jet & jet,
bool requireJetStructure = false ) const
protectedinherited

Definition at line 30 of file JetSubStructureMomentToolsBase.cxx.

30 {
31
32 bool decorate = true;
33
34 if (m_inputContainer.empty()) {
35 if (!checkForConstituents(jet))
36 decorate = false;
37 else pseudojet = buildPseudoJet(jet, requireJetStructure);
38 }
39 else {
40 std::vector<const xAOD::IParticle*> AssociatedParticles;
41 if (!(jet.getAssociatedObjects(m_inputContainer,AssociatedParticles))){
42 ATH_MSG_WARNING("InputContainer " << m_inputContainer << " unknown. Exiting..");
43 decorate = false;
44 }
45 ATH_MSG_VERBOSE("Found " << AssociatedParticles.size() << " associated particles");
46 if(AssociatedParticles.empty()) decorate = false;
47 else pseudojet = buildPseudoJet(AssociatedParticles);
48 }
49
50 return decorate;
51}
#define ATH_MSG_VERBOSE(x)
fastjet::PseudoJet buildPseudoJet(const xAOD::Jet &jet, bool requireJetStructure=false) const
bool checkForConstituents(const xAOD::Jet &jet) const
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...
decorate(hto4l_controller, decorator, **kwargs)

◆ 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

Member Data Documentation

◆ m_acc_ECFG_2_1_2

std::unique_ptr< SG::AuxElement::ConstAccessor<float> > EnergyCorrelatorGeneralizedRatiosTool::m_acc_ECFG_2_1_2
private

ConstAccessors for L-series ECFs.

Definition at line 54 of file EnergyCorrelatorGeneralizedRatiosTool.h.

◆ m_acc_ECFG_3_1_1

std::unique_ptr< SG::AuxElement::ConstAccessor<float> > EnergyCorrelatorGeneralizedRatiosTool::m_acc_ECFG_3_1_1
private

Definition at line 55 of file EnergyCorrelatorGeneralizedRatiosTool.h.

◆ m_acc_ECFG_3_2_1

std::unique_ptr< SG::AuxElement::ConstAccessor<float> > EnergyCorrelatorGeneralizedRatiosTool::m_acc_ECFG_3_2_1
private

Definition at line 56 of file EnergyCorrelatorGeneralizedRatiosTool.h.

◆ m_acc_ECFG_3_2_2

std::unique_ptr< SG::AuxElement::ConstAccessor<float> > EnergyCorrelatorGeneralizedRatiosTool::m_acc_ECFG_3_2_2
private

Definition at line 57 of file EnergyCorrelatorGeneralizedRatiosTool.h.

◆ m_acc_ECFG_3_3_1

std::unique_ptr< SG::AuxElement::ConstAccessor<float> > EnergyCorrelatorGeneralizedRatiosTool::m_acc_ECFG_3_3_1
private

Definition at line 58 of file EnergyCorrelatorGeneralizedRatiosTool.h.

◆ m_acc_ECFG_4_2_2

std::unique_ptr< SG::AuxElement::ConstAccessor<float> > EnergyCorrelatorGeneralizedRatiosTool::m_acc_ECFG_4_2_2
private

Definition at line 59 of file EnergyCorrelatorGeneralizedRatiosTool.h.

◆ m_acc_ECFG_4_4_1

std::unique_ptr< SG::AuxElement::ConstAccessor<float> > EnergyCorrelatorGeneralizedRatiosTool::m_acc_ECFG_4_4_1
private

Definition at line 60 of file EnergyCorrelatorGeneralizedRatiosTool.h.

◆ m_dec_L1

std::unique_ptr< SG::AuxElement::Decorator<float> > EnergyCorrelatorGeneralizedRatiosTool::m_dec_L1
private

Decorator for L-series ECFRs.

Definition at line 63 of file EnergyCorrelatorGeneralizedRatiosTool.h.

◆ m_dec_L2

std::unique_ptr< SG::AuxElement::Decorator<float> > EnergyCorrelatorGeneralizedRatiosTool::m_dec_L2
private

Definition at line 64 of file EnergyCorrelatorGeneralizedRatiosTool.h.

◆ m_dec_L3

std::unique_ptr< SG::AuxElement::Decorator<float> > EnergyCorrelatorGeneralizedRatiosTool::m_dec_L3
private

Definition at line 65 of file EnergyCorrelatorGeneralizedRatiosTool.h.

◆ m_dec_L4

std::unique_ptr< SG::AuxElement::Decorator<float> > EnergyCorrelatorGeneralizedRatiosTool::m_dec_L4
private

Definition at line 66 of file EnergyCorrelatorGeneralizedRatiosTool.h.

◆ m_dec_L5

std::unique_ptr< SG::AuxElement::Decorator<float> > EnergyCorrelatorGeneralizedRatiosTool::m_dec_L5
private

Definition at line 67 of file EnergyCorrelatorGeneralizedRatiosTool.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_doDichroic

bool EnergyCorrelatorGeneralizedRatiosTool::m_doDichroic
private

Vector of input values before cleaning.

Definition at line 48 of file EnergyCorrelatorGeneralizedRatiosTool.h.

◆ m_doLSeries

bool EnergyCorrelatorGeneralizedRatiosTool::m_doLSeries
private

Definition at line 46 of file EnergyCorrelatorGeneralizedRatiosTool.h.

◆ m_doM3

bool EnergyCorrelatorGeneralizedRatiosTool::m_doM3
private

Configurable as properties.

Definition at line 44 of file EnergyCorrelatorGeneralizedRatiosTool.h.

◆ m_doN3

bool EnergyCorrelatorGeneralizedRatiosTool::m_doN3
private

Definition at line 45 of file EnergyCorrelatorGeneralizedRatiosTool.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_inputContainer

std::string JetSubStructureMomentToolsBase::m_inputContainer
protectedinherited

Definition at line 29 of file JetSubStructureMomentToolsBase.h.

◆ m_moments

std::map< float, moments_t > EnergyCorrelatorGeneralizedRatiosTool::m_moments
private

Map of moment accessors and decorators using beta as the key.

Definition at line 51 of file EnergyCorrelatorGeneralizedRatiosTool.h.

◆ m_prefix

std::string JetSubStructureMomentToolsBase::m_prefix
protectedinherited

Definition at line 30 of file JetSubStructureMomentToolsBase.h.

◆ m_rawBetaVals

std::vector<float> EnergyCorrelatorGeneralizedRatiosTool::m_rawBetaVals
private

Definition at line 47 of file EnergyCorrelatorGeneralizedRatiosTool.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: