17 bool TrdKBaseData::Fill(TrdKCluster *trdkPtr, TrTrackR *pTrTrack) {
18 AlignStatus = TrdKCluster::IsReadAlignmentOK;
19 CalibStatus = TrdKCluster::IsReadCalibOK;
20 if (!AlignStatus || !CalibStatus)
23 if (trdkPtr->NHits() < 1)
26 double _tmpLR[3], _tmpL[3];
33 isValid = trdkPtr->GetLikelihoodRatio_TrTrack(
threshold, _tmpLR, _tmpL, nhits, trd_pathl, amps);
35 isValid = trdkPtr->GetLikelihoodRatio_TRDRefit(
threshold, _tmpLR, _tmpL, nhits, trd_pathl, amps);
52 Likelihood[ltype] = _tmpL[ltype];
57 LikelihoodRatio[ltype] = _tmpLR[ltype];
61 ChargeStatus = trdkPtr->CalculateTRDCharge(0, _beta);
68 trdkPtr->FitTRDTrack();
69 trdkPtr->GetTRDRefittedTrack(trd_point, trd_dir);
74 AMSEventR::Head()->GetStoermerCutoff(tmp, -1, trd_dir);
75 DirectionalStoermerCutoff[0] = tmp;
76 AMSEventR::Head()->GetStoermerCutoff(tmp, 1, trd_dir);
77 DirectionalStoermerCutoff[1] = tmp;
80 int status = trdkPtr->GetTrTrackExtrapolation(trd_point, trd_dir);
82 for (
unsigned int i = 0; i < trdkPtr->NHits(); i++) {
83 TrdKHit *hit = trdkPtr->GetHit(i);
86 float tube_length = hit->Tube_Track_3DLength(&trd_point, &trd_dir);
87 if (tube_length <= 0.02)
89 float amplitude = hit->TRDHit_Amp;
92 if (amplitude > 32767)
94 unsigned int ilay = hit->TRDHit_Layer;
95 if (amplitude <= Edep[ilay])
97 Edep[ilay] = amplitude;
98 Pathlength[ilay] = tube_length;
103 Cleanliness = trdkPtr->GetCleanliness();
104 IPChi2 = trdkPtr->GetIPChi2();
106 if (isValid && !_isStandalone && pTrTrack) {
108 auto fit_ID_maxspan =
111 pTrTrack->Interpolate(
TRDCenter, trd_point, trd_dir, fit_ID_maxspan);
112 float rigidity = pTrTrack->GetRigidity(fit_ID_maxspan);
113 trdkPtr->SetTrTrack(&trd_point, &trd_dir, 2 * rigidity);
117 float pathlDummy, ampDummy;
118 trdkPtr->GetLikelihoodRatio_TrTrack(
threshold, _tmpLR, _tmpL, hitDummy, pathlDummy, ampDummy, -1, 0);
126 m_pointAndDir.emplace_back(trd_point.x(), trd_point.y(), trd_point.z());
127 m_pointAndDir.emplace_back(trd_dir.x(), trd_dir.y(), trd_dir.z());
Charge estimated using the upper half of the TRD.
constexpr unsigned int numQualTypes
constexpr std::array< LikelihoodRType, numLikelihoodRTypes > likelihoodRTypes
Hits laying off the TRD track (all the rest)
TrdK container class description.
constexpr unsigned int numLikelihoodTypes
Charge estimated using the whole TRD.
constexpr std::array< LikelihoodType, numLikelihoodTypes > likelihoodTypes
constexpr unsigned int numChargeTypes
static constexpr float TRDCenter
static constexpr float threshold
constexpr unsigned int numLikelihoodRTypes
Charge estimated using the lower half of the TRD.