477 std::vector<G4double> & energies,
488 for (
unsigned int i=0; i != 4; i++) energies.push_back( 0. );
499 G4VPhysicalVolume* physical = step->GetPreStepPoint()->GetPhysicalVolume();
500 G4int copyNumber = physical->GetCopyNo();
501 G4String volumeName = physical->GetLogicalVolume()->GetName();
504 G4cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::Process - "
506 <<
" searching for volume '"
513 if(volumeName.find(
"LArMgr::") == 0) volumeName.erase(0,8);
514 if(volumeName.find(
"LAr::Barrel::Cryostat::Sector")==0) {
515 volumeName =
"LAr::Barrel::Cryostat::Sector";
516 if(copyNumber != 7 && copyNumber !=12) copyNumber=1;
517 }
else if(volumeName.find(
"LAr::Barrel::Cryostat::Cylinder")==0){
518 volumeName =
"LAr::Barrel::Cryostat::Cylinder";
519 }
else if(volumeName.find(
"LAr::Barrel::Cryostat::InnerWall")==0){
520 volumeName =
"LAr::Barrel::Cryostat::InnerWall";
525 const auto v =
volumeMap().find( volumeName );
536 const auto i = identifierMap.find( copyNumber );
538 if ( i != identifierMap.end() )
544 G4StepPoint* pre_step_point = step->GetPreStepPoint();
545 G4StepPoint* post_step_point = step->GetPostStepPoint();
546 G4ThreeVector startPoint = pre_step_point->GetPosition();
547 G4ThreeVector endPoint = post_step_point->GetPosition();
548 G4ThreeVector p = (startPoint + endPoint) * 0.5;
554 G4double
eta = fabs( p.pseudoRapidity() );
555 G4double
phi = p.phi();
565 G4int
regions = info->numberOfRegions;
569 G4cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::Process - "
571 <<
" found volume, number of regions="
573 <<
" eta=" <<
eta <<
" phi=" <<
phi
596 G4int phiInteger = G4int(
phi / region->
deltaPhi );
598 if (phiInteger > 63) phiInteger = 0;
601 G4cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::Process - "
605 <<
" eta bin=" << etaInteger <<
" phi bin=" << phiInteger
611 G4int subDetSign = 1;
612 if ( p.z() < 0 ) subDetSign = -1;
615 if ( etaInteger >= 0 )
618 identifier << info->detector
619 << info->subdet * subDetSign
636#if defined (DEBUG_HITS) || defined (DEBUG_VOLUMES)
637 std::cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::Process"
643 <<
" not found on tables, using backup calculator"
652 std::cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::Process"
653 <<
" vName " << step->GetPreStepPoint()->GetPhysicalVolume()->GetName()
654 <<
" ID=" << std::string(identifier)
656 <<
" energies=(" << energies[0]
657 <<
"," << energies[1]
658 <<
"," << energies[2]
659 <<
"," << energies[3] <<
")"