5 #include "fmt/format.h"
11 const std::array<float, RTIInfo::nrigbins + 1>
RTIInfo::rigbins = {0., 0.5, 1.0, 1.33, 1.71, 2.15, 2.67,
12 3.29, 3.64, 4.43, 5.37, 6.47, 7.76, 9.26,
13 11.0, 13.0, 15.3, 18.0, 21.1, 24.7, 100000};
14 const std::array<float, RTIInfo::nbetabins + 1>
RTIInfo::betabins = {0., 0.5, 0.6, 0.7, 0.8,
15 0.85, 0.9, 0.95, 0.99, 0.999};
17 const std::map<unsigned int, std::pair<float, float>>
RTIInfo::qbins = {
18 {1, {0.7, 1.3}}, {2, {1.7, 2.3}}, {3, {2.7, 5.3}}, {4, {5.55, 8.45}},
19 {5, {9.55, 14.5}}, {6, {14.5, 25.5}}, {7, {25.5, 26.5}}, {8, {26.5, 100}}};
22 static unsigned long long lastSec = 0;
68 m_saaEdge.SetPoint(0, -46.9020531516, 1.07065020944);
69 m_saaEdge.SetPoint(1, -42.4324570724, 0.278767621219);
70 m_saaEdge.SetPoint(2, -38.7963908651, -0.864383087583);
71 m_saaEdge.SetPoint(3, -32.3643804368, -7.86605177782);
72 m_saaEdge.SetPoint(4, -32.1564301222, -8.2925091686);
73 m_saaEdge.SetPoint(5, -30.4732034929, -10.2380772476);
74 m_saaEdge.SetPoint(6, -28.9780074759, -11.1541721933);
75 m_saaEdge.SetPoint(7, -24.9729186857, -13.9219707474);
76 m_saaEdge.SetPoint(8, -22.3514515118, -15.8035549547);
77 m_saaEdge.SetPoint(9, -17.864105537, -17.5329648531);
78 m_saaEdge.SetPoint(10, -13.7360395887, -18.4514556443);
79 m_saaEdge.SetPoint(11, -9.31195234438, -20.5579164624);
80 m_saaEdge.SetPoint(12, -7.18498632474, -21.1949557893);
81 m_saaEdge.SetPoint(13, -3.59895538649, -23.8036939586);
82 m_saaEdge.SetPoint(14, -2.34504587932, -24.8012082521);
83 m_saaEdge.SetPoint(15, -0.819716509312, -27.065064314);
84 m_saaEdge.SetPoint(16, -0.0558141297819, -29.4952077252);
85 m_saaEdge.SetPoint(17, -1.39465186809, -31.1867845581);
86 m_saaEdge.SetPoint(18, -4.48059829104, -33.3607272689);
87 m_saaEdge.SetPoint(19, -8.42183566883, -35.9587368092);
88 m_saaEdge.SetPoint(20, -9.27876931794, -36.2964186885);
89 m_saaEdge.SetPoint(21, -13.8165106415, -37.7311180334);
90 m_saaEdge.SetPoint(22, -17.4924677527, -39.0468547418);
91 m_saaEdge.SetPoint(23, -18.408230558, -39.407844502);
92 m_saaEdge.SetPoint(24, -19.3555119436, -39.7809321206);
93 m_saaEdge.SetPoint(25, -26.2402929635, -42.5628157663);
94 m_saaEdge.SetPoint(26, -29.3390198221, -43.7512422146);
95 m_saaEdge.SetPoint(27, -30.4468807826, -44.1487676525);
96 m_saaEdge.SetPoint(28, -36.2608202879, -44.9657315842);
97 m_saaEdge.SetPoint(29, -38.6471514882, -45.8362408379);
98 m_saaEdge.SetPoint(30, -39.884535768, -46.2670553531);
99 m_saaEdge.SetPoint(31, -41.1537099863, -46.7007904009);
100 m_saaEdge.SetPoint(32, -46.4231376314, -47.035405079);
101 m_saaEdge.SetPoint(33, -50.5517527888, -46.9389068642);
102 m_saaEdge.SetPoint(34, -56.1886816966, -45.9179669008);
103 m_saaEdge.SetPoint(35, -60.4620401598, -44.5064118787);
104 m_saaEdge.SetPoint(36, -65.9797837207, -40.9661101604);
105 m_saaEdge.SetPoint(37, -68.6756029734, -39.1105256272);
106 m_saaEdge.SetPoint(38, -69.9926612952, -38.1896928803);
107 m_saaEdge.SetPoint(39, -72.5874587403, -35.1855408369);
108 m_saaEdge.SetPoint(40, -74.9768865609, -32.1834974998);
109 m_saaEdge.SetPoint(41, -79.386936716, -24.8704780079);
110 m_saaEdge.SetPoint(42, -81.5015374707, -20.6638534546);
111 m_saaEdge.SetPoint(43, -83.3018473547, -16.5956399645);
112 m_saaEdge.SetPoint(44, -83.4855953538, -15.6706377827);
113 m_saaEdge.SetPoint(45, -83.4016563744, -13.3880324461);
114 m_saaEdge.SetPoint(46, -79.0157111546, -9.8025691601);
115 m_saaEdge.SetPoint(47, -76.0062621477, -8.49383318946);
116 m_saaEdge.SetPoint(48, -71.9675022979, -7.9008874195);
117 m_saaEdge.SetPoint(49, -69.1989836702, -6.34481990494);
118 m_saaEdge.SetPoint(50, -68.320940027, -6.15577355353);
119 m_saaEdge.SetPoint(51, -60.8270728968, -4.71604157559);
120 m_saaEdge.SetPoint(52, -57.4730300335, -3.41729725291);
121 m_saaEdge.SetPoint(53, -53.25104737, -1.64190214253);
122 m_saaEdge.SetPoint(54, -51.5811868613, -0.10182123818);
123 m_saaEdge.SetPoint(55, -49.9470795728, 1.16581717215);
124 m_saaEdge.SetPoint(56, -46.9020531516, 1.07065020944);
127 float rtiLong =
Phi * TMath::RadToDeg();
128 float rtiLat =
Theta * TMath::RadToDeg();
129 while (rtiLong > 180.0f)
132 return m_saaEdge.IsInside(rtiLong, rtiLat);
177 fmt::print(
"{:=^120} \n",
" RTIInfo ");
179 fmt::print(
"{:>15} {:>15} {:>15} {:>20} {:>15} {:>15} {:>15} {:>15} {:>15}\n",
"Run",
"RunTag",
"UTCTime",
180 "LivetimeFraction",
"Theta",
"Phi",
"Altitude",
"nEvent",
"nError");
182 fmt::print(
"{:>15} {:>15x} {:>15} {:>20} {:>15} {:>15} {:>15} {:>15} {:>15}\n",
Run,
RunTag,
UTCTime,
184 fmt::print(
"{:-^120}\n",
"");
unsigned int Month()
Get the current month [1-12].
float nTrigger
Number of events with trigger in this second.
float nPartTrkInn
Average number of ParticleR with InnerTracker track.
float nTRDHitAvg
Average number of TRD raw hits for one event.
void Clear()
Clear container content.
bool DSPErrorJLV1
Has a DSP error occurred in JLV1 in this second?
float nEventParticle
Number of events with tof+trd+tracker+ecal data.
float Altitude
Altitude (gtod coordinate system) (cm)
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...
unsigned int LastEvNo
Last event no in this second.
unsigned int FirstEvNo
First event nnumber in this second.
unsigned int RunTag
Run tag.
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)...
float nACC
Average number of ACC sectors.
std::array< std::array< float, nbetabins+1 >, nqbins+1 > nPartBetaRate
Average number of ParticleR object divided by charge and beta.
static const std::array< float, nbetabins+1 > betabins
Bin edges for beta-binned variables.
std::array< float, 16 > TofFlags
Average value of TofFlags.
std::array< std::array< float, nrigbins+1 >, nqbins+1 > nTrkInnRate
Average number of TrTrackR object divided by charge and rigidity (inner tracker fit) ...
std::array< float, nqbins+1 > nPartAboveCutoff
Average number of ParticleR objects above cutoff.
float nTrClusterL1X
Average number of TrRawCluster on x side of L1.
float nTrClusterY
Average number of TrRawCluster on y side.
std::array< std::array< float, nrigbins+1 >, nqbins+1 > nTrkRate
Average number of TrTrackR object divided by charge and rigidity.
std::array< float, 8 > TrigPhysBPatt
Average fraction of each trigger pattern.
std::array< float, 16 > TrigJMembPatt
Average fraction of each trigger pattern.
float nHWError
Number of events with HW error (from JINJStatus)
float nParticle
Average number of ParticleR objects.
float nTrkInn
Average number of TrTrackR objects with inner fit.
std::array< float, nqbins+1 > nPartBelowCutoff
Average number of ParticleR objects below cutoff.
unsigned int Minute()
Get the current minute [0-59].
float MagAltSphCoo
Magnetic coordinates altitude.
float nTrClusterAvg
Average number of Tracker raw clusters for one event.
float MostProbableHeRig
Most probable He rigidity for this second;.
float LivetimeFraction
Livetime fraction during this second.
float nTRDHits
Average number of total TrdRawHit.
float nEcalShower
Average number of EcalShower objects.
float Phi
Phi (gtod coordinate system) (rad)
float nTrk
Average number of TrTrackR objects with default fit.
float TofRaw_nsumh
High Threshold history.
unsigned int UTCTime
JMDC unix time (seconds since 1 Jan 1970)
float Theta
Theta (gtod coordinate system) (rad)
bool DSPErrorJINF
Has a DSP error occurred in JINF in this second?
float GalacticLong
Galactic longitude of AMS pointing direction (degrees)
float Zenith
AMS zenith angle (degrees)
std::array< std::array< float, 2 >, 2 > nEventInnerL1L9
Number of events with a track with layer 1 and layer 9 XY hit.
static const std::map< unsigned int, std::pair< float, float > > qbins
Bin edges for charge-binned variables, depending on particle species.
bool DSPError
Has a DSP error occurred in this second?
float nEcalHits
Average number of EcalHit objects.
float MagThetaSphCoo
Magnetic coordinates theta.
float TofRaw_nftdc
Fast Trigger history.
float nEvent
Total number of events in this second.
unsigned int Second()
Get the current second [0-59].
float MagPhiSphCoo
Magnetic coordinates phi.
std::array< float, 19 > TrigRates
Average value of trigger rates.
float nError
Number of missing events due to errors.
float nPartTrk
Average number of ParticleR with Tracker track.
unsigned int DayOfYear()
Get the current day of the year [1-366].
std::array< float, 20 > nTRDLayerHits
Average number of TRD hits in each layer.
unsigned int DayOfMonth()
Get the current day of the month [1-31].
int good
0 if good (Thanks, Qi. Very descriptive)
float nTrClusterX
Average number of TrRawCluster on x side.
std::array< std::array< float, 3 >, 2 > MeanAlignDiffExtLayer
mean difference(um) bewteen PG ad CIEMAT alignment of L1 and L9(XYZ)
bool IsInSAA() const
Check if the ISS is in the SAA for this second.
void Dump() const
Dump on screen container content.
float AntiRaw_nftdc
Fast Trigger history.
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) ...
float nTofClusterH
Average number of TofClusterH objects.
float nGoodParticle
Average number of "good" ParticleR objects.
float TofRaw_nstdc
Low Threshold history.
std::array< std::array< float, nrigbins+1 >, nqbins+1 > nPartRate
Average number of ParticleR object divided by charge and rigidity.
unsigned int Year()
Get the current year.
float AntiRaw_ntdct
Low Threshold history.
std::array< std::array< float, nrigbins+1 >, nqbins+1 > nPartInnRate
Average number of ParticleR object divided by charge and rigidity (inner tracker fit) ...
unsigned int Hour()
Get the current hour [0-23].
bool DSPErrorJINJ
Has a DSP error occurred in JINJ in this second?
float nTRDTrack
Average number of TrdTrack objects.
float TofRaw_nsumsh
Super-High Threshold history.
float nTrClusterL1Y
Average number of TrRawCluster on y side of L1.
float GalacticLat
Galactic latitude of AMS pointing direction (degrees)
static const std::array< float, nrigbins+1 > rigbins
Bin edges for rigidity-binned variables.
RTIInfo container class description.
float nRoomError
Average number of room errors.
unsigned int Run
Run number.