#include <PrimaryVertexRefitter.h>
|
| | PrimaryVertexRefitter (const std::string &t, const std::string &n, const IInterface *p) |
| | ~PrimaryVertexRefitter () |
| StatusCode | initialize () |
| xAOD::Vertex * | refitVertex (const xAOD::Vertex *vertex, const xAOD::Vertex *excludeVertex, bool ReturnCopy=true, int *exitcode=nullptr) const |
| xAOD::Vertex * | refitVertex (const xAOD::Vertex *vertex, const std::vector< const xAOD::TrackParticle * > &tps, bool ReturnCopy=true, int *exitcode=nullptr) const |
| 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 |
Definition at line 26 of file PrimaryVertexRefitter.h.
◆ StoreGateSvc_t
◆ PrimaryVertexRefitter()
| Analysis::PrimaryVertexRefitter::PrimaryVertexRefitter |
( |
const std::string & | t, |
|
|
const std::string & | n, |
|
|
const IInterface * | p ) |
◆ ~PrimaryVertexRefitter()
| Analysis::PrimaryVertexRefitter::~PrimaryVertexRefitter |
( |
| ) |
|
◆ declareGaudiProperty()
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
158 {
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
◆ declareProperty()
Definition at line 145 of file AthCommonDataStore.h.
145 {
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
◆ detStore()
◆ evtStore()
◆ 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
◆ initialize()
| StatusCode Analysis::PrimaryVertexRefitter::initialize |
( |
| ) |
|
Definition at line 21 of file PrimaryVertexRefitter.cxx.
21 {
22
24
26
27 return StatusCode::SUCCESS;
28
29}
#define CHECK(...)
Evaluate an expression and check for errors.
ToolHandle< Trk::ITrackToVertexIPEstimator > m_trackToVertexIPEstimator
◆ 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 & Analysis::PrimaryVertexRefitter::interfaceID |
( |
| ) |
|
|
inlinestatic |
Definition at line 32 of file PrimaryVertexRefitter.h.
static const InterfaceID IID_PrimaryVertexRefitter("PrimaryVertexRefitter", 1, 0)
◆ msg()
◆ msgLvl()
| bool AthCommonMsg< AlgTool >::msgLvl |
( |
const MSG::Level | lvl | ) |
const |
|
inlineinherited |
◆ 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.
◆ refitVertex() [1/2]
Definition at line 76 of file PrimaryVertexRefitter.cxx.
77{
78
79 if (vertex == 0) {
80 ATH_MSG_DEBUG(
"Empty original xAOD::Vertex pointer passed: returning 0");
82 return 0;
83 }
84 unsigned int ntrk_pv =
vertex->nTrackParticles();
85 if (ntrk_pv == 0) {
86 ATH_MSG_DEBUG(
"Input vertex has no associated tracks: returning 0");
88 return 0;
89 }
91 ATH_MSG_DEBUG(
"The number of tracks " << ntrk_pv <<
" in the original vertex is already <= the allowed minimum number of tracks " <<
m_ntrk_min <<
", returning original vertex");
94 }
95 unsigned int ntrk = tps.size();
96 if (ntrk == 0) {
97 ATH_MSG_DEBUG(
"No tracks requested to be removed: returning original vertex");
100 }
101
104 std::vector <const xAOD::TrackParticle*>::const_iterator
pb = tps.begin();
105 std::vector <const xAOD::TrackParticle*>::const_iterator
pe = tps.end();
109 if (tmpVert != vertex) delete tmpVert;
110 if (reducedVertex == 0) {
113 return returnCopy ?
new xAOD::Vertex(*vertex) : nullptr;
114 }
115 tmpVert = reducedVertex;
117 ATH_MSG_DEBUG(
"The number of tracks in the refitted vertex would be less than the allowed minimum number of tracks: " <<
m_ntrk_min <<
", returning original vertex");
118 delete reducedVertex;
120 return returnCopy ?
new xAOD::Vertex(*vertex) : nullptr;
121 }
122 }
124 return reducedVertex;
125}
Gaudi::Property< unsigned int > m_ntrk_min
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
◆ refitVertex() [2/2]
| xAOD::Vertex * Analysis::PrimaryVertexRefitter::refitVertex |
( |
const xAOD::Vertex * | vertex, |
|
|
const xAOD::Vertex * | excludeVertex, |
|
|
bool | ReturnCopy = true, |
|
|
int * | exitcode = nullptr ) const |
Definition at line 40 of file PrimaryVertexRefitter.cxx.
41{
42
43 if (vertex == 0) {
44 ATH_MSG_DEBUG(
"Empty original xAOD::Vertex pointer passed: returning 0");
46 return 0;
47 }
48 unsigned int ntrk_pv =
vertex->nTrackParticles();
49 if (ntrk_pv == 0) {
50 ATH_MSG_DEBUG(
"Input vertex has no associated tracks: returning 0");
52 return 0;
53 }
54 if (excludeVertex == 0) {
55 ATH_MSG_DEBUG(
"Empty exclude xAOD::Vertex pointer passed: returning original vertex");
58 }
59 std::vector<const xAOD::TrackParticle*> tps; tps.clear();
61 if (ntrk == 0) {
62 ATH_MSG_DEBUG(
"Exclude vertex has no associated tracks: returning original vertex");
65 }
66
67 for (
unsigned int i = 0;
i < ntrk ; ++
i) {
69 if (tp==0) continue;
70 tps.push_back(tp);
71 }
72 return refitVertex(vertex,tps, returnCopy, exitcode);
73}
xAOD::Vertex * refitVertex(const xAOD::Vertex *vertex, const xAOD::Vertex *excludeVertex, bool ReturnCopy=true, int *exitcode=nullptr) const
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
◆ renounce()
Definition at line 380 of file AthCommonDataStore.h.
381 {
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()
◆ 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()
Definition at line 308 of file AthCommonDataStore.h.
308 {
309
310
313 for (
auto k :
keys) {
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka
◆ m_detStore
◆ m_evtStore
◆ m_ntrk_min
| Gaudi::Property<unsigned int> Analysis::PrimaryVertexRefitter::m_ntrk_min {this,"MinimumNumberOfTracksInVertex",2} |
|
private |
◆ m_trackToVertexIPEstimator
| ToolHandle<Trk::ITrackToVertexIPEstimator> Analysis::PrimaryVertexRefitter::m_trackToVertexIPEstimator { this, "TrackToVertexIPEstimator", "Trk::TrackToVertexIPEstimator" } |
|
private |
Definition at line 42 of file PrimaryVertexRefitter.h.
42{ this, "TrackToVertexIPEstimator", "Trk::TrackToVertexIPEstimator" };
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files: