175 G4ThreeVector
pos = aStep->GetPostStepPoint()->GetPosition();
176 const G4TouchableHistory* theTouchable =
static_cast<const G4TouchableHistory*
>(aStep->GetPostStepPoint()->GetTouchable());
177 int depth = theTouchable->GetHistoryDepth();
178 bool correct_volume =
false;
180 correct_volume =
true;
182 G4VPhysicalVolume* rootVol = theTouchable->GetVolume(
depth - 1);
187 G4VPhysicalVolume* cur_volume = theTouchable->GetVolume(curdepth);
188 G4LogicalVolume* cur_log_volume = cur_volume->GetLogicalVolume();
191 if ((cur_log_volume->GetName() ==
"LArMgr::LAr::FCAL::Module1::Absorber") ||
192 (cur_log_volume->GetName() ==
"LArMgr::LAr::FCAL::Module2::Absorber") ||
193 (cur_log_volume->GetName() ==
"LArMgr::LAr::EMEC::Pos::OuterWheel") ||
194 (cur_log_volume->GetName() ==
"LArMgr::LAr::EMEC::Neg::OuterWheel") ||
195 (cur_log_volume->GetName() ==
"LArMgr::LAr::EMEC::Pos::InnerWheel") ||
196 (cur_log_volume->GetName() ==
"LArMgr::LAr::EMEC::Neg::InnerWheel") ||
197 (cur_log_volume->GetName() ==
"LArMgr::LAr::EMB::STAC")) {
198 correct_volume =
true;
200 if (!correct_volume) {
204 cur_volume = theTouchable->GetVolume(curdepth);
205 cur_log_volume = cur_volume->GetLogicalVolume();
207 }
while ((!correct_volume) && (cur_volume != rootVol) && (curdepth < (
depth-1)));
211 if (cur_log_volume->GetName() ==
"LArMgr::LAr::FCAL::Module1::Absorber") {
215 }
else if (cur_log_volume->GetName() ==
"LArMgr::LAr::FCAL::Module2::Absorber") {
219 }
else if ((cur_log_volume->GetName() ==
"LArMgr::LAr::EMEC::Pos::InnerWheel") ||
220 (cur_log_volume->GetName() ==
"LArMgr::LAr::EMEC::Neg::InnerWheel")) {
224 }
else if ((cur_log_volume->GetName() ==
"LArMgr::LAr::EMEC::Pos::OuterWheel") ||
225 (cur_log_volume->GetName() ==
"LArMgr::LAr::EMEC::Neg::OuterWheel")) {
229 }
else if (cur_log_volume->GetName() ==
"LArMgr::LAr::EMB::STAC") {
240 if (aStep->GetTotalEnergyDeposit()>0) {
249 G4ThreeVector pos1=aStep->GetPreStepPoint()->GetPosition();
250 G4ThreeVector pos2=aStep->GetPostStepPoint()->GetPosition();
253 G4ThreeVector
pos = 0.5*(pos1+pos2);
255 G4ThreeVector prepos = pos1;
262 G4VPhysicalVolume* pCurrentVolume = aStep->GetPreStepPoint()->GetPhysicalVolume();
263 if (!pCurrentVolume->GetLogicalVolume()->GetSensitiveDetector()){
268 std::vector<LArHitData>
results;
271 for (
const auto& larhit:
results)
278 G4cout <<
"Error: Hit not processed by calculator!" << G4endl;
292 G4cout<<
" TAGINFO: "<<
et <<
" "<<aStep->GetTotalEnergyDeposit()<< G4endl;
295 theInfo->
setTime(aStep->GetPreStepPoint()->GetGlobalTime());
303 G4cout <<
"DEBUG: step " << aStep->GetTotalEnergyDeposit() << G4endl;