|
ATLAS Offline Software
|
Go to the documentation of this file.
60 return StatusCode::FAILURE;
63 return StatusCode::SUCCESS;
74 return StatusCode::FAILURE;
77 if (!tracks.isValid())
80 return StatusCode::FAILURE;
83 if (!vertexHandle.isValid())
86 return StatusCode::FAILURE;
92 std::vector<const xAOD::Vertex *> vertices;
93 vertices.reserve(vertexHandle->size());
98 vertices.push_back(vtx);
106 return StatusCode::SUCCESS;
119 filteredTracks = tracks.ptr();
124 double minTrkEta = std::numeric_limits<double>::infinity();
125 double maxTrkEta = -std::numeric_limits<double>::infinity();
127 std::vector<std::tuple<bool, const xAOD::TrackParticle *, TrackExtension>>
extensions;
140 isPV =
m_tvaTool->getUniqueMatchVertex(*
track, vertices) == priVtx;
147 double eta = iclus->eta();
148 if (iclus->e() < 0.0 ||
156 double phi = iclus->phi();
159 for (
const std::tuple<bool, const xAOD::TrackParticle *, TrackExtension> &
ext :
extensions)
164 totalSum += std::get<1>(
ext)->pt();
165 if (std::get<0>(
ext))
166 PVSum += std::get<1>(
ext)->pt();
168 decCVF(*iclus) = totalSum == 0 ? -1 : PVSum / totalSum;
170 return StatusCode::SUCCESS;
CVFAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
virtual StatusCode initialize() override
Initialise the algorithm.
std::string contKeyFromKey(const std::string &key)
Extract the container part of key.
Gaudi::Property< double > m_clusterMatchDR
ToolHandle< InDet::IInDetTrackSelectionTool > m_trackSelTool
Scalar phi() const
phi method
virtual StatusCode execute(const EventContext &ctx) const override
Run the algorithm.
bool m_useTrackSelTool
Is a track selection tool being used?
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Scalar eta() const
pseudorapidity method
DataVector adapter that acts like it holds const pointers.
SG::WriteDecorHandleKey< xAOD::CaloClusterContainer > m_outputCVFKey
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_inputClusterKey
const std::string & key() const
Return the StoreGate ID for the referenced object.
Some common helper functions used by decoration handles.
VxType::VertexType vertexType() const
The type of the vertex.
const DV * asDataVector() const
Return a pointer to this object, as a const DataVector.
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Description of a calorimeter cluster.
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inputTrackKey
::StatusCode StatusCode
StatusCode definition for legacy code.
ToolHandle< IExtendTrackToLayerTool > m_extensionTool
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Handle class for adding a decoration to an object.
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Class describing a Vertex.
DataVector adapter that acts like it holds const pointers.
Class describing a TrackParticle.
Handle class for reading from StoreGate.
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
SG::ReadHandleKey< xAOD::VertexContainer > m_inputVertexKey
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Property< bool > m_useCompatible
ToolHandle< CP::ITrackVertexAssociationTool > m_tvaTool