ATLAS Offline Software
Loading...
Searching...
No Matches
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}
GeoIntrusivePtr< GeoFullPhysVol > m_psPhysical

◆ ~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();
59 SmartIF<StoreGateSvc> detStore{svcLocator->service("DetectorStore")};
60 if (!detStore.isValid()) {
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 SmartIF<IRDBAccessSvc> pAccessSvc{svcLocator->service("RDBAccessSvc")};
75 if (!pAccessSvc.isValid()) {
76 throw std::runtime_error ("Cannot locate RDBAccessSvc!!");
77 }
78
79 SmartIF<IGeoModelSvc> geoModel{svcLocator->service("GeoModelSvc")};
80 if (!geoModel.isValid()) {
81 throw std::runtime_error ("Cannot locate GeoModelSvc!!");
82 }
83
84 std::string AtlasVersion = geoModel->atlasVersion();
85 std::string LArVersion = geoModel->LAr_VersionOverride();
86
87 std::string detectorKey = LArVersion.empty() ? AtlasVersion : LArVersion;
88 std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr";
89
90
91
92 IRDBRecordset_ptr presamplerPosition = pAccessSvc->getRecordsetPtr("PresamplerPosition",AtlasVersion, "ATLAS");
93
94 //===>
95
96
98 // LAr Endcap Presampler GEOMETRY
100 double Rmin = 1231.74*Gaudi::Units::mm;
101 double Rmax = 1701.98*Gaudi::Units::mm;
102 double HalfZ = ((*presamplerPosition)[0]->getDouble("TCK")/2.)*Gaudi::Units::cm;
103
104
105 std::string name = "LAr::Endcap::Presampler::LiquidArgon";
106
107 double phi_size = 360.*Gaudi::Units::deg;
108 double start_phi = 0.;
109
110 if( m_isModule ){
111 phi_size = M_PI / 4;
112 start_phi = M_PI / 2 - M_PI / 8;
113 }
114
115 GeoTubs* endcapPresamplerSolid = new GeoTubs(Rmin, Rmax, HalfZ, start_phi, phi_size);
116
117 const GeoLogVol* endcapPresamplerLog = new GeoLogVol(name,endcapPresamplerSolid, LAr);
118 m_psPhysical = new GeoFullPhysVol(endcapPresamplerLog);
119
120 return m_psPhysical;
121}
#define M_PI
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
virtual const GeoMaterial * getMaterial(const std::string &name)=0

◆ 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: