-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathSBSEArm.h
151 lines (112 loc) · 5.14 KB
/
SBSEArm.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#ifndef SBSEarm_h
#define SBSEarm_h
#include "THaSpectrometer.h"
class TList;
class THaTrack;
class SBSEArm : public THaSpectrometer {
public:
SBSEArm( const char *name, const char *description );
virtual ~SBSEArm();
virtual void Clear( Option_t* opt="");
virtual Int_t FindVertices( TClonesArray& tracks );
virtual Int_t TrackCalc();
virtual Int_t CoarseReconstruct();
virtual Int_t CoarseTrack();
virtual Int_t Reconstruct();
virtual Int_t Track();
virtual Int_t CalcPID();
void SetPolarimeterMode( Bool_t ispol );
protected:
virtual Int_t ReadDatabase( const TDatime& date );
virtual Int_t ReadRunDatabase( const TDatime& date );
virtual Int_t DefineVariables( EMode mode = kDefine );
void CalcOpticsCoords( THaTrack* the_track );//calculate optics coords from det coords
void CalcTargetCoords( THaTrack* the_track );//calculate target coords from optics coords
void InitOpticsAxes(double, const TVector3 & );
void InitOpticsAxes(double); //version with only bend angle argument
void InitGEMAxes(double, double, const TVector3 & );
void InitGEMAxes(double, double); //version with only angle arguments:
void InitGEMAxes(double, double, double, const TVector3 &); //version that takes three angles, consistent with more correct alignment procedure
void InitGEMAxes(double, double, double);
void CheckConstraintOffsetsAndWidths();
//We have to make these vectors to accommodate the polarimeter mode; separate offsets and widths for front and back trackers:
std::vector<Double_t> fFrontConstraintWidthX;
std::vector<Double_t> fFrontConstraintWidthY;
std::vector<Double_t> fBackConstraintWidthX;
std::vector<Double_t> fBackConstraintWidthY;
std::vector<Double_t> fFrontConstraintX0;
std::vector<Double_t> fFrontConstraintY0;
std::vector<Double_t> fBackConstraintX0;
std::vector<Double_t> fBackConstraintY0;
//Idea is that slope of the track along x and y is roughly linearly correlated with the position of the back constraint:
bool fUseDynamicConstraint; //The "dynamic constraint" sets the front constraint point automatically based on the back constraint point; it is useful for applying effective loose constraints based on spectrometer optics (correlation between x and theta, y and phi, etc)
double fDynamicConstraintSlopeX;
double fDynamicConstraintOffsetX;
//double fDynamicWidthX;
double fDynamicConstraintSlopeY;
double fDynamicConstraintOffsetY;
//double fDynamicWidthY;
//for output only... Vectors instead?
std::vector<double> fFrontConstraintX;
std::vector<double> fFrontConstraintY;
std::vector<double> fFrontConstraintZ;
std::vector<double> fBackConstraintX;
std::vector<double> fBackConstraintY;
std::vector<double> fBackConstraintZ;
Double_t fHCALtheta_n; //xHCAL/HCALdist
Double_t fHCALphi_n; //yHCAL/HCALdist
Double_t fHCALdir_x;
Double_t fHCALdir_y;
Double_t fHCALdir_z;
TVector3 fGEMorigin; //Absolute position of GEM origin relative to target center, in TARGET transport coordinates
Double_t fGEMtheta; //Polar angle of GEM stack Z axis relative to SBS Z axis
Double_t fGEMphi; //Azimuthal angle of GEM stack Z axis relative to SBS Z axis
//X,Y,Z rotation angles (yaw,pitch,roll, resp.):
Double_t fGEMax;
Double_t fGEMay;
Double_t fGEMaz;
Double_t fMagDist; //mandatory parameter from run database
Double_t fHCALdist; //add to run database (this only changes when kinematics change). But should it be optional or mandatory?
Double_t fBdL; //define BdL (assumed units = T*m)
TRotation fGEM_Rtotal; //Total rotation;
TRotation fGEM_Rinverse; //Inverse rotation
TVector3 fGEMxaxis_global;
TVector3 fGEMyaxis_global;
TVector3 fGEMzaxis_global;
TVector3 fOpticsOrigin; //Give origin of ideal optics system
double fOpticsAngle; //Ideal central bend angle of GEM wrt BigBite
TVector3 fOpticsXaxis_global;
TVector3 fOpticsYaxis_global;
TVector3 fOpticsZaxis_global;
//TRotation fOpt2DetRot;// transformation from optics (ideal) to detector (actual)
//TRotation fDet2OptRot;// transformation from detector (actual) to optics (ideal)
UInt_t fPrecon_flag; //Indicate which momentum reconstruction formalism we are using:
int fOpticsOrder;
std::vector<double> fb_xptar;
std::vector<double> fb_yptar;
std::vector<double> fb_ytar;
std::vector<double> fb_pinv;
//AJRP: changed the exponents to integers here for speed:
std::vector<int> f_oi;
std::vector<int> f_oj;
std::vector<int> f_ok;
std::vector<int> f_ol;
std::vector<int> f_om;
Bool_t fPolarimeterMode; //Use polarimeter mode
Bool_t fPolarimeterMode_DBoverride; //flag to override DB value
Double_t fAnalyzerZ0; //Z of midpoint of analyzer.
//Also include (optional) forward optics model to aid in false track rejection.
int fForwardOpticsOrder;
std::vector<double> fb_xfp;
std::vector<double> fb_yfp;
std::vector<double> fb_xpfp;
std::vector<double> fb_ypfp;
//AJRP: changed the exponents to integers here for speed:
std::vector<int> f_foi;
std::vector<int> f_foj;
std::vector<int> f_fok;
std::vector<int> f_fol;
std::vector<int> f_fom;
ClassDef(SBSEArm,0) // BigBite spectrometer
};
#endif//ROOT_TreeSearch_SBSEArm