Project

General

Profile

Bug #1137 » SciFiHelicalPRTrack.hh

Dobbs, Adam, 27 September 2012 12:22

 
1
/* This file is part of MAUS: http://micewww.pp.rl.ac.uk:8080/projects/maus
2
 *
3
 * MAUS is free software: you can redistribute it and/or modify
4
 * it under the terms of the GNU General Public License as published by
5
 * the Free Software Foundation, either version 3 of the License, or
6
 * (at your option) any later version.
7
 *
8
 * MAUS is distributed in the hope that it will be useful,
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 * GNU General Public License for more details.
12
 *
13
 * You should have received a copy of the GNU General Public License
14
 * along with MAUS.  If not, see <http://www.gnu.org/licenses/>.
15
 *
16
 */
17

    
18
/** @class SciFiHelicalPRTrack
19
 *
20
 *
21
 */
22

    
23
#ifndef _SRC_COMMON_CPP_DATASTRUCTURE_SCIFIHELICALPRTRACK_HH_
24
#define _SRC_COMMON_CPP_DATASTRUCTURE_SCIFIHELICALPRTRACK_HH_
25

    
26
// C++ headers
27
#include <vector>
28

    
29
// MAUS headers
30
#include "src/common_cpp/DataStructure/SciFiSpacePoint.hh"
31
#include "src/common_cpp/DataStructure/SimpleHelix.hh"
32
#include "src/common_cpp/DataStructure/SimpleLine.hh"
33
#include "src/common_cpp/DataStructure/SimpleCircle.hh"
34

    
35
namespace MAUS {
36

    
37
typedef std::vector<double> DoubleArray;
38

    
39
class SciFiHelicalPRTrack {
40
  public:
41

    
42
    /** Default constructor */
43
    SciFiHelicalPRTrack();
44

    
45
    /** Constructor from parameters */
46
    SciFiHelicalPRTrack(int tracker, int num_points, double x0, double y0, double z0, double phi0,
47
                        double psi0, double dsdz, double R, double chisq);
48

    
49
    /** Constructor from SimpleCircle and SimpleLine */
50
    SciFiHelicalPRTrack(int tracker, int num_points, CLHEP::Hep3Vector pos0, double phi0,
51
                        double psi0, SimpleCircle circle, SimpleLine line_sz);
52

    
53
    /** Constructor from SimpleHelix */
54
    SciFiHelicalPRTrack(int tracker, int num_points, CLHEP::Hep3Vector pos0, SimpleHelix helix);
55

    
56
    /** Copy constructor - any pointers are deep copied */
57
    SciFiHelicalPRTrack(const SciFiHelicalPRTrack &_htrk);
58

    
59
    /** Destructors */
60
    virtual ~SciFiHelicalPRTrack();
61

    
62
    /** Assignment operator - any pointers are deep copied */
63
    SciFiHelicalPRTrack& operator=(const SciFiHelicalPRTrack &_htrk);
64

    
65
    // Getters
66
    SciFiSpacePointArray get_spacepoints() const { return _spoints; }
67

    
68
    int get_tracker() const { return _tracker; }
69
    int get_num_points() const { return _num_points; }
70
    int get_type() const { return _type; }
71

    
72
    double get_x0() const { return _x0; }
73
    double get_y0() const { return _y0; }
74
    double get_z0() const { return _z0; }
75
    double get_phi0() const { return _phi0; }
76
    double get_psi0() const { return _psi0; }
77
    double get_dsdz() const { return _dsdz; }
78
    double get_R() const { return _R; }
79
    double get_line_sz_chisq() const { return _line_sz_chisq; }
80
    double get_circle_chisq() const { return _circle_chisq; }
81
    double get_circle_x0() const { return _circle_x0; }
82
    double get_circle_y0() const { return _circle_y0; }
83
    double get_chisq() const { return _chisq; }
84
    double get_chisq_dof() const { return _chisq_dof; }
85
    DoubleArray get_phi_i() const { return _phi_i; }
86

    
87
    // Setters
88
    void set_tracker(int tracker) { _tracker = tracker; }
89
    void set_spacepoints(SciFiSpacePointArray spoints) { _spoints = spoints; }
90
    void set_num_points(int num_points) { _num_points = num_points; }
91
    void set_x0(double x0) { _x0 = x0; }
92
    void set_y0(double y0) { _y0 = y0; }
93
    void set_z0(double z0) { _z0 = z0; }
94
    void set_phi0(double phi0) { _phi0 = phi0; }
95
    void set_psi0(double psi0) { _psi0 = psi0; }
96
    void set_dsdz(double dsdz) { _dsdz = dsdz; }
97
    void set_R(double R) { _R = R; }
98
    void set_line_sz_chisq(double line_sz_chisq) { _line_sz_chisq = line_sz_chisq; }
99
    void set_circle_x0(double circle_x0) { _circle_x0 = circle_x0; }
100
    void set_circle_y0(double circle_y0) { _circle_y0 = circle_y0; }
101
    void set_circle_chisq(double circle_chisq) { _circle_chisq = circle_chisq; }
102
    void set_chisq(double chisq) { _chisq = chisq; }
103
    void set_chisq_dof(double chisq_dof) { _chisq_dof = chisq_dof; }
104
    void set_phi_i(DoubleArray phi_i) { _phi_i = phi_i; }
105

    
106
    /** Print track parameters */
107
    void print_params();
108

    
109
  private:
110

    
111
    double _x0;
112
    double _y0;
113
    double _z0;
114
    double _R;
115
    double _phi0;
116
    double _psi0;
117
    double _dsdz;
118
    double _line_sz_chisq;
119
    double _circle_x0;
120
    double _circle_y0;
121
    double _circle_chisq;
122
    double _chisq;
123
    double _chisq_dof;
124
    DoubleArray _phi_i;
125

    
126
    int _tracker;
127
    int _num_points;
128
    static const int _type = 1; // 0 for straight, 1 for helical
129

    
130
    SciFiSpacePointArray _spoints;
131

    
132
    ClassDef(SciFiHelicalPRTrack, 1)
133
};
134

    
135
typedef std::vector<SciFiHelicalPRTrack*> SciFiHelicalPRTrackPArray;
136
typedef std::vector<SciFiHelicalPRTrack> SciFiHelicalPRTrackArray;
137

    
138
} // ~namespace MAUS
139

    
140
#endif
(3-3/4)