File indexing completed on 2024-04-06 12:11:11
0001 #ifndef FastSimDataFormats_NuclearInteractions_FSimDisplacedVertex_h
0002 #define FastSimDataFormats_NuclearInteractions_FSimDisplacedVertex_h
0003
0004 #include "SimDataFormats/Vertex/interface/SimVertex.h"
0005
0006 #include "FastSimDataFormats/NuclearInteractions/interface/FSimVertexType.h"
0007
0008 #include <iostream>
0009 #include <vector>
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 class FSimDisplacedVertex {
0028 public:
0029 FSimDisplacedVertex();
0030 FSimDisplacedVertex(const SimVertex& vertex,
0031 unsigned id,
0032 int motherId,
0033 unsigned nCharged,
0034 const std::vector<int>& daughterIds,
0035 const FSimVertexType::VertexType vertexType);
0036
0037 FSimDisplacedVertex(const FSimDisplacedVertex& other);
0038
0039 virtual ~FSimDisplacedVertex() {}
0040
0041
0042 const SimVertex vertex() const { return vertex_; }
0043
0044
0045 int id() const { return id_; }
0046
0047
0048 int motherId() const { return motherId_; }
0049
0050
0051 unsigned int nDaughters() const { return daughterIds_.size(); }
0052
0053
0054 unsigned int nChargedDaughters() const { return nCharged_; }
0055
0056
0057 const std::vector<int>& daughterIds() const { return daughterIds_; }
0058
0059
0060 const FSimVertexType::VertexType vertexType() const { return vertexType_; }
0061
0062
0063 const bool isRecoVertex() const { return isRecoVertex_; }
0064
0065
0066 const int recoVertexId() const { return recoVertexId_; }
0067
0068
0069 void setRecoVertex(int recoVertexId) {
0070 isRecoVertex_ = true;
0071 recoVertexId_ = recoVertexId;
0072 }
0073
0074
0075 void removeRecoVertex() {
0076 isRecoVertex_ = false;
0077 recoVertexId_ = -1;
0078 }
0079
0080 private:
0081
0082 SimVertex vertex_;
0083
0084
0085
0086 int id_;
0087
0088
0089 int motherId_;
0090
0091
0092 unsigned int nCharged_;
0093
0094
0095 std::vector<int> daughterIds_;
0096
0097
0098 FSimVertexType::VertexType vertexType_;
0099
0100
0101 bool isRecoVertex_;
0102
0103
0104
0105
0106 int recoVertexId_;
0107
0108 friend std::ostream& operator<<(std::ostream& out, const FSimDisplacedVertex& co);
0109 };
0110
0111 #endif