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

#include <JetReclusteringTool.h>

Inheritance diagram for JetReclusteringTool:

Public Member Functions

 JetReclusteringTool (const std::string &myname)
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function.
virtual int execute () const override
 Method to be called for each event.
virtual void print () const override
 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
virtual int inputContainerNames (std::vector< std::string > &connames)
 Method to return the list of input containers.
virtual int outputContainerNames (std::vector< std::string > &connames)
 Method to return the list of output containers.
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

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.

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

std::string m_APP_NAME = "JetReclusteringTool"
std::string m_inputJetContainer
std::string m_outputJetContainer
float m_radius
std::string m_rc_alg
float m_varR_minR
float m_varR_mass
float m_ptMin_input
float m_ptMin_rc
float m_ptFrac
float m_subjet_radius
bool m_doArea
std::string m_areaAttributes
bool m_isInitialized = false
asg::AnaToolHandle< IJetModifierm_jetFilterTool
asg::AnaToolHandle< IJetExecuteToolm_inputJetFilterTool
asg::AnaToolHandle< IPseudoJetGetterm_pseudoJetGetterTool
asg::AnaToolHandle< IJetFromPseudojetm_jetFromPseudoJetTool
asg::AnaToolHandle< IJetFinderm_jetFinderTool
asg::AnaToolHandle< IJetExecuteToolm_reclusterJetTool
asg::AnaToolHandle< IJetExecuteToolm_trimJetTool
asg::AnaToolHandle< IJetModifierm_effectiveRTool
asg::AnaToolHandle< IJetGroomerm_jetTrimmingTool
asg::AnaToolHandle< IJetPseudojetRetrieverm_jetTrimmingTool_JPJR
asg::AnaToolHandle< IJetModifierm_jetChargeTool
asg::AnaToolHandle< IJetModifierm_jetPullTool
asg::AnaToolHandle< IJetModifierm_energyCorrelatorTool
asg::AnaToolHandle< IJetModifierm_energyCorrelatorRatiosTool
asg::AnaToolHandle< IJetModifierm_ktSplittingScaleTool
asg::AnaToolHandle< IJetModifierm_dipolarityTool
asg::AnaToolHandle< IJetModifierm_centerOfMassShapesTool
asg::AnaToolHandle< IJetModifierm_nSubjettinessTool
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 33 of file JetReclusteringTool.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

◆ JetReclusteringTool()

JetReclusteringTool::JetReclusteringTool ( const std::string & myname)

Definition at line 37 of file JetReclusteringTool.cxx.

37 :
38 AsgTool(name),
39 m_jetFilterTool("JetFilterTool/JetFilterTool_" + this->name()),
40 m_inputJetFilterTool("JetRecTool/JetRec_InputJetFilterTool_" + this->name()),
41 m_pseudoJetGetterTool("PseudoJetGetter/PseudoJetGetterTool_" + this->name()),
42 m_jetFromPseudoJetTool("JetFromPseudojet/JetFromPseudoJetTool_" + this->name()),
43 m_jetFinderTool("JetFinder/JetFinderTool_" + this->name()),
44 m_reclusterJetTool("JetRecTool/JetRec_JetReclusterTool_" + this->name()),
45 m_trimJetTool("JetRecTool/JetRec_JetTrimTool_" + this->name()),
46 m_effectiveRTool("EffectiveRTool/EffectiveRTool"),
47 m_jetTrimmingTool("JetTrimmer/JetTrimmerTool_" + this->name()),
48 m_jetTrimmingTool_JPJR("JetPseudojetRetriever/JetRec_JetTrimTool_JPJR_" + this->name()),
49 m_jetChargeTool("JetChargeTool/JetChargeTool_" + this->name()),
50 m_jetPullTool("JetPullTool/JetPullTool_" + this->name()),
51 m_energyCorrelatorTool("EnergyCorrelatorTool/EnergyCorrelatorTool_" + this->name()),
52 m_energyCorrelatorRatiosTool("EnergyCorrelatorRatiosTool/EnergyCorrelatorRatiosTool_" + this->name()),
53 m_ktSplittingScaleTool("KTSplittingScaleTool/KTSplittingScaleTool_" + this->name()),
54 m_dipolarityTool("DipolarityTool/DipolarityTool_" + this->name()),
55 m_centerOfMassShapesTool("CenterOfMassShapesTool/CenterOfMassShapesTool_" + this->name()),
56 m_nSubjettinessTool("NSubjettinessTool/NSubjettinessTool_" + this->name())
57{
58
59
60 declareProperty("InputJetContainer", m_inputJetContainer = "");
61 declareProperty("OutputJetContainer", m_outputJetContainer = "");
62 declareProperty("ReclusterRadius", m_radius = 1.0);
63 declareProperty("ReclusterAlgorithm", m_rc_alg = "AntiKt");
64 declareProperty("VariableRMinRadius", m_varR_minR =-1.0);
65 declareProperty("VariableRMassScale", m_varR_mass =-1.0);
66 declareProperty("InputJetPtMin", m_ptMin_input = 25.0);
67 declareProperty("RCJetPtMin", m_ptMin_rc = 50.0);
68 declareProperty("RCJetPtFrac", m_ptFrac = 0.05);
69 declareProperty("RCJetSubjetRadius", m_subjet_radius = 0.2);
70 declareProperty("DoArea", m_doArea = false);
71 declareProperty("AreaAttributes", m_areaAttributes = "ActiveArea ActiveArea4vec");
72
73}
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
asg::AnaToolHandle< IJetModifier > m_centerOfMassShapesTool
asg::AnaToolHandle< IJetExecuteTool > m_inputJetFilterTool
asg::AnaToolHandle< IJetModifier > m_nSubjettinessTool
asg::AnaToolHandle< IJetExecuteTool > m_reclusterJetTool
asg::AnaToolHandle< IPseudoJetGetter > m_pseudoJetGetterTool
asg::AnaToolHandle< IJetFinder > m_jetFinderTool
asg::AnaToolHandle< IJetFromPseudojet > m_jetFromPseudoJetTool
asg::AnaToolHandle< IJetModifier > m_jetFilterTool
asg::AnaToolHandle< IJetModifier > m_ktSplittingScaleTool
asg::AnaToolHandle< IJetExecuteTool > m_trimJetTool
asg::AnaToolHandle< IJetGroomer > m_jetTrimmingTool
asg::AnaToolHandle< IJetModifier > m_jetPullTool
asg::AnaToolHandle< IJetModifier > m_jetChargeTool
asg::AnaToolHandle< IJetModifier > m_effectiveRTool
asg::AnaToolHandle< IJetPseudojetRetriever > m_jetTrimmingTool_JPJR
asg::AnaToolHandle< IJetModifier > m_energyCorrelatorRatiosTool
asg::AnaToolHandle< IJetModifier > m_dipolarityTool
asg::AnaToolHandle< IJetModifier > m_energyCorrelatorTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition AsgTool.cxx:58

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 }

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

◆ execute()

int JetReclusteringTool::execute ( ) const
overridevirtual

Method to be called for each event.

Returns 0 for success.

Implements IJetExecuteTool.

Definition at line 256 of file JetReclusteringTool.cxx.

256 {
257 int retCode = 0;
258 if(m_ptMin_input > 0) {
259 if ( (retCode = m_inputJetFilterTool->execute() ) != 0) {
260 ATH_MSG_ERROR( "Failure in inputJetFilterTool with return code: " << retCode );
261 return retCode;
262 }
263 }
264 if ( (retCode = m_reclusterJetTool->execute() ) != 0) {
265 ATH_MSG_ERROR( "Failure in reclusterJetTool with return code: " << retCode );
266 return retCode;
267 }
268 if ( (retCode = m_trimJetTool->execute() ) != 0) {
269 ATH_MSG_ERROR( "Failure in trimJetTool with return code: " << retCode );
270 return retCode;
271 }
272 return 0;
273}
#define ATH_MSG_ERROR(x)

◆ 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 JetReclusteringTool::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 75 of file JetReclusteringTool.cxx.

75 {
77 ATH_MSG_WARNING(m_APP_NAME << " already initialized.");
78 return StatusCode::FAILURE;
79 }
80 ATH_MSG_INFO(m_APP_NAME << " initializing");
81 ATH_MSG_INFO( "Name is " << name());
82
83
84 ATH_MSG_INFO( "... with containers:" );
85 ATH_MSG_INFO( "\tInputJetContainer: " << m_inputJetContainer );
86 ATH_MSG_INFO( "\tOutputJetContainer: " << m_outputJetContainer );
87
88 // set to true, we're calling it now
89 m_isInitialized = true;
90
91 // set up some stuff to use within the initialize()
92 ToolHandleArray<IJetModifier> modArray;
93 ToolHandleArray<IPseudoJetGetter> getterArray;
94
95 // this is for intermediate output containers used between tools
96 std::string filteredInputJetContainer(m_inputJetContainer);
97 if(m_ptMin_input > 0) filteredInputJetContainer = "Filtered_"+name();
98 std::string filteredInputPseudoJetsContainer = "PseudoJets_"+name();
99 std::string reclusteredJetsContainer = "ReclusteredJets_"+name();
100
101 if(m_ptMin_input > 0){
102 ATH_MSG_INFO( "Input Jet Filtering" );
103 ATH_MSG_INFO( "\tPtMin: " << m_ptMin_input*1.e3 << " GeV" );
104 /* initialize input jet filtering */
105 // - create a tool that will filter jets
106 ASG_CHECK( ASG_MAKE_ANA_TOOL( m_jetFilterTool, JetFilterTool) );
107 ASG_CHECK(m_jetFilterTool.setProperty("PtMin", m_ptMin_input*1.e3));
108 ASG_CHECK(m_jetFilterTool.setProperty("OutputLevel", msg().level() ) );
109 ASG_CHECK(m_jetFilterTool.retrieve() );
110 modArray.clear();
111 modArray.push_back(m_jetFilterTool.getHandle() );
112 ATH_CHECK(modArray.retrieve() );
113
114 // - create the master tool to filter the input jets
116 ASG_CHECK(m_inputJetFilterTool.setProperty("InputContainer", m_inputJetContainer));
117 ASG_CHECK(m_inputJetFilterTool.setProperty("OutputContainer", filteredInputJetContainer));
118 ASG_CHECK(m_inputJetFilterTool.setProperty("JetModifiers", modArray));
119 /* note: we cannot use shallow copies since we are removing elements from a
120 * container, we need a deep copy as linking will break */
121 ASG_CHECK(m_inputJetFilterTool.setProperty("ShallowCopy", false));
122 ASG_CHECK(m_inputJetFilterTool.setProperty("OutputLevel", msg().level() ) );
124 }
125
126 // only compute area if ptFrac = 0.0 and m_areaAttributes is specified
127 float ghostArea(0.0);
128 std::vector<std::string> areaAttributes;
129 if(m_doArea){
130 ATH_MSG_INFO( "Ghost Area Calculations:" );
131 ATH_MSG_INFO( "\tAreaAttributes: " << m_areaAttributes );
132 ghostArea = 0.01;
133 // split up the m_areaAttributes string specifying which attributes to record
134 std::string token;
135 std::istringstream ss(m_areaAttributes);
136 while(std::getline(ss, token, ' '))
137 areaAttributes.push_back(token);
138 }
139 /* initialize jet reclustering */
140 // - create a PseudoJet builder.
141 ATH_MSG_INFO( "PseudoJet Builder initializing..." );
142 m_pseudoJetGetterTool.setType ("PseudoJetGetter");
143 ASG_CHECK(m_pseudoJetGetterTool.setProperty("InputContainer", filteredInputJetContainer));
144 ASG_CHECK(m_pseudoJetGetterTool.setProperty("OutputContainer", filteredInputPseudoJetsContainer));
145 ASG_CHECK(m_pseudoJetGetterTool.setProperty("Label", "LCTopo"));
146 ASG_CHECK(m_pseudoJetGetterTool.setProperty("SkipNegativeEnergy", true));
147 ASG_CHECK(m_pseudoJetGetterTool.setProperty("GhostScale", 0.0));
148 ASG_CHECK(m_pseudoJetGetterTool.setProperty("OutputLevel", msg().level() ) );
150 getterArray.push_back(m_pseudoJetGetterTool.getHandle());
151 ATH_CHECK(getterArray.retrieve() );
152 // - create a Jet builder
153 ATH_MSG_INFO( "Jet Builder initializing..." );
154 m_jetFromPseudoJetTool.setType ("JetFromPseudojet");
155 ASG_CHECK(m_jetFromPseudoJetTool.setProperty("Attributes", areaAttributes));
156 ASG_CHECK(m_jetFromPseudoJetTool.setProperty("OutputLevel", msg().level() ) );
158 // - create a ClusterSequence Tool
159 ATH_MSG_INFO( "Cluster Sequencer initializing..." );
160 m_jetFinderTool.setType ("JetFinder");
161 ASG_CHECK(m_jetFinderTool.setProperty("JetAlgorithm", m_rc_alg));
162 ASG_CHECK(m_jetFinderTool.setProperty("JetRadius", m_radius));
163 ASG_CHECK(m_jetFinderTool.setProperty("VariableRMinRadius", m_varR_minR));
164 ASG_CHECK(m_jetFinderTool.setProperty("VariableRMassScale", m_varR_mass*1.e3));
165 ASG_CHECK(m_jetFinderTool.setProperty("PtMin", m_ptMin_rc*1.e3));
166 // set ghost area, ignore if trimming is being applied to reclustered jets
167 ASG_CHECK(m_jetFinderTool.setProperty("GhostArea", ghostArea));
168 ASG_CHECK(m_jetFinderTool.setProperty("RandomOption", 1));
169 ASG_CHECK(m_jetFinderTool.setProperty("JetBuilder", m_jetFromPseudoJetTool.getHandle()));
170 ASG_CHECK(m_jetFinderTool.setProperty("OutputLevel", msg().level() ) );
171 ASG_CHECK(m_jetFinderTool.retrieve());
172 // - create list of modifiers.
173 modArray.clear();
174 // we need to calculate effectiveR before trimming, if we are doing variableR
175 m_effectiveRTool.setType ("EffectiveRTool");
176 ATH_CHECK(m_effectiveRTool.retrieve());
177 modArray.push_back(m_effectiveRTool.getHandle() );
178 ATH_CHECK(modArray.retrieve() );
179 // - create our master reclustering tool
180 ATH_MSG_INFO( "Jet Reclusterer initializing..." );
181 m_reclusterJetTool.setType ("JetRecTool");
182 ASG_CHECK(m_reclusterJetTool.setProperty("OutputContainer", reclusteredJetsContainer));
183 ASG_CHECK(m_reclusterJetTool.setProperty("PseudoJetGetters", getterArray));
184 ASG_CHECK(m_reclusterJetTool.setProperty("JetFinder", m_jetFinderTool.getHandle()));
185 ASG_CHECK(m_reclusterJetTool.setProperty("JetModifiers", modArray));
186 ASG_CHECK(m_reclusterJetTool.setProperty("OutputLevel", msg().level() ) );
187 ASG_CHECK(m_reclusterJetTool.retrieve());
188
189 // clear modArray again
190 modArray.clear();
191 // then trim the reclustered jets
192 ATH_MSG_INFO( "Jet Trimmer initializing..." );
193 ATH_MSG_INFO( "\tPtFrac: " << m_ptFrac );
194 ATH_MSG_INFO( "\tRClus: " << m_subjet_radius );
195 m_jetTrimmingTool.setType ("JetTrimmer");
196 ASG_CHECK(m_jetTrimmingTool.setProperty("PtFrac", m_ptFrac));
197 ASG_CHECK(m_jetTrimmingTool.setProperty("RClus", m_subjet_radius));
198 ASG_CHECK(m_jetTrimmingTool.setProperty("JetBuilder", m_jetFromPseudoJetTool.getHandle()));
199 ASG_CHECK(m_jetTrimmingTool.setProperty("OutputLevel", msg().level() ) );
200 ASG_CHECK(m_jetTrimmingTool.retrieve() );
201
202 // because of changes to JetRec, can't rely on them making this tool for us anymore
203 ATH_MSG_INFO( "JetPseudojetRetriever initializing for Jet Trimmer..." );
204 m_jetTrimmingTool_JPJR.setType ("JetPseudojetRetriever");
206
207 // and then apply all other modifiers based on the trimmed reclustered jets
208 ATH_MSG_INFO( "\t... and queuing up various jet modifiers..." );
209
210 m_jetChargeTool.setType ("JetChargeTool");
211 ASG_CHECK(m_jetChargeTool.retrieve());
212 modArray.push_back(m_jetChargeTool.getHandle() );
213
214 m_jetPullTool.setType ("JetPullTool");
215 ASG_CHECK(m_jetPullTool.retrieve());
216 modArray.push_back(m_jetPullTool.getHandle() );
217
218 m_energyCorrelatorTool.setType ("EnergyCorrelatorTool");
220 modArray.push_back(m_energyCorrelatorTool.getHandle() );
221
222 m_energyCorrelatorRatiosTool.setType ("EnergyCorrelatorRatiosTool");
224 modArray.push_back(m_energyCorrelatorRatiosTool.getHandle() );
225
226 m_ktSplittingScaleTool.setType ("KTSplittingScaleTool");
228 modArray.push_back(m_ktSplittingScaleTool.getHandle() );
229
230 m_dipolarityTool.setType ("DipolarityTool");
231 ASG_CHECK(m_dipolarityTool.retrieve());
232 modArray.push_back(m_dipolarityTool.getHandle() );
233
234 m_centerOfMassShapesTool.setType ("CenterOfMassShapesTool");
236 modArray.push_back(m_centerOfMassShapesTool.getHandle() );
237
238 m_nSubjettinessTool.setType ("NSubjettinessTool");
239 ASG_CHECK(m_nSubjettinessTool.retrieve());
240 modArray.push_back(m_nSubjettinessTool.getHandle() );
241 ATH_CHECK(modArray.retrieve() );
242 // finish up the rest of the tool
243
244 m_trimJetTool.setType ("JetRecTool");
245 ASG_CHECK(m_trimJetTool.setProperty("InputContainer", reclusteredJetsContainer));
246 ASG_CHECK(m_trimJetTool.setProperty("OutputContainer", m_outputJetContainer));
247 ASG_CHECK(m_trimJetTool.setProperty("JetModifiers", modArray));
248 ASG_CHECK(m_trimJetTool.setProperty("JetGroomer", m_jetTrimmingTool.getHandle() ));
249 ASG_CHECK(m_trimJetTool.setProperty("JetPseudojetRetriever", m_jetTrimmingTool_JPJR.getHandle()));
250 ASG_CHECK(m_trimJetTool.setProperty("OutputLevel", msg().level() ) );
251 ASG_CHECK(m_trimJetTool.retrieve());
252
253 return StatusCode::SUCCESS;
254}
#define ASG_MAKE_ANA_TOOL(handle, type)
create the tool in the given tool handle
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ASG_CHECK(...)
Helper macro for checking the status code returned by a function call.
Definition Check.h:43
static Double_t ss
MsgStream & msg() const

◆ inputContainerNames()

int IJetExecuteTool::inputContainerNames ( std::vector< std::string > & connames)
virtualinherited

Method to return the list of input containers.

The names of required input containers are appended to connames. Returns nonzero for error. Default returns 0 and adds no names.

Reimplemented in JetRecTool.

Definition at line 11 of file IJetExecuteTool.cxx.

11 {
12 return 0;
13}

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

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

◆ outputContainerNames()

int IJetExecuteTool::outputContainerNames ( std::vector< std::string > & connames)
virtualinherited

Method to return the list of output containers.

The names of produced output containers are appended to connames. Returns nonzero for error. Default returns 0 and adds no names.

Reimplemented in JetRecTool.

Definition at line 17 of file IJetExecuteTool.cxx.

17 {
18 return 0;
19}

◆ 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 JetReclusteringTool::print ( ) const
overridevirtual

Print the state of the tool.

Reimplemented from asg::AsgTool.

Definition at line 275 of file JetReclusteringTool.cxx.

275 {
276 ATH_MSG_INFO("Properties for " << m_APP_NAME << "(" << name() << ")");
277 ATH_MSG_INFO(" InputJetContainer: " << m_inputJetContainer );
278 ATH_MSG_INFO(" OutputJetContainer: " << m_outputJetContainer );
279 ATH_MSG_INFO(" Radius: " << m_radius );
280 ATH_MSG_INFO(" ReclusteringAlgorithm: " << m_rc_alg << " (" << m_rc_alg << ")" );
281 ATH_MSG_INFO(" VariableRMinRadius: " << m_varR_minR );
282 ATH_MSG_INFO(" VariableRMassScale: " << m_varR_mass << " GeV" );
283 ATH_MSG_INFO(" InputJetPtCut: " << m_ptMin_input << " GeV" );
284 ATH_MSG_INFO(" ReclusteredJetPtCut: " << m_ptMin_rc << " GeV" );
285 ATH_MSG_INFO(" ReclusteredJetPtFrac: " << m_ptFrac );
286 ATH_MSG_INFO(" ReclusteredJetSubjetR: " << m_subjet_radius );
287
288 if(m_isInitialized){
289 m_inputJetFilterTool->print();
290 m_reclusterJetTool->print();
291 m_trimJetTool->print();
292 } else {
293 ATH_MSG_INFO(m_APP_NAME << " has not been initialized yet");
294 }
295
296 }

◆ 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

Member Data Documentation

◆ m_APP_NAME

std::string JetReclusteringTool::m_APP_NAME = "JetReclusteringTool"
private

Definition at line 49 of file JetReclusteringTool.h.

◆ m_areaAttributes

std::string JetReclusteringTool::m_areaAttributes
private

Definition at line 75 of file JetReclusteringTool.h.

◆ m_centerOfMassShapesTool

asg::AnaToolHandle<IJetModifier> JetReclusteringTool::m_centerOfMassShapesTool
private

Definition at line 102 of file JetReclusteringTool.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_dipolarityTool

asg::AnaToolHandle<IJetModifier> JetReclusteringTool::m_dipolarityTool
private

Definition at line 101 of file JetReclusteringTool.h.

◆ m_doArea

bool JetReclusteringTool::m_doArea
private

Definition at line 74 of file JetReclusteringTool.h.

◆ m_effectiveRTool

asg::AnaToolHandle<IJetModifier> JetReclusteringTool::m_effectiveRTool
private

Definition at line 90 of file JetReclusteringTool.h.

◆ m_energyCorrelatorRatiosTool

asg::AnaToolHandle<IJetModifier> JetReclusteringTool::m_energyCorrelatorRatiosTool
private

Definition at line 99 of file JetReclusteringTool.h.

◆ m_energyCorrelatorTool

asg::AnaToolHandle<IJetModifier> JetReclusteringTool::m_energyCorrelatorTool
private

Definition at line 98 of file JetReclusteringTool.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_inputJetContainer

std::string JetReclusteringTool::m_inputJetContainer
private

Definition at line 53 of file JetReclusteringTool.h.

◆ m_inputJetFilterTool

asg::AnaToolHandle<IJetExecuteTool> JetReclusteringTool::m_inputJetFilterTool
private

Definition at line 81 of file JetReclusteringTool.h.

◆ m_isInitialized

bool JetReclusteringTool::m_isInitialized = false
private

Definition at line 78 of file JetReclusteringTool.h.

◆ m_jetChargeTool

asg::AnaToolHandle<IJetModifier> JetReclusteringTool::m_jetChargeTool
private

Definition at line 96 of file JetReclusteringTool.h.

◆ m_jetFilterTool

asg::AnaToolHandle<IJetModifier> JetReclusteringTool::m_jetFilterTool
private

Definition at line 80 of file JetReclusteringTool.h.

◆ m_jetFinderTool

asg::AnaToolHandle<IJetFinder> JetReclusteringTool::m_jetFinderTool
private

Definition at line 85 of file JetReclusteringTool.h.

◆ m_jetFromPseudoJetTool

asg::AnaToolHandle<IJetFromPseudojet> JetReclusteringTool::m_jetFromPseudoJetTool
private

Definition at line 84 of file JetReclusteringTool.h.

◆ m_jetPullTool

asg::AnaToolHandle<IJetModifier> JetReclusteringTool::m_jetPullTool
private

Definition at line 97 of file JetReclusteringTool.h.

◆ m_jetTrimmingTool

asg::AnaToolHandle<IJetGroomer> JetReclusteringTool::m_jetTrimmingTool
private

Definition at line 92 of file JetReclusteringTool.h.

◆ m_jetTrimmingTool_JPJR

asg::AnaToolHandle<IJetPseudojetRetriever> JetReclusteringTool::m_jetTrimmingTool_JPJR
private

Definition at line 94 of file JetReclusteringTool.h.

◆ m_ktSplittingScaleTool

asg::AnaToolHandle<IJetModifier> JetReclusteringTool::m_ktSplittingScaleTool
private

Definition at line 100 of file JetReclusteringTool.h.

◆ m_nSubjettinessTool

asg::AnaToolHandle<IJetModifier> JetReclusteringTool::m_nSubjettinessTool
private

Definition at line 103 of file JetReclusteringTool.h.

◆ m_outputJetContainer

std::string JetReclusteringTool::m_outputJetContainer
private

Definition at line 55 of file JetReclusteringTool.h.

◆ m_pseudoJetGetterTool

asg::AnaToolHandle<IPseudoJetGetter> JetReclusteringTool::m_pseudoJetGetterTool
private

Definition at line 83 of file JetReclusteringTool.h.

◆ m_ptFrac

float JetReclusteringTool::m_ptFrac
private

Definition at line 71 of file JetReclusteringTool.h.

◆ m_ptMin_input

float JetReclusteringTool::m_ptMin_input
private

Definition at line 67 of file JetReclusteringTool.h.

◆ m_ptMin_rc

float JetReclusteringTool::m_ptMin_rc
private

Definition at line 69 of file JetReclusteringTool.h.

◆ m_radius

float JetReclusteringTool::m_radius
private

Definition at line 57 of file JetReclusteringTool.h.

◆ m_rc_alg

std::string JetReclusteringTool::m_rc_alg
private

Definition at line 59 of file JetReclusteringTool.h.

◆ m_reclusterJetTool

asg::AnaToolHandle<IJetExecuteTool> JetReclusteringTool::m_reclusterJetTool
private

Definition at line 86 of file JetReclusteringTool.h.

◆ m_subjet_radius

float JetReclusteringTool::m_subjet_radius
private

Definition at line 72 of file JetReclusteringTool.h.

◆ m_trimJetTool

asg::AnaToolHandle<IJetExecuteTool> JetReclusteringTool::m_trimJetTool
private

Definition at line 87 of file JetReclusteringTool.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_varR_mass

float JetReclusteringTool::m_varR_mass
private

Definition at line 64 of file JetReclusteringTool.h.

◆ m_varR_minR

float JetReclusteringTool::m_varR_minR
private

Definition at line 62 of file JetReclusteringTool.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: