5 void UnbExtHitBaseData::Fill(AMSEventR *evPtr) {
7 auto fillHit = [
this](
ExtHit type, TrRecHitR *hit,
int imult,
float beta) {
8 m_hits[type].ChargeStatus = hit->GetQStatus();
9 m_hits[type].HitPosX = hit->GetCoord(imult).x();
10 m_hits[type].HitPosY = hit->GetCoord(imult).y();
24 TrRecHitR *hitL1 =
nullptr;
25 TrRecHitR *hitL9 =
nullptr;
29 Float_t prev_charge1 = 0;
30 Float_t prev_charge9 = 0;
31 for (
int ihit = 0; ihit < evPtr->NTrRecHit(); ihit++) {
32 if (evPtr->pTrRecHit(ihit)->OnlyX() || evPtr->pTrRecHit(ihit)->OnlyY())
34 if (evPtr->pTrRecHit(ihit)->GetLayerJ() == 1) {
35 if (evPtr->pTrRecHit(ihit)->GetXCluster()->GetQ() > prev_charge1) {
36 hitL1 = evPtr->pTrRecHit(ihit);
37 prev_charge1 = evPtr->pTrRecHit(ihit)->GetXCluster()->GetQ();
39 }
else if (evPtr->pTrRecHit(ihit)->GetLayerJ() == 9) {
40 if (evPtr->pTrRecHit(ihit)->GetXCluster()->GetQ() > prev_charge9) {
41 hitL9 = evPtr->pTrRecHit(ihit);
42 prev_charge9 = evPtr->pTrRecHit(ihit)->GetXCluster()->GetQ();
47 Int_t mult1 = -1, mult9 = -1;
48 if (hitL1 !=
nullptr) {
50 AMSPoint tofh_point = AMSPoint(betaInt[0], betaInt[1], betaInt[2]);
51 hitL1->HitPointDist(tofh_point, mult1);
55 if (hitL9 !=
nullptr) {
57 AMSPoint tofh_point = AMSPoint(betaInt[0], betaInt[1], betaInt[2]);
58 hitL9->HitPointDist(tofh_point, mult9);
67 AMSPoint tofh_point_L1 = AMSPoint(betaL1Int[0], betaL1Int[1], betaL1Int[2]);
68 AMSPoint tofh_point_L9 = AMSPoint(betaL9Int[0], betaL9Int[1], betaL9Int[2]);
70 Float_t prev_dist1 = 99999;
71 Float_t prev_dist9 = 99999;
72 Int_t mult1 = -1, mult9 = -1;
73 for (
int ihit = 0; ihit < evPtr->NTrRecHit(); ihit++) {
74 if (evPtr->pTrRecHit(ihit)->OnlyX() || evPtr->pTrRecHit(ihit)->OnlyY())
76 if (evPtr->pTrRecHit(ihit)->GetLayerJ() == 1) {
77 if (evPtr->pTrRecHit(ihit)->HitPointDist(tofh_point_L1, mult1).norm() < prev_dist1) {
78 hitL1 = evPtr->pTrRecHit(ihit);
79 prev_dist1 = hitL1->HitPointDist(tofh_point_L1, mult1).norm();
81 }
else if (evPtr->pTrRecHit(ihit)->GetLayerJ() == 9) {
82 if (evPtr->pTrRecHit(ihit)->HitPointDist(tofh_point_L9, mult9).norm() < prev_dist9) {
83 hitL9 = evPtr->pTrRecHit(ihit);
84 prev_dist9 = hitL9->HitPointDist(tofh_point_L9, mult9).norm();
UnbExtHit container class description.
TofBetaVariable< float > Beta
Beta measurement, one for each type. See Tof::BetaType for list of types.
TVector3 InterpolateAtZ(float z) const
Get Tof track interpolation at given height.
TofChargeVariable< float > Charge
Charge measurement, one for each type. See Tof::ChargeType for list of types.
Charge estimated using the whole TRD.
const TofBaseData * tofBase
SingleTreeChain::EventItr end(SingleTreeChain &chain)
std::map< ExtHit, HitData > m_hits
ExtHit
Handy enum to distinguish L1 and L9.
Standard tracker charge reconstruction.