ATLAS Offline Software
Loading...
Searching...
No Matches
LArGeo::RALEmb Class Reference

#include <RALEmb.h>

Inheritance diagram for LArGeo::RALEmb:
Collaboration diagram for LArGeo::RALEmb:

Classes

class  Clockwork

Public Member Functions

 RALEmb ()
virtual ~RALEmb ()
virtual double GetValue (const std::string &, const int i0=INT_MIN, const int i1=INT_MIN, const int i2=INT_MIN, const int i3=INT_MIN, const int i4=INT_MIN) const override

Static Public Member Functions

static void SetInstance (std::unique_ptr< VDetectorParameters >)
static const VDetectorParametersGetInstance ()

Private Member Functions

 RALEmb (const RALEmb &)
RALEmboperator= (const RALEmb &)

Private Attributes

Clockworkm_c
bool m_oldDB {false}
bool m_oldSagging {false}
bool m_oldContract {false}

Static Private Attributes

static CxxUtils::CachedUniquePtr< VDetectorParameters > s_instance ATLAS_THREAD_SAFE

Detailed Description

Definition at line 17 of file RALEmb.h.

Constructor & Destructor Documentation

◆ RALEmb() [1/2]

RALEmb::RALEmb ( )

Definition at line 52 of file RALEmb.cxx.

52 :
53 m_c(new Clockwork())
54{
55 // First, fetch the Athena services.
56 ISvcLocator* svcLocator = Gaudi::svcLocator();
57
58 SmartIF<IGeoDbTagSvc> geoDbTagSvc{svcLocator->service("GeoDbTagSvc")};
59 if(!geoDbTagSvc.isValid()) {
60 throw std::runtime_error ("Cannot locate GeoDBTagSvc");
61 }
62
63 SmartIF<IRDBAccessSvc> pAccessSvc{svcLocator->service(geoDbTagSvc->getParamSvcName())};
64 if(!pAccessSvc.isValid()) {
65 throw std::runtime_error ("Cannot locate " + geoDbTagSvc->getParamSvcName());
66 }
67
68 std::string detectorKey;
69 std::string detectorNode;
70
71 if(geoDbTagSvc->getSqliteReader()==nullptr) {
72 // The geometry DB is used
73 SmartIF<IGeoModelSvc> geoModel{svcLocator->service("GeoModelSvc")};
74 if(!geoModel.isValid()) {
75 throw std::runtime_error ("Cannot locate GeoModelSvc");
76 }
77
78 std::string AtlasVersion = geoModel->atlasVersion();
79 std::string LArVersion = geoModel->LAr_VersionOverride();
80
81 detectorKey = LArVersion.empty() ? AtlasVersion : LArVersion;
82 detectorNode = LArVersion.empty() ? "ATLAS" : "LAr";
83
84
85 if ( LArVersion.empty()) {
86 LArVersion=pAccessSvc->getChildTag("LAr",AtlasVersion,"ATLAS");
87 }
88
89 MsgStream log(Athena::getMessageSvc(),"RALEmb");
90
91 if (LArVersion == "LAr-00" || LArVersion == "LAr-01" ||
92 LArVersion == "LAr-Rome-Initial-00" ||
93 LArVersion == "LAr-H6-00" ||
94 LArVersion == "LAr-Commissioning-00" ||
95 LArVersion == "LAr-G3-00") {
96 m_oldDB=true;
97 log << MSG::INFO << " in RALEmb: old database tag used, some values are hard coded" << endmsg;
98 log << MSG::INFO << " Non projectivity of lead transition will not be simulated " << endmsg;
99 }
100
101 if (LArVersion == "LAr-00" || LArVersion == "LAr-01" || LArVersion == "LAr-02" ||
102 LArVersion == "LAr-Rome-Initial-00" ||
103 LArVersion == "LAr-H8-00" ||
104 LArVersion == "LAr-H6-00" ||
105 LArVersion == "LAr-Commissioning-00" ||
106 LArVersion == "LAr-G3-00") {
107 m_oldSagging=true;
108 log << MSG::INFO << " in RALEmb: only old sagging values available" << endmsg;
109 }
110
111 if (LArVersion == "LAr-00" || LArVersion == "LAr-01" || LArVersion == "LAr-02" ||
112 LArVersion == "LAr-03" || LArVersion == "LAr-04" ||
113 LArVersion == "LAr-Rome-Initial-00" ||
114 LArVersion == "LAr-H8-00" ||
115 LArVersion == "LAr-H6-00" ||
116 LArVersion == "LAr-Commissioning-00" ||
117 LArVersion == "LAr-Commissioning-01" ||
118 LArVersion == "LAr-G3-00" ||
119 LArVersion == "LAr-02-Align-00" ||
120 LArVersion == "LAr-02-Align-01" ||
121 LArVersion == "LAr-H6-2002-00" ||
122 LArVersion == "LAr-H6-2003-00" ||
123 LArVersion == "LAr-TBEC-00" ) {
124 m_oldContract=true;
125 }
126 }
127
128
129 m_c->barrelGeometry = pAccessSvc->getRecordsetPtr("BarrelGeometry",detectorKey, detectorNode);
130 m_c->barrelSagging = pAccessSvc->getRecordsetPtr("BarrelSagging",detectorKey, detectorNode);
131 m_c->barrelAccordionCables = pAccessSvc->getRecordsetPtr("BarrelAccordionCables",detectorKey, detectorNode);
132 m_c->barrelMotherboards = pAccessSvc->getRecordsetPtr("BarrelMotherboards",detectorKey, detectorNode);
133 m_c->barrelLongDiv = pAccessSvc->getRecordsetPtr("BarrelLongDiv",detectorKey, detectorNode);
134 m_c->presamplerGeometry = pAccessSvc->getRecordsetPtr("PresamplerGeometry",detectorKey, detectorNode);
135 if (!m_oldDB) m_c->barrelEtaTrans = pAccessSvc->getRecordsetPtr("BarrelEtaTrans",detectorKey,detectorNode);
136
137 if (!m_oldContract) m_c->coldContraction = pAccessSvc->getRecordsetPtr("ColdContraction",detectorKey,detectorNode);
138}
#define endmsg
Clockwork * m_c
Definition RALEmb.h:35
bool m_oldContract
Definition RALEmb.h:38
bool m_oldSagging
Definition RALEmb.h:37
bool m_oldDB
Definition RALEmb.h:36
IMessageSvc * getMessageSvc(bool quiet=false)

◆ ~RALEmb()

RALEmb::~RALEmb ( )
virtual

Definition at line 141 of file RALEmb.cxx.

142{
143 delete m_c;
144}

◆ RALEmb() [2/2]

LArGeo::RALEmb::RALEmb ( const RALEmb & )
private

Member Function Documentation

◆ GetInstance()

const LArGeo::VDetectorParameters * LArGeo::VDetectorParameters::GetInstance ( )
staticinherited

Definition at line 29 of file VDetectorParameters.cxx.

30{
31 const VDetectorParameters* p = s_instance.get();
32 if(p==nullptr)
33 std::cerr << "LArGeo::VDetectorParameters::GetInstance was called, but "
34 << "the pointer to the detector-parameter access object is 0."
35 << std::endl;
36
37 return p;
38}

◆ GetValue()

double RALEmb::GetValue ( const std::string & a_name,
const int i0 = INT_MIN,
const int i1 = INT_MIN,
const int i2 = INT_MIN,
const int i3 = INT_MIN,
const int i4 = INT_MIN ) const
overridevirtual

Implements LArGeo::VDetectorParameters.

Definition at line 147 of file RALEmb.cxx.

153{
154
155 std::ostringstream A0STR;
156 A0STR << "_" << a0;
157 const std::string A0 = A0STR.str();
158
159 if ( a_name == "LArEMBnoOFPhysPhiCell" ) return (*m_c->barrelGeometry)[0]->getInt("NCELMX");
160// GU 7-oct-05 phifirst is stored in radians not in degre
161 if ( a_name == "LArEMBAbsPhiFirst" ) return (*m_c->barrelGeometry)[0]->getDouble("PHIFIRST");
162 if ( a_name == "LArEMBPhiGapWidth" ) return (*m_c->barrelGeometry)[0]->getDouble("PHIGAP")*CLHEP::cm;
163 if ( a_name == "LArEMBPhiGapAperture" ) return (*m_c->barrelGeometry)[0]->getDouble("ALFA")*CLHEP::deg;
164 if ( a_name == "LArEMBMotherRmin" ) return (*m_c->barrelGeometry)[0]->getDouble("RMIN")*CLHEP::cm;
165 if ( a_name == "LArEMBMotherRmax" ) return (*m_c->barrelGeometry)[0]->getDouble("RMAX")*CLHEP::cm;
166 if ( a_name == "LArEMBFiducialRmax" ) return (*m_c->barrelGeometry)[0]->getDouble("ROUT_AC")*CLHEP::cm;
167 if ( a_name == "LArEMBMotherZmin" ) return (*m_c->barrelGeometry)[0]->getDouble("ZMIN")*CLHEP::cm;
168 if ( a_name == "LArEMBMotherZmax" ) return (*m_c->barrelGeometry)[0]->getDouble("ZMAX")*CLHEP::cm;
169 if ( a_name == "LArEMBnoOFAccZigs" ) return (*m_c->barrelGeometry)[0]->getInt("NBRT");
170 if ( a_name == "LArEMBnoOFAccSamps" ) return (*m_c->barrelGeometry)[0]->getInt("NSTAMX");
171 if ( a_name == "LArEMBInnerElectronics" ) return (*m_c->barrelGeometry)[0]->getDouble("XEL1")*CLHEP::cm;
172 if ( a_name == "LArEMBLArGapTail" ) return (*m_c->barrelGeometry)[0]->getDouble("XTAL")*CLHEP::cm;
173 if ( a_name == "LArEMBG10SupportBarsIn" ) return (*m_c->barrelGeometry)[0]->getDouble("XG10")*CLHEP::cm;
174 if ( a_name == "LArEMBG10SupportBarsOut" ) return (*m_c->barrelGeometry)[0]->getDouble("XGSB")*CLHEP::cm;
175 if ( a_name == "LArEMBZmin" ) return (*m_c->barrelGeometry)[0]->getDouble("ZMIN")*CLHEP::cm;
176 if ( a_name == "LArEMBZmax" ) return (*m_c->barrelGeometry)[0]->getDouble("ZMAX")*CLHEP::cm;
177 if ( a_name == "LArEMBAccTrackMin" ) return (*m_c->barrelGeometry)[0]->getDouble("RHOMIN")*CLHEP::cm;
178 if ( a_name == "LArEMBRadiusInnerAccordion" ) return (*m_c->barrelGeometry)[0]->getDouble("RIN_AC")*CLHEP::cm;
179 if ( a_name == "LArEMBRadiusOuterAccordion" ) return (*m_c->barrelGeometry)[0]->getDouble("ROUT_AC")*CLHEP::cm;
180 if ( a_name == "LArEMBMaxEtaAcceptance" ) return (*m_c->barrelGeometry)[0]->getDouble("ETACUT");
181 if ( a_name == "LArEMBThickEtaAcceptance" ) return (*m_c->barrelGeometry)[0]->getDouble("ETACU1");
182 if ( a_name == "LArEMBRadiusAtCurvature" ) return (*m_c->barrelGeometry)[0]->getDouble("RHOCEN"+A0)*CLHEP::cm;
183 if ( a_name == "LArEMBPhiAtCurvature" ) return (*m_c->barrelGeometry)[0]->getDouble("PHICEN"+A0)*CLHEP::deg;
184 if ( a_name == "LArEMBDeltaZigAngle" ) return (*m_c->barrelGeometry)[0]->getDouble("DELTA"+A0)*CLHEP::deg;
185 if ( a_name == "LArEMBNeutFiberRadius" ) return (*m_c->barrelGeometry)[0]->getDouble("RINT")*CLHEP::cm;
186 if ( a_name == "LArEMBLeadTipThickFront" ) return (*m_c->barrelGeometry)[0]->getDouble("XTIP_PB")*CLHEP::cm;
187 if ( a_name == "LArEMBLeadTipThickEnd" ) return (*m_c->barrelGeometry)[0]->getDouble("XTIP_PC")*CLHEP::cm;
188 if ( a_name == "LArEMBG10TipThickFront" ) return (*m_c->barrelGeometry)[0]->getDouble("XTIP_GT")*CLHEP::cm;
189 if ( a_name == "LArEMBG10TipThickEnd" ) return (*m_c->barrelGeometry)[0]->getDouble("XTIP_GS")*CLHEP::cm;
190 if ( a_name == "LArEMBThinAbsGlue" ) return (*m_c->barrelGeometry)[0]->getDouble("TGGL")*CLHEP::cm;
191 if ( a_name == "LArEMBThinAbsIron" ) return (*m_c->barrelGeometry)[0]->getDouble("TGFE")*CLHEP::cm;
192 if ( a_name == "LArEMBThinAbsLead" ) return (*m_c->barrelGeometry)[0]->getDouble("TGPB")*CLHEP::cm;
193 if ( a_name == "LArEMBThickAbsGlue" ) return (*m_c->barrelGeometry)[0]->getDouble("THGL")*CLHEP::cm;
194 if ( a_name == "LArEMBThickAbsIron" ) return (*m_c->barrelGeometry)[0]->getDouble("THFE")*CLHEP::cm;
195 if ( a_name == "LArEMBThickAbsLead" ) return (*m_c->barrelGeometry)[0]->getDouble("THPB")*CLHEP::cm;
196 if ( a_name == "LArEMBThickElecCopper" ) return (*m_c->barrelGeometry)[0]->getDouble("THCU")*CLHEP::cm;
197 if ( a_name == "LArEMBThickElecKapton" ) return (*m_c->barrelGeometry)[0]->getDouble("THFG")*CLHEP::cm;
198 if ( a_name == "LArEMBRminHighZ" ) {
199 if (!m_oldDB) return (*m_c->barrelGeometry)[0]->getDouble("RMINHIGHZ")*CLHEP::cm;
200 else return 154.8*CLHEP::cm;
201 }
202 if ( a_name == "LArEMBDeltaRS12" ) {
203 if (!m_oldDB) return (*m_c->barrelGeometry)[0]->getDouble("DELTARS12")*CLHEP::cm;
204 else return 0.11*CLHEP::cm;
205 }
206 if ( a_name == "LArEMBphiMaxBarrel" ) {
207 if (!m_oldDB) return (*m_c->barrelGeometry)[0]->getDouble("PHIMAXBARREL");
208 else return 360.;
209 }
210 if ( a_name == "LArEMBG10FrontDeltaZ" ) {
211 if (!m_oldDB) return (*m_c->barrelGeometry)[0]->getDouble("G10FRONTDELTAZ")*CLHEP::cm;
212 else return 309.4*CLHEP::cm;
213 }
214
215 //
216
217
218 // 2) FROM ASAG structure
219
220
221 if ( a_name == "LArEMBSaggingAmplitude" ) {
222 return (*m_c->barrelSagging)[0]->getDouble("SAG"+A0)*CLHEP::cm;
223 }
224 if ( a_name == "LArEMBSaggingAmplitude2" ) {
225 if (!m_oldSagging) return (*m_c->barrelSagging)[0]->getDouble("SAG"+A0+"_X")*CLHEP::cm;
226 else return 0;
227 }
228
229
230
231 //
232
233 // 3) FROM ACCA ( electronics cables)
234
235 if ( a_name == "LArEMBmasspercentCu" ) return (*m_c->barrelAccordionCables)[0]->getDouble("PERCU");
236 if ( a_name == "LArEMBmasspercentKap" ) return (*m_c->barrelAccordionCables)[0]->getDouble("PERKAP");
237 if ( a_name == "LArEMBCablethickat0" ) return (*m_c->barrelAccordionCables)[0]->getDouble("THICKIN")*CLHEP::cm;
238 if ( a_name == "LArEMBthickincrfac" ) return (*m_c->barrelAccordionCables)[0]->getDouble("THICKFAC")*CLHEP::cm;
239 if ( a_name == "LArEMBCableEtaheight" ) return (*m_c->barrelAccordionCables)[0]->getDouble("HEIGHT")*CLHEP::cm;
240 if ( a_name == "LArEMBnoOFcableBundle" ) return (*m_c->barrelAccordionCables)[0]->getInt("ACCORCAB");
241 if ( a_name == "LArEMBCablclearfrPS" ) return (*m_c->barrelAccordionCables)[0]->getDouble("CLEARANCE")*CLHEP::cm;
242
243
244 // 4) FROM (*C->BARRELMOTHERBOARDS) ( electronics mother_boards)
245 if ( a_name == "LArEMBEpoxyVolumicMass" ) return (*m_c->barrelMotherboards)[0]->getDouble("DG10")*(CLHEP::g/CLHEP::cm3);
246 if ( a_name == "LArEMBCuThickness" ) return (*m_c->barrelMotherboards)[0]->getDouble("THICU")*CLHEP::cm;
247 if ( a_name == "LArEMBG10Thickness" ) return (*m_c->barrelMotherboards)[0]->getDouble("THIG10")*CLHEP::cm;
248 if ( a_name == "LArEMBMoBoTchickness" ) return (*m_c->barrelMotherboards)[0]->getDouble("THIMB")*CLHEP::cm;
249 if ( a_name == "LArEMBMoBoHeight" ) return (*m_c->barrelMotherboards)[0]->getDouble("HEIGHTMB")*CLHEP::cm;
250 if ( a_name == "LArEMBnoOFmothboard" ) return (*m_c->barrelMotherboards)[0]->getInt("MOTHBOAR");
251 if ( a_name == "LArEMBMoBoclearfrPS" ) return (*m_c->barrelMotherboards)[0]->getDouble("CLEARANCE")*CLHEP::cm;
252
253 //
254
255 // 5) FROM ACCO ( Longitudinal Barrel Parameters)
256 if ( a_name == "LArEMBfiducialMothZmax" ) return (*m_c->barrelLongDiv)[0]->getDouble("ZMAXACT")*CLHEP::cm;
257 if ( a_name == "LArEMBfiducialMothZmin" ) {
258 if (!m_oldDB) return (*m_c->barrelLongDiv)[0]->getDouble("ZMINACT")*CLHEP::cm;
259 else return 0.4*CLHEP::cm;
260 }
261
262 //
263
264 // 6) FROM COPG ( PreSampler Barrel Parameters)
265 if ( a_name == "LArEMBarrelRmin" ) return (*m_c->presamplerGeometry)[0]->getDouble("RMIN")*CLHEP::cm;
266
267 // 7) FROM BarrelEtaTrans
268 if ( a_name == "LArEMBEtaTrans" ) {
269 if (!m_oldDB) return (*m_c->barrelEtaTrans)[a0]->getDouble("ETATRANS");
270 else return 0.8;
271 }
272
273 // 8) FROM ColdContraction
274 if (!m_oldContract) {
275 if (a_name == "LArEMBAbsorberContraction") return (*m_c->coldContraction)[0]->getDouble("ABSORBERCONTRACTION");
276 }
277 else {
278 if (a_name == "LArEMBAbsorberContraction") return 0.997;
279 }
280
281 // We didn't find a match.
282 MsgStream log(Athena::getMessageSvc(),"RALEmb");
283 std::string errMessage = "RALEmb::GetValue: could not find a match for the key '" + a_name;
284 log << MSG::FATAL << errMessage << endmsg;
285 throw std::runtime_error(errMessage);
286
287 // Unreached.
288}
double a0
Definition globals.cxx:27

