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

#include <EMBAccordionDetails.h>

Collaboration diagram for EMBAccordionDetails:

Classes

class  Clockwork
 

Public Member Functions

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

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 195 of file EMBAccordionDetails.cxx.

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

◆ ~EMBAccordionDetails()

EMBAccordionDetails::~EMBAccordionDetails ( )

Destructor.

Definition at line 270 of file EMBAccordionDetails.cxx.

270  {
271  delete m_c;
272 }

◆ EMBAccordionDetails() [2/2]

EMBAccordionDetails::EMBAccordionDetails ( const EMBAccordionDetails )
private

Member Function Documentation

◆ getAbsorberSections()

const GeoStraightAccSection * EMBAccordionDetails::getAbsorberSections ( ) const

Absorber position details:

Definition at line 291 of file EMBAccordionDetails.cxx.

291  {
292  if (m_c->absorberStraightSection==nullptr) {
293  const GeoStraightAccSection* sa = nullptr;
294 
295  StatusCode status = m_c->detStore->retrieve(sa,"STRAIGHTABSORBERS");
296  if (status != StatusCode::SUCCESS) throw std::runtime_error ("Cannot locate Straight Absorbers");
297 
299 
300  }
302 
303 }

◆ getElectrodeSections()

const GeoStraightAccSection * EMBAccordionDetails::getElectrodeSections ( ) const

Electrode position details:

Definition at line 306 of file EMBAccordionDetails.cxx.

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

◆ operator=()

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

◆ phiFirstAbsorber()

double EMBAccordionDetails::phiFirstAbsorber ( ) const

Phi of the first absorber.

Definition at line 274 of file EMBAccordionDetails.cxx.

274  {
275  return m_c->gam0;
276 }

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:
EMBAccordionDetails::Clockwork::Nbrt1
int Nbrt1
Definition: EMBAccordionDetails.cxx:56
EMBAccordionDetails::Clockwork::yc
double yc[15]
Definition: EMBAccordionDetails.cxx:62
GeoStraightAccSection
Record of All Electrode Straight Pieces.
Definition: GeoStraightAccSection.h:24
EMBAccordionDetails::Clockwork::absorberStraightSection
const GeoStraightAccSection * absorberStraightSection
Definition: EMBAccordionDetails.cxx:72
EMBAccordionDetails::Clockwork::NCellTot
int NCellTot
Definition: EMBAccordionDetails.cxx:68
EMBAccordionDetails::Clockwork::zMinBarrel
double zMinBarrel
Definition: EMBAccordionDetails.cxx:65
EMBAccordionDetails::Clockwork::electrodeStraightSection
const GeoStraightAccSection * electrodeStraightSection
Definition: EMBAccordionDetails.cxx:71
EMBAccordionDetails::Clockwork::rint_eleFib
double rint_eleFib
Definition: EMBAccordionDetails.cxx:57
deg
#define deg
Definition: SbPolyhedron.cxx:17
EMBAccordionDetails::Clockwork::zMaxBarrel
double zMaxBarrel
Definition: EMBAccordionDetails.cxx:66
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
EMBAccordionDetails::Clockwork::rc
double rc[15]
Definition: EMBAccordionDetails.cxx:59
EventInfoWrite.AtlasVersion
AtlasVersion
Definition: EventInfoWrite.py:17
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
EMBAccordionDetails::Clockwork::detStore
ServiceHandle< StoreGateSvc > detStore
Definition: EMBAccordionDetails.cxx:74
EMBAccordionDetails::Clockwork::etaMaxBarrel
double etaMaxBarrel
Definition: EMBAccordionDetails.cxx:67
EMBAccordionDetails::Clockwork::NCellMax
int NCellMax
Definition: EMBAccordionDetails.cxx:69
EMBAccordionDetails::Clockwork::xc
double xc[15]
Definition: EMBAccordionDetails.cxx:61
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
EMBAccordionDetails::Clockwork::rMinAccordion
double rMinAccordion
Definition: EMBAccordionDetails.cxx:63
EMBAccordionDetails::Clockwork::gam0
double gam0
Definition: EMBAccordionDetails.cxx:49
EMBAccordionDetails::Clockwork::getRPhi
void getRPhi()
initialization routine
Definition: EMBAccordionDetails.cxx:77
EMBAccordionDetails::Clockwork::delta
double delta[15]
Definition: EMBAccordionDetails.cxx:58
merge.status
status
Definition: merge.py:17
EMBAccordionDetails::m_c
Clockwork * m_c
Definition: EMBAccordionDetails.h:47
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
EMBAccordionDetails::Clockwork::phic
double phic[15]
Definition: EMBAccordionDetails.cxx:60
EMBAccordionDetails::Clockwork::Nbrt
int Nbrt
Definition: EMBAccordionDetails.cxx:55
EMBAccordionDetails::Clockwork::rMaxAccordion
double rMaxAccordion
Definition: EMBAccordionDetails.cxx:64