ATLAS Offline Software
Loading...
Searching...
No Matches
EMBAccordionDetails Class Reference

#include <EMBAccordionDetails.h>

Collaboration diagram for EMBAccordionDetails:

Classes

class  Clockwork

Public Member Functions

 EMBAccordionDetails ()
 Destructor.
 ~EMBAccordionDetails ()
 Destructor.
double phiFirstAbsorber () const
 Phi of the first absorber.
const GeoStraightAccSectiongetAbsorberSections () const
 Absorber position details:
const GeoStraightAccSectiongetElectrodeSections () const
 Electrode position details:

Private Member Functions

 EMBAccordionDetails (const EMBAccordionDetails &)
EMBAccordionDetailsoperator= (const EMBAccordionDetails &)

Private Attributes

Clockworkm_c

Detailed Description

Definition at line 9 of file EMBAccordionDetails.h.

Constructor & Destructor Documentation

◆ EMBAccordionDetails() [1/2]

EMBAccordionDetails::EMBAccordionDetails ( )

Destructor.

Definition at line 196 of file EMBAccordionDetails.cxx.

197 : m_c(new Clockwork())
198{
199 ISvcLocator *svcLocator = Gaudi::svcLocator();
200
201 SmartIF<IGeoModelSvc> geoModel{svcLocator->service("GeoModelSvc")};
202 if(!geoModel.isValid())
203 throw std::runtime_error("Error in HECDetectorManager, cannot access GeoModelSvc");
204
205 SmartIF<IGeoDbTagSvc> geoDbTagSvc{svcLocator->service("GeoDbTagSvc")};
206 if(!geoDbTagSvc.isValid())
207 throw std::runtime_error("Error in HECDetectorManager, cannot access GeoDbTagSvc");
208
209 SmartIF<IRDBAccessSvc> rdbAccess{svcLocator->service(geoDbTagSvc->getParamSvcName())};
210 if(!rdbAccess.isValid())
211 throw std::runtime_error("Error in HECDetectorManager, cannot access RDBAccessSvc");
212
213 if(m_c->detStore.retrieve().isFailure())
214 throw std::runtime_error("Error in HECDetectorManager, cannot access DetectorStore");
215
216 std::string detectorKey, detectorNode;
217
218 if(geoDbTagSvc->getSqliteReader()==nullptr) {
219 std::string AtlasVersion = geoModel->atlasVersion();
220 std::string LArVersion = geoModel->LAr_VersionOverride();
221
222 detectorKey = LArVersion.empty() ? AtlasVersion : LArVersion;
223 detectorNode = LArVersion.empty() ? "ATLAS" : "LAr";
224 }
225
226 IRDBRecordset_ptr barrelGeometry = rdbAccess->getRecordsetPtr("BarrelGeometry",detectorKey,detectorNode);
227 if (barrelGeometry->size()==0) {
228 throw std::runtime_error("Cannot find the BarrelGeometry Table");
229 }
230
231 IRDBRecordset_ptr barrelLongDiv = rdbAccess->getRecordsetPtr("BarrelLongDiv",detectorKey,detectorNode);
232 if (barrelLongDiv->size()==0) {
233 throw std::runtime_error("Cannot find the BarrelLongDiv Table");
234 }
235
236 // number of straight sections (should be 14)
237 m_c->Nbrt = (*barrelGeometry)[0]->getInt("NBRT");
238 // Number of ZIGs + 1 i.e. 15 = number of folds
239 m_c->Nbrt1 = m_c->Nbrt + 1;
240 // phi of first absorber
241 m_c->gam0 = (*barrelGeometry)[0]->getDouble("PHIFIRST");
242 // radius of curvature of neutral fiber in the folds
243 m_c->rint_eleFib = (*barrelGeometry)[0]->getDouble("RINT")*Gaudi::Units::cm;
244
245 // r,phi positions of the centre of the folds (nominal geometry)
246 for (int idat = 0; idat < m_c->Nbrt1 ; idat++)
247 {
248 m_c->rc[idat] = (*barrelGeometry)[0]->getDouble("RHOCEN",idat)*Gaudi::Units::cm;
249 m_c->phic[idat] = (*barrelGeometry)[0]->getDouble("PHICEN",idat)*Gaudi::Units::deg;
250 m_c->delta[idat] = (*barrelGeometry)[0]->getDouble("DELTA",idat)*Gaudi::Units::deg;
251 m_c->xc[idat] = m_c->rc[idat]*cos(m_c->phic[idat]);
252 m_c->yc[idat] = m_c->rc[idat]*sin(m_c->phic[idat]);
253 }
254 //
255 m_c->rMinAccordion = (*barrelGeometry)[0]->getDouble("RIN_AC")*Gaudi::Units::cm;
256 m_c->rMaxAccordion = (*barrelGeometry)[0]->getDouble("ROUT_AC")*Gaudi::Units::cm;
257 m_c->etaMaxBarrel = (*barrelGeometry)[0]->getDouble("ETACUT");
258 m_c->zMinBarrel = (*barrelLongDiv)[0]->getDouble("ZMAXACT")*Gaudi::Units::cm;
259 m_c->zMaxBarrel = (*barrelLongDiv)[0]->getDouble("ZMINACT")*Gaudi::Units::cm;
260 // === GU 11/06/2003 total number of cells in phi
261 // to distinguish 1 module (testbeam case) from full Atlas
262 m_c->NCellTot = (*barrelGeometry)[0]->getInt("NCELMX");
263 m_c->NCellMax=1024;
264
265 //====================================================
266
267 m_c->getRPhi();
268
269}
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
virtual unsigned int size() const =0

◆ ~EMBAccordionDetails()

EMBAccordionDetails::~EMBAccordionDetails ( )

Destructor.

Definition at line 271 of file EMBAccordionDetails.cxx.

271 {
272 delete m_c;
273}

◆ EMBAccordionDetails() [2/2]

EMBAccordionDetails::EMBAccordionDetails ( const EMBAccordionDetails & )
private

Member Function Documentation

◆ getAbsorberSections()

const GeoStraightAccSection * EMBAccordionDetails::getAbsorberSections ( ) const

Absorber position details:

Definition at line 292 of file EMBAccordionDetails.cxx.

292 {
293 if (m_c->absorberStraightSection==nullptr) {
294 const GeoStraightAccSection* sa = nullptr;
295
296 StatusCode status = m_c->detStore->retrieve(sa,"STRAIGHTABSORBERS");
297 if (status != StatusCode::SUCCESS) throw std::runtime_error ("Cannot locate Straight Absorbers");
298
299 m_c->absorberStraightSection = sa;
300
301 }
302 return m_c->absorberStraightSection;
303
304}
::StatusCode StatusCode
StatusCode definition for legacy code.
status
Definition merge.py:16

◆ getElectrodeSections()

const GeoStraightAccSection * EMBAccordionDetails::getElectrodeSections ( ) const

Electrode position details:

Definition at line 307 of file EMBAccordionDetails.cxx.

307 {
308 if (m_c->electrodeStraightSection==nullptr) {
309 const GeoStraightAccSection* sa = nullptr;
310
311 StatusCode status = m_c->detStore->retrieve(sa,"STRAIGHTELECTRODES");
312 if (status != StatusCode::SUCCESS) throw std::runtime_error ("Cannot locate Straight Electrodes");
313
314 m_c->electrodeStraightSection=sa;
315
316 }
317 return m_c->electrodeStraightSection;
318
319}

◆ operator=()

EMBAccordionDetails & EMBAccordionDetails::operator= ( const EMBAccordionDetails & )
private

◆ phiFirstAbsorber()

double EMBAccordionDetails::phiFirstAbsorber ( ) const

Phi of the first absorber.

Definition at line 275 of file EMBAccordionDetails.cxx.

275 {
276 return m_c->gam0;
277}

Member Data Documentation

◆ m_c

Clockwork* EMBAccordionDetails::m_c
private

Definition at line 48 of file EMBAccordionDetails.h.


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