478 std::vector<double>& energies,
489 for (
unsigned int i=0; i != 4; i++) energies.push_back( 0. );
500 G4VPhysicalVolume* physical = step->GetPreStepPoint()->GetPhysicalVolume();
501 G4int copyNumber = physical->GetCopyNo();
502 G4String volumeName = physical->GetLogicalVolume()->GetName();
505 G4cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::Process - "
507 <<
" searching for volume '"
514 if(volumeName.find(
"LArMgr::") == 0) volumeName.erase(0,8);
515 if(volumeName.find(
"LAr::Barrel::Cryostat::Sector")==0) {
516 volumeName =
"LAr::Barrel::Cryostat::Sector";
517 if(copyNumber != 7 && copyNumber !=12) copyNumber=1;
518 }
else if(volumeName.find(
"LAr::Barrel::Cryostat::Cylinder")==0){
519 volumeName =
"LAr::Barrel::Cryostat::Cylinder";
520 }
else if(volumeName.find(
"LAr::Barrel::Cryostat::InnerWall")==0){
521 volumeName =
"LAr::Barrel::Cryostat::InnerWall";
526 const auto v =
volumeMap().find( volumeName );
537 const auto i = identifierMap.find( copyNumber );
539 if ( i != identifierMap.end() )
545 G4StepPoint* pre_step_point = step->GetPreStepPoint();
546 G4StepPoint* post_step_point = step->GetPostStepPoint();
547 G4ThreeVector startPoint = pre_step_point->GetPosition();
548 G4ThreeVector endPoint = post_step_point->GetPosition();
549 G4ThreeVector p = (startPoint + endPoint) * 0.5;
555 G4double
eta = fabs( p.pseudoRapidity() );
556 G4double
phi = p.phi();
566 G4int
regions = info->numberOfRegions;
570 G4cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::Process - "
572 <<
" found volume, number of regions="
574 <<
" eta=" <<
eta <<
" phi=" <<
phi
597 G4int phiInteger = G4int(
phi / region->
deltaPhi );
599 if (phiInteger > 63) phiInteger = 0;
602 G4cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::Process - "
606 <<
" eta bin=" << etaInteger <<
" phi bin=" << phiInteger
612 G4int subDetSign = 1;
613 if ( p.z() < 0 ) subDetSign = -1;
616 if ( etaInteger >= 0 )
619 identifier << info->detector
620 << info->subdet * subDetSign
637#if defined (DEBUG_HITS) || defined (DEBUG_VOLUMES)
638 std::cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::Process"
644 <<
" not found on tables, using backup calculator"
653 std::cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::Process"
654 <<
" vName " << step->GetPreStepPoint()->GetPhysicalVolume()->GetName()
655 <<
" ID=" << std::string(identifier)
657 <<
" energies=(" << energies[0]
658 <<
"," << energies[1]
659 <<
"," << energies[2]
660 <<
"," << energies[3] <<
")"