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

Tool to dump jets to the log. More...

#include <JetDumper.h>

Inheritance diagram for JetDumper:
Collaboration diagram for JetDumper:

Public Types

typedef std::string Name
typedef std::vector< NameNameList
typedef xAOD::JetFourMom_t FourVector
typedef std::vector< const xAOD::IParticle * > APVector
typedef ElementLink< xAOD::IParticleContainerAPEL
typedef std::vector< APELAPELVector
typedef std::vector< const xAOD::MuonSegment * > MSVector
typedef ElementLink< xAOD::MuonSegmentContainerMSEL
typedef std::vector< MSELMSELVector

Public Member Functions

 JetDumper (const std::string &myname)
template<typename T>
int dump_object (const T *pjet, const std::string &objtypename="Unknown") const
template<typename TList>
int dump_collection (const TList *pjets, const std::string &objtypename="Unknown") const
int execute () const
 Method to be called for each event.
void print () const
 Print the state of the tool.
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.
virtual StatusCode initialize ()
 Dummy implementation of the initialisation function.
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

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

template<typename T>
std::string object_label (const T *pjet, const std::string &label) const
std::string object_label (const fastjet::PseudoJet &jet, const std::string &label) const
template<typename T>
int dump_object_after_prefix (const T *pjet, const std::string &objtypename) const
int dump_object_after_prefix (const fastjet::PseudoJet &jet, const std::string &objtypename) const
int dump_object_after_prefix (const xAOD::MuonSegment *seg, const std::string &objtypename) const
template<typename TObj, typename TMom>
void get_moment (TObj *pobj, std::string name, TMom &val) const
template<typename TObj>
void get_moment (TObj *pobj, std::string name, FourVector &val) const
template<typename TObj>
void get_moment (TObj *pobj, std::string name, std::string &val) const
template<typename TObj>
void get_moment (TObj *pobj, std::string name, std::vector< int > &) const
template<typename TObj>
void get_moment (TObj *pobj, std::string name, std::vector< float > &) const
template<typename TMom>
void get_moment (const xAOD::Jet *pobj, std::string name, TMom &val) const
void get_moment (const xAOD::Jet *pobj, const std::string &name, FourVector &val) const
void get_moment (const xAOD::Jet *pobj, const std::string &name, std::string &val) const
void get_moment (const xAOD::Jet *pobj, const std::string &name, std::vector< int > &vals) const
void get_moment (const xAOD::Jet *pobj, const std::string &name, std::vector< float > &vals) const
template<typename TObj>
std::string get_moment_as_string (const TObj &obj, std::string name) const
std::string get_moment_as_string (const xAOD::Jet *pobj, const std::string &name) const
template<typename TObj>
void getAssociatedParticles (TObj *pobj, std::string name, APVector &val) const
void getAssociatedParticles (const xAOD::Jet *pobj, const std::string &name, APVector &val) const
template<typename TObj>
void getAssociatedLinks (TObj *pobj, std::string name, APELVector &val) const
void getAssociatedLinks (const xAOD::Jet *pobj, const std::string &name, APELVector &val) const
template<typename TObj>
void getAssociatedParticles (TObj *pobj, std::string name, MSVector &val) const
void getAssociatedParticles (const xAOD::Jet *pobj, const std::string &name, MSVector &val) const
template<typename TObj>
void getAssociatedLinks (TObj *pobj, std::string name, MSELVector &val) const
void getAssociatedLinks (const xAOD::Jet *pobj, const std::string &name, MSELVector &val) const
template<typename T>
void extra_info (const T *, std::ostream &out, int) const
void extra_info (const xAOD::Jet *pjet, std::ostream &out, int iopt) const
void extra_info (const fastjet::PseudoJet *ppsj, std::ostream &out, int linedetail) const
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_cname
int m_detail
int m_linedetail
int m_prefix
int m_maxobj
float m_floatmax
NameList m_fmoms
NameList m_imoms
 Float moments.
NameList m_bmoms
 Int moments.
NameList m_cbmoms
 Bool moments.
NameList m_smoms
 Bool stored as char moments.
NameList m_fvmoms
 String moments.
NameList m_elmoms
 Four-vector moments.
NameList m_vimoms
 Element link moments.
NameList m_vfmoms
 Vector<int> moments.
NameList m_apmoms
 Vector<float> moments.
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

Tool to dump jets to the log.

Tool properties: ContainerName: Name of the container to be dumped Detail: 0 for container info, 1 for one line per object, 2 for object properties LineDetail: 0 for object index, 2 for kinematics, 2 for more Prefix: 0 for no prefix, 1 for type, 2 for container, 3 for type+contaienr MaxObject: Maximum number of objects for which detail is shown FloatMax: Above this value, floats are displayed in scientific notation. FloatMoments: Names of the float moments to display IntMoments: Names of the integer moments to display BoolMoments: Names of the bool moments to display CBoolMoments: Names of the bool moments storaed as char to display StringMoments: Names of the string moments to display FourVectorMoments: Names of the four-vector moments to display ElementLinkMoments: Names of the element link moments to display IntVectorMoments: Names of the int vector moments to display FloatVectorMoments: Names of the float vector moments to display AssociatedParticleVectors: Names of the associated object vectors to display

Definition at line 53 of file JetDumper.h.

Member Typedef Documentation

◆ APEL

Definition at line 64 of file JetDumper.h.

◆ APELVector

typedef std::vector<APEL> JetDumper::APELVector

Definition at line 65 of file JetDumper.h.

◆ APVector

typedef std::vector<const xAOD::IParticle*> JetDumper::APVector

Definition at line 63 of file JetDumper.h.

◆ FourVector

Definition at line 62 of file JetDumper.h.

◆ MSEL

◆ MSELVector

typedef std::vector<MSEL> JetDumper::MSELVector

Definition at line 68 of file JetDumper.h.

◆ MSVector

typedef std::vector<const xAOD::MuonSegment*> JetDumper::MSVector

Definition at line 66 of file JetDumper.h.

◆ Name

typedef std::string JetDumper::Name

Definition at line 60 of file JetDumper.h.

◆ NameList

typedef std::vector<Name> JetDumper::NameList

Definition at line 61 of file JetDumper.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ JetDumper()

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

Definition at line 24 of file JetDumper.cxx.

25: AsgTool(myname) {
26 ATH_MSG_INFO("JetDumper::ctor: Declaring properties.");
27 declareProperty("ContainerName", m_cname ="");
28 declareProperty("Detail", m_detail =1);
29 declareProperty("LineDetail", m_linedetail =1);
30 declareProperty("Prefix", m_prefix =1);
31 declareProperty("MaxObject", m_maxobj =10);
32 declareProperty("FloatMax", m_floatmax = 0.999e6);
33 declareProperty("FloatMoments", m_fmoms);
34 declareProperty("IntMoments", m_imoms);
35 declareProperty("BoolMoments", m_bmoms);
36 declareProperty("CBoolMoments", m_cbmoms);
37 declareProperty("StringMoments", m_smoms);
38 declareProperty("FourVectorMoments", m_fvmoms);
39 declareProperty("ElementLinkMoments", m_elmoms);
40 declareProperty("IntVectorMoments", m_vimoms);
41 declareProperty("FloatVectorMoments", m_vfmoms);
42 declareProperty("AssociatedParticleVectors", m_apmoms);
43 ATH_MSG_DEBUG("JetDumper::ctor: Done.");
44}
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
NameList m_bmoms
Int moments.
Definition JetDumper.h:156
NameList m_fvmoms
String moments.
Definition JetDumper.h:159
NameList m_imoms
Float moments.
Definition JetDumper.h:155
std::string m_cname
Definition JetDumper.h:148
int m_detail
Definition JetDumper.h:149
float m_floatmax
Definition JetDumper.h:153
NameList m_smoms
Bool stored as char moments.
Definition JetDumper.h:158
NameList m_fmoms
Definition JetDumper.h:154
NameList m_cbmoms
Bool moments.
Definition JetDumper.h:157
NameList m_vfmoms
Vector<int> moments.
Definition JetDumper.h:162
NameList m_vimoms
Element link moments.
Definition JetDumper.h:161
int m_maxobj
Definition JetDumper.h:152
int m_prefix
Definition JetDumper.h:151
NameList m_elmoms
Four-vector moments.
Definition JetDumper.h:160
int m_linedetail
Definition JetDumper.h:150
NameList m_apmoms
Vector<float> moments.
Definition JetDumper.h:163
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.

◆ dump_collection()

template<typename TList>
int JetDumper::dump_collection ( const TList * pjets,
const std::string & objtypename = "Unknown" ) const

Definition at line 369 of file JetDumper.h.

369 {
370 int njet = pjets->size();
371 ATH_MSG_INFO(" " << objtypename << " multiplicity: " << njet << " [" << m_cname << "]");
372 std::string line = "-------------------------------------------------------------------------";
373 int jstat = 0;
374 if ( m_detail > 0 ) {
375 unsigned int njetshow = njet;
376 if ( m_maxobj > 0 && m_maxobj < njet ) njetshow = m_maxobj;
377 typename TList::const_iterator itjet = pjets->begin();
378 typedef typename TList::const_iterator::reference TValue;
379 std::vector<std::string> labs;
380 unsigned int wlab = 0;
381 for ( unsigned int ijet=0; ijet<njetshow; ++ijet ) {
382 TValue pjet = *itjet++;
383 std::string lab = object_label(pjet, objtypename);
384 labs.push_back(lab);
385 if ( lab.size() > wlab ) wlab = lab.size();
386 }
387 itjet = pjets->begin();
388 int widx = 1;
389 if ( njetshow > 10 ) widx = 2;
390 if ( njetshow > 100 ) widx = 3;
391 if ( njetshow > 1000 ) widx = 4;
392 for ( unsigned int ijet=0; ijet<njetshow; ++ijet ) {
393 TValue pjet = *itjet++;
394 if ( m_detail > 1 && ijet==0 ) ATH_MSG_INFO(line);
395 // One line summary.
396 msg() << MSG::INFO << " ";
397 if ( m_prefix == 1 || m_prefix > 2 ) {
398 msg() << std::setw(wlab) << labs[ijet] << " ";
399 }
400 if ( m_prefix < 2 ) {
401 msg() << std::setw(widx) << ijet;
402 } else {
403 msg() << m_cname;
404 msg() << "[" << std::setw(widx) << ijet << "]";
405 }
406 msg() << ": ";
407 jstat += dump_object_after_prefix(pjet, objtypename);
408 if ( m_detail > 1 ) ATH_MSG_INFO(line);
409 }
410 }
411 return jstat;
412}
int dump_object_after_prefix(const T *pjet, const std::string &objtypename) const
Definition JetDumper.h:183
std::string object_label(const T *pjet, const std::string &label) const
Definition JetDumper.h:356
MsgStream & msg
Definition testRead.cxx:32

◆ dump_object()

template<typename T>
int JetDumper::dump_object ( const T * pjet,
const std::string & objtypename = "Unknown" ) const

Definition at line 177 of file JetDumper.h.

177 {
178 msg() << MSG::INFO << objtypename << " ";
179 return dump_object_after_prefix(pobj, objtypename);
180}

◆ dump_object_after_prefix() [1/3]

int JetDumper::dump_object_after_prefix ( const fastjet::PseudoJet & jet,
const std::string & objtypename ) const
private

Definition at line 122 of file JetDumper.cxx.

122 {
123 const double mevtogev = 0.001;
124 // One line summary.
125 std::ostringstream ssjetline;
126 double px = mevtogev*jet.px();
127 double py = mevtogev*jet.py();
128 double pt = sqrt(px*px+py*py);
129 if ( m_linedetail > 0 ) {
130 ssjetline << "pT =" << std::setw(6) << std::fixed << std::setprecision(1) << pt << " GeV";
131 ssjetline << ", m =" << std::setw(6) << std::fixed << std::setprecision(1)
132 << mevtogev*jet.m() << " GeV";
133 ssjetline << ", eta =" << std::setw(5) << std::fixed << std::setprecision(2) << jet.eta();
134 ssjetline << ", phi =" << std::setw(5) << std::fixed << std::setprecision(2) << jet.phi();
135 }
136 if ( m_linedetail > 1 ) extra_info(&jet, ssjetline, m_linedetail);
137 msg() << ssjetline.str() << endmsg;
138 return 0;
139}
#define endmsg
void extra_info(const T *, std::ostream &out, int) const
Definition JetDumper.h:476

◆ dump_object_after_prefix() [2/3]

template<typename T>
int JetDumper::dump_object_after_prefix ( const T * pjet,
const std::string & objtypename ) const
private

Definition at line 183 of file JetDumper.h.

183 {
184 const double mevtogev = 0.001;
185 const int wname = 30;
186 if ( pjet == 0 ) {
187 msg() << endmsg;
188 ATH_MSG_ERROR("Null jet.");
189 return 1;
190 }
191 // One line summary.
192 std::ostringstream ssjetline;
193 if ( m_linedetail > 0 ) {
194 ssjetline << "pT =" << std::setw(6) << std::fixed << std::setprecision(1) << mevtogev*pjet->pt() << " GeV";
195 ssjetline << ", m =" << std::setw(6) << std::fixed << std::setprecision(1) << mevtogev*pjet->m() << " GeV";
196 ssjetline << ", eta =" << std::setw(5) << std::fixed << std::setprecision(2) << pjet->eta();
197 ssjetline << ", phi =" << std::setw(5) << std::fixed << std::setprecision(2) << pjet->phi();
198 }
199 if ( m_linedetail > 1 ) extra_info(pjet, ssjetline, m_linedetail);
200 msg() << ssjetline.str() << endmsg;
201 // All properties.
202 if ( m_detail > 1 ) {
203 NameList fnames = m_fmoms;
204 NameList inames = m_imoms;
205 NameList bnames = m_bmoms;
206 NameList cbnames = m_cbmoms;
207 NameList snames = m_smoms;
208 NameList fvnames = m_fvmoms;
209 NameList elnames = m_elmoms;
210 NameList vinames = m_vimoms;
211 NameList vfnames = m_vfmoms;
212 NameList apnames = m_apmoms;
213 if ( fnames.size() == 0 ) fnames = get_moment_keys<T,float>(pjet);
214 ATH_MSG_INFO(" " << objtypename << " has " << fnames.size() << " float attributes:");
215 for ( NameList::const_iterator inam=fnames.begin(); inam!=fnames.end(); ++inam ) {
216 Name name = *inam;
217 float val;
218 get_moment(pjet, name, val);
219 if ( fabs(val) > m_floatmax ) {
220 ATH_MSG_INFO(std::setw(wname) << name << ":" << std::setw(16) << std::scientific << std::setprecision(3) << val);
221 } else {
222 ATH_MSG_INFO(std::setw(wname) << name << ":" << std::setw(12) << std::fixed << std::setprecision(3) << val);
223 }
224 }
225 if ( inames.size() == 0 ) inames = get_moment_keys<T,int>(pjet);
226 ATH_MSG_INFO(" " << objtypename << " has " << inames.size() << " int attributes:");
227 for ( NameList::const_iterator inam=inames.begin(); inam!=inames.end(); ++inam ) {
228 Name name = *inam;
229 int ival;
230 get_moment(pjet, name, ival);
231 ATH_MSG_INFO(std::setw(wname) << name << ":" << std::setw(12) << std::fixed << std::setprecision(3) << ival);
232 }
233 if ( bnames.size() == 0 ) bnames = get_moment_keys<T,int>(pjet);
234 ATH_MSG_INFO(" " << objtypename << " has " << bnames.size() << " bool attributes:");
235 for ( NameList::const_iterator inam=bnames.begin(); inam!=bnames.end(); ++inam ) {
236 Name name = *inam;
237 bool val;
238 get_moment(pjet, name, val);
239 std::string sval = val ? "true" : "false";
240 ATH_MSG_INFO(std::setw(wname) << name << ":" << std::setw(6) << sval);
241 }
242 if ( cbnames.size() == 0 ) cbnames = get_moment_keys<T,int>(pjet);
243 ATH_MSG_INFO(" " << objtypename << " has " << cbnames.size() << " cbool attributes:");
244 for ( NameList::const_iterator inam=cbnames.begin(); inam!=cbnames.end(); ++inam ) {
245 Name name = *inam;
246 char val;
247 get_moment(pjet, name, val);
248 std::string sval = val ? "true" : "false";
249 ATH_MSG_INFO(std::setw(wname) << name << ":" << std::setw(6) << sval);
250 }
251 ATH_MSG_INFO(" " << objtypename << " has " << snames.size() << " string attributes:");
252 for ( NameList::const_iterator inam=snames.begin(); inam!=snames.end(); ++inam ) {
253 Name name = *inam;
254 std::string sval;
255 get_moment(pjet, name, sval);
256 ATH_MSG_INFO(std::setw(wname) << name << ":" << std::setw(30) << sval);
257 }
258 ATH_MSG_INFO(" " << objtypename << " has " << vinames.size() << " vector<int> attributes:");
259 for ( NameList::const_iterator inam=vinames.begin(); inam!=vinames.end(); ++inam ) {
260 Name name = *inam;
261 std::vector<int> vals;
262 get_moment(pjet, name, vals);
263 if ( vals.size() == 0 ) {
264 ATH_MSG_INFO(std::setw(wname) << name << ": No entries.");
265 } else {
266 int widx = 1;
267 if ( vals.size() > 10 ) widx = 2;
268 for ( unsigned int ival=0; ival<vals.size(); ++ival ) {
269 ATH_MSG_INFO(std::setw(wname) << name << "[" << std::setw(widx) << ival << "]: "
270 << std::setw(8) << vals[ival]);
271 }
272 }
273 }
274 ATH_MSG_INFO(" " << objtypename << " has " << vfnames.size() << " vector<float> attributes:");
275 for ( NameList::const_iterator inam=vfnames.begin(); inam!=vfnames.end(); ++inam ) {
276 Name name = *inam;
277 std::vector<float> vals;
278 get_moment(pjet, name, vals);
279 if ( vals.size() == 0 ) {
280 ATH_MSG_INFO(std::setw(wname) << name << ": No entries.");
281 } else {
282 int widx = 1;
283 if ( vals.size() > 10 ) widx = 2;
284 for ( unsigned int ival=0; ival<vals.size(); ++ival ) {
285 ATH_MSG_INFO(std::setw(wname) << name << "[" << std::setw(widx) << ival << "]: "
286 << std::setw(12) << std::fixed << std::setprecision(3) << vals[ival]);
287 }
288 }
289 }
290 ATH_MSG_INFO(" " << objtypename << " has " << apnames.size() << " associated particle vectors:");
291 for ( NameList::const_iterator inam=apnames.begin(); inam!=apnames.end(); ++inam ) {
292 Name name = *inam;
293 if ( name.find("MuonSegment") != std::string::npos ) {
295 getAssociatedParticles(pjet, name, vals);
296 MSELVector els;
297 getAssociatedLinks(pjet, name, els);
298 std::string slab = "entries";
299 if ( vals.size() == 1 ) slab = "entry";
300 if ( vals.size() > 0 ) slab += ":";
301 ATH_MSG_INFO(std::setw(wname) << name << " has " << vals.size() << " " << slab);
302 if ( els.size() == vals.size() ) {
303 for (const MSEL& el : els) {
304 ATH_MSG_INFO(std::setw(wname+2) << "" << el.dataID() << "[" << el.index() << "]");
305 }
306 } else {
307 for (auto ppar : vals) {
308 ATH_MSG_INFO(std::setw(wname+2) << "" << ppar->container() << "[" << ppar->index() << "]");
309 }
310 }
311 } else {
313 getAssociatedParticles(pjet, name, vals);
314 APELVector els;
315 getAssociatedLinks(pjet, name, els);
316 std::string slab = "entries";
317 if ( vals.size() == 1 ) slab = "entry";
318 if ( vals.size() > 0 ) slab += ":";
319 ATH_MSG_INFO(std::setw(wname) << name << " has " << vals.size() << " " << slab);
320 // Show container names if found, otherwise container addresses.
321 if ( els.size() == vals.size() ) {
322 for (const APEL& el : els) {
323 ATH_MSG_INFO(std::setw(wname+2) << "" << el.dataID() << "[" << el.index() << "]");
324 }
325 } else {
326 for (auto ppar : vals) {
327 ATH_MSG_INFO(std::setw(wname+2) << "" << ppar->container() << "[" << ppar->index() << "]");
328 }
329 }
330 }
331 }
332 if ( fvnames.size() == 0 ) fvnames = get_moment_keys<T,float>(pjet);
333 ATH_MSG_INFO(" " << objtypename << " has " << fvnames.size() << " four-vector attributes (pT m eta phi):");
334 for ( NameList::const_iterator inam=fvnames.begin(); inam!=fvnames.end(); ++inam ) {
335 Name name = *inam;
337 get_moment(pjet, name, val);
338 ATH_MSG_INFO(std::setw(wname) << name << ":"
339 << std::setw(12) << std::fixed << std::setprecision(3) << val.Pt()
340 << std::setw(12) << std::fixed << std::setprecision(3) << val.M()
341 << std::setw(12) << std::fixed << std::setprecision(3) << val.Eta()
342 << std::setw(12) << std::fixed << std::setprecision(3) << val.Phi()
343 );
344 }
345 ATH_MSG_INFO(" " << objtypename << " has " << elnames.size() << " element-link attributes:");
346 for ( NameList::const_iterator inam=elnames.begin(); inam!=elnames.end(); ++inam ) {
347 std::string name = *inam;
348 std::string sel = get_moment_as_string(pjet, name);
349 ATH_MSG_INFO(std::setw(wname) << name << ": " << sel);
350 }
351 }
352 return 0;
353}
#define ATH_MSG_ERROR(x)
JetDumper::NameList get_moment_keys(const T *pobj)
Definition JetDumper.h:469
void getAssociatedLinks(TObj *pobj, std::string name, APELVector &val) const
Definition JetDumper.h:452
std::vector< MSEL > MSELVector
Definition JetDumper.h:68
void getAssociatedParticles(TObj *pobj, std::string name, APVector &val) const
Definition JetDumper.h:449
std::vector< APEL > APELVector
Definition JetDumper.h:65
void get_moment(TObj *pobj, std::string name, TMom &val) const
Definition JetDumper.h:417
std::vector< const xAOD::MuonSegment * > MSVector
Definition JetDumper.h:66
std::string get_moment_as_string(const TObj &obj, std::string name) const
Definition JetDumper.h:462
ElementLink< xAOD::MuonSegmentContainer > MSEL
Definition JetDumper.h:67
std::string Name
Definition JetDumper.h:60
std::vector< const xAOD::IParticle * > APVector
Definition JetDumper.h:63
ElementLink< xAOD::IParticleContainer > APEL
Definition JetDumper.h:64
xAOD::JetFourMom_t FourVector
Definition JetDumper.h:62
std::vector< Name > NameList
Definition JetDumper.h:61

◆ dump_object_after_prefix() [3/3]

int JetDumper::dump_object_after_prefix ( const xAOD::MuonSegment * seg,
const std::string & objtypename ) const
private

Definition at line 143 of file JetDumper.cxx.

143 {
144 if ( pseg == nullptr ) return 1;
145 const xAOD::MuonSegment& seg = *pseg;
146 const double mmtom = 0.001;
147 // One line summary.
148 std::ostringstream ssline;
149 double x = mmtom*seg.x();
150 double y = mmtom*seg.y();
151 double z = mmtom*seg.z();
152 double r = sqrt(x*x+y*y);
153 double phi = atan2(y,x);
154 ssline << "r =" << std::setw(7) << std::fixed << std::setprecision(2) << r << " m";
155 ssline << ", z =" << std::setw(7) << std::fixed << std::setprecision(2) << z << " m";
156 ssline << ", phi =" << std::setw(7) << std::fixed << std::setprecision(2) << phi;
157 //if ( m_linedetail > 1 ) extra_info(&seg, ssline, m_linedetail);
158 msg() << ssline.str() << endmsg;
159 return 0;
160}
Scalar phi() const
phi method
#define y
#define x
#define z
float y() const
Returns the x position.
float z() const
Returns the y position.
int r
Definition globals.cxx:22
MuonSegment_v1 MuonSegment
Reference the current persistent version:

◆ 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 JetDumper::execute ( ) const
virtual

Method to be called for each event.

Returns 0 for success.

Implements IJetExecuteTool.

Definition at line 63 of file JetDumper.cxx.

63 {
64 ATH_MSG_DEBUG("Looping over collection types...");
66 ATH_MSG_DEBUG("Collection is pseudojets.");
67 const PseudoJetVector* pobjs = nullptr;
68 StatusCode sc = evtStore()->retrieve(pobjs, m_cname);
69 if ( !sc.isFailure() && pobjs != nullptr ) return dump_collection(pobjs, "Pseudojet");
71 ATH_MSG_DEBUG("Collection is xAOD clusters.");
72 const xAOD::CaloClusterContainer* pclus = nullptr;
73 pclus = evtStore()->retrieve<const xAOD::CaloClusterContainer>(m_cname);
74 //StatusCode sc = evtStore()->retrieve(pclus, m_cname);
75 if ( pclus != nullptr ) return dump_collection(pclus, "Cluster");
77 ATH_MSG_DEBUG("Collection is xAOD jets.");
78 const xAOD::JetContainer* pobjs = nullptr;
79 pobjs = evtStore()->retrieve<const xAOD::JetContainer>(m_cname);
80 if ( pobjs != nullptr ) {
81 return dump_collection(pobjs, "Jet");
82 ATH_MSG_DEBUG("Retrieved xAOD jets.");
83 } else {
84 ATH_MSG_ERROR("xAOD jet retrieval failed.");
85 }
87 ATH_MSG_DEBUG("Collection is xAOD muon segments.");
88 const xAOD::MuonSegmentContainer* psegs = nullptr;
89 psegs = evtStore()->retrieve<const xAOD::MuonSegmentContainer>(m_cname);
90 if ( psegs != nullptr ) return dump_collection(psegs, "Muon segment");
91 }
92 ATH_MSG_ERROR("Unable to retrieve input collection: " << m_cname);
93 return 2;
94}
static Double_t sc
ServiceHandle< StoreGateSvc > & evtStore()
int dump_collection(const TList *pjets, const std::string &objtypename="Unknown") const
Definition JetDumper.h:369
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:114
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< fastjet::PseudoJet > PseudoJetVector
MuonSegmentContainer_v1 MuonSegmentContainer
Definition of the current "MuonSegment container version".
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
JetContainer_v1 JetContainer
Definition of the current "jet container version".

◆ extra_info() [1/3]

void JetDumper::extra_info ( const fastjet::PseudoJet * ppsj,
std::ostream & out,
int linedetail ) const
private

Definition at line 275 of file JetDumper.cxx.

275 {
276 if ( ppsj == nullptr ) {
277 out << ", Null pseudojet";
278 return;
279 }
280 const fastjet::PseudoJet& psj = *ppsj;
281 if ( psj.has_user_info() ) {
282 const jet::IConstituentUserInfo& cui = psj.user_info<jet::IConstituentUserInfo>();
283 if ( linedetail > 1 ) {
284 out << ", ilab=" << cui.index();
285 if ( linedetail > 2 ) {
286 const xAOD::IParticle* pip = cui.particle();
287 if ( pip == nullptr ) {
288 out << ", Associated particle is null";
289 } else {
290 out << " [" << pip->container() << "/" << pip->index() << "]";
291 if ( linedetail > 3 ) out << ", IParticle @ " << pip;
292 }
293 }
294 if ( cui.isGhost() ) out << ", ghost";
295 }
296 } else {
297 out << ", No user info";
298 }
299}
const SG::AuxVectorData * container() const
Return the container holding this element.
size_t index() const
Return the index of this element within its container.
virtual bool isGhost() const
Returns true if this constituent is a ghost.
virtual const xAOD::IParticle * particle() const =0

◆ extra_info() [2/3]

template<typename T>
void JetDumper::extra_info ( const T * ,
std::ostream & out,
int  ) const
private

Definition at line 476 of file JetDumper.h.

476 {
477 out << ", Unknown type: " << typeid(T).name();
478}
unsigned long long T

◆ extra_info() [3/3]

void JetDumper::extra_info ( const xAOD::Jet * pjet,
std::ostream & out,
int iopt ) const
private

Definition at line 252 of file JetDumper.cxx.

252 {
253 if ( iopt == 2 ) {
254 int ncon = pjet->numConstituents();
255 out << ", ncon = " << ncon;
256 }
257 if ( iopt > 2 ) {
258 int ncon = pjet->numConstituents();
259 int scon = pjet->getConstituents().size();
260 string lab = ", size/ncon=";
261 out << lab << scon << "/" << ncon;
262 }
263 if ( iopt > 3 ) {
264 const fastjet::PseudoJet* ppj = pjet->getPseudoJet();
265 if ( ppj == nullptr ) {
266 out << ", No pseudojet";
267 } else {
268 out << ", npjcon=" << ppj->constituents().size();
269 }
270 }
271}
size_t size() const
number of constituents
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
JetConstituentVector getConstituents() const
Return a vector of consituents. The object behaves like vector<const IParticle*>. See JetConstituentV...
Definition Jet_v1.cxx:147
const fastjet::PseudoJet * getPseudoJet() const
Definition Jet_v1.cxx:236

◆ 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

◆ get_moment() [1/10]

void JetDumper::get_moment ( const xAOD::Jet * pobj,
const std::string & name,
FourVector & val ) const
private

Definition at line 164 of file JetDumper.cxx.

164 {
165 if ( name.empty() || name == "jetP4()" ) val = pjet->jetP4();
166 else val = pjet->getAttribute<FourVector>(name);
167}

◆ get_moment() [2/10]

void JetDumper::get_moment ( const xAOD::Jet * pobj,
const std::string & name,
std::string & val ) const
private

Definition at line 187 of file JetDumper.cxx.

187 {
188 val = pjet->getAttribute<std::string>(name);
189}

◆ get_moment() [3/10]

void JetDumper::get_moment ( const xAOD::Jet * pobj,
const std::string & name,
std::vector< float > & vals ) const
private

Definition at line 179 of file JetDumper.cxx.

180 {
181 typedef std::vector<float> T;
182 vals = pjet->getAttribute<T>(name);
183}

◆ get_moment() [4/10]

void JetDumper::get_moment ( const xAOD::Jet * pobj,
const std::string & name,
std::vector< int > & vals ) const
private

Definition at line 171 of file JetDumper.cxx.

172 {
173 typedef std::vector<int> T;
174 vals = pjet->getAttribute<T>(name);
175}

◆ get_moment() [5/10]

template<typename TMom>
void JetDumper::get_moment ( const xAOD::Jet * pobj,
std::string name,
TMom & val ) const
private

Definition at line 444 of file JetDumper.h.

444 {
445 val = pjet->getAttribute<TMom>(name);
446}

◆ get_moment() [6/10]

template<typename TObj>
void JetDumper::get_moment ( TObj * pobj,
std::string name,
FourVector & val ) const
private

Definition at line 422 of file JetDumper.h.

422 {
423 val = FourVector();
424}

◆ get_moment() [7/10]

template<typename TObj>
void JetDumper::get_moment ( TObj * pobj,
std::string name,
std::string & val ) const
private

Definition at line 427 of file JetDumper.h.

427 {
428 val = "";
429}

◆ get_moment() [8/10]

template<typename TObj>
void JetDumper::get_moment ( TObj * pobj,
std::string name,
std::vector< float > & val ) const
private

Definition at line 438 of file JetDumper.h.

438 {
439 static const std::vector<float> empty;
440 val = empty;
441}
static const Attributes_t empty

◆ get_moment() [9/10]

template<typename TObj>
void JetDumper::get_moment ( TObj * pobj,
std::string name,
std::vector< int > & val ) const
private

Definition at line 432 of file JetDumper.h.

432 {
433 static const std::vector<int> empty;
434 val = empty;
435}

◆ get_moment() [10/10]

template<typename TObj, typename TMom>
void JetDumper::get_moment ( TObj * pobj,
std::string name,
TMom & val ) const
private

Definition at line 417 of file JetDumper.h.

417 {
418 val = 0;
419}

◆ get_moment_as_string() [1/2]

template<typename TObj>
std::string JetDumper::get_moment_as_string ( const TObj & obj,
std::string name ) const
private

Definition at line 462 of file JetDumper.h.

462 {
463 return " Not a jet.";
464}

◆ get_moment_as_string() [2/2]

std::string JetDumper::get_moment_as_string ( const xAOD::Jet * pobj,
const std::string & name ) const
private

Definition at line 222 of file JetDumper.cxx.

222 {
223 std::ostringstream sout;
224 // May want to try other types here.
225 // Or find some way to access the base information of the element link.
226 try {
227 ElementLink<xAOD::JetContainer> eljet;
228 if ( pjet->getAttribute(name, eljet) ) {
229 sout << "Jet " << eljet.dataID() << "[" << eljet.index() << "]";
230 return sout.str();
231 }
232 } catch (...) { }
233 try {
234 ElementLink<xAOD::VertexContainer> elvtx;
235 if ( pjet->getAttribute(name, elvtx) ) {
236 sout << "Vertex " << elvtx.dataID() << "[" << elvtx.index() << "]";
237 return sout.str();
238 }
239 } catch (...) { }
240 try {
241 ElementLink<xAOD::IParticleContainer> elobj;
242 if ( pjet->getAttribute(name, elobj) ) {
243 sout << "IParticle " << elobj.dataID() << "[" << elobj.index() << "]";
244 return sout.str();
245 }
246 } catch (...) { }
247 return "Not a known element link.";
248}

◆ getAssociatedLinks() [1/4]

void JetDumper::getAssociatedLinks ( const xAOD::Jet * pobj,
const std::string & name,
APELVector & val ) const
private

Definition at line 200 of file JetDumper.cxx.

201 {
202 pobj->getAttribute(name, val);
203}
bool getAttribute(AttributeID type, T &value) const
Retrieve attribute moment by enum.

◆ getAssociatedLinks() [2/4]

void JetDumper::getAssociatedLinks ( const xAOD::Jet * pobj,
const std::string & name,
MSELVector & val ) const
private

Definition at line 214 of file JetDumper.cxx.

215 {
216 pobj->getAttribute(name, val);
217}

◆ getAssociatedLinks() [3/4]

template<typename TObj>
void JetDumper::getAssociatedLinks ( TObj * pobj,
std::string name,
APELVector & val ) const
private

Definition at line 452 of file JetDumper.h.

452{ }

◆ getAssociatedLinks() [4/4]

template<typename TObj>
void JetDumper::getAssociatedLinks ( TObj * pobj,
std::string name,
MSELVector & val ) const
private

Definition at line 458 of file JetDumper.h.

458{ }

◆ getAssociatedParticles() [1/4]

void JetDumper::getAssociatedParticles ( const xAOD::Jet * pobj,
const std::string & name,
APVector & val ) const
private

Definition at line 193 of file JetDumper.cxx.

194 {
195 pobj->getAssociatedObjects(name, val);
196}
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...

◆ getAssociatedParticles() [2/4]

void JetDumper::getAssociatedParticles ( const xAOD::Jet * pobj,
const std::string & name,
MSVector & val ) const
private

Definition at line 207 of file JetDumper.cxx.

208 {
209 pobj->getAssociatedObjects(name, val);
210}

◆ getAssociatedParticles() [3/4]

template<typename TObj>
void JetDumper::getAssociatedParticles ( TObj * pobj,
std::string name,
APVector & val ) const
private

Definition at line 449 of file JetDumper.h.

449{ }

◆ getAssociatedParticles() [4/4]

template<typename TObj>
void JetDumper::getAssociatedParticles ( TObj * pobj,
std::string name,
MSVector & val ) const
private

Definition at line 455 of file JetDumper.h.

455{ }

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

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

virtual StatusCode asg::AsgTool::initialize ( void )
inlinevirtualinherited

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 in asg::DataHandleTestTool, asg::UnitTestTool1, asg::UnitTestTool1A, asg::UnitTestTool2, asg::UnitTestTool3, AsgDeadHVCellRemovalTool, AsgElectronChargeIDSelectorTool, AsgElectronEfficiencyCorrectionTool, AsgElectronIsEMSelector, AsgElectronLikelihoodTool, AsgElectronSelectorTool, AsgForwardElectronIsEMSelector, AsgForwardElectronLikelihoodTool, AsgHelloTool, AsgPhotonEfficiencyCorrectionTool, AsgPhotonIsEMSelector, AthAsgExUnittestTool, AthONNX::JSSMLTool, AthOnnx::OnnxRuntimeInferenceTool, AthOnnx::OnnxRuntimeSessionToolCPU, AthOnnx::OnnxRuntimeSessionToolCUDA, BaseFakeBkgTool, BDTVertexWeightCalculator, BJetCorrectionTool, BookkeeperDumperTool, BookkeeperTool, BoostedJetTaggerTool, BTaggingEfficiencyJsonTool, BTaggingEfficiencyTool, BTaggingEigenVectorRecompositionTool, BTaggingSelectionJsonTool, BTaggingSelectionTool, BTaggingTruthTaggingTool, CaloClusterConstituentsOrigin, CenterOfMassShapesTool, ChargedHadronSubtractionTool, ClusterAtEMScaleTool, ClusterAtMLScaleTool, ClusterMatching::CaloClusterMatchingTool, columnar::ConfigurableColumnExampleTool, columnar::LinkColumnExampleTool, columnar::ModularExampleTool, columnar::MomentumAccessorExampleTool, columnar::OptionalColumnExampleTool, columnar::SimpleSelectorExampleTool, columnar::StringExampleTool, columnar::VariantExampleTool, columnar::VectorExampleTool, ConstitTimeCutTool, ConstituentSubtractorTool, CopyTruthJetParticles, CopyTruthParticles, CorrectPFOTool, CP::ApplyE2YFakeRate, CP::ApplyFakeFactor, CP::AsgFlagSelectionTool, CP::AsgMaskSelectionTool, CP::AsgMassSelectionTool, CP::AsgNumDecorationSelectionTool< T >, CP::AsgNumDecorationSelectionTool< int >, CP::AsgNumDecorationSelectionTool< uint8_t >, CP::AsgPtEtaSelectionTool, CP::AsymptMatrixTool, CP::BaseFakeBkgTool, CP::BaseLinearFakeBkgTool, CP::EgammaCalibrationAndSmearingTool, CP::EgammaIsGoodOQSelectionTool, CP::ElectronChargeEfficiencyCorrectionTool, CP::ElectronLRTOverlapRemovalTool, CP::FFJetSmearingTool, CP::FJvtEfficiencyTool, CP::FJvtSelectionTool, CP::IsolationCloseByCorrectionTool, CP::IsolationCorrectionTool, CP::IsolationHelper, CP::IsolationLowPtPLVTool, CP::IsolationSelectionTool, CP::JetQGTagger, CP::JetQGTaggerBDT, CP::JetTileCorrectionTool, CP::JvtEfficiencyTool, CP::JvtEfficiencyToolBase, CP::JvtSelectionTool, CP::JvtSelectionToolBase, CP::LhoodMM_tools, CP::MuonCalibIntHighpTSmearTool, CP::MuonCalibIntSagittaTool, CP::MuonCalibIntScaleSmearTool, CP::MuonCalibTool, CP::MuonEfficiencyScaleFactors, CP::MuonLRTOverlapRemovalTool, CP::MuonSelectionTool, CP::MuonTriggerScaleFactors, CP::MVATrackVertexAssociationTool, CP::NNJvtEfficiencyTool, CP::NNJvtSelectionTool, CP::PhotonPointingTool, CP::PhotonVertexSelectionTool, CP::PileupReweightingTool, CP::TrackVertexAssociationTool, D3PD::D3PDMCTruthClassifier, Diagram, DiTauMassTools::MissingMassTool, DiTauRecTools::DiTauDiscriminantTool, DiTauRecTools::DiTauIDVarCalculator, DiTauRecTools::DiTauOnnxDiscriminantTool, dRMatchingTool, ECUtils::EventCleaningTool, EfficiencyResponseHistos, EGammaAmbiguityTool, egammaMVACalibTool, EL::UnitTestTool, ElectronPhotonVariableCorrectionBase, ElectronPhotonVariableCorrectionTool, EnergyCorrelatorGeneralizedRatiosTool, EnergyCorrelatorGeneralizedTool, EnergyCorrelatorRatiosTool, EnergyCorrelatorTool, EnhancedBiasWeighter, EtaJESCalibStep, EventDensityTool, EventShapeCopier, ExtendTrackToLayerTool, FastJetInterfaceTool, FlavorTagDiscriminants::DL2Tool, FlavorTagDiscriminants::HbbTagTool, FlavorTagDiscriminants::TrackClassifier, FlavorTagDiscriminants::VRJetOverlapDecoratorTool, FlavorTagInference::GNNTool, FlavorTagInference::MultifoldGNNTool, FSR::FsrPhotonTool, GoodRunsListSelectionTool, GSCCalibStep, HI::HIEventSelectionTool, HI::HIPileupTool, HI::HIVertexSelectionTool, HIClusterSubtraction, HIEfficiencyResponseHistos, HIEventShapeFillerTool, HIEventShapeJetIteration, HIEventShapeMapTool, HIEventShapeSummaryTool, HiggsTruthCategoryTool, HIJetClusterIndexAssociationTool, HIJetClusterSubtractorTool, HIJetConstituentModifierTool, HIJetConstituentSubtractionTool, HIJetDRAssociationTool, HIJetMaxOverMeanTool, HIJetSignificanceTool, HIJetUEMonitoring, HistoDefinitionTool, HistoGroupBase, HistosForJetSelection, HIUEModulatorTool, IDTPM::DeltaRMatchingToolBase< T, R >, IDTPM::DeltaRMatchingToolBase< xAOD::TrackParticle >, IDTPM::DeltaRMatchingToolBase< xAOD::TrackParticle, xAOD::TruthParticle >, IDTPM::DeltaRMatchingToolBase< xAOD::TruthParticle, xAOD::TrackParticle >, IDTPM::EFTrackMatchingTool, IDTPM::JsonPlotsDefReadTool, IDTPM::OfflineTrackQualitySelectionTool, IDTPM::RoiSelectionTool, IDTPM::StableDeltaRMatchingTool< T, R >, IDTPM::StableDeltaRMatchingTool< xAOD::TrackParticle, xAOD::TrackParticle >, IDTPM::StableDeltaRMatchingTool< xAOD::TrackParticle, xAOD::TruthParticle >, IDTPM::StableDeltaRMatchingTool< xAOD::TruthParticle, xAOD::TrackParticle >, IDTPM::TrackAnalysisInfoWriteTool, IDTPM::TrackObjectSelectionTool, IDTPM::TrackQualitySelectionTool, IDTPM::TrackRoiSelectionTool, IDTPM::TrackTruthMatchingTool, IDTPM::TruthQualitySelectionTool, IDTPM::TruthTrackMatchingTool, IDTPM::VertexQualitySelectionTool, IDTPM::VertexRoiSelectionTool, IHIEventShapeMapTool, InDet::InclusiveTrackFilterTool, InDet::InDetHardScatterSelectionTool, InDet::InDetSecVtxTrackSelectionTool, InDet::InDetTrackBiasingTool, InDet::InDetTrackSelectionTool, InDet::InDetTrackSmearingTool, InDet::InDetTrackSystematicsTool, InDet::InDetTrackTruthFilterTool, InDet::InDetTrackTruthOriginTool, InDet::InDetUsedInFitTrackDecoratorTool, InDet::JetTrackFilterTool, InDetGNNHardScatterSelection::GNNTool, InDetSecVtxTruthMatchTool, InDetVertexTruthMatchTool, InSituCalibStep, JetAttributeHisto, JetAttributeRatioSelector, JetAttributeSelector, JetBadChanCorrTool, JetBalancePFlowJvtTool, JetBottomUpSoftDrop, JetCalibrationTool, JetCalibTool, JetCaloCellQualityTool, JetCaloEnergies, JetCaloQualityTool, JetCaloQualityToolFE, JetCleaningTool, JetClusterer, JetClustererByVertex, JetClusterMomentsTool, JetConstitFourMomTool, JetConstituentFrac, JetConstituentModSequence, JetConstituentsRetriever, JetContainerHistoFiller, JetCopier, JetDRTrackAssocTool, JetECPSFractionTool, JetEMScaleMomTool, JetEventSelector, JetFinder, JetForwardJvtTool, JetForwardJvtToolBDT, JetForwardPFlowJvtTool, JetFromPseudojet, JetGrooming::JetGroomer, JetGrooming::JetTrimming, JetGrooming::RecSoftDrop, JetGrooming::SoftDrop, JetGroomMRatio, JetHelper::HistoInput1D, JetHelper::HistoInput2D, JetHelper::HistoInput3D, JetHelper::VarTool, JetHistoBase, JetInputElRemovalTool, JetIsolationTool, JetLArHVTool, JetModifiedMassDrop, JetOriginCorrectionTool, JetParticleAssociation, JetPileupLabelingTool, JetPileupTag::JetVertexNNTagger, JetPruner, JetPseudojetCopier, JetPseudojetRetriever, JetPtAssociationTool, JetQGTaggerVariableTool, JetQuarkChargeLabelingTool, JetReclusterer, JetReclusteringTool, JetRecTool, JetRecursiveSoftDrop, JetSelectorAttribute, JetSelectorAttributeRunII, JetSoftDrop, JetSplitter, JetSubStructureMomentToolsBase, JetToolRunner, JetTrackMomentsTool, JetTrackSumMomentsTool, JetTrimmer, JetTruthLabelingTool, JetTruthParticleSelectorTool, JetUncertaintiesTool, JetUsedInFitTrackDecoratorTool, JetVertexFractionTool, JetVertexTaggerTool, JetVoronoiDiagramHelpers::Diagram, JetVoronoiMomentsTool, JetWidthTool, JSSTaggerBase, JSSTaggerUtils, JSSWTopTaggerANN, JSSWTopTaggerDNN, KTSplittingScaleTool, LeadingJetsRelations, LVL1::L1CaloCells2TriggerTowers, LVL1::L1CaloFcal23Cells2RxMappingTool, LVL1::L1CaloLArTowerEnergy, LVL1::L1CaloMonitoringCaloTool, LVL1::L1CaloOfflineTriggerTowerTools, LVL1::L1CaloTTIdTools, LVL1::L1CaloxAODOfflineTriggerTowerTools, LVL1::TrigT1CaloMonErrorTool, LVL1::TrigT1CaloMonErrorToolV1, LVL1BS::PpmByteStreamReadV1V2Tool, LVL1BS::TrigT1CaloDataAccessV2, MBTSTimeFilterTool, MCTruthClassifier, met::ColumnarMETMaker, met::METAssociationTool, met::METAssociator, met::METBuilderTool, met::METCaloRegionsTool, met::METEgammaAssociator, met::METElectronAssociator, met::METJetAssocTool, met::METJetTool, met::METMaker, met::METMuonAssociator, met::METNet, met::METPhotonAssociator, met::METRecoTool, met::METRefinerTool, met::METRegionsTool, met::METSignificance, met::METSoftAssociator, met::METSoftTermsTool, met::METSystematicsTool, met::METTauAssociator, met::METTrackFilterTool, met::METTruthAssociator, met::METTruthTool, MissingCellListTool, MvaTESEvaluator, MvaTESVariableDecorator, NSubjettinessRatiosTool, NSubjettinessTool, ORUtils::BaseOverlapTool, ORUtils::OverlapRemovalTool, PanTau::PanTauProcessor, PanTau::Tool_DecayModeDeterminator, PanTau::Tool_DetailsArranger, PanTau::Tool_FeatureExtractor, PanTau::Tool_InformationStore, PanTau::Tool_InputConverter, PanTau::Tool_ModeDiscriminator, PanTau::Tool_TauConstituentGetter, PanTau::Tool_TauConstituentSelector, ParticleJetDeltaRLabelTool, ParticleJetGhostLabelTool, ParticleScaleFactorTool, PDFWeight, Pileup1DResidualCalibStep, PileupAreaCalibStep, PMGTools::PMGCrossSectionTool, PMGTools::PMGDecayProductsSelectionTool, PMGTools::PMGHFProductionFractionTool, PMGTools::PMGSherpa22VJetsWeightTool, PMGTools::PMGSherpaVjetsSysTool, PMGTools::PMGTruthWeightTool, PuppiWeightTool, QwTool, Ringer::AsgRingerSelectorTool, SimpleMuonTriggerScaleFactors, SmearingCalibStep, SmoothedTopTagger, SmoothedWZTagger, SoftKillerWeightTool, ST::SUSYObjDef_xAOD, TauAnalysisTools::BuildTruthTaus, TauAnalysisTools::CommonDiTauEfficiencyTool, TauAnalysisTools::CommonDiTauSmearingTool, TauAnalysisTools::CommonEfficiencyTool, TauAnalysisTools::CommonSmearingTool, TauAnalysisTools::DiTauEfficiencyCorrectionsTool, TauAnalysisTools::DiTauSelectionTool, TauAnalysisTools::DiTauSmearingTool, TauAnalysisTools::DiTauTruthMatchingTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, TauAnalysisTools::TauHFVetoTool, TauAnalysisTools::TauSelectionTool, TauAnalysisTools::TauSmearingTool, TauAnalysisTools::TauTruthMatchingTool, TauAnalysisTools::TauTruthTrackMatchingTool, TauAODMuonRemovalTool, TauCalibrateLC, TauCombinedTES, TauDecayModeNNClassifier, TauElectronVetoVariables, TauEleOverlapChecker, TauGNNEvaluator, TauJetRNNEvaluator, TauPi0CreateROI, TauPi0ScoreCalculator, TauRecToolBase, tauRecTools::TauTrackRNNClassifier, tauRecTools::TrackRNN, TauShotFinder, TauTrackFinder, TauVertexedClusterDecorator, TauVertexFinder, TauVertexVariables, TauWPDecorator, TrackTruthSelectionTool, TrackVertexAssociationTool, Trig::DRScoringTool, Trig::EgammaDRScoringTool, Trig::IParticleRetrievalTool, Trig::JetManagerTool, Trig::MatchFromCompositeTool, Trig::MatchingTool, Trig::R3IParticleRetrievalTool, Trig::R3MatchingTool, Trig::StaticBunchCrossingTool, Trig::TrigConfBunchCrossingTool, Trig::TrigDecisionTool, Trig::TrigDecisionToolLite, Trig::TrigEgammaEmulationBaseHypoTool, Trig::TrigEgammaEmulationChain, Trig::TrigEgammaEmulationFastCaloHypoTool, Trig::TrigEgammaEmulationPrecisionElectronHypoTool, Trig::TrigEgammaEmulationPrecisionPhotonHypoTool, Trig::TrigEgammaEmulationToolMT, Trig::TrigEgammaMatchingTool, Trig::TrigMuonMatching, Trig::TypedScoringTool, Trig::xAODBunchCrossingTool, TrigConf::xAODConfigTool, TrigEgammaMatchingToolMT, TrigFastCalibWithRings, TrigGlobalEfficiencyCorrectionTool, Validator, VoronoiWeightTool, WeightsAgregator, WeightToolBase, xAOD::BPhysBlindingTool, xAOD::BPhysTrackVertexMapTool, xAOD::CaloIsolationTool, xAOD::TrackIsolationTool, xAODMaker::TriggerMenuMetaDataTool, xAODMaker::TruthMetaDataTool, xAODtoHepMCTool, ZDC::RPDAnalysisTool, ZDC::RpdSubtractCentroidTool, ZDC::ZdcAnalysisTool, ZDC::ZdcLEDAnalysisTool, ZDC::ZdcRecTool, ZDC::ZdcTrigValidTool, ZdcByteStreamReadV1V2Tool, ZdcDataAccessV2, ZdcRecChannelToolLucrod, ZdcRecChannelToolV2, and ZMassConstraint::ConstraintFit.

Definition at line 133 of file AsgTool.h.

133{ return StatusCode::SUCCESS; }

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

◆ object_label() [1/2]

string JetDumper::object_label ( const fastjet::PseudoJet & jet,
const std::string & label ) const
private

Definition at line 109 of file JetDumper.cxx.

109 {
110 string sout;
111 if ( jet.has_user_info<IConstituentUserInfo>() ) {
112 const IConstituentUserInfo& cui = jet.user_info<IConstituentUserInfo>();
113 return cui.label() + " pseudojet";
114 } else {
115 return "No-CUI pseudojet";
116 }
117 return label;
118}
virtual Label label() const =0
std::string label(const std::string &format, int i)
Definition label.h:19

◆ object_label() [2/2]

template<typename T>
std::string JetDumper::object_label ( const T * pjet,
const std::string & label ) const
private

Definition at line 356 of file JetDumper.h.

356 {
357 return label;
358}

◆ 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 JetDumper::print ( ) const
virtual

Print the state of the tool.

Implements asg::IAsgTool.

Definition at line 98 of file JetDumper.cxx.

98 {
99 std::string myname = "JetDumper::print: ";
100 ATH_MSG_INFO("Properties for JetDumper " << name());
101 ATH_MSG_INFO(" Container: " << m_cname);
102 ATH_MSG_INFO(" Detail: " << m_detail);
103 ATH_MSG_INFO(" LineDetail: " << m_linedetail);
104 ATH_MSG_INFO(" Max # objects: " << m_maxobj);
105}

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

NameList JetDumper::m_apmoms
private

Vector<float> moments.

Definition at line 163 of file JetDumper.h.

◆ m_bmoms

NameList JetDumper::m_bmoms
private

Int moments.

Definition at line 156 of file JetDumper.h.

◆ m_cbmoms

NameList JetDumper::m_cbmoms
private

Bool moments.

Definition at line 157 of file JetDumper.h.

◆ m_cname

std::string JetDumper::m_cname
private

Definition at line 148 of file JetDumper.h.

◆ m_detail

int JetDumper::m_detail
private

Definition at line 149 of file JetDumper.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_elmoms

NameList JetDumper::m_elmoms
private

Four-vector moments.

Definition at line 160 of file JetDumper.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_floatmax

float JetDumper::m_floatmax
private

Definition at line 153 of file JetDumper.h.

◆ m_fmoms

NameList JetDumper::m_fmoms
private

Definition at line 154 of file JetDumper.h.

◆ m_fvmoms

NameList JetDumper::m_fvmoms
private

String moments.

Definition at line 159 of file JetDumper.h.

◆ m_imoms

NameList JetDumper::m_imoms
private

Float moments.

Definition at line 155 of file JetDumper.h.

◆ m_linedetail

int JetDumper::m_linedetail
private

Definition at line 150 of file JetDumper.h.

◆ m_maxobj

int JetDumper::m_maxobj
private

Definition at line 152 of file JetDumper.h.

◆ m_prefix

int JetDumper::m_prefix
private

Definition at line 151 of file JetDumper.h.

◆ m_smoms

NameList JetDumper::m_smoms
private

Bool stored as char moments.

Definition at line 158 of file JetDumper.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vfmoms

NameList JetDumper::m_vfmoms
private

Vector<int> moments.

Definition at line 162 of file JetDumper.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vimoms

NameList JetDumper::m_vimoms
private

Element link moments.

Definition at line 161 of file JetDumper.h.


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