ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
ForwardDetectors
ForwardSimulation
ForwardRegionGeoModel
src
ForwardRegionGeoModelTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ForwardRegionGeoModelTool.h
"
6
#include "
ForwardRegionGeoModelFactory.h
"
7
#include "
ForwardRegionGeoModelManager.h
"
8
#include "
GeoModelUtilities/GeoModelExperiment.h
"
9
#include "GaudiKernel/IService.h"
10
#include "GaudiKernel/ISvcLocator.h"
11
#include "GaudiKernel/MsgStream.h"
12
#include "GaudiKernel/SystemOfUnits.h"
13
#include "
StoreGate/StoreGateSvc.h
"
14
18
ForwardRegionGeoModelTool::ForwardRegionGeoModelTool
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent )
19
:
GeoModelTool
(
type
, name, parent )
20
{
21
}
22
26
ForwardRegionGeoModelTool::~ForwardRegionGeoModelTool
()
27
{
28
// This will need to be modified once we register the DetectorNode in
29
// the Transient Detector Store
30
if
( 0 !=
m_detector
) {
31
delete
m_detector
;
32
m_detector
= 0;
33
}
34
}
35
39
void
ForwardRegionGeoModelTool::fillConfig
()
40
{
41
m_Config
.clear();
42
m_Config
.TCL4JawDistB1I =
m_tcl4JawDistB1I
;
43
m_Config
.TCL4JawDistB2I =
m_tcl4JawDistB2I
;
44
m_Config
.TCL5JawDistB1I =
m_tcl5JawDistB1I
;
45
m_Config
.TCL5JawDistB2I =
m_tcl5JawDistB2I
;
46
m_Config
.TCL6JawDistB1I =
m_tcl6JawDistB1I
;
47
m_Config
.TCL6JawDistB2I =
m_tcl6JawDistB2I
;
48
m_Config
.TCL4JawDistB1O =
m_tcl4JawDistB1O
;
49
m_Config
.TCL4JawDistB2O =
m_tcl4JawDistB2O
;
50
m_Config
.TCL5JawDistB1O =
m_tcl5JawDistB1O
;
51
m_Config
.TCL5JawDistB2O =
m_tcl5JawDistB2O
;
52
m_Config
.TCL6JawDistB1O =
m_tcl6JawDistB1O
;
53
m_Config
.TCL6JawDistB2O =
m_tcl6JawDistB2O
;
54
m_Config
.vp1Compatibility =
m_vp1Compatibility
;
55
m_Config
.buildTCL4 =
m_buildTCL4
;
56
m_Config
.buildTCL6 =
m_buildTCL6
;
57
m_Config
.ALFAInNewPosition =
m_alfaInNewPosition
;
58
m_Config
.newPosB7L1 =
m_newPosB7L1
;
59
m_Config
.newPosB7R1 =
m_newPosB7R1
;
60
m_Config
.posAFPL1 =
m_posAFPL1
;
61
m_Config
.posAFPR1 =
m_posAFPR1
;
62
m_Config
.posAFPL2 =
m_posAFPL2
;
63
m_Config
.posAFPR2 =
m_posAFPR2
;
64
m_Config
.posZDC1 =
m_posZDC1
;
65
m_Config
.posZDC2 =
m_posZDC2
;
66
}
67
71
StatusCode
72
ForwardRegionGeoModelTool::create
()
73
{
74
MsgStream log(msgSvc(), name());
75
//
76
// Locate the top level experiment node
77
//
78
GeoModelExperiment
* theExpt =
nullptr
;
79
StatusCode
sc
= detStore()->retrieve( theExpt,
"ATLAS"
);
80
if
(StatusCode::SUCCESS !=
sc
) {
81
log << MSG::ERROR
82
<<
"Could not find GeoModelExperiment ATLAS"
83
<<
endmsg
;
84
return
(StatusCode::FAILURE);
85
}
86
87
fillConfig
();
88
89
ForwardRegionGeoModelFactory
theFactory(detStore().operator->(), &
m_Config
);
90
if
( 0 ==
m_detector
) {
91
// Create the DetectorNode instance
92
try
{
93
//
94
// This strange way of casting is to avoid an
95
// utterly brain damaged compiler warning.
96
//
97
GeoPhysVol *world=&*theExpt->
getPhysVol
();
98
theFactory.
create
(world);
99
}
catch
(
const
std::bad_alloc&) {
100
log << MSG::FATAL <<
"Could not create new DetectorNode!"
<<
endmsg
;
101
return
StatusCode::FAILURE;
102
}
103
// Register the DetectorNode instance with the Transient Detector Store
104
theExpt->
addManager
(theFactory.
getDetectorManager
());
105
sc
= detStore()->record(theFactory.
getDetectorManager
(),theFactory.
getDetectorManager
()->getName());
106
if
(StatusCode::SUCCESS !=
sc
) {
107
log << MSG::ERROR
108
<<
"Could not register DetectorNode"
109
<<
endmsg
;
110
return
(StatusCode::FAILURE);
111
}
112
return
StatusCode::SUCCESS;
113
}
114
return
StatusCode::FAILURE;
115
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
ForwardRegionGeoModelFactory.h
ForwardRegionGeoModelManager.h
ForwardRegionGeoModelTool.h
GeoModelExperiment.h
sc
static Double_t sc
Definition
LArPhysWaveHECTool.cxx:37
StoreGateSvc.h
ForwardRegionGeoModelFactory
Definition
ForwardRegionGeoModelFactory.h:49
ForwardRegionGeoModelFactory::create
virtual void create(GeoPhysVol *world)
Definition
ForwardRegionGeoModelFactory.cxx:373
ForwardRegionGeoModelFactory::getDetectorManager
virtual const ForwardRegionGeoModelManager * getDetectorManager() const
Definition
ForwardRegionGeoModelFactory.cxx:442
ForwardRegionGeoModelTool::m_tcl6JawDistB2I
Gaudi::Property< double > m_tcl6JawDistB2I
Definition
ForwardRegionGeoModelTool.h:34
ForwardRegionGeoModelTool::m_posZDC2
Gaudi::Property< double > m_posZDC2
Definition
ForwardRegionGeoModelTool.h:52
ForwardRegionGeoModelTool::m_tcl6JawDistB1I
Gaudi::Property< double > m_tcl6JawDistB1I
Definition
ForwardRegionGeoModelTool.h:33
ForwardRegionGeoModelTool::m_buildTCL4
Gaudi::Property< bool > m_buildTCL4
Definition
ForwardRegionGeoModelTool.h:42
ForwardRegionGeoModelTool::m_Config
FWD_CONFIGURATION m_Config
Definition
ForwardRegionGeoModelTool.h:55
ForwardRegionGeoModelTool::m_posAFPL1
Gaudi::Property< double > m_posAFPL1
Definition
ForwardRegionGeoModelTool.h:47
ForwardRegionGeoModelTool::m_posAFPR2
Gaudi::Property< double > m_posAFPR2
Definition
ForwardRegionGeoModelTool.h:50
ForwardRegionGeoModelTool::m_tcl4JawDistB1O
Gaudi::Property< double > m_tcl4JawDistB1O
Definition
ForwardRegionGeoModelTool.h:35
ForwardRegionGeoModelTool::m_tcl6JawDistB1O
Gaudi::Property< double > m_tcl6JawDistB1O
Definition
ForwardRegionGeoModelTool.h:39
ForwardRegionGeoModelTool::m_posAFPL2
Gaudi::Property< double > m_posAFPL2
Definition
ForwardRegionGeoModelTool.h:49
ForwardRegionGeoModelTool::m_vp1Compatibility
Gaudi::Property< bool > m_vp1Compatibility
Definition
ForwardRegionGeoModelTool.h:41
ForwardRegionGeoModelTool::create
virtual StatusCode create() override final
Create the Detector Node corresponding to this tool.
Definition
ForwardRegionGeoModelTool.cxx:72
ForwardRegionGeoModelTool::m_buildTCL6
Gaudi::Property< bool > m_buildTCL6
Definition
ForwardRegionGeoModelTool.h:43
ForwardRegionGeoModelTool::m_tcl4JawDistB2I
Gaudi::Property< double > m_tcl4JawDistB2I
Definition
ForwardRegionGeoModelTool.h:30
ForwardRegionGeoModelTool::m_tcl5JawDistB1I
Gaudi::Property< double > m_tcl5JawDistB1I
Definition
ForwardRegionGeoModelTool.h:31
ForwardRegionGeoModelTool::m_tcl6JawDistB2O
Gaudi::Property< double > m_tcl6JawDistB2O
Definition
ForwardRegionGeoModelTool.h:40
ForwardRegionGeoModelTool::m_tcl4JawDistB1I
Gaudi::Property< double > m_tcl4JawDistB1I
Definition
ForwardRegionGeoModelTool.h:29
ForwardRegionGeoModelTool::m_posAFPR1
Gaudi::Property< double > m_posAFPR1
Definition
ForwardRegionGeoModelTool.h:48
ForwardRegionGeoModelTool::fillConfig
void fillConfig()
Copy the property values into the configuration structure.
Definition
ForwardRegionGeoModelTool.cxx:39
ForwardRegionGeoModelTool::~ForwardRegionGeoModelTool
virtual ~ForwardRegionGeoModelTool() override final
Destructor.
Definition
ForwardRegionGeoModelTool.cxx:26
ForwardRegionGeoModelTool::m_newPosB7L1
Gaudi::Property< double > m_newPosB7L1
Definition
ForwardRegionGeoModelTool.h:45
ForwardRegionGeoModelTool::m_alfaInNewPosition
Gaudi::Property< bool > m_alfaInNewPosition
Definition
ForwardRegionGeoModelTool.h:44
ForwardRegionGeoModelTool::m_tcl5JawDistB1O
Gaudi::Property< double > m_tcl5JawDistB1O
Definition
ForwardRegionGeoModelTool.h:37
ForwardRegionGeoModelTool::m_tcl4JawDistB2O
Gaudi::Property< double > m_tcl4JawDistB2O
Definition
ForwardRegionGeoModelTool.h:36
ForwardRegionGeoModelTool::ForwardRegionGeoModelTool
ForwardRegionGeoModelTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor(s).
Definition
ForwardRegionGeoModelTool.cxx:18
ForwardRegionGeoModelTool::m_posZDC1
Gaudi::Property< double > m_posZDC1
Definition
ForwardRegionGeoModelTool.h:51
ForwardRegionGeoModelTool::m_newPosB7R1
Gaudi::Property< double > m_newPosB7R1
Definition
ForwardRegionGeoModelTool.h:46
ForwardRegionGeoModelTool::m_tcl5JawDistB2O
Gaudi::Property< double > m_tcl5JawDistB2O
Definition
ForwardRegionGeoModelTool.h:38
ForwardRegionGeoModelTool::m_tcl5JawDistB2I
Gaudi::Property< double > m_tcl5JawDistB2I
Definition
ForwardRegionGeoModelTool.h:32
GeoModelExperiment
Definition
GeoModelExperiment.h:32
GeoModelExperiment::getPhysVol
GeoPhysVol * getPhysVol()
Destructor.
Definition
GeoModelExperiment.cxx:21
GeoModelExperiment::addManager
void addManager(const GeoVDetectorManager *)
Definition
GeoModelExperiment.cxx:40
GeoModelTool
Definition
GeoModelTool.h:15
GeoModelTool::m_detector
GeoVDetectorManager * m_detector
Definition
GeoModelTool.h:28
type
Generated on
for ATLAS Offline Software by
1.17.0