ATLAS Offline Software
Loading...
Searching...
No Matches
VertexQualitySelectionTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
9
13
15#include "GaudiKernel/ISvcLocator.h"
16#include "GaudiKernel/Service.h"
17
18
23 const std::string& name ) :
24 asg::AsgTool( name ) { }
25
26
31
33
34 ATH_MSG_DEBUG( "Initializing " << name() );
35
37
38 return StatusCode::SUCCESS;
39}
40
41
46 TrackAnalysisCollections& trkAnaColls ) {
47
48 ATH_MSG_DEBUG( "Initially copying vertex collections to FullScan vectors" );
49
50 ISvcLocator* svcLoc = Gaudi::svcLocator();
51 SmartIF< ITrackAnalysisDefinitionSvc > trkAnaDefSvc(
52 svcLoc->service( "TrkAnaDefSvc" + trkAnaColls.anaTag() ) );
53 ATH_CHECK( trkAnaDefSvc.isValid() );
54
56 if( trkAnaDefSvc->useOffline() ) {
58 ATH_CHECK( trkAnaColls.fillOfflVertexVec(
61 }
62
63 if( trkAnaDefSvc->useTrigger() or trkAnaDefSvc->useEFTrigger() ) {
66 ATH_CHECK( trkAnaColls.fillTrigVertexVec(
69 }
70
71 if( trkAnaDefSvc->useTruth() ) {
73 ATH_CHECK( trkAnaColls.fillTruthVertexVec(
76 }
77
79 ATH_MSG_DEBUG( "Vertices after initial FullScan copy: " <<
81
83
84 return StatusCode::SUCCESS;
85}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
Class to hold for each event collections needed in the TrkAnalsis.
Tool to handle all required reco and truth vertex quality selections in this package.
const std::vector< const xAOD::Vertex * > & offlVertexVec(Stage stage=FULL)
StatusCode fillOfflVertexVec(const std::vector< const xAOD::Vertex * > &vec, Stage stage=FULL)
Offline tracks.
const std::string & anaTag()
— Getter methods —
const std::vector< const xAOD::TruthVertex * > & truthVertexVec(Stage stage=FULL)
get truth/offline/trigger vertex vector (TEST or REFERENCE)
StatusCode fillTruthVertexVec(const std::vector< const xAOD::TruthVertex * > &vec, Stage stage=FULL)
fill truth/offline/trigger vertex vector (TEST or REFERENCE)
StatusCode fillTrigVertexVec(const std::vector< const xAOD::Vertex * > &vec, Stage stage=FULL)
Trigger tracks.
const std::vector< const xAOD::Vertex * > & trigVertexVec(Stage stage=FULL)
std::string printVertexInfo(Stage stage=FULL) const
print information about vertices in the collection(s)
VertexQualitySelectionTool(const std::string &name)
Constructor.
virtual StatusCode initialize() override
Initialize.
virtual StatusCode selectVertices(TrackAnalysisCollections &trkAnaColls) override
Main Vertex selection method.
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition AsgTool.cxx:58
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition AsgTool.h:133