ATLAS Offline Software
Loading...
Searching...
No Matches
xAODMaker::IsoMuonFeatureCnvTool Class Reference

Implementation for the IIsoMuonFeatureCnvTool interface. More...

#include <IsoMuonFeatureCnvTool.h>

Inheritance diagram for xAODMaker::IsoMuonFeatureCnvTool:
Collaboration diagram for xAODMaker::IsoMuonFeatureCnvTool:

Public Member Functions

 IsoMuonFeatureCnvTool (const std::string &type, const std::string &name, const IInterface *parent)
 Regular AlgTool constructor.
virtual StatusCode convert (const IsoMuonFeature *aod, xAOD::L2IsoMuon *xaod) override
 Function that fills an existing xAOD::L2IsoMuon.
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

Static Public Member Functions

static const InterfaceID & interfaceID ()
 Gaudi interface definition.

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

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

Implementation for the IIsoMuonFeatureCnvTool interface.

   This is a simple tool that implements the converter function
   defined in IIsoMuonFeatureCnvTool.
Author
stefano giagu stefa.nosp@m.no.g.nosp@m.iagu@.nosp@m.cern.nosp@m..ch

Definition at line 32 of file IsoMuonFeatureCnvTool.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

◆ IsoMuonFeatureCnvTool()

xAODMaker::IsoMuonFeatureCnvTool::IsoMuonFeatureCnvTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Regular AlgTool constructor.

Definition at line 18 of file IsoMuonFeatureCnvTool.cxx.

21 : AthAlgTool( type, name, parent ) {
22
23 // Declare the interface(s) provided by the tool:
24 declareInterface< IIsoMuonFeatureCnvTool >( this );
25 }
AthAlgTool()
Default constructor:

Member Function Documentation

◆ convert()

StatusCode xAODMaker::IsoMuonFeatureCnvTool::convert ( const IsoMuonFeature * aod,
xAOD::L2IsoMuon * xaod )
overridevirtual

Function that fills an existing xAOD::L2IsoMuon.

Implements xAODMaker::IIsoMuonFeatureCnvTool.

Definition at line 27 of file IsoMuonFeatureCnvTool.cxx.

28 {
29
30 xaod->setPt (aod->pt());
31 xaod->setEta (aod->eta());
32 xaod->setPhi (aod->phi());
33 xaod->setRoiWord (aod->getRoiIdMu());
34 xaod->setCharge (aod->charge());
35 xaod->setErrorFlag (aod->getFlag());
36 xaod->setSumPt01 (aod->getsumpt01());
37 xaod->setSumPt02 (aod->getsumpt02());
38 xaod->setSumPt03 (aod->getsumpt03());
39 xaod->setSumPt04 (aod->getsumpt04());
40 xaod->setSumEt01 (aod->getsumet01());
41 xaod->setSumEt02 (aod->getsumet02());
42 xaod->setSumEt03 (aod->getsumet03());
43 xaod->setSumEt04 (aod->getsumet04());
44
45 ATH_MSG_VERBOSE("Orig vs xAOD: Pt: " << aod->pt() << " " << xaod->pt());
46 ATH_MSG_VERBOSE("Orig vs xAOD: Eta: " << aod->eta() << " " << xaod->eta());
47 ATH_MSG_VERBOSE("Orig vs xAOD: phi: " << aod->phi() << " " << xaod->phi());
48 ATH_MSG_VERBOSE("Orig vs xAOD: roiWord: " << aod->getRoiIdMu() << " " << xaod->roiWord());
49 ATH_MSG_VERBOSE("Orig vs xAOD: charge: " << aod->charge() << " " << xaod->charge());
50 ATH_MSG_VERBOSE("Orig vs xAOD: flag: " << aod->getFlag() << " " << xaod->errorFlag());
51 ATH_MSG_VERBOSE("Orig vs xAOD: sumpt01: " << aod->getsumpt01() << " " << xaod->sumPt01());
52 ATH_MSG_VERBOSE("Orig vs xAOD: sumpt02: " << aod->getsumpt02() << " " << xaod->sumPt02());
53 ATH_MSG_VERBOSE("Orig vs xAOD: sumpt03: " << aod->getsumpt03() << " " << xaod->sumPt03());
54 ATH_MSG_VERBOSE("Orig vs xAOD: sumpt04: " << aod->getsumpt04() << " " << xaod->sumPt04());
55 ATH_MSG_VERBOSE("Orig vs xAOD: sumet01: " << aod->getsumet01() << " " << xaod->sumEt01());
56 ATH_MSG_VERBOSE("Orig vs xAOD: sumet02: " << aod->getsumet02() << " " << xaod->sumEt02());
57 ATH_MSG_VERBOSE("Orig vs xAOD: sumet03: " << aod->getsumet03() << " " << xaod->sumEt03());
58 ATH_MSG_VERBOSE("Orig vs xAOD: sumet04: " << aod->getsumet04() << " " << xaod->sumEt04());
59
60 ATH_MSG_DEBUG("Note: some of the original infos considered obsolete not implemented");
61
62 // Return gracefully:
63 return StatusCode::SUCCESS;
64 }
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
float getsumpt04() const
double charge(void) const
float getsumet02() const
int getRoiIdMu() const
Get Muon RoI Id.
float getsumpt01() const
Get Transverse Pt sum in cone.
float getsumet04() const
double pt(void) const
transverse momentum
float getsumpt02() const
float getsumpt03() const
int getFlag() const
double eta(void) const
pseudo rapidity
float getsumet01() const
Get Transverse Energy sum in cone.
float getsumet03() const
double phi(void) const
phi in [-pi,pi[
float sumPt02() const
get ptcone radius DeltaR<0.2
float sumPt01() const
get ptcone radius DeltaR<0.1
void setPt(float pt)
Set the transverse momentum ( ) of the muon.
float sumPt03() const
get ptcone radius DeltaR<0.3
virtual double phi() const
The azimuthal angle ( ) of the particle.
float sumEt01() const
get ptcone radius DeltaR<0.1
float sumEt03() const
get etcone radius DeltaR<0.3
void setSumEt02(float value)
set etcone radius DeltaR<0.2
void setSumPt03(float value)
set ptcone radius DeltaR<0.3
int errorFlag() const
get algorithm error flag
void setErrorFlag(int value)
set algorithm error flag
float sumEt02() const
get etcone radius DeltaR<0.2
float sumEt04() const
get etcone radius DeltaR<0.4
float charge() const
get seeding muon charge
void setSumEt01(float value)
set ptcone radius DeltaR<0.1
void setSumPt04(float value)
set ptcone radius DeltaR<0.4
virtual double eta() const
The pseudorapidity ( ) of the particle.
void setSumPt02(float value)
set ptcone radius DeltaR<0.2
void setSumEt03(float value)
set etcone radius DeltaR<0.3
void setSumEt04(float value)
set etcone radius DeltaR<0.4
void setCharge(float value)
set seeding muon charge
float sumPt04() const
get ptcone radius DeltaR<0.4
void setEta(float eta)
Set the pseudorapidity ( ) of the muon.
void setRoiWord(uint32_t value)
Set the RoI ID of the seeding muon.
uint32_t roiWord() const
Get the RoI ID of the seeding muon.
void setSumPt01(float value)
set ptcone radius DeltaR<0.1
virtual double pt() const
The transverse momentum ( ) of the particle.
void setPhi(float phi)
Set the azimuthal angle ( ) of the muon.

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

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

◆ declareProperty()

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

Definition at line 145 of file AthCommonDataStore.h.

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

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

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

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

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

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

Add StoreName to extra input/output deps as needed.

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

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

◆ interfaceID()

const InterfaceID & xAODMaker::IIsoMuonFeatureCnvTool::interfaceID ( )
inlinestaticinherited

Gaudi interface definition.

Definition at line 40 of file IIsoMuonFeatureCnvTool.h.

40 {
42 }
static const InterfaceID IID_IIsoMuonFeatureCnvTool("xAODMaker::IIsoMuonFeatureCnvTool", 1, 0)
The interface.

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

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

Definition at line 30 of file AthCommonMsg.h.

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

◆ outputHandles()

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

Return this algorithm's output handles.

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

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

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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