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 |
pam-mep |
1.24 |
#include <TVector3.h> |
10 |
pam-fi |
1.26 |
#include <string.h>//ELENA |
11 |
mocchiut |
1.16 |
|
12 |
|
|
class OrbitalInfoTrkVar : public TObject { |
13 |
|
|
private: |
14 |
|
|
|
15 |
|
|
public: |
16 |
|
|
// |
17 |
|
|
Int_t trkseqno; // tof sequ. number: -1=ToF standalone, 0=first Tracker track, ... |
18 |
|
|
// |
19 |
mocchiut |
1.18 |
Float_t pitch; ///< Pitch angle |
20 |
pam-mep |
1.24 |
Float_t sunangle; |
21 |
|
|
Float_t sunmagangle; |
22 |
mocchiut |
1.18 |
// |
23 |
|
|
TMatrixD Eij; ///< vector of incoming particle respect to cartesian geographic coordinates |
24 |
|
|
TMatrixD Sij; ///< vector of incoming particle respect to flight coordinates |
25 |
|
|
// |
26 |
|
|
Float_t cutoff; ///< Calculated cutoff for the incoming particle taking into account particle direction |
27 |
mocchiut |
1.16 |
// |
28 |
|
|
OrbitalInfoTrkVar(); |
29 |
mocchiut |
1.19 |
OrbitalInfoTrkVar(const OrbitalInfoTrkVar&); |
30 |
mocchiut |
1.16 |
OrbitalInfoTrkVar* GetOrbitalInfoTrkVar(){return this;}; |
31 |
|
|
// |
32 |
|
|
void Clear(Option_t *t=""); |
33 |
mocchiut |
1.18 |
void Delete(Option_t *t=""); //ELENA |
34 |
mocchiut |
1.16 |
// |
35 |
mocchiut |
1.19 |
ClassDef(OrbitalInfoTrkVar, 3); |
36 |
mocchiut |
1.16 |
// |
37 |
|
|
}; |
38 |
|
|
|
39 |
|
|
|
40 |
mocchiut |
1.1 |
|
41 |
pam-rm2 |
1.9 |
/** |
42 |
|
|
* Class that stores position, time, inclination, magnetic field and |
43 |
|
|
* cutoff informations. |
44 |
|
|
*/ |
45 |
mocchiut |
1.1 |
class OrbitalInfo : public TObject { |
46 |
mocchiut |
1.16 |
private: |
47 |
|
|
|
48 |
mocchiut |
1.1 |
public: |
49 |
mocchiut |
1.16 |
TClonesArray *OrbitalInfoTrk; |
50 |
mocchiut |
1.1 |
|
51 |
mocchiut |
1.11 |
UInt_t absTime; ///< Absolute Time (seconds) |
52 |
|
|
UInt_t OBT; ///< On Board Time (ms) |
53 |
|
|
UInt_t pkt_num; ///< CPU packet number |
54 |
|
|
|
55 |
|
|
Float_t lon; ///< degrees from -180 to 180 |
56 |
|
|
Float_t lat; ///< degrees from -90 to 90 |
57 |
|
|
Float_t alt; ///< meters asl |
58 |
pam-rm2 |
1.9 |
|
59 |
pam-mep |
1.24 |
TVector3 V; /// velocity |
60 |
|
|
|
61 |
pam-rm2 |
1.9 |
// B components. |
62 |
mocchiut |
1.11 |
Float_t Bnorth; ///< gauss |
63 |
|
|
Float_t Beast; ///< gauss |
64 |
|
|
Float_t Bdown; ///< gauss |
65 |
pam-rm2 |
1.9 |
|
66 |
mocchiut |
1.11 |
Float_t Babs; ///< abs value (guass) |
67 |
pam-rm2 |
1.9 |
|
68 |
pam-mep |
1.23 |
Float_t M; ///< M |
69 |
|
|
|
70 |
mocchiut |
1.11 |
Float_t BB0; ///< B abs over the B minimum on this field line |
71 |
pam-rm2 |
1.9 |
|
72 |
mocchiut |
1.11 |
Float_t L; ///< McIlwain's L shell (in earth radii) |
73 |
pam-rm2 |
1.9 |
|
74 |
mocchiut |
1.18 |
/* // Dipolar magnetic coordinates (not used). */ |
75 |
pam-mep |
1.24 |
Float_t londip; ///< degrees from -180 to 180 |
76 |
|
|
Float_t latdip; ///< degrees from -90 to 90 |
77 |
pam-rm2 |
1.7 |
|
78 |
mocchiut |
1.18 |
// Float_t cutoff[17]; |
79 |
|
|
Float_t cutoffsvl; |
80 |
mocchiut |
1.22 |
Float_t igrf_icode; |
81 |
pam-rm2 |
1.7 |
|
82 |
mocchiut |
1.21 |
// linear Quaternions |
83 |
mocchiut |
1.13 |
Float_t q0; ///< Quaternion 0 |
84 |
|
|
Float_t q1; ///< Quaternion 1 |
85 |
|
|
Float_t q2; ///< Quaternion 2 |
86 |
|
|
Float_t q3; ///< Quaternion 3 |
87 |
|
|
|
88 |
|
|
// Euler angles (Resurs velocity reference frame) |
89 |
|
|
Float_t theta; ///< Euler angle theta in the velocity reference frame (pitch) |
90 |
|
|
Float_t phi; ///< Euler angle phi in the velocity reference frame (yaw) |
91 |
|
|
Float_t etha; ///< Euler angle etha in the velocity reference frame (roll) |
92 |
pam-rm2 |
1.7 |
|
93 |
mocchiut |
1.16 |
// Pitch angles |
94 |
pam-mep |
1.24 |
|
95 |
mocchiut |
1.18 |
// |
96 |
|
|
TMatrixD Iij; ///< Angle between PAMELA Z direction and cartesian geographic coordinates |
97 |
mocchiut |
1.16 |
|
98 |
mocchiut |
1.13 |
/** |
99 |
|
|
* The variable mode means a character time distant between two quaternions, inside which stay every events |
100 |
|
|
*/ |
101 |
|
|
Int_t mode; // 0 - means that time different pair of quaternions exuals to 0.25 seconds in R10 mode |
102 |
|
|
// (it mean that all quaternions in array is correct) |
103 |
|
|
// 1 - means that we have R10 mode and use just first value of quaternions array |
104 |
|
|
// 2 - means that we have non R10 mode and use every quaternions from array. |
105 |
|
|
// 3 - means normal transition from R10 to non R10 or from non R10 to R10. |
106 |
|
|
// 4 - means that we have eliminable hole between R10 and non R10 or between non R10 and R10 |
107 |
|
|
// 5 - means that we have uneliminable hole between R10 and non R10 or between non R10 and R10 |
108 |
|
|
// 6 - means that we have eliminable hole inside R10 (in such keys eliminable depends from other factors also) |
109 |
|
|
// 7 - means that we have uneliminable hole inside R10 |
110 |
|
|
// 8 - means that we have eliminable hole inside non R10 |
111 |
|
|
// 9 - means that we have uneliminable hole inside non R10 |
112 |
mocchiut |
1.16 |
// 10 - means other unknown problems |
113 |
mocchiut |
1.20 |
// -10 - means we use recovered quaternions |
114 |
|
|
|
115 |
pam-mep |
1.24 |
Int_t qkind; // How matrix Qij was got. |
116 |
|
|
// 0 means that it was calculated from flight quaternion |
117 |
|
|
// 1 means that it was calculated from Euler angles from Rotation Table |
118 |
mocchiut |
1.20 |
|
119 |
|
|
Float_t TimeGap; //Time gap between two points where interpolation have done. |
120 |
pam-mep |
1.24 |
|
121 |
|
|
Int_t errq; // flag, if errq == 1 then real flight quaternion (not interpolated) incorrect |
122 |
|
|
Int_t azim; // 0 - means everything is ok |
123 |
|
|
// 1 - means azimutal rotations were performed in this moment and in case of absense of flight quaternions orientation calculated here incorrect |
124 |
malakhov |
1.27 |
// >1 - No flight quaternions, no azimuthal rotations, no adequate data from RotationTable, unaccuracy equals to Bank angle of rotetion in this moment |
125 |
|
|
// -1 - Very Strange flight data, I don't know how to understand them |
126 |
|
|
|
127 |
|
|
Int_t rtqual; // 0 - means orientation data for period whe this event registered is in agreement with fligh orioentation data, one can fully trust such event when it calculated using Rotation Table (qkind=1) |
128 |
|
|
// 1 - means orientation data was not compared with flight data (during of absence of them), one should check them somehow |
129 |
|
|
// 2 - means orientation data calculated with flight data has disagreement with rotation table data and thre were not enough of flight data to correct RT. |
130 |
mocchiut |
1.16 |
|
131 |
|
|
Int_t ntrk(){return OrbitalInfoTrk->GetEntries();}; |
132 |
pam-rm2 |
1.9 |
/** |
133 |
|
|
\return Returns the B minimum along the field line. |
134 |
|
|
*/ |
135 |
mocchiut |
1.8 |
Float_t GetB0() { return Babs/BB0; }; |
136 |
|
|
|
137 |
pam-rm2 |
1.9 |
/** |
138 |
|
|
\return Returns the Stormer vertical cutoff using L shell: |
139 |
|
|
14.9/L^2 (GV/c). |
140 |
|
|
*/ |
141 |
mocchiut |
1.18 |
Float_t GetCutoffSVL() { return cutoffsvl; }; |
142 |
pam-rm2 |
1.7 |
|
143 |
pam-fi |
1.5 |
void SetFromLevel2Struct(cOrbitalInfo *l2); |
144 |
|
|
void GetLevel2Struct(cOrbitalInfo *l2) const; |
145 |
mocchiut |
1.17 |
OrbitalInfoTrkVar *GetOrbitalInfoTrkVar(Int_t notrack); |
146 |
pam-fi |
1.26 |
OrbitalInfoTrkVar * GetOrbitalInfoStoredTrack(Int_t seqno);///< returns pointer to the track set related to the seqno number |
147 |
|
|
|
148 |
mocchiut |
1.16 |
// |
149 |
|
|
OrbitalInfo(); |
150 |
|
|
~OrbitalInfo(){Delete();}; //ELENA |
151 |
|
|
// |
152 |
|
|
OrbitalInfo* GetOrbitalInfo(){return this;}; // Elena |
153 |
|
|
void Delete(Option_t *t=""); //ELENA |
154 |
|
|
void Set();//ELENA |
155 |
|
|
// |
156 |
|
|
// |
157 |
pam-ts |
1.25 |
TClonesArray *GetTrackArray(){return OrbitalInfoTrk;} ///< returns a pointer to the track related variables array |
158 |
|
|
TClonesArray** GetPointerToTrackArray(){return &OrbitalInfoTrk;}///< returns pointer to pointer to the track array |
159 |
pam-fi |
1.26 |
void SetTrackArray(TClonesArray *track);///<set pointer to the track array |
160 |
pam-fi |
1.5 |
|
161 |
mocchiut |
1.15 |
void Clear(Option_t *t=""); // emiliano |
162 |
mocchiut |
1.4 |
// |
163 |
malakhov |
1.27 |
ClassDef(OrbitalInfo, 11); |
164 |
mocchiut |
1.1 |
}; |
165 |
|
|
#endif |