ATLAS Offline Software
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 
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 }
IDTPM::TrackAnalysisCollections::printVertexInfo
std::string printVertexInfo(Stage stage=FULL) const
print information about vertices in the collection(s)
Definition: TrackAnalysisCollections.cxx:1089
IDTPM::TrackAnalysisCollections
Definition: TrackAnalysisCollections.h:46
asg
Definition: DataHandleTestTool.h:28
IDTPM::VertexQualitySelectionTool::VertexQualitySelectionTool
VertexQualitySelectionTool(const std::string &name)
Constructor.
Definition: VertexQualitySelectionTool.cxx:22
IDTPM::TrackAnalysisCollections::fillTruthVertexVec
StatusCode fillTruthVertexVec(const std::vector< const xAOD::TruthVertex * > &vec, Stage stage=FULL)
fill truth/offline/trigger vertex vector (TEST or REFERENCE)
Definition: TrackAnalysisCollections.cxx:553
TrackAnalysisCollections.h
Class to hold for each event collections needed in the TrkAnalsis.
IDTPM::VertexQualitySelectionTool::selectVertices
virtual StatusCode selectVertices(TrackAnalysisCollections &trkAnaColls) override
Main Vertex selection method.
Definition: VertexQualitySelectionTool.cxx:45
IDTPM::TrackAnalysisCollections::fillTrigVertexVec
StatusCode fillTrigVertexVec(const std::vector< const xAOD::Vertex * > &vec, Stage stage=FULL)
Trigger tracks.
Definition: TrackAnalysisCollections.cxx:587
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
IDTPM::TrackAnalysisCollections::FS
@ FS
Definition: TrackAnalysisCollections.h:54
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
IDTPM::VertexQualitySelectionTool::initialize
virtual StatusCode initialize() override
Initialize.
Definition: VertexQualitySelectionTool.cxx:30
IDTPM::TrackAnalysisCollections::truthVertexVec
const std::vector< const xAOD::TruthVertex * > & truthVertexVec(Stage stage=FULL)
get truth/offline/trigger vertex vector (TEST or REFERENCE)
Definition: TrackAnalysisCollections.h:249
IDTPM::TrackAnalysisCollections::trigVertexVec
const std::vector< const xAOD::Vertex * > & trigVertexVec(Stage stage=FULL)
Definition: TrackAnalysisCollections.h:253
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
IDTPM::TrackAnalysisCollections::offlVertexVec
const std::vector< const xAOD::Vertex * > & offlVertexVec(Stage stage=FULL)
Definition: TrackAnalysisCollections.h:251
VertexQualitySelectionTool.h
Tool to handle all required reco and truth vertex quality selections in this package.
IDTPM::TrackAnalysisCollections::FULL
@ FULL
Definition: TrackAnalysisCollections.h:54
IDTPM::TrackAnalysisCollections::anaTag
const std::string & anaTag()
— Getter methods —
Definition: TrackAnalysisCollections.h:181
asg::AsgTool::initialize
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: AsgTool.h:133
IDTPM::TrackAnalysisCollections::fillOfflVertexVec
StatusCode fillOfflVertexVec(const std::vector< const xAOD::Vertex * > &vec, Stage stage=FULL)
Offline tracks.
Definition: TrackAnalysisCollections.cxx:570