ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
DetectorGeometrySvc Class Reference

#include <DetectorGeometrySvc.h>

Inheritance diagram for DetectorGeometrySvc:
Collaboration diagram for DetectorGeometrySvc:

Public Member Functions

 DetectorGeometrySvc (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~DetectorGeometrySvc ()=default
 
StatusCode initialize () override final
 
StatusCode finalize () override final
 
G4VUserDetectorConstruction * GetDetectorConstruction () override final
 
std::vector< std::string > & GetParallelWorldNames () override final
 

Private Attributes

PublicToolHandle< IDetectorConstructionToolm_detConstruction {this, "DetectorConstruction", "", "Tool handle of the DetectorConstruction"}
 

Detailed Description

Definition at line 20 of file DetectorGeometrySvc.h.

Constructor & Destructor Documentation

◆ DetectorGeometrySvc()

DetectorGeometrySvc::DetectorGeometrySvc ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 14 of file DetectorGeometrySvc.cxx.

15  : base_class(name,pSvcLocator)
16 {
17  ATH_MSG_DEBUG( "DetectorGeometrySvc being created!" );
18 }

◆ ~DetectorGeometrySvc()

virtual DetectorGeometrySvc::~DetectorGeometrySvc ( )
virtualdefault

Member Function Documentation

◆ finalize()

StatusCode DetectorGeometrySvc::finalize ( )
finaloverride

Definition at line 31 of file DetectorGeometrySvc.cxx.

31  {
32  ATH_MSG_DEBUG( "DetectorGeometrySvc being finalized!!!" );
33  // // Code for G4Field debugging
34  // ATH_MSG_INFO("There are " << G4FieldManagerStore::GetInstance()->size() << " G4FieldManagers in the G4FieldManagerStore.");
35  // for(auto fieldMgr: *G4FieldManagerStore::GetInstance())
36  // {
37  // G4LogicalVolumeStore *g4lvs = G4LogicalVolumeStore::GetInstance();
38  // unsigned int numberOfVolumes = 0;
39  // for (const auto log_vol : *g4lvs)
40  // {
41  // if(fieldMgr== log_vol->GetFieldManager())
42  // {
43  // ++numberOfVolumes;
44  // }
45  // }
46  // ATH_MSG_INFO("Number of volumes = " << numberOfVolumes << ", GetDeltaIntersection = " << fieldMgr->GetDeltaIntersection() << ", GetDeltaOneStep() = " << fieldMgr->GetDeltaOneStep() << ", GetMinimumEpsilonStep() = " << fieldMgr->GetMinimumEpsilonStep() << ", GetMaximumEpsilonStep() = " << fieldMgr->GetMaximumEpsilonStep() << ", GetDeltaChord() = " << fieldMgr->GetChordFinder()->GetDeltaChord() );
47  // //fieldMgr->GetChordFinder()->PrintStatistics();
48  // G4MagInt_Driver* temp(fieldMgr->GetChordFinder()->GetIntegrationDriver());
49  // ATH_MSG_INFO("GetHmin() = " << temp->GetHmin() << ", GetSafety() = " << temp->GetSafety() << ", GetPshrnk() = " << temp->GetPshrnk() << ", GetPgrow() = " << temp->GetPgrow() << ", GetErrcon() = " << temp->GetErrcon());
50  // const G4MagIntegratorStepper* stepper(temp->GetStepper());
51  // std::string stepperName("Unknown");
52  // if (dynamic_cast<const G4HelixImplicitEuler*>(stepper)!=nullptr) stepperName = "HelixImplicitEuler";
53  // else if (dynamic_cast<const G4HelixSimpleRunge*>(stepper)!=nullptr) stepperName="HelixSimpleRunge";
54  // else if (dynamic_cast<const G4HelixExplicitEuler*>(stepper)!=nullptr) stepperName="HelixExplicitEuler";
55  // else if (dynamic_cast<const G4NystromRK4*>(stepper)!=nullptr) stepperName="NystromRK4";
56  // else if (dynamic_cast<const G4ClassicalRK4*>(stepper)!=nullptr) stepperName="ClassicalRK4";
57  // else if (dynamic_cast<const G4AtlasRK4*>(stepper)!=nullptr) stepperName="AtlasRK4";
58  // ATH_MSG_INFO("Stepper properties: GetNumberOfVariables() = " << stepper->GetNumberOfVariables() << ", GetNumberOfStateVariables() = " << stepper->GetNumberOfStateVariables() << ", IntegratorOrder() = " << stepper->IntegratorOrder() << ", Stepper Type = " << stepperName);
59  // }
60  return StatusCode::SUCCESS;
61 }

◆ GetDetectorConstruction()

G4VUserDetectorConstruction * DetectorGeometrySvc::GetDetectorConstruction ( )
finaloverride

Definition at line 63 of file DetectorGeometrySvc.cxx.

64 {
65  return m_detConstruction->GetDetectorConstruction();
66 }

◆ GetParallelWorldNames()

std::vector< std::string > & DetectorGeometrySvc::GetParallelWorldNames ( )
finaloverride

Definition at line 68 of file DetectorGeometrySvc.cxx.

69 {
70  return m_detConstruction->GetParallelWorldNames();
71 }

◆ initialize()

StatusCode DetectorGeometrySvc::initialize ( )
finaloverride

Definition at line 20 of file DetectorGeometrySvc.cxx.

20  {
21 
22  // go through all tools and retrieve them
23  // This fires initialize() for each of those tools
24  ATH_MSG_DEBUG( "Setting up a DetectorConstruction " << m_detConstruction.name() );
25  ATH_CHECK(m_detConstruction.retrieve());
26 
27  ATH_MSG_DEBUG( "DetectorGeometrySvc initialized!!!" );
28  return StatusCode::SUCCESS;
29 }

Member Data Documentation

◆ m_detConstruction

PublicToolHandle<IDetectorConstructionTool> DetectorGeometrySvc::m_detConstruction {this, "DetectorConstruction", "", "Tool handle of the DetectorConstruction"}
private

Definition at line 37 of file DetectorGeometrySvc.h.


The documentation for this class was generated from the following files:
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
DetectorGeometrySvc::m_detConstruction
PublicToolHandle< IDetectorConstructionTool > m_detConstruction
Definition: DetectorGeometrySvc.h:37
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228