66{
67 auto edep = step->GetTotalEnergyDeposit();
68 if (edep==0.) return true;
69
70 auto preStepPoint = step->GetPreStepPoint();
71 auto touchable = preStepPoint->GetTouchable();
72 auto copyNo = touchable->GetVolume()->GetCopyNo();
73 auto hitTime = preStepPoint->GetGlobalTime();
74
75
76 auto ix = -1;
79 ix = i;
80 break;
81 }
82 }
83
84 if (ix>=0) {
85
87 (*fHitsCollection)[ix]->SetTime(hitTime);
88 }
89 }
90 else {
91
92 auto hit = new HodoscopeHit(copyNo,hitTime);
93 auto physical = touchable->GetVolume();
94 hit->SetLogV(physical->GetLogicalVolume());
95 auto transform = touchable->GetHistory()->GetTopTransform();
96 transform.Invert();
97 hit->SetRot(transform.NetRotation());
98 hit->SetPos(transform.NetTranslation());
100 }
101 return true;
102}