![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
20 m_reflinkName(
"TauRefittedPVLink"),
21 m_pvrefContainerName(
"TauRefittedPrimaryVertices"),
22 m_pvContainerName(
"PrimaryVertices"),
23 m_tauTrkContainerName(
"TauPVTracks"),
24 m_pvrefitter(
"Analysis::PrimaryVertexRefitter")
26 declareInterface<DerivationFramework::IAugmentationTool>(
this);
38 ATH_MSG_ERROR(
"No SG name provided for the output of the tau PV refitter tool!");
39 return StatusCode::FAILURE;
42 return StatusCode::SUCCESS;
47 return StatusCode::SUCCESS;
55 return StatusCode::FAILURE;
61 CHECK(
refit(TauRefittedPrimaryVertices,TauRefittedPrimaryVerticesAux));
69 return StatusCode::SUCCESS;
76 TauRefittedPrimaryVertices->setStore(TauRefittedPrimaryVerticesAux);
80 if (pv_cont == 0)
return StatusCode::SUCCESS;
84 std::vector<const xAOD::TrackParticle*> tps; tps.clear();
86 for (
auto trk: *trk_cont) tps.push_back(trk);
89 std::vector<unsigned int> pv_index; pv_index.clear();
90 unsigned int ipv = 0, ipv2 = 0;
92 for (
auto pv: *pv_cont ) {
96 TauRefittedPrimaryVertices->
push_back(pv_ref);
97 pv_index.push_back(ipv);
108 for (
auto pv: *pv_cont ) {
113 if (TauRefittedPrimaryVertices->
size() == 0) mDecor_pvLink(*
pv) = pvLink;
114 unsigned int irpv = 0;
115 for (
auto rpv: *TauRefittedPrimaryVertices ) {
116 if (ipv2 == pv_index[irpv]) {
117 ATH_MSG_DEBUG (
" pv x " <<
pv->x() <<
" y " <<
pv->y() <<
" z " <<
pv->z() <<
" ntrks " <<
pv->nTrackParticles() <<
" ndf " <<
pv->numberDoF() <<
" chi2 " <<
pv->chiSquared());
118 ATH_MSG_DEBUG (
"ref pv x " << rpv->x() <<
" y " << rpv->y() <<
" z " << rpv->z() <<
" ntrks " << rpv->nTrackParticles() <<
" ndf " << rpv->numberDoF() <<
" chi2 " << rpv->chiSquared());
121 mDecor_pvLink(*
pv) = pvLink;
125 mDecor_ref_pvLink(*rpv) = ref_pvLink;
127 mDecor_pvLink(*
pv) = pvLink;
134 return StatusCode::SUCCESS;
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
Temporary container used until we have I/O for AuxStoreInternal.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Helper class to provide type-safe access to aux data.
VertexAuxContainer_v1 VertexAuxContainer
Definition of the current jet auxiliary container.
::StatusCode StatusCode
StatusCode definition for legacy code.
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
#define CHECK(...)
Evaluate an expression and check for errors.
ElementLink implementation for ROOT usage.
bool setElement(ElementType element)
Set to point to an element.
bool setStorableObject(BaseConstReference data, bool replace=false, IProxyDict *sg=0)
Set link to point to a new container (storable).
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Class describing a Vertex.
size_type size() const noexcept
Returns the number of elements in the collection.