Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <VertexFittingTool.h>
|
| VertexFittingTool (const std::string &t, const std::string &name, const IInterface *p) |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | finalize () override |
|
virtual std::unique_ptr< xAOD::Vertex > | fitVertexWithPrimarySeed (const FittingInput &input, const std::vector< const xAOD::TrackParticle * > &tracks, VtxType vtx) override |
|
virtual std::unique_ptr< xAOD::Vertex > | fitVertexWithSeed (const FittingInput &input, const std::vector< const xAOD::TrackParticle * > &tracks, const Amg::Vector3D &seed, VtxType vtxType) override |
|
virtual bool | isValidVertex (const xAOD::Vertex *vtx) const override |
|
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 |
|
| DeclareInterfaceID (Prompt::IVertexFittingTool, 1, 0) |
|
Definition at line 29 of file VertexFittingTool.h.
◆ StoreGateSvc_t
◆ vtxPtr_t
◆ VertexFittingTool()
Prompt::VertexFittingTool::VertexFittingTool |
( |
const std::string & |
t, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
p |
|
) |
| |
◆ 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]
◆ DeclareInterfaceID()
◆ 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]
◆ decorateNewSecondaryVertex()
Definition at line 226 of file VertexFittingTool.cxx.
242 float distToPriVtx = -1;
243 float normDistToPriVtx = -1;
244 float distToRefittedPriVtx = -1;
245 float normDistToRefittedPriVtx = -1;
246 float distToRefittedRmLepPriVtx = -1;
247 float normDistToRefittedRmLepPriVtx = -1;
254 if(
input.refittedPriVtx) {
259 if(
input.refittedPriVtxWithoutLep) {
264 (*m_distToPriVtx) (*secVtx) = distToPriVtx;
265 (*m_normDistToPriVtx) (*secVtx) = normDistToPriVtx;
266 (*m_distToRefittedPriVtx) (*secVtx) = distToRefittedPriVtx;
267 (*m_normDistToRefittedPriVtx) (*secVtx) = normDistToRefittedPriVtx;
268 (*m_distToRefittedRmLepPriVtx) (*secVtx) = distToRefittedRmLepPriVtx;
269 (*m_normDistToRefittedRmLepPriVtx)(*secVtx) = normDistToRefittedRmLepPriVtx;
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ 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 Prompt::VertexFittingTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ fitVertexWithPrimarySeed()
◆ fitVertexWithSeed()
◆ getSecondaryVertexWithSeed()
Definition at line 275 of file VertexFittingTool.cxx.
284 std::vector<const xAOD::TrackParticle*> tracksForFit(tracks);
286 ATH_MSG_DEBUG(
"getSecondaryVertexWithSeed -- before remove " << tracksForFit.size());
290 ATH_MSG_DEBUG(
"getSecondaryVertexWithSeed -- after remove " << tracksForFit.size());
292 if(tracksForFit.size() < 2) {
293 ATH_MSG_WARNING(
"getSecondaryVertexWithSeed -- cannot fit vertex with one or zero input track: ntrack=" << tracksForFit.size());
300 ATH_MSG_DEBUG(
name() <<
"::getSecondaryVertexWithSeed -- N tracks = " << tracksForFit.size());
308 std::unique_ptr<xAOD::Vertex> seedVertex;
311 seedVertex = std::unique_ptr<xAOD::Vertex>(
m_seedVertexFitter->fit(tracksForFit, seed));
314 ATH_MSG_DEBUG(
"getSecondaryVertexWithSeed -- failed to fit seed vertex");
320 if(seedVertex.get()) {
328 ATH_MSG_INFO(
"getSecondaryVertexWithSeed -- failed to fit vertex and fitter returned null xAOD::Vertex pointer");
335 std::vector<ElementLink< xAOD::TrackParticleContainer> > tpLinks;
345 tpLinks.push_back(tpLink);
351 TLorentzVector Momentum;
354 Momentum +=
static_cast<TLorentzVector
>(
track->p4());
364 std::unique_ptr<xAOD::Vertex> returnPtr(newVertex);
◆ initialize()
StatusCode Prompt::VertexFittingTool::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.
◆ isValidVertex()
Implements Prompt::IVertexFittingTool.
Definition at line 165 of file VertexFittingTool.cxx.
170 bool bad_vtx =
false;
173 ATH_MSG_WARNING(
"VertexFittingSvc::Validate_Vertex -- invalid vtx pointer!!!");
179 ATH_MSG_WARNING(
"VertexFittingSvc::Validate_Vertex -- empty vtx covariance!!!");
182 float chisquared = -9999;
184 if(!
getVar(vtx, chisquared,
"chiSquared")) {
186 ATH_MSG_WARNING(
"VertexFittingSvc::Validate_Vertex -- not valid vtx chiSquared!!!");
189 float numberdof = -9999;
191 if(!
getVar(vtx, numberdof,
"numberDoF")) {
193 ATH_MSG_WARNING(
"VertexFittingSvc::Validate_Vertex -- not valid vtx numberDoF!!!");
196 if(std::isnan(vtx->
x()) || std::isnan(vtx->
y()) || std::isnan(vtx->
z())) {
198 ATH_MSG_WARNING(
"VertexFittingSvc::Validate_Vertex -- vertex coordinate is nan");
◆ 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.
◆ removeDoubleEntries()
Definition at line 210 of file VertexFittingTool.cxx.
212 const unsigned nbefore = tracks.size();
214 sort(tracks.begin(), tracks.end());
218 tracks.erase(TransfEnd, tracks.end());
220 if(nbefore != tracks.size()) {
221 ATH_MSG_DEBUG(
"removeDoubleEntries nbefore != tracks.size()): " << nbefore <<
" != " << tracks.size());
◆ renounce()
◆ 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()
◆ m_countNumberOfFits
int Prompt::VertexFittingTool::m_countNumberOfFits {0} |
|
private |
◆ m_countNumberOfFitsFailed
int Prompt::VertexFittingTool::m_countNumberOfFitsFailed {0} |
|
private |
◆ m_countNumberOfFitsInvalid
int Prompt::VertexFittingTool::m_countNumberOfFitsInvalid {0} |
|
private |
◆ m_detStore
◆ m_distToPriVtx
◆ m_distToPriVtxName
Gaudi::Property<std::string> Prompt::VertexFittingTool::m_distToPriVtxName |
|
private |
◆ m_distToRefittedPriVtx
◆ m_distToRefittedPriVtxName
Gaudi::Property<std::string> Prompt::VertexFittingTool::m_distToRefittedPriVtxName |
|
private |
Initial value:{
this, "DistToRefittedPriVtxName", "default"
}
Definition at line 92 of file VertexFittingTool.h.
◆ m_distToRefittedRmLepPriVtx
◆ m_distToRefittedRmLepPriVtxName
Gaudi::Property<std::string> Prompt::VertexFittingTool::m_distToRefittedRmLepPriVtxName |
|
private |
Initial value:{
this, "DistToRefittedRmLepPriVtxName", "default"
}
Definition at line 98 of file VertexFittingTool.h.
◆ m_doSeedVertexFit
Gaudi::Property<bool> Prompt::VertexFittingTool::m_doSeedVertexFit |
|
private |
◆ m_evtStore
◆ m_normDistToPriVtx
◆ m_normDistToPriVtxName
Gaudi::Property<std::string> Prompt::VertexFittingTool::m_normDistToPriVtxName |
|
private |
Initial value:{
this, "NormDistToPriVtxName", "default"
}
Definition at line 89 of file VertexFittingTool.h.
◆ m_normDistToRefittedPriVtx
◆ m_normDistToRefittedPriVtxName
Gaudi::Property<std::string> Prompt::VertexFittingTool::m_normDistToRefittedPriVtxName |
|
private |
Initial value:{
this, "NormDistToRefittedPriVtxName", "default"
}
Definition at line 95 of file VertexFittingTool.h.
◆ m_normDistToRefittedRmLepPriVtx
◆ m_normDistToRefittedRmLepPriVtxName
Gaudi::Property<std::string> Prompt::VertexFittingTool::m_normDistToRefittedRmLepPriVtxName |
|
private |
Initial value:{
this, "NormDistToRefittedRmLepPriVtxName", "default"
}
Definition at line 101 of file VertexFittingTool.h.
◆ m_secondaryVertexIndex
int Prompt::VertexFittingTool::m_secondaryVertexIndex {0} |
|
private |
◆ m_seedVertexFitter
Initial value:{
this, "seedVertexFitterTool",
"Trk::FastVertexFitter/FastVertexFitterTool"
}
Definition at line 77 of file VertexFittingTool.h.
◆ m_timer
TStopwatch Prompt::VertexFittingTool::m_timer |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vertexFitter
Initial value:{
this, "vertexFitterTool", "Trk::FastVertexFitter/FastVertexFitterTool"
}
Definition at line 74 of file VertexFittingTool.h.
◆ m_vhka
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
float x() const
Returns the x position.
bool toContainedElement(BaseConstReference data, ElementType element, IProxyDict *sg=0)
Set from element pointer and a reference to the container (storable)
Helper class to provide type-safe access to aux data.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
bool getVar(T1 &obj, T2 &value, const std::string &var_name)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const Amg::Vector3D & position() const
Returns the 3-pos.
std::string PrintResetStopWatch(TStopwatch &watch)
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
def timer(name, disabled=False)
virtual void setOwner(IDataHandleHolder *o)=0
double getNormDist(const Amg::Vector3D &PrimVtx, const Amg::Vector3D &SecVtx, const std::vector< float > &ErrorMatrix, MsgStream &msg)
double getDistance(const xAOD::Vertex *vtx1, const xAOD::Vertex *vtx2)
std::reverse_iterator< DataModel_detail::iterator< DVL > > unique(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, BinaryPredicate pred)
Specialization of unique for DataVector/List.
std::string printPromptVertexAsStr(const xAOD::Vertex *vtx, MsgStream &msg)
void setTrackParticleLinks(const TrackParticleLinks_t &trackParticles)
Set all track particle links at once.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
float z() const
Returns the z position.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const std::vector< float > & covariance() const
Returns the covariance matrix as a simple vector of values.
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
float y() const
Returns the y position.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Class describing a TrackParticle.
void setVertexMass(xAOD::Vertex *, float value)
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>