00001 #ifndef FastSimDataFormats_NuclearInteractions_FSimDisplacedVertex_h 00002 #define FastSimDataFormats_NuclearInteractions_FSimDisplacedVertex_h 00003 00004 #include "SimDataFormats/Vertex/interface/SimVertex.h" 00005 00006 #include "FastSimDataFormats/NuclearInteractions/interface/FSimVertexType.h" 00007 00008 #include <iostream> 00009 #include <vector> 00010 00028 class FSimDisplacedVertex { 00029 00030 00031 public: 00032 00033 FSimDisplacedVertex(); 00034 FSimDisplacedVertex(const SimVertex& vertex, 00035 unsigned id, int motherId, unsigned nCharged, 00036 const std::vector<int>& daughterIds, 00037 const FSimVertexType::VertexType vertexType 00038 ); 00039 00040 FSimDisplacedVertex(const FSimDisplacedVertex& other); 00041 00042 00043 00044 virtual ~FSimDisplacedVertex() {} 00045 00047 const SimVertex vertex() const { return vertex_; } 00048 00050 int id() const { return id_; } 00051 00053 int motherId() const { return motherId_; } 00054 00056 unsigned int nDaughters() const { return daughterIds_.size();} 00057 00059 unsigned int nChargedDaughters() const { return nCharged_;} 00060 00062 const std::vector<int>& daughterIds() const {return daughterIds_;} 00063 00065 const FSimVertexType::VertexType vertexType() const { return vertexType_;} 00066 00068 const bool isRecoVertex() const {return isRecoVertex_;} 00069 00071 const int recoVertexId() const {return recoVertexId_;} 00072 00074 void setRecoVertex(int recoVertexId) { 00075 isRecoVertex_ = true; 00076 recoVertexId_ = recoVertexId; 00077 } 00078 00080 void removeRecoVertex() { 00081 isRecoVertex_ = false; 00082 recoVertexId_ = -1; 00083 } 00084 00085 00086 private: 00087 00088 00090 SimVertex vertex_; 00091 00094 int id_; 00095 00097 int motherId_; 00098 00100 unsigned int nCharged_; 00101 00103 std::vector<int> daughterIds_; 00104 00106 FSimVertexType::VertexType vertexType_; 00107 00109 bool isRecoVertex_; 00110 00114 int recoVertexId_; 00115 00116 friend std::ostream& operator<<( std::ostream& out, const FSimDisplacedVertex& co ); 00117 00118 }; 00119 00120 #endif 00121 00122 00123