◆ operator=()

RALEmb & LArGeo::RALEmb::operator= ( const RALEmb & )
private

◆ SetInstance()

void LArGeo::VDetectorParameters::SetInstance ( std::unique_ptr< VDetectorParameters > p)
staticinherited

Definition at line 24 of file VDetectorParameters.cxx.

25{
26 s_instance.set (std::move (p));
27}

Member Data Documentation

◆ ATLAS_THREAD_SAFE

CxxUtils::CachedUniquePtr<VDetectorParameters> s_instance LArGeo::VDetectorParameters::ATLAS_THREAD_SAFE
staticprivateinherited

Definition at line 64 of file VDetectorParameters.h.

◆ m_c

Clockwork* LArGeo::RALEmb::m_c
private

Definition at line 35 of file RALEmb.h.

◆ m_oldContract

bool LArGeo::RALEmb::m_oldContract {false}
private

Definition at line 38 of file RALEmb.h.

38{false};

◆ m_oldDB

bool LArGeo::RALEmb::m_oldDB {false}
private

Definition at line 36 of file RALEmb.h.

36{false};

◆ m_oldSagging

bool LArGeo::RALEmb::m_oldSagging {false}
private

Definition at line 37 of file RALEmb.h.

37{false};

The documentation for this class was generated from the following files: