00001 // Dear emacs, this is -*- c++ -*- 00002 // $Id: TruthEventBase_v1.h 622193 2014-10-16 16:08:34Z krasznaa $ 00003 #ifndef XAODTRUTH_VERSIONS_TRUTHEVENTBASE_V1_H 00004 #define XAODTRUTH_VERSIONS_TRUTHEVENTBASE_V1_H 00005 00006 // System include(s): 00007 #include <vector> 00008 00009 // EDM include(s): 00010 #include "AthContainers/AuxElement.h" 00011 #include "AthLinks/ElementLink.h" 00012 #include "xAODBase/ObjectType.h" 00013 00014 // Local include(s): 00015 #include "xAODTruth/TruthParticleContainer.h" 00016 #include "xAODTruth/TruthVertexContainer.h" 00017 00018 namespace xAOD { 00019 00031 class TruthEventBase_v1 : public SG::AuxElement { 00032 00033 public: 00035 TruthEventBase_v1(); 00037 virtual ~TruthEventBase_v1() {} 00038 00041 00043 typedef ElementLink< TruthParticleContainer > TruthParticleLink_t; 00045 typedef std::vector< TruthParticleLink_t > TruthParticleLinks_t; 00046 00048 const TruthParticleLinks_t& truthParticleLinks() const; 00050 void setTruthParticleLinks( const TruthParticleLinks_t& plinks ); 00052 size_t nTruthParticles() const; 00054 const TruthParticleLink_t& truthParticleLink( size_t index ) const; 00056 const TruthParticle* truthParticle( size_t index ) const; 00058 void addTruthParticleLink( const TruthParticleLink_t& plink ); 00060 void clearTruthParticleLinks(); 00061 00063 00066 00068 typedef ElementLink< TruthVertexContainer > TruthVertexLink_t; 00070 typedef std::vector< TruthVertexLink_t > TruthVertexLinks_t; 00071 00073 const TruthVertexLinks_t& truthVertexLinks() const; 00075 void setTruthVertexLinks( const TruthVertexLinks_t& links ); 00077 size_t nTruthVertices() const; 00079 const TruthVertexLink_t& truthVertexLink( size_t index ) const; 00081 const TruthVertex* truthVertex( size_t index ) const; 00083 void addTruthVertexLink( const TruthVertexLink_t& vlink ); 00085 void clearTruthVertexLinks(); 00086 00088 00090 virtual Type::ObjectType type() const = 0; 00091 00093 void toPersistent(); 00094 00095 }; // class TruthEventBase_v1 00096 00097 } // namespace xAOD 00098 00099 // Declare the base class of TruthEventBase_v1 to StoreGate: 00100 #include "xAODCore/BaseInfo.h" 00101 SG_BASE( xAOD::TruthEventBase_v1, SG::AuxElement ); 00102 00103 #endif // XAODTRUTH_VERSIONS_TRUTHEVENTBASE_V1_H