|
ATLAS Offline Software
|
Algorithm creating xAOD::Muons from Muons.
More...
#include <MuonCnvAlg.h>
|
| MuonCnvAlg (const std::string &name, ISvcLocator *svcLoc) |
| Regular algorithm constructor. More...
|
|
virtual StatusCode | initialize () |
| Function initialising the algorithm. More...
|
|
virtual StatusCode | execute () |
| Function executing the algorithm. More...
|
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Algorithm creating xAOD::Muons from Muons.
This algorithm can be used to translate the Muons coming
from an AOD, and create xAOD::Muon objects out of them
for an output xAOD.
- Author
- Edward Moyse Edwar.nosp@m.d.Mo.nosp@m.yse@c.nosp@m.ern..nosp@m.ch
Definition at line 41 of file MuonCnvAlg.h.
◆ StoreGateSvc_t
◆ MuonCnvAlg()
xAODMaker::MuonCnvAlg::MuonCnvAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svcLoc |
|
) |
| |
◆ checkAndSetIsolation()
◆ checkAndSetParameter()
◆ convertAuthor()
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode xAODMaker::MuonCnvAlg::execute |
( |
| ) |
|
|
virtual |
Function executing the algorithm.
Definition at line 41 of file MuonCnvAlg.cxx.
47 return StatusCode::SUCCESS;
58 xaod->setStore( aux );
65 for( ; itr !=
end; ++itr ) {
71 muon->setP4((*itr)->pt(),(*itr)->eta(),(*itr)->phi());
75 muon->setAllAuthors( (*itr)->allAuthors());
78 if ((*itr)->isCombinedMuon())
80 else if ((*itr)->isStandAloneMuon())
81 muon->setMuonType(xAOD::Muon::MuonStandAlone);
82 else if ((*itr)->isSegmentTaggedMuon())
83 muon->setMuonType(xAOD::Muon::SegmentTagged);
84 else if ((*itr)->isCaloMuonId())
85 muon->setMuonType(xAOD::Muon::CaloTagged);
86 else if ((*itr)->isSiliconAssociatedForwardMuon())
87 muon->setMuonType(xAOD::Muon::SiliconAssociatedForwardMuon);
92 xAOD::Muon::Quality tightness;
93 if ((*itr)->isTight()) {
95 }
else if ((*itr)->isMedium()) {
100 muon->setQuality( tightness );
114 <<
" links CB " <<
muon->combinedTrackParticleLink().isValid()
115 <<
" ID " <<
muon->inDetTrackParticleLink().isValid()
116 <<
" MS " <<
muon->muonSpectrometerTrackParticleLink().isValid()
117 <<
" Primary " <<
muon->primaryTrackParticleLink().isValid()
124 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ getNewLink()
Definition at line 211 of file MuonCnvAlg.cxx.
213 std::string destname =
name;
214 if (destname.empty())
215 destname = oldLink.
dataID();
217 ATH_MSG_VERBOSE(
"MuonCnvAlg::getNewLink - Old link is "<<(oldLink.
isValid()?
"VALID":
"INVALID")<<
" with SGKey = "<<oldLink.
dataID()<<
" & index = "<<oldLink.
index()
218 <<
" and new link is "<<(newLink.
isValid()?
"VALID":
"INVALID")<<
" with SGKey = "<<newLink.
dataID()<<
" & index = "<<newLink.
index());
◆ initialize()
StatusCode xAODMaker::MuonCnvAlg::initialize |
( |
| ) |
|
|
virtual |
Function initialising the algorithm.
Definition at line 32 of file MuonCnvAlg.cxx.
38 return StatusCode::SUCCESS;
◆ inputHandles()
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() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ setIsolations()
◆ setLinks()
◆ setMuonHitContent()
◆ setParameters()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_aodContainerName
std::string xAODMaker::MuonCnvAlg::m_aodContainerName |
|
private |
◆ m_cbTrackParticles
std::string xAODMaker::MuonCnvAlg::m_cbTrackParticles |
|
private |
Location/Key for combined fit xAOD::TrackParticles.
Definition at line 69 of file MuonCnvAlg.h.
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_inDetTrackParticles
std::string xAODMaker::MuonCnvAlg::m_inDetTrackParticles |
|
private |
Location/Key for xAOD::TrackParticles from ID.
Definition at line 67 of file MuonCnvAlg.h.
◆ m_mgTrackParticles
std::string xAODMaker::MuonCnvAlg::m_mgTrackParticles |
|
private |
Location/Key for MuGirl combined fit xAOD::TrackParticles; needed in conversion from release 17.
Definition at line 70 of file MuonCnvAlg.h.
◆ m_muonDressingTool
◆ m_saTrackParticles
std::string xAODMaker::MuonCnvAlg::m_saTrackParticles |
|
private |
Location/Key for MS SA (extrap to beamline) xAOD::TrackParticles.
Definition at line 68 of file MuonCnvAlg.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_xaodContainerName
std::string xAODMaker::MuonCnvAlg::m_xaodContainerName |
|
private |
The documentation for this class was generated from the following files:
std::string m_saTrackParticles
Location/Key for MS SA (extrap to beamline) xAOD::TrackParticles.
const ElementLink< TrackParticleContainer > & primaryTrackParticleLink() const
std::string m_inDetTrackParticles
Location/Key for xAOD::TrackParticles from ID.
const Rec::TrackParticle * track() const
return the primary track of this muon
const ElementLink< Rec::TrackParticleContainer > & combinedTrackLink() const
Access to the smart pointer to the muon combined track.
Const iterator class for DataVector/DataList.
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
void setTrackParticleLink(TrackParticleType type, const ElementLink< TrackParticleContainer > &link)
Set method for TrackParticle links.
std::vector< ALFA_RawData_p1 > t0
void setMuonHitContent(const Analysis::Muon &aodmuon, xAOD::Muon &xaodmuon)
const TrackSummary * trackSummary() const
accessor function for TrackSummary.
@ scatteringNeighbourSignificance
@ innAngle
common MuGirl and MuTag parameters
@ ptcone20
Track isolation.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
static void checkAndSetIsolation(MuonParameters::ParamDef aodParameter, xAOD::Iso::IsolationType xaodParameter, const Analysis::Muon &aodmuon, xAOD::Muon &xaodmuon)
#define ATH_MSG_VERBOSE(x)
bool isValid() const
Test to see if the link can be dereferenced.
const ID_type & dataID() const
Get the key that we reference, as a string.
void setIsolation(float value, const Iso::IsolationType information)
Set method for Isolation values.
void setLinks(const Analysis::Muon &aodmuon, xAOD::Muon &xaodmuon) const
virtual void setOwner(IDataHandleHolder *o)=0
@ momentumBalanceSignificance
void setParameter(float value, const ParamDef parameter)
Set method for parameter values.
const ElementLink< Rec::TrackParticleContainer > & muonExtrapTrackLink() const
Access to the smart pointer to the muon track extrapolated to the vertex.
Temporary container used until we have I/O for AuxStoreInternal.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
static void checkAndSetParameter(MuonParameters::ParamDef aodParameter, xAOD::Muon::ParamDef xaodParameter, const Analysis::Muon &aodmuon, xAOD::Muon &xaodmuon)
void resetWithKeyAndIndex(const ID_type &dataID, index_type elemID, IProxyDict *sg=0)
Set the link to an element given by string key and index.
virtual StatusCode sysInitialize() override
Override sysInitialize.
ElementLink< xAOD::TrackParticleContainer > getNewLink(const ElementLink< Rec::TrackParticleContainer > &oldLink, const std::string &name) const
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
double parameter(MuonParameters::ParamDef x) const
get a parameter for this Muon - isolation energy in some cone for example
@ etcone20
Calorimeter isolation.
::StatusCode StatusCode
StatusCode definition for legacy code.
const ElementLink< TrackParticleContainer > & muonSpectrometerTrackParticleLink() const
Returns an ElementLink to the InnerDetector TrackParticle used in identification of this muon.
@ segmentDeltaEta
MuTag parameters.
#define CHECK(...)
Evaluate an expression and check for errors.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
definition of StoreGate container holding a vector of Analysis::Muon
std::string m_aodContainerName
The key of the input CaloClusterContainer.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
@ scatteringCurvatureSignificance
Muon_v1 Muon
Reference the current persistent version:
value_type push_back(value_type pElem)
Add an element to the end of the collection.
std::string m_cbTrackParticles
Location/Key for combined fit xAOD::TrackParticles.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const ElementLink< TrackParticleContainer > & inDetTrackParticleLink() const
Returns an ElementLink to the InnerDetector TrackParticle used in identification of this muon.
DataObjIDColl m_extendedExtraObjects
#define ATH_MSG_WARNING(x)
index_type index() const
Get the index of the element inside of its container.
static void setIsolations(const Analysis::Muon &aodmuon, xAOD::Muon &xaodmuon)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
const ElementLink< Rec::TrackParticleContainer > & inDetTrackLink() const
Access to the smart pointer to inner detector track.
AthAlgorithm()
Default constructor:
static void setParameters(const Analysis::Muon &aodmuon, xAOD::Muon &xaodmuon)
MuonAuxContainer_v5 MuonAuxContainer
Definition of the current Muon auxiliary container.
std::string m_xaodContainerName
The key for the output xAOD::CaloClusterContainer.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
@ spectrometerFieldIntegral
Discriminators and further variables.
ToolHandle< xAOD::IMuonDressingTool > m_muonDressingTool
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
const ElementLink< TrackParticleContainer > & combinedTrackParticleLink() const
Returns an ElementLink to the InnerDetector TrackParticle used in identification of this muon.
MuonType muonType() const