#include <CryostatCalibrationCalculator.h>
◆ CalibrationCalculator()
LArG4::BarrelCryostat::CalibrationCalculator::CalibrationCalculator |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~CalibrationCalculator()
LArG4::BarrelCryostat::CalibrationCalculator::~CalibrationCalculator |
( |
| ) |
|
|
virtual |
◆ initialize()
StatusCode LArG4::BarrelCryostat::CalibrationCalculator::initialize |
( |
| ) |
|
|
finaloverride |
Definition at line 450 of file CryostatCalibrationCalculator.cxx.
454 #if defined (DEBUG_HITS) || defined (DEBUG_MAPS)
455 G4cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::CalibrationCalculator - "
456 <<
" numberOfVolumes=" << numberOfVolumes
457 <<
", sizeof(volumes)=" <<
sizeof(volumes)
458 <<
", sizeof(VolumeInfo_t)=" <<
sizeof(VolumeInfo_t)
467 #if defined (DEBUG_HITS) || defined (DEBUG_MAPS)
468 G4cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::CalibrationCalculator - "
470 <<
" initialization complete; map size="
475 return StatusCode::SUCCESS;
◆ Process()
Definition at line 486 of file CryostatCalibrationCalculator.cxx.
499 for (
unsigned int i=0;
i != 4;
i++) energies.push_back( 0. );
510 G4VPhysicalVolume* physical =
step->GetPreStepPoint()->GetPhysicalVolume();
511 G4int copyNumber = physical->GetCopyNo();
512 G4String volumeName = physical->GetLogicalVolume()->GetName();
515 G4cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::Process - "
517 <<
" searching for volume '"
524 if(volumeName.find(
"LArMgr::") == 0) volumeName.erase(0,8);
525 if(volumeName.find(
"LAr::Barrel::Cryostat::Sector")==0) {
526 volumeName =
"LAr::Barrel::Cryostat::Sector";
527 if(copyNumber != 7 && copyNumber !=12) copyNumber=1;
528 }
else if(volumeName.find(
"LAr::Barrel::Cryostat::Cylinder")==0){
529 volumeName =
"LAr::Barrel::Cryostat::Cylinder";
530 }
else if(volumeName.find(
"LAr::Barrel::Cryostat::InnerWall")==0){
531 volumeName =
"LAr::Barrel::Cryostat::InnerWall";
536 const auto v =
volumeMap().find( volumeName );
547 const auto i = identifierMap.find( copyNumber );
549 if (
i != identifierMap.end() )
551 const IdentifierInfo_t*
info = (*i).second;
555 G4StepPoint* pre_step_point =
step->GetPreStepPoint();
556 G4StepPoint* post_step_point =
step->GetPostStepPoint();
557 G4ThreeVector startPoint = pre_step_point->GetPosition();
558 G4ThreeVector endPoint = post_step_point->GetPosition();
559 G4ThreeVector
p = (startPoint + endPoint) * 0.5;
565 G4double
eta = fabs(
p.pseudoRapidity() );
566 G4double
phi =
p.phi();
576 G4int regions =
info->numberOfRegions;
577 const RegionInfo_t* region =
info->regionInfoArray;
580 G4cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::Process - "
582 <<
" found volume, number of regions="
584 <<
" eta=" <<
eta <<
" phi=" <<
phi
589 for (
r = 0;
r < regions;
r++, region++ )
591 if ( eta > region->etaMin &&
606 G4int etaInteger = G4int( (eta - region->etaMin) / region->deltaEta );
607 G4int phiInteger = G4int( phi / region->deltaPhi );
609 if (phiInteger > 63) phiInteger = 0;
612 G4cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::Process - "
615 << region->regionNumber
616 <<
" eta bin=" << etaInteger <<
" phi bin=" << phiInteger
622 G4int subDetSign = 1;
623 if (
p.z() < 0 ) subDetSign = -1;
626 if ( etaInteger >= 0 )
630 <<
info->subdet * subDetSign
633 << region->regionNumber
647 #if defined (DEBUG_HITS) || defined (DEBUG_VOLUMES)
648 std::cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::Process"
654 <<
" not found on tables, using backup calculator"
663 std::cout <<
"LArG4::BarrelCryostat::CalibrationCalculator::Process"
664 <<
" vName " <<
step->GetPreStepPoint()->GetPhysicalVolume()->GetName()
667 <<
" energies=(" << energies[0]
668 <<
"," << energies[1]
669 <<
"," << energies[2]
670 <<
"," << energies[3] <<
")"
◆ m_backupCalculator
◆ m_energyCalculator
The documentation for this class was generated from the following files: