1 |
mocchiut |
1.1 |
#ifndef OrbitalInfo_h |
2 |
mocchiut |
1.2 |
#define OrbitalInfo_h |
3 |
mocchiut |
1.1 |
|
4 |
|
|
#include <TObject.h> |
5 |
mocchiut |
1.14 |
#include <algorithm> // EMILIANO |
6 |
pam-fi |
1.5 |
#include <OrbitalInfoStruct.h> |
7 |
mocchiut |
1.16 |
#include <TClonesArray.h> |
8 |
mocchiut |
1.18 |
#include <TMatrixD.h> |
9 |
mocchiut |
1.16 |
|
10 |
|
|
class OrbitalInfoTrkVar : public TObject { |
11 |
|
|
private: |
12 |
|
|
|
13 |
|
|
public: |
14 |
|
|
// |
15 |
|
|
Int_t trkseqno; // tof sequ. number: -1=ToF standalone, 0=first Tracker track, ... |
16 |
|
|
// |
17 |
mocchiut |
1.18 |
Float_t pitch; ///< Pitch angle |
18 |
|
|
// |
19 |
|
|
TMatrixD Eij; ///< vector of incoming particle respect to cartesian geographic coordinates |
20 |
|
|
TMatrixD Sij; ///< vector of incoming particle respect to flight coordinates |
21 |
|
|
// |
22 |
|
|
Float_t cutoff; ///< Calculated cutoff for the incoming particle taking into account particle direction |
23 |
mocchiut |
1.16 |
// |
24 |
|
|
OrbitalInfoTrkVar(); |
25 |
mocchiut |
1.19 |
OrbitalInfoTrkVar(const OrbitalInfoTrkVar&); |
26 |
mocchiut |
1.16 |
OrbitalInfoTrkVar* GetOrbitalInfoTrkVar(){return this;}; |
27 |
|
|
// |
28 |
|
|
void Clear(Option_t *t=""); |
29 |
mocchiut |
1.18 |
void Delete(Option_t *t=""); //ELENA |
30 |
mocchiut |
1.16 |
// |
31 |
mocchiut |
1.19 |
ClassDef(OrbitalInfoTrkVar, 3); |
32 |
mocchiut |
1.16 |
// |
33 |
|
|
}; |
34 |
|
|
|
35 |
|
|
|
36 |
mocchiut |
1.1 |
|
37 |
pam-rm2 |
1.9 |
/** |
38 |
|
|
* Class that stores position, time, inclination, magnetic field and |
39 |
|
|
* cutoff informations. |
40 |
|
|
*/ |
41 |
mocchiut |
1.1 |
class OrbitalInfo : public TObject { |
42 |
mocchiut |
1.16 |
private: |
43 |
|
|
|
44 |
mocchiut |
1.1 |
public: |
45 |
mocchiut |
1.16 |
TClonesArray *OrbitalInfoTrk; |
46 |
mocchiut |
1.1 |
|
47 |
mocchiut |
1.11 |
UInt_t absTime; ///< Absolute Time (seconds) |
48 |
|
|
UInt_t OBT; ///< On Board Time (ms) |
49 |
|
|
UInt_t pkt_num; ///< CPU packet number |
50 |
|
|
|
51 |
|
|
Float_t lon; ///< degrees from -180 to 180 |
52 |
|
|
Float_t lat; ///< degrees from -90 to 90 |
53 |
|
|
Float_t alt; ///< meters asl |
54 |
pam-rm2 |
1.9 |
|
55 |
|
|
// B components. |
56 |
mocchiut |
1.11 |
Float_t Bnorth; ///< gauss |
57 |
|
|
Float_t Beast; ///< gauss |
58 |
|
|
Float_t Bdown; ///< gauss |
59 |
pam-rm2 |
1.9 |
|
60 |
mocchiut |
1.11 |
Float_t Babs; ///< abs value (guass) |
61 |
pam-rm2 |
1.9 |
|
62 |
mocchiut |
1.11 |
Float_t BB0; ///< B abs over the B minimum on this field line |
63 |
pam-rm2 |
1.9 |
|
64 |
mocchiut |
1.11 |
Float_t L; ///< McIlwain's L shell (in earth radii) |
65 |
pam-rm2 |
1.9 |
|
66 |
mocchiut |
1.18 |
/* // Dipolar magnetic coordinates (not used). */ |
67 |
|
|
/* Float_t londip; ///< degrees from -180 to 180 */ |
68 |
|
|
/* Float_t latdip; ///< degrees from -90 to 90 */ |
69 |
|
|
/* Float_t altdip; ///< meters */ |
70 |
|
|
|
71 |
|
|
/* // Corrected magnetic coordinates (not used). */ |
72 |
|
|
/* Float_t loncgm; ///< degrees from -180 to 180 */ |
73 |
|
|
/* Float_t latcgm; ///< degrees from -90 to 90 */ |
74 |
|
|
/* Float_t altcgm; ///< meters */ |
75 |
|
|
|
76 |
|
|
/* // Corrected B min magnetic coordinates (not used). */ |
77 |
|
|
/* Float_t loncbm; ///< degrees from -180 to 180 */ |
78 |
|
|
/* Float_t latcbm; ///< degrees from -90 to 90 */ |
79 |
|
|
/* Float_t altcbm; ///< meters */ |
80 |
pam-rm2 |
1.7 |
|
81 |
mocchiut |
1.18 |
// Float_t cutoff[17]; |
82 |
|
|
Float_t cutoffsvl; |
83 |
pam-rm2 |
1.7 |
|
84 |
mocchiut |
1.12 |
// Quaternions |
85 |
mocchiut |
1.13 |
Float_t q0; ///< Quaternion 0 |
86 |
|
|
Float_t q1; ///< Quaternion 1 |
87 |
|
|
Float_t q2; ///< Quaternion 2 |
88 |
|
|
Float_t q3; ///< Quaternion 3 |
89 |
mocchiut |
1.20 |
|
90 |
|
|
//tested linear quaternions |
91 |
|
|
|
92 |
|
|
Float_t q0t; |
93 |
|
|
Float_t q1t; |
94 |
|
|
Float_t q2t; |
95 |
|
|
Float_t q3t; |
96 |
mocchiut |
1.13 |
|
97 |
|
|
// Euler angles (Resurs velocity reference frame) |
98 |
|
|
Float_t theta; ///< Euler angle theta in the velocity reference frame (pitch) |
99 |
|
|
Float_t phi; ///< Euler angle phi in the velocity reference frame (yaw) |
100 |
|
|
Float_t etha; ///< Euler angle etha in the velocity reference frame (roll) |
101 |
pam-rm2 |
1.7 |
|
102 |
mocchiut |
1.16 |
// Pitch angles |
103 |
mocchiut |
1.18 |
// Float_t pamzenitangle; |
104 |
|
|
// Float_t pamBangle; |
105 |
|
|
// |
106 |
|
|
TMatrixD Iij; ///< Angle between PAMELA Z direction and cartesian geographic coordinates |
107 |
mocchiut |
1.16 |
|
108 |
mocchiut |
1.13 |
/** |
109 |
|
|
* The variable mode means a character time distant between two quaternions, inside which stay every events |
110 |
|
|
*/ |
111 |
|
|
Int_t mode; // 0 - means that time different pair of quaternions exuals to 0.25 seconds in R10 mode |
112 |
|
|
// (it mean that all quaternions in array is correct) |
113 |
|
|
// 1 - means that we have R10 mode and use just first value of quaternions array |
114 |
|
|
// 2 - means that we have non R10 mode and use every quaternions from array. |
115 |
|
|
// 3 - means normal transition from R10 to non R10 or from non R10 to R10. |
116 |
|
|
// 4 - means that we have eliminable hole between R10 and non R10 or between non R10 and R10 |
117 |
|
|
// 5 - means that we have uneliminable hole between R10 and non R10 or between non R10 and R10 |
118 |
|
|
// 6 - means that we have eliminable hole inside R10 (in such keys eliminable depends from other factors also) |
119 |
|
|
// 7 - means that we have uneliminable hole inside R10 |
120 |
|
|
// 8 - means that we have eliminable hole inside non R10 |
121 |
|
|
// 9 - means that we have uneliminable hole inside non R10 |
122 |
mocchiut |
1.16 |
// 10 - means other unknown problems |
123 |
mocchiut |
1.20 |
// -10 - means we use recovered quaternions |
124 |
|
|
|
125 |
|
|
Int_t R10f; //if 1 we recognize R10 mode using flight data if 0 - no R10 mode if -1 we know nothing about R10 mode |
126 |
|
|
Bool_t R10r; //if true we recognize R10 mode using recovered data |
127 |
|
|
|
128 |
|
|
Float_t TimeGap; //Time gap between two points where interpolation have done. |
129 |
mocchiut |
1.16 |
|
130 |
|
|
Int_t ntrk(){return OrbitalInfoTrk->GetEntries();}; |
131 |
pam-rm2 |
1.9 |
/** |
132 |
|
|
\return Returns the B minimum along the field line. |
133 |
|
|
*/ |
134 |
mocchiut |
1.8 |
Float_t GetB0() { return Babs/BB0; }; |
135 |
|
|
|
136 |
pam-rm2 |
1.9 |
/** |
137 |
|
|
\return Returns the Stormer vertical cutoff using L shell: |
138 |
|
|
14.9/L^2 (GV/c). |
139 |
|
|
*/ |
140 |
mocchiut |
1.18 |
Float_t GetCutoffSVL() { return cutoffsvl; }; |
141 |
pam-rm2 |
1.7 |
|
142 |
pam-fi |
1.5 |
void SetFromLevel2Struct(cOrbitalInfo *l2); |
143 |
|
|
void GetLevel2Struct(cOrbitalInfo *l2) const; |
144 |
mocchiut |
1.17 |
OrbitalInfoTrkVar *GetOrbitalInfoTrkVar(Int_t notrack); |
145 |
mocchiut |
1.16 |
// |
146 |
|
|
OrbitalInfo(); |
147 |
|
|
~OrbitalInfo(){Delete();}; //ELENA |
148 |
|
|
// |
149 |
|
|
OrbitalInfo* GetOrbitalInfo(){return this;}; // Elena |
150 |
|
|
void Delete(Option_t *t=""); //ELENA |
151 |
|
|
void Set();//ELENA |
152 |
|
|
// |
153 |
|
|
// |
154 |
pam-fi |
1.5 |
|
155 |
mocchiut |
1.15 |
void Clear(Option_t *t=""); // emiliano |
156 |
mocchiut |
1.4 |
// |
157 |
mocchiut |
1.20 |
ClassDef(OrbitalInfo, 8); |
158 |
mocchiut |
1.1 |
}; |
159 |
|
|
#endif |