14#include "GaudiKernel/ISvcLocator.h"
15#include "GaudiKernel/Service.h"
30 const std::string& name ) :
48 return StatusCode::SUCCESS;
64 if(
r->composite() ) {
65 for(
unsigned i=
r->size() ; i-- ; )
71 if(
r->isFullscan() )
return true;
73 bool contained_zed =
posZ(v) >=
r->zedMinus() and
74 posZ(v) <=
r->zedPlus();
76 if( contained_zed )
return true;
96 const std::vector< const V* >& vvec,
99 std::vector< const V* > selectedVertices;
101 for(
const V* thisVertex : vvec ) {
103 selectedVertices.push_back( thisVertex );
107 return selectedVertices;
111template std::vector< const xAOD::Vertex* >
112IDTPM:: VertexRoiSelectionTool::getVertices< xAOD::Vertex >(
113 const std::vector< const xAOD::Vertex* >& vvec,
117template std::vector< const xAOD::TruthVertex* >
119 const std::vector< const xAOD::TruthVertex* >& vvec,
126std::vector< const xAOD::Vertex* >
128 const std::vector< const xAOD::Vertex* >& vvec,
140 std::vector< const xAOD::Vertex* > selectedTrigVertices;
142 for( vtxItr = trigVtxItrPair.first ; vtxItr != trigVtxItrPair.second ; ++vtxItr ) {
145 if( std::find( vvec.begin(), vvec.end(), *vtxItr ) == vvec.end() ) {
146 ATH_MSG_DEBUG(
"Trigger vertex does not pass quality selection. Skipping." );
149 selectedTrigVertices.push_back( *vtxItr );
152 return selectedTrigVertices;
166 ISvcLocator* svcLoc = Gaudi::svcLocator();
167 SmartIF< ITrackAnalysisDefinitionSvc > trkAnaDefSvc(
168 svcLoc->service(
"TrkAnaDefSvc"+trkAnaColls.
anaTag() ) );
184 if( trkAnaDefSvc->useOffline() ) {
193 if( trkAnaDefSvc->useTruth() ) {
205 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Class to hold for each event collections needed in the TrkAnalsis.
Utility methods to access track/truth particles parmeters in a consitent way in this package.
DataModel_detail::const_iterator< DataVector > const_iterator
ElementConstPointer cptr() const
Return a pointer to the referenced element.
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)
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
float posZ(const V &v)
Accessor utility function for getting the value of vertex position z.
TruthVertex_v1 TruthVertex
Typedef to implementation.
Vertex_v1 Vertex
Define the latest version of the vertex class.