Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackSeed_v1.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrackSeed_v1.h
1 #ifndef TRACKBASEHISTORIC_TRACKSEED_V1_H
2 #define TRACKBASEHISTORIC_TRACKSEED_V1_H
3 
4 #include "TrackSeed.h"
5 
6 #include <trackbase/TrkrDefs.h>
7 
8 #include <limits.h>
9 #include <cmath>
10 #include <iostream>
11 
12 class TrackSeed_v1 : public TrackSeed
13 {
14  public:
15  TrackSeed_v1();
16 
18  TrackSeed_v1( const TrackSeed& );
19  TrackSeed_v1( const TrackSeed_v1& );
21  ~TrackSeed_v1() override;
22 
23  void identify(std::ostream& os = std::cout) const override;
24  void Reset() override { *this = TrackSeed_v1(); }
25  int isValid() const override { return 1; }
26  void CopyFrom( const TrackSeed&) override;
27  void CopyFrom( TrackSeed* seed) override { CopyFrom( *seed ); }
28  PHObject* CloneMe() const override { return new TrackSeed_v1(*this); }
29 
30  int get_charge() const override;
32  ActsGeometry *tGeometry) const override;
34  ActsGeometry *tGeometry) const override;
35  float get_pz() const override;
36  float get_x() const override;
37  float get_y() const override;
38  float get_z() const override;
40  ActsGeometry *tGeometry) const override;
41  float get_phi(std::map<TrkrDefs::cluskey, Acts::Vector3>& positions) const override;
42  float get_eta() const override;
43  float get_theta() const override;
44  float get_pt() const override;
45  float get_p() const override;
46 
47  float get_qOverR() const override { return m_qOverR; }
48  float get_X0() const override { return m_X0; }
49  float get_Y0() const override { return m_Y0; }
50  float get_slope() const override { return m_slope; }
51  float get_Z0() const override { return m_Z0; }
52  short int get_crossing() const override { return m_crossing; }
53 
54  void set_crossing(const short int crossing) override { m_crossing = crossing; }
55  void set_qOverR(const float qOverR) override { m_qOverR = qOverR; }
56  void set_X0(const float X0) override { m_X0 = X0; }
57  void set_Y0(const float Y0) override { m_Y0 = Y0; }
58  void set_slope(const float slope) override { m_slope = slope; }
59  void set_Z0(const float Z0) override { m_Z0 = Z0; }
60 
61  void clear_cluster_keys() override { m_cluster_keys.clear(); }
62  bool empty_cluster_keys() const override { return m_cluster_keys.empty(); }
63  size_t size_cluster_keys() const override { return m_cluster_keys.size(); }
64 
65  void insert_cluster_key(TrkrDefs::cluskey clusterid) override { m_cluster_keys.insert(clusterid); }
66  size_t erase_cluster_key(TrkrDefs::cluskey clusterid) override { return m_cluster_keys.erase(clusterid); }
67  ConstClusterKeyIter find_cluster_key(TrkrDefs::cluskey clusterid) const override { return m_cluster_keys.find(clusterid); }
68  ConstClusterKeyIter begin_cluster_keys() const override { return m_cluster_keys.begin(); }
69  ConstClusterKeyIter end_cluster_keys() const override { return m_cluster_keys.end(); }
70  ClusterKeyIter find_cluster_keys(unsigned int clusterid) override { return m_cluster_keys.find(clusterid); }
71  ClusterKeyIter begin_cluster_keys() override { return m_cluster_keys.begin(); }
72  ClusterKeyIter end_cluster_keys() override { return m_cluster_keys.end(); }
73 
77  uint8_t startLayer = 0,
78  uint8_t endLayer = 58) override;
82  uint8_t startLayer = 0,
83  uint8_t endLayer = 58) override;
84 
85  void circleFitByTaubin(std::map<TrkrDefs::cluskey, Acts::Vector3>& positions,
86  uint8_t startLayer = 0,
87  uint8_t endLayer = 58) override;
88 
89  void lineFit(std::map<TrkrDefs::cluskey, Acts::Vector3>& positions,
90  uint8_t startLayer = 0,
91  uint8_t endLayer = 58) override;
92 
93  protected:
94 
96  std::pair<float,float> findRoot() const;
97 
98  private:
99 
101 
102  float m_qOverR = NAN;
103  float m_X0 = NAN;
104  float m_Y0 = NAN;
105  float m_slope = NAN;
106  float m_Z0 = NAN;
107 
108  short int m_crossing = std::numeric_limits<short int>::max();
109 
111 
112 };
113 
114 #endif