ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
LArGeo::WarmTCConstructionH62004 Class Reference

#include <WarmTCConstructionH62004.h>

Collaboration diagram for LArGeo::WarmTCConstructionH62004:

Public Member Functions

 WarmTCConstructionH62004 ()
 
virtual ~WarmTCConstructionH62004 ()
 
GeoIntrusivePtr< GeoVFullPhysVol > GetEnvelope ()
 

Private Attributes

GeoIntrusivePtr< GeoFullPhysVol > m_WarmTCPhys
 
StoreGateSvcm_detectorStore = nullptr
 

Detailed Description

Definition at line 18 of file WarmTCConstructionH62004.h.

Constructor & Destructor Documentation

◆ WarmTCConstructionH62004()

LArGeo::WarmTCConstructionH62004::WarmTCConstructionH62004 ( )

Definition at line 50 of file WarmTCConstructionH62004.cxx.

50  :m_WarmTCPhys(nullptr) {
51 
52  //StoreGateSvc* detStore;
53 
54  ISvcLocator* svcLocator = Gaudi::svcLocator();
55  if (svcLocator->service("DetectorStore", m_detectorStore, false )==StatusCode::FAILURE) {
56  throw std::runtime_error("Error in ModulesConstruction, cannot access DetectorStore");
57  }
58 }

◆ ~WarmTCConstructionH62004()

LArGeo::WarmTCConstructionH62004::~WarmTCConstructionH62004 ( )
virtual

Definition at line 60 of file WarmTCConstructionH62004.cxx.

60 {;}

Member Function Documentation

◆ GetEnvelope()

GeoIntrusivePtr< GeoVFullPhysVol > LArGeo::WarmTCConstructionH62004::GetEnvelope ( )

Definition at line 63 of file WarmTCConstructionH62004.cxx.

64 {
65  StoredMaterialManager* materialManager = nullptr;
66  if (StatusCode::SUCCESS != m_detectorStore->retrieve(materialManager, std::string("MATERIALS"))) {
67  throw std::runtime_error("Error in ModulesConstruction, cannot access Material manager");
68  }
69 
70  if (m_WarmTCPhys) return (m_WarmTCPhys);
71  ISvcLocator *svcLocator = Gaudi::svcLocator();
72  IMessageSvc * msgSvc;
73  if (svcLocator->service("MessageSvc", msgSvc, true )==StatusCode::FAILURE) {
74  throw std::runtime_error("Error in WarmTCConstructionH62004, cannot access MessageSvc");
75  }
76  MsgStream log(msgSvc, "WarmTCConstructionH62004");
77 
78 // SHOULD GO INTO DB !!!!
79 
80 // Muon scintilators are the first one:
81 double Muon_x = 20.0*Gaudi::Units::cm;
82 double Muon_y = 120.0*Gaudi::Units::cm;
83 double Muon_z = 1.0*Gaudi::Units::cm;
84 // The extra space to accumulate muon sci. into mother:
85 double Muon_dist = 120.0*Gaudi::Units::mm;
86 //
87 // WTC dimensions
88 double WTC_len = 591.5*Gaudi::Units::mm;
89 double WTC_high = 1250.0*Gaudi::Units::mm;
90 double WTC_sci_z = 12.7*Gaudi::Units::mm;
91 double WTC_sci_x = 190.0*Gaudi::Units::mm;
92 double WTC_sci_y = 1160.0*Gaudi::Units::mm;
93 
94 // Define dimension WTC mother
95 //
96 // cppcheck-suppress duplicateAssignExpression
97 double x_m = WTC_high / 2;
98 double y_m = WTC_high / 2;
99 double z_m = (86.0*Gaudi::Units::mm + WTC_len + WTC_sci_z + Muon_dist + Muon_z) / 2;
100 //
101 // Define dimension of Fe absorber
102 //
103 // cppcheck-suppress duplicateAssignExpression
104 double Fe_x = WTC_high / 2;
105 double Fe_y = WTC_high / 2;
106 double Fe_z = (99.0 / 2)*Gaudi::Units::mm;
107 //
108 // Define dimension of X scintillator
109 //
110 double x_x = 6 * WTC_sci_x / 2;
111 // cppcheck-suppress duplicateAssignExpression
112 double x_y = WTC_sci_y / 2;
113 //
114 // Define dimension of Y scintillator
115 //
116 double y_x = WTC_sci_y / 2;
117 double y_y = 6 * WTC_sci_x / 2;
118 //
119 // Define widht of scintillator, same for X & Y
120 //
121 double z_s = WTC_sci_z / 2;
122 //
123 // Calculate position of Fe & scintillators inside mother WTC
124 // x & y position is always 0, all is need is z position!!
125 //
126 double z_x[3], z_y[3], z_Fe[4];
127  z_x[0] = -z_m + Muon_dist + Muon_z + z_s; // X scin. Layer 1
128  z_y[0] = z_x[0] + 54*Gaudi::Units::mm; // Y scin. Layer 2
129  z_Fe[0] = z_x[0] + 86.0*Gaudi::Units::mm + Fe_z; // 1st Fe abs.
130  z_y[1] = z_Fe[0] + 125.5*Gaudi::Units::mm - Fe_z; // Y scin. Layer 3
131  z_Fe[1] = z_Fe[0] + 2 * Fe_z + 53.0*Gaudi::Units::mm; // 2nd Fe abs.
132  z_x[1] = z_Fe[0] - Fe_z + 278.5*Gaudi::Units::mm; // X scin. Layer 4
133  z_Fe[2] = z_Fe[1] + 2 *Fe_z + 52.5*Gaudi::Units::mm; // 3rd Fe abs.
134  z_y[2] = z_Fe[0] - Fe_z + 433.0*Gaudi::Units::mm; // Y scin. Layer 5
135  z_Fe[3] = z_Fe[2] + 2 *Fe_z + 61.5*Gaudi::Units::mm; // 4rd Fe abs.
136  z_x[2] = z_Fe[0] - Fe_z + WTC_len; // X scin. Layer 6
137 //
138 // Tilding of the TC
139 //double WTC_tild = -1.1*Gaudi::Units::deg; // 24 Gaudi::Units::mm tild on 1250 Gaudi::Units::mm length
140 //double WTC_tild = 0.*Gaudi::Units::deg; // 24 Gaudi::Units::mm tild on 1250 Gaudi::Units::mm length
141 // Define position in test beam line....
142 //
143 //double WTC_x = 0.0*Gaudi::Units::mm;
144 //double WTC_y = 0.0*Gaudi::Units::mm;
145 //double WTC_z = 460.0*Gaudi::Units::mm - 120.*Gaudi::Units::mm - 10.*Gaudi::Units::mm;
146 
147 // Some elements
148 
149  const GeoElement* elH = materialManager->getElement("Hydrogen");
150  const GeoElement* elC = materialManager->getElement("Carbon");
151  //const GeoElement* elO = materialManager->getElement("Oxygen");
152  //const GeoElement* elN = materialManager->getElement("Nitrogen");
153  const GeoMaterial* Iron = materialManager->getMaterial("std::Iron");
154  const GeoMaterial *Air = materialManager->getMaterial("std::Air");
155  // Scintillator
156  double density = 1.032*GeoModelKernelUnits::g/Gaudi::Units::cm3;
157  GeoMaterial* Scintillator=new GeoMaterial("Scintillator",density);
158  Scintillator->add(elC,0.9147);
159  Scintillator->add(elH,0.0853);
160  Scintillator->lock();
161 
162 
163 // "mother" volume for Fe abs. & scint.
164 //
166  std::string mname = std::string("WarmTC_Mother");
167  GeoBox *wtc_box = new GeoBox(x_m,y_m,z_m);
168  GeoLogVol *wtc_log = new GeoLogVol(mname,wtc_box,Air);
169 
170  m_WarmTCPhys = new GeoFullPhysVol(wtc_log);
171 
172  std::string tag = std::string("WARMTC_POS");
173  StoredPhysVol *sPhysVol = new StoredPhysVol(m_WarmTCPhys);
174  status=m_detectorStore->record(sPhysVol,tag);
175  if(!status.isSuccess()) throw std::runtime_error ((std::string("Cannot store ")+tag).c_str());
176 
177 //
178 // Create the muon scintillator and position
179  double a,n;
180  std::string muname = "LAr::WarmTC::MuonWall";
181  GeoBox *mu_box = new GeoBox(Muon_x/2, Muon_y/2, Muon_z/2);
182  GeoLogVol *mu_log = new GeoLogVol(muname, mu_box, Scintillator);
183  GeoIntrusivePtr<GeoPhysVol>mu_phys = new GeoPhysVol(mu_log);
184  for(int i=1; i<=3; ++i) {
185  a = -5.*i*Gaudi::Units::mm + (2*i-1)*Muon_x/2;
186  n = pow(-1,i) * Muon_z/2 - z_m + Muon_z;
187  GeoTrf::Vector3D posShift(a,0.0*Gaudi::Units::mm,n);
188  m_WarmTCPhys->add(new GeoSerialIdentifier(6-i));
189  m_WarmTCPhys->add(new GeoTransform(GeoTrf::Translate3D(a,0.0*Gaudi::Units::mm,n)));
190  m_WarmTCPhys->add(mu_phys);
191 
192  n = pow(-1,i+1) * Muon_z/2 - z_m + Muon_z;
193  m_WarmTCPhys->add(new GeoSerialIdentifier(5+i));
194  m_WarmTCPhys->add(new GeoTransform(GeoTrf::Translate3D(-a,0.0*Gaudi::Units::mm,n)));
195  m_WarmTCPhys->add(mu_phys);
196 
197  }
198 
199 //
200 // Create Fe abs. plate and position them
201 //
202  std::string aname = "LAr::WarmTC::Absorber";
203  GeoBox *Fe_box = new GeoBox(Fe_x,Fe_y,Fe_z);
204  GeoLogVol *Fe_log = new GeoLogVol(aname,Fe_box,Iron);
205  GeoIntrusivePtr<GeoPhysVol>Fe_phys = new GeoPhysVol(Fe_log);
206 
207  for(int i=0; i<4; i++) {
208  m_WarmTCPhys->add(new GeoSerialIdentifier(i+1));
209  m_WarmTCPhys->add(new GeoTransform(GeoTrf::Translate3D(0.0*Gaudi::Units::mm,0.0*Gaudi::Units::mm,z_Fe[i])));
210  m_WarmTCPhys->add(Fe_phys);
211  }
212 
213 //
214 // Create X scintillators and position them
215 //
216  std::string sname = "LAr::WarmTC::Sci";
217  GeoBox *X_box = new GeoBox(x_x,x_y,z_s);
218  GeoLogVol *X_log = new GeoLogVol(sname+"::X", X_box,Scintillator);
219  GeoIntrusivePtr<GeoPhysVol>X_phys = new GeoPhysVol(X_log);
220 
221  for(int i=0; i<3; i++) {
222  m_WarmTCPhys->add(new GeoSerialIdentifier(i+1));
223  m_WarmTCPhys->add(new GeoTransform(GeoTrf::Translate3D(0.0*Gaudi::Units::mm,0.0*Gaudi::Units::mm,z_x[i])));
224  m_WarmTCPhys->add(X_phys);
225  }
226 
227 //
228 // Create Y scintillators and position them
229 //
230  sname = "LAr::WarmTC::Sci";
231  GeoBox *Y_box = new GeoBox(y_x,y_y,z_s);
232  GeoLogVol *Y_log = new GeoLogVol(sname+"::Y", Y_box,Scintillator);
233  GeoIntrusivePtr<GeoPhysVol>Y_phys = new GeoPhysVol(Y_log);
234 
235  for(int i=0; i<3; i++) {
236  m_WarmTCPhys->add(new GeoSerialIdentifier(i+1));
237  m_WarmTCPhys->add(new GeoTransform(GeoTrf::Translate3D(0.0*Gaudi::Units::mm,0.0*Gaudi::Units::mm,z_y[i])));
238  m_WarmTCPhys->add(Y_phys);
239  }
240 
241  std::cout<<"About to return WarmTC PhysVol"<<std::endl;
242  return m_WarmTCPhys;
243 }

Member Data Documentation

◆ m_detectorStore

StoreGateSvc* LArGeo::WarmTCConstructionH62004::m_detectorStore = nullptr
private

Definition at line 26 of file WarmTCConstructionH62004.h.

◆ m_WarmTCPhys

GeoIntrusivePtr<GeoFullPhysVol> LArGeo::WarmTCConstructionH62004::m_WarmTCPhys
private

Definition at line 25 of file WarmTCConstructionH62004.h.


The documentation for this class was generated from the following files:
StoreGateSvc::record
StatusCode record(T *p2BRegistered, const TKEY &key)
Record an object with a key.
LArGeo::WarmTCConstructionH62004::m_WarmTCPhys
GeoIntrusivePtr< GeoFullPhysVol > m_WarmTCPhys
Definition: WarmTCConstructionH62004.h:25
compute_lumi.z_m
z_m
Definition: compute_lumi.py:30
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
StoredMaterialManager::getElement
virtual const GeoElement * getElement(const std::string &name)=0
cm3
#define cm3
python.Dumpers.aname
string aname
Definition: Dumpers.py:5541
StoreGateSvc::retrieve
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
StoredPhysVol
Definition: StoredPhysVol.h:27
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
lumiFormat.i
int i
Definition: lumiFormat.py:92
LArGeo::WarmTCConstructionH62004::m_detectorStore
StoreGateSvc * m_detectorStore
Definition: WarmTCConstructionH62004.h:26
beamspotman.n
n
Definition: beamspotman.py:731
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
a
TList * a
Definition: liststreamerinfos.cxx:10
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
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
merge.status
status
Definition: merge.py:17
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24