36 return StatusCode::FAILURE;
45 return StatusCode::FAILURE;
57 return StatusCode::FAILURE;
71 return StatusCode::SUCCESS;
82 auto vertexContainerPair = std::make_pair(vertexContainer, vertexAuxContainer);
86 if (trackParticleCollection.
isValid()) {
91 <<
" exists in StoreGate. No Vertexing Possible");
92 return StatusCode::FAILURE;
96 if (trackCollection.
isValid()) {
101 <<
" exists in StoreGate. No Vertexing Possible");
102 return StatusCode::FAILURE;
107 std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer* > myVertexContainerPair{
nullptr,
nullptr};
108 auto deletePair = [](std::pair<xAOD::VertexContainer*, xAOD::VertexAuxContainer* > &p){
109 delete p.first; p.first =
nullptr;
110 delete p.second; p.second =
nullptr;
113 if (vertexContainerPair.first) {
116 myVertexContainerPair =
m_VertexMergingTool->mergeVertexContainer( *vertexContainerPair.first );
117 deletePair(vertexContainerPair);
118 vertexContainerPair = myVertexContainerPair;
123 deletePair(vertexContainerPair);
126 if (myVertexContainerPair.first ==
nullptr) {
128 return StatusCode::FAILURE;
131 if (not myVertexContainerPair.first->hasStore()) {
133 return StatusCode::FAILURE;
136 << myVertexContainerPair.first->size() - 1
137 <<
" vertices (excluding dummy)");
141 std::unique_ptr<xAOD::VertexContainer>(myVertexContainerPair.first),
142 std::unique_ptr<xAOD::VertexAuxContainer>(myVertexContainerPair.second)));
146 vertexIter != myVertexContainerPair.first->end(); ++vertexIter ) {
147 if((*vertexIter)->nTrackParticles() > 0 and (*vertexIter)->vertexType() != 0 ){
151 if( vertexIter == myVertexContainerPair.first->begin() )
monitor_vertex(
"primVertex", **vertexIter);
156 return StatusCode::SUCCESS;
161 return StatusCode::SUCCESS;
165 if (prefix ==
"allVertex"){
174 else if (prefix ==
"primVertex"){
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define CHECK(...)
Evaluate an expression and check for errors.
Header file to be included by clients of the Monitored infrastructure.
An algorithm that can be simultaneously executed in multiple threads.
DataModel_detail::iterator< DataVector > iterator
virtual StatusCode finalize() override
ToolHandle< Trk::IVertexMergingTool > m_VertexMergingTool
SG::ReadHandleKey< TrackCollection > m_trkTracksName
ToolHandle< IVertexFinder > m_VertexFinderTool
BooleanProperty m_useTrackParticles
void monitor_vertex(const std::string &prefix, const xAOD::Vertex &vertex) const
virtual StatusCode execute(const EventContext &ctx) const override
InDetPriVxFinder(const std::string &name, ISvcLocator *pSvcLocator)
BooleanProperty m_doVertexSorting
ToolHandle< Trk::IVertexCollectionSortingTool > m_VertexCollectionSortingTool
ToolHandle< GenericMonitoringTool > m_monTool
virtual StatusCode initialize() override
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tracksName
SG::WriteHandleKey< xAOD::VertexContainer > m_vxCandidatesOutputName
BooleanProperty m_doVertexMerging
Group of local monitoring quantities and retain correlation when filling histograms
Declare a monitored scalar variable.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
double chi2(TH1 *h0, TH1 *h1)
VertexAuxContainer_v1 VertexAuxContainer
Definition of the current jet auxiliary container.
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.