17 void TrdKBaseData::Fill(TrdKCluster *trdkPtr, TrTrackR *pTrTrack) {
18 AlignStatus = trdkPtr->IsReadAlignmentOK;
19 CalibStatus = trdkPtr->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);
72 int status = trdkPtr->GetTrTrackExtrapolation(trd_point, trd_dir);
74 for (
unsigned int i = 0; i < trdkPtr->NHits(); i++) {
75 TrdKHit *hit = trdkPtr->GetHit(i);
78 float tube_length = hit->Tube_Track_3DLength(&trd_point, &trd_dir);
79 if (tube_length <= 0.02)
81 float amplitude = hit->TRDHit_Amp;
84 if (amplitude > 32767)
86 unsigned int ilay = hit->TRDHit_Layer;
87 if (amplitude <= Edep[ilay])
89 Edep[ilay] = amplitude;
90 Pathlength[ilay] = tube_length;
95 Cleanliness = trdkPtr->GetCleanliness();
96 IPChi2 = trdkPtr->GetIPChi2();
98 if (isValid && !_isStandalone && pTrTrack) {
100 auto fit_ID_maxspan =
103 pTrTrack->Interpolate(
TRDCenter, trd_point, trd_dir, fit_ID_maxspan);
104 float rigidity = pTrTrack->GetRigidity(fit_ID_maxspan);
105 trdkPtr->SetTrTrack(&trd_point, &trd_dir, 2 * rigidity);
109 float pathlDummy, ampDummy;
110 trdkPtr->GetLikelihoodRatio_TrTrack(
threshold, _tmpLR, _tmpL, hitDummy, pathlDummy, ampDummy, -1, 0);
118 m_pointAndDir.emplace_back(trd_point.x(), trd_point.y(), trd_point.z());
119 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.