Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <VertexFinder.h>
|
| VertexFinder (const std::string &type, const std::string &name, const IInterface *parent) |
| Constructor. More...
|
|
virtual | ~VertexFinder () |
| Destructor. More...
|
|
virtual StatusCode | initialize () override |
| Tool initializer. More...
|
|
virtual StatusCode | execute (DiTauCandidateData *data, const EventContext &ctx) const override |
| Execute - called for each Ditau candidate. More...
|
|
ElementLink< xAOD::VertexContainer > | getPV_TJVA (const xAOD::DiTauJet *, const xAOD::VertexContainer *, float &maxJVF, const EventContext &ctx) const |
|
virtual StatusCode | eventInitialize (DiTauCandidateData *data) |
| Event initializer - called at the beginning of each event. More...
|
|
virtual StatusCode | finalize () |
| Finalizer. More...
|
|
template<class T > |
bool | retrieveTool (T &tool) |
| Convenience functions to handle storegate objects. 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 | sysInitialize () override |
| Perform system initialization for an algorithm. 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 |
|
Definition at line 14 of file VertexFinder.h.
◆ StoreGateSvc_t
◆ VertexFinder()
VertexFinder::VertexFinder |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Constructor.
Definition at line 9 of file VertexFinder.cxx.
15 declareInterface<DiTauToolBase > (
this);
◆ ~VertexFinder()
VertexFinder::~VertexFinder |
( |
| ) |
|
|
virtualdefault |
◆ 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()
◆ eventInitialize()
Event initializer - called at the beginning of each event.
Definition at line 32 of file DiTauToolBase.cxx.
34 return StatusCode::SUCCESS;
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
Execute - called for each Ditau candidate.
Reimplemented from DiTauToolBase.
Definition at line 32 of file VertexFinder.cxx.
48 for (
const auto *
const vtx : *vxContainer) {
56 if (vxPrimary ==
nullptr) {
58 " Continue without Tau Vertex Association.");
59 return StatusCode::SUCCESS;
63 pDiTau->
setVertex(vxContainer.get(), vxPrimary);
67 ATH_MSG_DEBUG(
"TJVA enabled -> try to find new PV for the tau candidate");
71 if (newPrimaryVertexLink.
isValid()) {
83 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
◆ finalize()
StatusCode DiTauToolBase::finalize |
( |
| ) |
|
|
virtualinherited |
◆ getJetVertexFraction()
Definition at line 132 of file VertexFinder.cxx.
134 float sumTrackPV = 0.;
135 float sumTrackAll = 0.;
136 for (
size_t iTrack = 0; iTrack < tracks.size(); ++iTrack)
140 if (ptvtx !=
nullptr) {
144 sumTrackAll +=
track->pt();
147 return sumTrackAll!=0. ? sumTrackPV/sumTrackAll : 0.;
◆ getPV_TJVA()
Definition at line 87 of file VertexFinder.cxx.
96 std::vector<const xAOD::TrackParticle*> assocTracks;
106 std::vector<float> jvf;
107 jvf.resize(vertices->
size());
108 for (
size_t iVertex = 0; iVertex < vertices->
size(); ++iVertex) {
116 for (
size_t iVertex = 0; iVertex < jvf.size(); ++iVertex) {
117 if (jvf.at(iVertex) > maxJVF) {
118 maxJVF = jvf.at(iVertex);
◆ initialize()
StatusCode VertexFinder::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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.
◆ interfaceID()
const InterfaceID & DiTauToolBase::interfaceID |
( |
| ) |
|
|
staticinherited |
InterfaceID implementation needed for ToolHandle.
Definition at line 9 of file DiTauToolBase.cxx.
10 return DiTauToolBaseID;
◆ 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()
◆ retrieveTool()
template<class T >
bool DiTauToolBase::retrieveTool |
( |
T & |
tool | ) |
|
|
inherited |
Convenience functions to handle storegate objects.
Definition at line 54 of file DiTauToolBase.cxx.
55 if (
tool.retrieve().isFailure()) {
◆ sysInitialize()
◆ 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_assocTracksName
std::string VertexFinder::m_assocTracksName |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_primVtxContainerName
◆ m_trackVertexAssocName
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
void setVertex(const xAOD::VertexContainer *cont, const xAOD::Vertex *vertex)
char data[hepevt_bytes_allocation_ATLAS]
void setDetail(DiTauJetParameters::Detail detail, int value)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
SG::ReadHandleKey< xAOD::VertexContainer > m_primVtxContainerName
#define ATH_MSG_VERBOSE(x)
static float getJetVertexFraction(const xAOD::Vertex *, const std::vector< const xAOD::TrackParticle * > &, const jet::TrackVertexAssociation *)
bool isValid() const
Test to see if the link can be dereferenced.
virtual void setOwner(IDataHandleHolder *o)=0
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...
ElementLink< xAOD::VertexContainer > getPV_TJVA(const xAOD::DiTauJet *, const xAOD::VertexContainer *, float &maxJVF, const EventContext &ctx) const
SG::ReadHandleKey< jet::TrackVertexAssociation > m_trackVertexAssocName
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
size_t index() const
Return the index of this element within its container.
const xAOD::Vertex * associatedVertex(const xAOD::TrackParticle *trk) const
void setVertexLink(const VertexLink_t &vertexLink)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ElementLink implementation for ROOT usage.
const JetLink_t & jetLink() const
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
std::string m_assocTracksName
Class describing a TrackParticle.
const T * at(size_type n) const
Access an element, as an rvalue.
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>