NAIA  1.1.1
RTIInfoFill.cpp
Go to the documentation of this file.
1 #include "Containers/RTIInfo.h"
2 
3 #include "TMath.h"
4 
5 // gbatch headers
6 #include "GM_SubLibrary.h"
7 #include "root.h"
8 
9 // SES headers
10 #include <SESMagFieldIGRF.h>
11 
12 #include <SESTraceMagFieldLine.h>
13 #include <algorithm>
14 
15 namespace NAIA {
16 
17 template <typename ValueType, long unsigned int N>
18 constexpr int FindBin(ValueType value, const std::array<ValueType, N> &bins) {
19  auto binIt = std::lower_bound(begin(bins), end(bins), value, std::less_equal<ValueType>());
20  return binIt == end(bins) ? -1 : std::distance(begin(bins), binIt) - 1;
21 };
22 
23 template <typename ValueType>
24 int FindBin(ValueType value, const std::map<unsigned int, std::pair<ValueType, ValueType>> &bins) {
25  auto binIt = std::find_if(begin(bins), end(bins),
26  [&value](auto it) { return (value >= it.second.first && value < it.second.second); });
27  return binIt == end(bins) ? -1 : binIt->first;
28 };
29 
30 auto GoodParticle = [](ParticleR *part) {
31  BetaHR *beta = part->pBetaH();
32 
33  TrTrackR *trk = part->pTrTrack();
34  if (!trk)
35  return false;
36 
37  constexpr int refit = 31;
38  constexpr int fit_algo = 1;
39  int id_max = trk->iTrTrackPar(fit_algo, 0, refit);
40  if (id_max < 0)
41  return false;
42 
43  bool hasinnery = false;
44  bool L2y = false, L34y = false, L56y = false, L78y = false;
45  TrRecHitR *trkHit = nullptr;
46  trkHit = trk->GetHitLJ(2);
47  if (trkHit)
48  if (trkHit->pTrCluster('y')) {
49  L2y = true;
50  }
51  trkHit = trk->GetHitLJ(3);
52  if (trkHit)
53  if (trkHit->pTrCluster('y')) {
54  L34y = true;
55  }
56  trkHit = trk->GetHitLJ(4);
57  if (trkHit)
58  if (trkHit->pTrCluster('y')) {
59  L34y = true;
60  }
61  trkHit = trk->GetHitLJ(5);
62  if (trkHit)
63  if (trkHit->pTrCluster('y')) {
64  L56y = true;
65  }
66  trkHit = trk->GetHitLJ(6);
67  if (trkHit)
68  if (trkHit->pTrCluster('y')) {
69  L56y = true;
70  }
71  trkHit = trk->GetHitLJ(7);
72  if (trkHit)
73  if (trkHit->pTrCluster('y')) {
74  L78y = true;
75  }
76  trkHit = trk->GetHitLJ(8);
77  if (trkHit)
78  if (trkHit->pTrCluster('y')) {
79  L78y = true;
80  }
81  if (L2y && L34y && L56y && L78y)
82  hasinnery = true;
83 
84  float chi2 = trk->GetNormChisqY(id_max);
85  if (!beta || beta->GetSumHit() < 4 || !trk || id_max < 0 || !hasinnery || chi2 < 0 || chi2 > 10)
86  return false;
87 
88  return true;
89 };
90 
91 void RTIInfo::Fill(AMSSetupR::RTI *rtiPtr, unsigned int runTag) {
92  Run = rtiPtr->run;
93  RunTag = runTag;
94  FirstEvNo = rtiPtr->evno;
95  LastEvNo = rtiPtr->evnol;
96  LivetimeFraction = rtiPtr->lf;
97  MostProbableHeRig = rtiPtr->mphe;
98  Theta = rtiPtr->theta;
99  Phi = rtiPtr->phi;
100  Altitude = rtiPtr->r - Re;
101  Zenith = rtiPtr->zenith;
102  GalacticLat = rtiPtr->glat;
103  GalacticLong = rtiPtr->glong;
104  nEvent = rtiPtr->nev;
105  nError = rtiPtr->nerr;
106  nTrigger = rtiPtr->ntrig;
107  nHWError = rtiPtr->nhwerr;
108  nEventParticle = rtiPtr->npart;
109  nTRDHitAvg = rtiPtr->mtrdh;
110  nTrClusterAvg = rtiPtr->mtrcl;
111  good = rtiPtr->good;
112  UTCTime = rtiPtr->utime;
113 
114  rtiPtr->getissatt(Roll, Pitch, Yaw);
115  rtiPtr->getisstle(Velocity_s, Velocity_theta, Velocity_phi);
116 
117  for (unsigned int i = 0; i < 4; i++) {
118  for (unsigned int j = 0; j < 2; j++) {
119  MaxStoermerCutoff[i][j] = rtiPtr->cf[i][j];
120  MaxIGRFCutoff[i][j] = rtiPtr->cfi[i][j];
121  if (i < 2) {
122  MinIGRFCutoff[i][j] = rtiPtr->cfl[i][j];
123  }
124  }
125  }
126 
127  nEventInnerL1L9[0][0] = rtiPtr->nl1l9[0][0];
128  nEventInnerL1L9[0][1] = rtiPtr->nl1l9[0][1];
129  nEventInnerL1L9[1][0] = rtiPtr->nl1l9[1][0];
130  nEventInnerL1L9[1][1] = rtiPtr->nl1l9[1][1];
131 
132  AMSPoint nexl[2];
133  AMSEventR::GetRTInL1L9(nexl, rtiPtr->utime, 90);
134  nEventInnerL1L9Int90[0][0] = nexl[0][0];
135  nEventInnerL1L9Int90[0][1] = nexl[0][1];
136  nEventInnerL1L9Int90[0][2] = nexl[0][2];
137  nEventInnerL1L9Int90[1][0] = nexl[1][0];
138  nEventInnerL1L9Int90[1][1] = nexl[1][1];
139  nEventInnerL1L9Int90[1][2] = nexl[1][2];
140 
141  AMSPoint pn1, pn9, pd1, pd9;
142  AMSEventR::GetRTIdL1L9(0, pn1, pd1, UTCTime, 60);
143  AMSEventR::GetRTIdL1L9(1, pn9, pd9, UTCTime, 60);
144  MeanAlignDiffExtLayer[0] = {static_cast<float>(pd1.x()), static_cast<float>(pd1.y()), static_cast<float>(pd1.z())};
145  MeanAlignDiffExtLayer[1] = {static_cast<float>(pd9.x()), static_cast<float>(pd9.y()), static_cast<float>(pd9.z())};
146 
147  // again, this should be illegal
148  double GMC[3];
149  GM_GeoMagSphericalCoo(UTCTime, Altitude, Theta, Phi, GMC);
150 
151  MagThetaSphCoo = static_cast<float>(GMC[2]);
152  MagPhiSphCoo = static_cast<float>(GMC[1]);
153  MagAltSphCoo = static_cast<float>(GMC[0]);
154 
155  double lambda2 = cos(MagThetaSphCoo * TMath::DegToRad()) * cos(MagThetaSphCoo * TMath::DegToRad());
156  LShell = (MagAltSphCoo / Re) / lambda2;
157 
158  AMSSetupR amssetup;
159  AMSSetupR::DSPError dsperr;
160  DSPError = amssetup.getDSPError(dsperr, UTCTime);
161  DSPErrorJINJ = false;
162  for (int inode = 0x80; inode < 0x88; inode++)
163  if (dsperr.SearchNA(inode))
164  DSPErrorJINJ = true;
165  DSPErrorJLV1 = false;
166  for (int inode = 0x88; inode < 0x8C; inode++)
167  if (dsperr.SearchNA(inode))
168  DSPErrorJLV1 = true;
169  DSPErrorJINF = false;
170  for (int inode = 0x34; inode < 0x3E; inode++)
171  if (dsperr.SearchNA(inode))
172  DSPErrorJINF = true;
173  for (int inode = 0x96; inode < 0xCE; inode++)
174  if (dsperr.SearchNA(inode))
175  DSPErrorJINF = true;
176 
177  // IGRF mag field. IGRF13 is loaded by default
178  static SESMagFieldIGRF igrf_field_calculator{};
179  igrf_field_calculator.SetTime(SESTime{UTCTime, 0});
180 
181  // note, R should be in km
182  const SESVector iss_position{(Altitude + Re) / 1e5, Theta, Phi, SESVectorType::Geographic};
183  const SESVector mag_field = igrf_field_calculator.GetB(iss_position);
184  IGRFMagField = mag_field.GetCartesian();
185 
186  SESTraceMagFieldLine trace_mline(iss_position, M_PI / 2, &igrf_field_calculator);
187  trace_mline.Integrate();
188  Bm = trace_mline.GetBm();
189  I = trace_mline.GetI();
190  BEq = trace_mline.GetBEq();
191  L = trace_mline.GetL();
192 }
193 
194 void RTIInfo::FillEventVariables() {
195  if (m_processedEvents == 0) {
196  return;
197  }
198 
199  auto normalize = [this](auto &value) { value /= m_processedEvents; };
200 
201  normalize(nTRDTrack);
202  normalize(nTRDHits);
203 
204  std::for_each(begin(nTRDLayerHits), begin(nTRDLayerHits), normalize);
205 
206  normalize(nEcalShower);
207  normalize(nEcalHits);
208 
209  normalize(nTrClusterX);
210  normalize(nTrClusterY);
211  normalize(nTrClusterL1X);
212  normalize(nTrClusterL1Y);
213 
214  normalize(nTofClusterH);
215 
216  normalize(nParticle);
217  normalize(nGoodParticle);
218  normalize(nPartTrkInn);
219  normalize(nPartTrk);
220 
221  for (auto &inner : nPartRate)
222  std::for_each(begin(inner), end(inner), normalize);
223  for (auto &inner : nPartBetaRate)
224  std::for_each(begin(inner), end(inner), normalize);
225  for (auto &inner : nPartInnRate)
226  std::for_each(begin(inner), end(inner), normalize);
227  std::for_each(begin(nPartAboveCutoff), end(nPartAboveCutoff), normalize);
228  std::for_each(begin(nPartBelowCutoff), end(nPartBelowCutoff), normalize);
229 
230  normalize(nTrk);
231  normalize(nTrkInn);
232 
233  for (auto &inner : nTrkRate)
234  std::for_each(begin(inner), end(inner), normalize);
235  for (auto &inner : nTrkInnRate)
236  std::for_each(begin(inner), end(inner), normalize);
237 
238  normalize(nACC);
239  std::for_each(begin(TrigPhysBPatt), end(TrigPhysBPatt), normalize);
240  std::for_each(begin(TrigJMembPatt), end(TrigJMembPatt), normalize);
241  std::for_each(begin(TrigRates), end(TrigRates), normalize);
242 
243  std::for_each(begin(TofFlags), end(TofFlags), normalize);
244 
245  normalize(TofRaw_nstdc);
246  normalize(TofRaw_nftdc);
247  normalize(TofRaw_nsumh);
248  normalize(TofRaw_nsumsh);
249 
250  normalize(AntiRaw_ntdct);
251  normalize(AntiRaw_nftdc);
252 
253  normalize(nRoomError);
254 
255  m_processedEvents = 0;
256 }
257 
258 void RTIInfo::AccumulateEventVariables(AMSEventR *evPtr) {
260 
261  // TRD
262  nTRDTrack += evPtr->NTrdTrack();
263  nTRDHits += evPtr->nTrdRawHit();
264 
265  std::for_each(begin(evPtr->TrdCluster()), end(evPtr->TrdCluster()),
266  [this](const TrdClusterR &cl) { nTRDLayerHits[cl.Layer]++; });
267 
268  // ECAL
269  nEcalShower += evPtr->NEcalShower();
270  nEcalHits += evPtr->nEcalHit();
271 
272  // TrCluster
273  std::for_each(begin(evPtr->TrRawCluster()), end(evPtr->TrRawCluster()), [this](TrRawClusterR &cl) {
274  if (cl.GetSide() == 0) {
275  nTrClusterX++;
276  if (cl.GetLayerJ() == 1)
277  nTrClusterL1X++;
278  } else {
279  nTrClusterY++;
280  if (cl.GetLayerJ() == 1)
281  nTrClusterL1Y++;
282  }
283  });
284 
285  // TOF
286  nTofClusterH += evPtr->nTofClusterH();
287 
288  // Particle rates
289  std::for_each(begin(evPtr->Particle()), end(evPtr->Particle()), [this](ParticleR &part) {
290  nParticle++;
291 
292  if (GoodParticle(&part)) {
293  nGoodParticle++;
294 
295  constexpr int refit = 31;
296  constexpr int fit_algo = 1;
297  int id_inner = part.pTrTrack()->iTrTrackPar(fit_algo, 3, refit);
298  if (id_inner >= 0) {
299  nPartTrkInn++;
300  float rig = part.pTrTrack()->GetRigidity(id_inner);
301  float q = part.pTrTrack()->GetQ(part.pBetaH()->GetBeta());
302  int rbin = FindBin(rig, rigbins);
303  int qbin = rig < 0 ? 0 : FindBin(q, qbins);
304  if (qbin >= 0 && rbin >= 0)
305  nPartInnRate[qbin][rbin]++;
306  }
307  int id_max = part.pTrTrack()->iTrTrackPar(fit_algo, 0, refit);
308  if (id_max >= 0) {
309  nPartTrk++;
310  float rig = part.pTrTrack()->GetRigidity(id_inner);
311  float q = part.pTrTrack()->GetQ(part.pBetaH()->GetBeta());
312  int rbin = FindBin(rig, rigbins);
313  int qbin = rig < 0 ? 0 : FindBin(q, qbins);
314  if (qbin >= 0 && rbin >= 0)
315  nPartRate[qbin][rbin]++;
316 
317  int bbin = FindBin(part.pBetaH()->GetBeta(), betabins);
318  nPartBetaRate[qbin][bbin]++;
319 
320  float maxrigcutoff = max(fabs(MaxIGRFCutoff[3][0]), fabs(MaxIGRFCutoff[3][1])); // 40 deg
321  float minrigcutoff = min(fabs(MinIGRFCutoff[1][0]), fabs(MinIGRFCutoff[1][1])); // 40 deg
322  if (qbin >= 0 && fabs(rig) < minrigcutoff)
323  nPartBelowCutoff[qbin]++;
324  if (qbin >= 0 && fabs(rig) > maxrigcutoff)
325  nPartAboveCutoff[qbin]++;
326  }
327  }
328  });
329 
330  std::for_each(begin(evPtr->TrTrack()), end(evPtr->TrTrack()), [this](TrTrackR &trtrack) {
331  constexpr int refit = 31;
332  constexpr int fit_algo = 1; // Kalman fitter
333 
334  int id_inner = trtrack.iTrTrackPar(fit_algo, 3, refit);
335  if (id_inner >= 0) {
336  nTrkInn++;
337  float rig = trtrack.GetRigidity(id_inner);
338  float q = trtrack.GetQ(1.0);
339  int rbin = FindBin(rig, rigbins);
340  int qbin = rig < 0 ? 0 : FindBin(q, qbins);
341  if (qbin >= 0 && rbin >= 0)
342  nTrkInnRate[qbin][rbin]++;
343  }
344  int id_max = trtrack.iTrTrackPar(fit_algo, 0, refit);
345  if (id_max >= 0) {
346  nTrk++;
347  float rig = trtrack.GetRigidity(id_max);
348  float q = trtrack.GetQ(1.0);
349  int rbin = FindBin(rig, rigbins);
350  int qbin = rig < 0 ? 0 : FindBin(q, qbins);
351  if (qbin >= 0 && rbin >= 0)
352  nTrkRate[qbin][rbin]++;
353  }
354  });
355 
356  auto *trig = evPtr->pLevel1(0);
357  if (trig) {
358  trig->RestorePhysBPat();
359  auto bpatt = std::bitset<8>(trig->PhysBPatt);
360  for (size_t ipatt = 0; ipatt < 8; ipatt++)
361  if (bpatt[ipatt])
362  TrigPhysBPatt[ipatt]++;
363 
364  auto jpatt = std::bitset<16>(trig->JMembPatt);
365  for (size_t ipatt = 0; ipatt < 16; ipatt++)
366  if (jpatt[ipatt])
367  TrigJMembPatt[ipatt]++;
368 
369  for (size_t i = 0; i < 19; i++)
370  TrigRates[i] += (float)trig->TrigRates[i];
371 
372  auto antipatt = std::bitset<8>(trig->AntiPatt);
373  for (size_t iacc = 0; iacc < 8; iacc++)
374  if (antipatt[iacc])
375  nACC++;
376 
377  if (trig->TofFlag1 < 0)
378  TofFlags[15]++; // No FTC
379  else if (trig->TofFlag1 < 15)
380  TofFlags[trig->TofFlag1]++;
381 
382  std::for_each(begin(evPtr->TofRawSide()), end(evPtr->TofRawSide()), [this](TofRawSideR &tofraw) {
383  TofRaw_nstdc += tofraw.nstdc; // Low Threshold History
384  TofRaw_nftdc += tofraw.nftdc; // Fast Trigger History
385  TofRaw_nsumh += tofraw.nsumh; // High Threshold History
386  TofRaw_nsumsh += tofraw.nsumsh; // Super-High Threshold History
387  });
388 
389  std::for_each(begin(evPtr->AntiRawSide()), end(evPtr->AntiRawSide()), [this](AntiRawSideR &antiraw) {
390  AntiRaw_ntdct += antiraw.ntdct; // Low Threshold History
391  AntiRaw_nftdc += antiraw.nftdc; // Fast Trigger History
392  });
393 
394  // Check for room errors
395  auto *daq = evPtr->pDaqEvent(0);
396  if (daq) {
397  bool jinj_room_error = false;
398  for (int ijinj = 0; ijinj < 4; ijinj++) {
399  if ((daq->JINJStatus[ijinj] >> 8) & 0x2) {
400  for (int ijinf = 0; ijinf < 24; ijinf++) {
401  if ((((daq->JError[ijinf]) >> 3) == 0x1A) || (((daq->JError[ijinf]) >> 3) == 0x12))
402  jinj_room_error = true;
403  }
404  }
405  }
406  if (jinj_room_error)
407  nRoomError++;
408  }
409  }
410 }
411 
412 } // namespace NAIA
NAIA::RTIInfo::TrigJMembPatt
std::array< float, 16 > TrigJMembPatt
Average fraction of each trigger pattern.
Definition: RTIInfo.h:150
NAIA::end
NAIAChain::EventItr end(NAIAChain &chain)
Definition: NAIAChain.h:298
NAIA::FindBin
int FindBin(ValueType value, const std::map< unsigned int, std::pair< ValueType, ValueType >> &bins)
Definition: RTIInfoFill.cpp:24
NAIA::RTIInfo::TofRaw_nsumsh
float TofRaw_nsumsh
Super-High Threshold history.
Definition: RTIInfo.h:158
NAIA::RTIInfo::nPartTrkInn
float nPartTrkInn
Average number of ParticleR with InnerTracker track.
Definition: RTIInfo.h:132
NAIA::RTIInfo::nTrClusterY
float nTrClusterY
Average number of TrRawCluster on y side.
Definition: RTIInfo.h:124
NAIA::RTIInfo::nTrigger
float nTrigger
Number of events with trigger in this second.
Definition: RTIInfo.h:94
NAIA::RTIInfo::MagAltSphCoo
float MagAltSphCoo
Magnetic coordinates altitude.
Definition: RTIInfo.h:113
NAIA::RTIInfo::nTrClusterL1Y
float nTrClusterL1Y
Average number of TrRawCluster on y side of L1.
Definition: RTIInfo.h:126
NAIA::RTIInfo::nEventInnerL1L9
std::array< std::array< float, 2 >, 2 > nEventInnerL1L9
Number of events with a track with layer 1 and layer 9 XY hit.
Definition: RTIInfo.h:97
NAIA::RTIInfo::nRoomError
float nRoomError
Average number of room errors.
Definition: RTIInfo.h:163
NAIA::RTIInfo::nTrk
float nTrk
Average number of TrTrackR objects with default fit.
Definition: RTIInfo.h:142
NAIA::RTIInfo::Re
static constexpr double Re
Definition: RTIInfo.h:178
NAIA::RTIInfo::nTRDHits
float nTRDHits
Average number of total TrdRawHit.
Definition: RTIInfo.h:117
NAIA::RTIInfo::nTrkInnRate
std::array< std::array< float, nrigbins+1 >, nqbins+1 > nTrkInnRate
Average number of TrTrackR object divided by charge and rigidity (inner tracker fit)
Definition: RTIInfo.h:146
NAIA::RTIInfo::nTrkRate
std::array< std::array< float, nrigbins+1 >, nqbins+1 > nTrkRate
Average number of TrTrackR object divided by charge and rigidity.
Definition: RTIInfo.h:145
NAIA::RTIInfo::nError
float nError
Number of missing events due to errors.
Definition: RTIInfo.h:93
NAIA
Definition: Event.h:13
NAIA::RTIInfo::TofRaw_nsumh
float TofRaw_nsumh
High Threshold history.
Definition: RTIInfo.h:157
NAIA::RTIInfo::nPartBelowCutoff
std::array< float, nqbins+1 > nPartBelowCutoff
Average number of ParticleR objects below cutoff.
Definition: RTIInfo.h:140
NAIA::RTIInfo::TofFlags
std::array< float, 16 > TofFlags
Average value of TofFlags.
Definition: RTIInfo.h:153
NAIA::RTIInfo::MostProbableHeRig
float MostProbableHeRig
Most probable He rigidity for this second;.
Definition: RTIInfo.h:79
NAIA::RTIInfo::DSPError
bool DSPError
Has a DSP error occurred in this second?
Definition: RTIInfo.h:106
NAIA::RTIInfo::L
float L
L-shell.
Definition: RTIInfo.h:78
NAIA::RTIInfo::AntiRaw_ntdct
float AntiRaw_ntdct
Low Threshold history.
Definition: RTIInfo.h:160
NAIA::RTIInfo::Altitude
float Altitude
Altitude (gtod coordinate system) (cm)
Definition: RTIInfo.h:82
NAIA::RTIInfo::nHWError
float nHWError
Number of events with HW error (from JINJStatus)
Definition: RTIInfo.h:95
NAIA::RTIInfo::MagPhiSphCoo
float MagPhiSphCoo
Magnetic coordinates phi.
Definition: RTIInfo.h:112
NAIA::RTIInfo::nTrClusterX
float nTrClusterX
Average number of TrRawCluster on x side.
Definition: RTIInfo.h:123
NAIA::RTIInfo::Phi
float Phi
Phi (gtod coordinate system) (rad)
Definition: RTIInfo.h:81
NAIA::RTIInfo::nEcalHits
float nEcalHits
Average number of EcalHit objects.
Definition: RTIInfo.h:121
NAIA::RTIInfo::MaxStoermerCutoff
std::array< std::array< float, 2 >, 4 > MaxStoermerCutoff
Max Stoermer cutoff within a 25,30,35,40 degrees field of view (for both negative and positive partic...
Definition: RTIInfo.h:71
NAIA::RTIInfo::Theta
float Theta
Theta (gtod coordinate system) (rad)
Definition: RTIInfo.h:80
NAIA::RTIInfo::nEcalShower
float nEcalShower
Average number of EcalShower objects.
Definition: RTIInfo.h:120
NAIA::RTIInfo::Zenith
float Zenith
AMS zenith angle (degrees)
Definition: RTIInfo.h:83
NAIA::RTIInfo::TrigPhysBPatt
std::array< float, 8 > TrigPhysBPatt
Average fraction of each trigger pattern.
Definition: RTIInfo.h:149
NAIA::RTIInfo::nTrClusterL1X
float nTrClusterL1X
Average number of TrRawCluster on x side of L1.
Definition: RTIInfo.h:125
NAIA::RTIInfo::LShell
float LShell
L shell.
Definition: RTIInfo.h:114
NAIA::RTIInfo::nPartTrk
float nPartTrk
Average number of ParticleR with Tracker track.
Definition: RTIInfo.h:133
NAIA::RTIInfo::Roll
float Roll
ISS roll angle (rad)
Definition: RTIInfo.h:84
NAIA::RTIInfo::good
int good
0 if good (Thanks, Qi. Very descriptive)
Definition: RTIInfo.h:103
NAIA::RTIInfo::Yaw
float Yaw
ISS yaw angle (rad)
Definition: RTIInfo.h:86
NAIA::RTIInfo::DSPErrorJINF
bool DSPErrorJINF
Has a DSP error occurred in JINF in this second?
Definition: RTIInfo.h:108
NAIA::GoodParticle
auto GoodParticle
Definition: RTIInfoFill.cpp:30
NAIA::RTIInfo::RunTag
unsigned int RunTag
Run tag.
Definition: RTIInfo.h:65
NAIA::RTIInfo::TofRaw_nftdc
float TofRaw_nftdc
Fast Trigger history.
Definition: RTIInfo.h:156
NAIA::RTIInfo::MeanAlignDiffExtLayer
std::array< std::array< float, 3 >, 2 > MeanAlignDiffExtLayer
mean difference(um) bewteen PG ad CIEMAT alignment of L1 and L9(XYZ)
Definition: RTIInfo.h:99
NAIA::RTIInfo::DSPErrorJINJ
bool DSPErrorJINJ
Has a DSP error occurred in JINJ in this second?
Definition: RTIInfo.h:107
NAIA::RTIInfo::Velocity_theta
float Velocity_theta
ISS angular velocity theta component (rad)
Definition: RTIInfo.h:88
NAIA::RTIInfo::I
float I
Second magnetic adiabatic invariant (km)
Definition: RTIInfo.h:76
NAIA::RTIInfo::nTrkInn
float nTrkInn
Average number of TrTrackR objects with inner fit.
Definition: RTIInfo.h:143
NAIA::RTIInfo::LivetimeFraction
float LivetimeFraction
Livetime fraction during this second.
Definition: RTIInfo.h:68
NAIA::RTIInfo::nParticle
float nParticle
Average number of ParticleR objects.
Definition: RTIInfo.h:130
NAIA::RTIInfo::nTrClusterAvg
float nTrClusterAvg
Average number of Tracker raw clusters for one event.
Definition: RTIInfo.h:102
NAIA::RTIInfo::GalacticLat
float GalacticLat
Galactic latitude of AMS pointing direction (degrees)
Definition: RTIInfo.h:90
NAIA::RTIInfo::nTofClusterH
float nTofClusterH
Average number of TofClusterH objects.
Definition: RTIInfo.h:128
NAIA::RTIInfo::nGoodParticle
float nGoodParticle
Average number of "good" ParticleR objects.
Definition: RTIInfo.h:131
NAIA::RTIInfo::m_processedEvents
unsigned long long m_processedEvents
Definition: RTIInfo.h:184
NAIA::RTIInfo::nPartRate
std::array< std::array< float, nrigbins+1 >, nqbins+1 > nPartRate
Average number of ParticleR object divided by charge and rigidity.
Definition: RTIInfo.h:135
NAIA::RTIInfo::Bm
float Bm
Mirror magnetic field in nT.
Definition: RTIInfo.h:75
NAIA::RTIInfo::MaxIGRFCutoff
std::array< std::array< float, 2 >, 4 > MaxIGRFCutoff
Max IGRF cutoff within a 25,30,35,40 degrees field of view (for both negative and positive particles)
Definition: RTIInfo.h:72
NAIA::RTIInfo::AntiRaw_nftdc
float AntiRaw_nftdc
Fast Trigger history.
Definition: RTIInfo.h:161
NAIA::RTIInfo::nEvent
float nEvent
Total number of events in this second.
Definition: RTIInfo.h:92
NAIA::RTIInfo::nEventInnerL1L9Int90
std::array< std::array< float, 3 >, 2 > nEventInnerL1L9Int90
Number of events with a track with layer 1 and layer 9 XY hit integrated in a 90-second window (see h...
Definition: RTIInfo.h:98
NAIA::RTIInfo::LastEvNo
unsigned int LastEvNo
Last event no in this second.
Definition: RTIInfo.h:67
NAIA::RTIInfo::UTCTime
unsigned int UTCTime
JMDC unix time (seconds since 1 Jan 1970)
Definition: RTIInfo.h:104
NAIA::RTIInfo::nEventParticle
float nEventParticle
Number of events with tof+trd+tracker+ecal data.
Definition: RTIInfo.h:96
NAIA::RTIInfo::MagThetaSphCoo
float MagThetaSphCoo
Magnetic coordinates theta.
Definition: RTIInfo.h:111
NAIA::RTIInfo::nTRDHitAvg
float nTRDHitAvg
Average number of TRD raw hits for one event.
Definition: RTIInfo.h:101
NAIA::RTIInfo::DSPErrorJLV1
bool DSPErrorJLV1
Has a DSP error occurred in JLV1 in this second?
Definition: RTIInfo.h:109
NAIA::RTIInfo::Velocity_s
float Velocity_s
ISS angular velocity magnitude (rad/s)
Definition: RTIInfo.h:87
NAIA::RTIInfo::nPartBetaRate
std::array< std::array< float, nbetabins+1 >, nqbins+1 > nPartBetaRate
Average number of ParticleR object divided by charge and beta.
Definition: RTIInfo.h:136
NAIA::RTIInfo::TrigRates
std::array< float, 19 > TrigRates
Average value of trigger rates.
Definition: RTIInfo.h:151
RTIInfo.h
RTIInfo container class description.
NAIA::RTIInfo::FirstEvNo
unsigned int FirstEvNo
First event nnumber in this second.
Definition: RTIInfo.h:66
NAIA::RTIInfo::nPartInnRate
std::array< std::array< float, nrigbins+1 >, nqbins+1 > nPartInnRate
Average number of ParticleR object divided by charge and rigidity (inner tracker fit)
Definition: RTIInfo.h:137
NAIA::RTIInfo::MinIGRFCutoff
std::array< std::array< float, 2 >, 2 > MinIGRFCutoff
Min IGRF cutoff within a 25,40 degrees field of view (for both negative and positive particles)
Definition: RTIInfo.h:73
NAIA::RTIInfo::IGRFMagField
std::array< double, 3 > IGRFMagField
Geomagnetic field estimated from IGRF13 model in nT.
Definition: RTIInfo.h:74
NAIA::RTIInfo::nACC
float nACC
Average number of ACC sectors.
Definition: RTIInfo.h:152
NAIA::RTIInfo::BEq
float BEq
Equatorial magnetic field in nT.
Definition: RTIInfo.h:77
NAIA::RTIInfo::Run
unsigned int Run
Run number.
Definition: RTIInfo.h:64
NAIA::RTIInfo::nPartAboveCutoff
std::array< float, nqbins+1 > nPartAboveCutoff
Average number of ParticleR objects above cutoff.
Definition: RTIInfo.h:139
NAIA::begin
NAIAChain::EventItr begin(NAIAChain &chain)
Definition: NAIAChain.h:297
NAIA::RTIInfo::TofRaw_nstdc
float TofRaw_nstdc
Low Threshold history.
Definition: RTIInfo.h:155
NAIA::RTIInfo::nTRDTrack
float nTRDTrack
Average number of TrdTrack objects.
Definition: RTIInfo.h:116
NAIA::RTIInfo::Velocity_phi
float Velocity_phi
ISS angular phi component (rad)
Definition: RTIInfo.h:89
NAIA::RTIInfo::nTRDLayerHits
std::array< float, 20 > nTRDLayerHits
Average number of TRD hits in each layer.
Definition: RTIInfo.h:118
NAIA::RTIInfo::Pitch
float Pitch
ISS pitch angle (rad)
Definition: RTIInfo.h:85
NAIA::RTIInfo::GalacticLong
float GalacticLong
Galactic longitude of AMS pointing direction (degrees)
Definition: RTIInfo.h:91
NAIA::FindBin
constexpr int FindBin(ValueType value, const std::array< ValueType, N > &bins)
Definition: RTIInfoFill.cpp:18