|
ATLAS Offline Software
|
Go to the documentation of this file.
14 #include "GaudiKernel/ISvcLocator.h"
15 #include "GaudiKernel/Service.h"
30 const std::string&
name ) :
43 ATH_CHECK( m_triggerVertexContainerName.initialize(
44 not m_triggerVertexContainerName.key().empty() ) );
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
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 ) {
102 if( accept<V>( *thisVertex,
r ) ) {
103 selectedVertices.push_back( thisVertex );
107 return selectedVertices;
111 template std::vector< const xAOD::Vertex* >
112 IDTPM:: VertexRoiSelectionTool::getVertices< xAOD::Vertex >(
113 const std::vector< const xAOD::Vertex* >& vvec,
117 template std::vector< const xAOD::TruthVertex* >
119 const std::vector< const xAOD::TruthVertex* >& vvec,
126 std::vector< const xAOD::Vertex* >
128 const std::vector< const xAOD::Vertex* >& vvec,
137 m_trigDecTool->associateToEventView( handle, roiLink );
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() ) );
175 if( not m_triggerVertexContainerName.key().empty() ) {
184 if( trkAnaDefSvc->useOffline() ) {
193 if( trkAnaDefSvc->useTruth() ) {
205 return StatusCode::SUCCESS;
std::string printVertexInfo(Stage stage=FULL) const
print information about vertices in the collection(s)
Const iterator class for DataVector/DataList.
std::string find(const std::string &s)
return a remapped string
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
StatusCode accept(const xAOD::Muon *mu)
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
StatusCode fillTruthVertexVec(const std::vector< const xAOD::TruthVertex * > &vec, Stage stage=FULL)
fill truth/offline/trigger vertex vector (TEST or REFERENCE)
Class to hold for each event collections needed in the TrkAnalsis.
StatusCode fillTrigVertexVec(const std::vector< const xAOD::Vertex * > &vec, Stage stage=FULL)
Trigger tracks.
Utility methods to access track/truth particles parmeters in a consitent way in this package.
::StatusCode StatusCode
StatusCode definition for legacy code.
float posZ(const V &v)
Accessor utility function for getting the value of vertex position z.
const std::vector< const xAOD::TruthVertex * > & truthVertexVec(Stage stage=FULL)
get truth/offline/trigger vertex vector (TEST or REFERENCE)
const std::vector< const xAOD::Vertex * > & trigVertexVec(Stage stage=FULL)
Class describing a truth vertex in the MC record.
const std::vector< const xAOD::Vertex * > & offlVertexVec(Stage stage=FULL)
ElementConstPointer cptr() const
Return a pointer to the referenced element.
Class describing a Vertex.
const std::string & anaTag()
— Getter methods —
StatusCode fillOfflVertexVec(const std::vector< const xAOD::Vertex * > &vec, Stage stage=FULL)
Offline tracks.