Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MbdVertexv2.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MbdVertexv2.h
1 #ifndef G4MBD_MBDVERTEXV2_H
2 #define G4MBD_MBDVERTEXV2_H
3 
4 #include "MbdVertex.h"
5 
6 #include <iostream>
7 
8 class MbdVertexv2 : public MbdVertex
9 {
10  public:
11  MbdVertexv2();
12  ~MbdVertexv2() override;
13 
14  // PHObject virtual overloads
15 
16  void identify(std::ostream& os = std::cout) const override;
17  void Reset() override { *this = MbdVertexv2(); }
18  int isValid() const override;
19  PHObject* CloneMe() const override { return new MbdVertexv2(*this); }
20 
21  // vertex info
22 
23  unsigned int get_id() const override { return _id; }
24  void set_id(unsigned int id) override { _id = id; }
25 
26  float get_t() const override { return _t; }
27  void set_t(float t) override { _t = t; }
28 
29  float get_t_err() const override { return _t_err; }
30  void set_t_err(float t_err) override { _t_err = t_err; }
31 
32  // Return 0 for now, can implement beam spot
33  float get_x() const override { return 0; }
34  float get_y() const override { return 0; }
35 
36  float get_z() const override { return _z; }
37  void set_z(float z) override { _z = z; }
38 
39  float get_z_err() const override { return _z_err; }
40  void set_z_err(float z_err) override { _z_err = z_err; }
41 
42  float get_position(unsigned int coor) const override;
43 
44  unsigned int get_beam_crossing() const override { return _bco; }
45  void set_beam_crossing(unsigned int bco) override { _bco = bco; }
46  private:
47  unsigned int _id; //< unique identifier within container
48  unsigned int _bco; //< global bco
49  float _t; //< collision time
50  float _t_err; //< collision time uncertainty
51  float _z; //< collision position z
52  float _z_err; //< collision position z uncertainty
53 
55 };
56 
57 #endif