#include <CryostatCalibrationCalculator.h>
◆ CalibrationCalculator()
LArG4::BarrelCryostat::CalibrationCalculator::CalibrationCalculator |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~CalibrationCalculator()
virtual LArG4::BarrelCryostat::CalibrationCalculator::~CalibrationCalculator |
( |
| ) |
|
|
virtualdefault |
◆ initialize()
StatusCode LArG4::BarrelCryostat::CalibrationCalculator::initialize |
( |
| ) |
|
|
finaloverride |
Definition at line 448 of file CryostatCalibrationCalculator.cxx.
452 #if defined (DEBUG_HITS) || defined (DEBUG_MAPS)
453 G4cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::CalibrationCalculator - "
454 <<
" numberOfVolumes=" << numberOfVolumes
455 <<
", sizeof(volumes)=" <<
sizeof(volumes)
456 <<
", sizeof(VolumeInfo_t)=" <<
sizeof(VolumeInfo_t)
465 #if defined (DEBUG_HITS) || defined (DEBUG_MAPS)
466 G4cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::CalibrationCalculator - "
468 <<
" initialization complete; map size="
473 return StatusCode::SUCCESS;
◆ Process()
Definition at line 476 of file CryostatCalibrationCalculator.cxx.
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() )
540 const IdentifierInfo_t*
info = (*i).second;
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;
566 const RegionInfo_t* region =
info->regionInfoArray;
569 G4cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::Process - "
571 <<
" found volume, number of regions="
573 <<
" eta=" <<
eta <<
" phi=" <<
phi
578 for (
r = 0;
r < regions;
r++, region++ )
580 if (
eta > region->etaMin &&
595 G4int etaInteger = G4int( (
eta - region->etaMin) / region->deltaEta );
596 G4int phiInteger = G4int(
phi / region->deltaPhi );
598 if (phiInteger > 63) phiInteger = 0;
601 G4cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::Process - "
604 << region->regionNumber
605 <<
" eta bin=" << etaInteger <<
" phi bin=" << phiInteger
611 G4int subDetSign = 1;
612 if (
p.z() < 0 ) subDetSign = -1;
615 if ( etaInteger >= 0 )
619 <<
info->subdet * subDetSign
622 << region->regionNumber
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()
656 <<
" energies=(" << energies[0]
657 <<
"," << energies[1]
658 <<
"," << energies[2]
659 <<
"," << energies[3] <<
")"
◆ m_backupCalculator
◆ m_energyCalculator
The documentation for this class was generated from the following files: