Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:38

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef GLOBALVERTEX_MBDVERTEXV2_H
0004 #define GLOBALVERTEX_MBDVERTEXV2_H
0005 
0006 #include "MbdVertex.h"
0007 
0008 #include <iostream>
0009 #include <limits>
0010 
0011 class MbdVertexv2 : public MbdVertex
0012 {
0013  public:
0014   MbdVertexv2() = default;
0015   ~MbdVertexv2() override = default;
0016 
0017   // PHObject virtual overloads
0018 
0019   void identify(std::ostream& os = std::cout) const override;
0020   void Reset() override { *this = MbdVertexv2(); }
0021   int isValid() const override;
0022   PHObject* CloneMe() const override { return new MbdVertexv2(*this); }
0023 
0024   // vertex info
0025 
0026   unsigned int get_id() const override { return _id; }
0027   void set_id(unsigned int id) override { _id = id; }
0028 
0029   float get_t() const override { return _t; }
0030   void set_t(float t) override { _t = t; }
0031 
0032   float get_t_err() const override { return _t_err; }
0033   void set_t_err(float t_err) override { _t_err = t_err; }
0034 
0035   // Return 0 for now, can implement beam spot
0036   float get_x() const override { return 0; }
0037   float get_y() const override { return 0; }
0038 
0039   float get_z() const override { return _z; }
0040   void set_z(float z) override { _z = z; }
0041 
0042   float get_z_err() const override { return _z_err; }
0043   void set_z_err(float z_err) override { _z_err = z_err; }
0044 
0045   float get_position(unsigned int coor) const override;
0046 
0047   unsigned int get_beam_crossing() const override { return _bco; }
0048   void set_beam_crossing(unsigned int bco) override { _bco = bco; }
0049 
0050  private:
0051   unsigned int _id{std::numeric_limits<unsigned int>::max()};   //< unique identifier within container
0052   unsigned int _bco{std::numeric_limits<unsigned int>::max()};  //< global bco
0053   float _t{std::numeric_limits<float>::quiet_NaN()};            //< collision time
0054   float _t_err{std::numeric_limits<float>::quiet_NaN()};        //< collision time uncertainty
0055   float _z{std::numeric_limits<float>::quiet_NaN()};            //< collision position z
0056   float _z_err{std::numeric_limits<float>::quiet_NaN()};        //< collision position z uncertainty
0057 
0058   ClassDefOverride(MbdVertexv2, 1);
0059 };
0060 
0061 #endif