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

GeoModel description of the LAr Endcap Presampler geometry. More...

#include <EndcapPresamplerConstruction.h>

Collaboration diagram for EndcapPresamplerConstruction:

Public Member Functions

 EndcapPresamplerConstruction (bool imb=false)
 
virtual ~EndcapPresamplerConstruction ()
 
GeoIntrusivePtr< GeoFullPhysVol > Envelope ()
 

Private Member Functions

 EndcapPresamplerConstruction (const EndcapPresamplerConstruction &)
 
EndcapPresamplerConstructionoperator= (const EndcapPresamplerConstruction &)
 

Private Attributes

GeoIntrusivePtr< GeoFullPhysVol > m_psPhysical
 
bool m_isModule
 

Detailed Description

GeoModel description of the LAr Endcap Presampler geometry.

Definition at line 24 of file EndcapPresamplerConstruction.h.

Constructor & Destructor Documentation

◆ EndcapPresamplerConstruction() [1/2]

EndcapPresamplerConstruction::EndcapPresamplerConstruction ( bool  imb = false)

Definition at line 44 of file EndcapPresamplerConstruction.cxx.

44  :
45  m_psPhysical(nullptr)
46 {
47  m_isModule = imb;
48 }

◆ ~EndcapPresamplerConstruction()

EndcapPresamplerConstruction::~EndcapPresamplerConstruction ( )
virtual

Definition at line 50 of file EndcapPresamplerConstruction.cxx.

50 {;}

◆ EndcapPresamplerConstruction() [2/2]

EndcapPresamplerConstruction::EndcapPresamplerConstruction ( const EndcapPresamplerConstruction )
private

Member Function Documentation

◆ Envelope()

GeoIntrusivePtr< GeoFullPhysVol > EndcapPresamplerConstruction::Envelope ( )

Definition at line 53 of file EndcapPresamplerConstruction.cxx.

54 {
55  if (m_psPhysical) return m_psPhysical->clone();
56 
57 
58  ISvcLocator *svcLocator = Gaudi::svcLocator();
60  if (svcLocator->service("DetectorStore", detStore, false )==StatusCode::FAILURE) {
61  throw std::runtime_error("Error in EndcapCryostatConstruction, cannot access DetectorStore");
62  }
63 
64  StoredMaterialManager* materialManager = nullptr;
65  if (StatusCode::SUCCESS != detStore->retrieve(materialManager, std::string("MATERIALS"))) return nullptr;
66 
67  const GeoMaterial *LAr = materialManager->getMaterial("std::LiquidArgon");
68  if (!LAr) {
69  throw std::runtime_error("Error in EndcapCryostatConstruction, std::LiquidArgon is not found.");
70  }
71 
72 
73  //===>
74 
75  StatusCode sc;
76  IRDBAccessSvc *pAccessSvc;
77  sc=svcLocator->service("RDBAccessSvc",pAccessSvc);
78  if (sc != StatusCode::SUCCESS) {
79  throw std::runtime_error ("Cannot locate RDBAccessSvc!!");
80  }
81 
82  IGeoModelSvc *geoModel;
83  sc = svcLocator->service ("GeoModelSvc",geoModel);
84  if (sc != StatusCode::SUCCESS) {
85  throw std::runtime_error ("Cannot locate GeoModelSvc!!");
86  }
87 
88  std::string AtlasVersion = geoModel->atlasVersion();
89  std::string LArVersion = geoModel->LAr_VersionOverride();
90 
91  std::string detectorKey = LArVersion.empty() ? AtlasVersion : LArVersion;
92  std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr";
93 
94 
95 
96  IRDBRecordset_ptr presamplerPosition = pAccessSvc->getRecordsetPtr("PresamplerPosition",AtlasVersion, "ATLAS");
97 
98  //===>
99 
100 
102  // LAr Endcap Presampler GEOMETRY
104  double Rmin = 1231.74*Gaudi::Units::mm;
105  double Rmax = 1701.98*Gaudi::Units::mm;
106  double HalfZ = ((*presamplerPosition)[0]->getDouble("TCK")/2.)*Gaudi::Units::cm;
107 
108 
109  std::string name = "LAr::Endcap::Presampler::LiquidArgon";
110 
111  double phi_size = 360.*Gaudi::Units::deg;
112  double start_phi = 0.;
113 
114  if( m_isModule ){
115  phi_size = M_PI / 4;
116  start_phi = M_PI / 2 - M_PI / 8;
117  }
118 
119  GeoTubs* endcapPresamplerSolid = new GeoTubs(Rmin, Rmax, HalfZ, start_phi, phi_size);
120 
121  const GeoLogVol* endcapPresamplerLog = new GeoLogVol(name,endcapPresamplerSolid, LAr);
122  m_psPhysical = new GeoFullPhysVol(endcapPresamplerLog);
123 
124  return m_psPhysical;
125 }

◆ operator=()

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

Member Data Documentation

◆ m_isModule

bool EndcapPresamplerConstruction::m_isModule
private

Definition at line 49 of file EndcapPresamplerConstruction.h.

◆ m_psPhysical

GeoIntrusivePtr<GeoFullPhysVol> EndcapPresamplerConstruction::m_psPhysical
private

Definition at line 46 of file EndcapPresamplerConstruction.h.


The documentation for this class was generated from the following files:
IRDBAccessSvc::getRecordsetPtr
virtual IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
IGeoModelSvc
Definition: IGeoModelSvc.h:17
LAr
Definition: LArVolumeBuilder.h:36
M_PI
#define M_PI
Definition: ActiveFraction.h:11
deg
#define deg
Definition: SbPolyhedron.cxx:17
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
IGeoModelSvc::LAr_VersionOverride
virtual const std::string & LAr_VersionOverride() const =0
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
EventInfoWrite.AtlasVersion
AtlasVersion
Definition: EventInfoWrite.py:17
IRDBAccessSvc
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
Definition: IRDBAccessSvc.h:45
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
EndcapPresamplerConstruction::m_psPhysical
GeoIntrusivePtr< GeoFullPhysVol > m_psPhysical
Definition: EndcapPresamplerConstruction.h:46
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
EndcapPresamplerConstruction::m_isModule
bool m_isModule
Definition: EndcapPresamplerConstruction.h:49
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
StoredMaterialManager::getMaterial
virtual const GeoMaterial * getMaterial(const std::string &name)=0
StoredMaterialManager
This class holds one or more material managers and makes them storeable, under StoreGate.
Definition: StoredMaterialManager.h:28
Rmin
double Rmin
Definition: LArDetectorConstructionTBEC.cxx:54
IGeoModelSvc::atlasVersion
virtual const std::string & atlasVersion() const =0