File indexing completed on 2023-03-17 11:24:05
0001 #ifndef CoreSimVertex_H
0002 #define CoreSimVertex_H
0003
0004 #include "SimDataFormats/EncodedEventId/interface/EncodedEventId.h"
0005 #include "DataFormats/Math/interface/Vector3D.h"
0006 #include "DataFormats/Math/interface/LorentzVector.h"
0007
0008 #include <cmath>
0009
0010
0011
0012 class CoreSimVertex {
0013 public:
0014
0015 CoreSimVertex() {}
0016
0017 CoreSimVertex(const math::XYZVectorD& v, float tof) { theVertex.SetXYZT(v.x(), v.y(), v.z(), tof); }
0018
0019 CoreSimVertex(const math::XYZTLorentzVectorD& v) { theVertex.SetXYZT(v.x(), v.y(), v.z(), v.t()); }
0020
0021 const math::XYZTLorentzVectorD& position() const { return theVertex; }
0022
0023 void setEventId(EncodedEventId e) { eId = e; }
0024
0025 EncodedEventId eventId() const { return eId; }
0026
0027 void setTof(float tof) { theVertex.SetXYZT(theVertex.x(), theVertex.y(), theVertex.z(), tof); }
0028
0029 private:
0030 EncodedEventId eId;
0031 math::XYZTLorentzVectorD theVertex;
0032 };
0033
0034 #include <iosfwd>
0035 std::ostream& operator<<(std::ostream& o, const CoreSimVertex& v);
0036
0037 #endif