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

#include <ExcluderConstructionH62004.h>

Collaboration diagram for LArGeo::ExcluderConstructionH62004:

Public Member Functions

 ExcluderConstructionH62004 (int which=0)
 
virtual ~ExcluderConstructionH62004 ()
 
GeoIntrusivePtr< GeoVFullPhysVol > GetEnvelope () const
 

Private Attributes

int m_which
 

Detailed Description

Definition at line 14 of file ExcluderConstructionH62004.h.

Constructor & Destructor Documentation

◆ ExcluderConstructionH62004()

LArGeo::ExcluderConstructionH62004::ExcluderConstructionH62004 ( int  which = 0)

Definition at line 46 of file ExcluderConstructionH62004.cxx.

47  :m_which(which)
48 {
49 }

◆ ~ExcluderConstructionH62004()

LArGeo::ExcluderConstructionH62004::~ExcluderConstructionH62004 ( )
virtual

Definition at line 51 of file ExcluderConstructionH62004.cxx.

51 {;}

Member Function Documentation

◆ GetEnvelope()

GeoIntrusivePtr< GeoVFullPhysVol > LArGeo::ExcluderConstructionH62004::GetEnvelope ( ) const

Definition at line 54 of file ExcluderConstructionH62004.cxx.

54  {
55 //----------------------------------------------------------------
56 // Elements , Mixtures and Materials
57 //----------------------------------------------------------------
58  ISvcLocator *svcLocator = Gaudi::svcLocator();
59 
60  StoreGateSvc *detectorStore;
61  if (svcLocator->service("DetectorStore", detectorStore, false )==StatusCode::FAILURE) {
62  throw std::runtime_error("Error in ModulesConstruction, cannot access DetectorStore");
63  }
64  StoredMaterialManager* materialManager = nullptr;
65  if (StatusCode::SUCCESS != detectorStore->retrieve(materialManager, std::string("MATERIALS"))) {
66  return nullptr;
67  }
68 
69 
70  const GeoElement *elH = materialManager->getElement("Hydrogen");
71  if (!elH) throw std::runtime_error("Error in ExcluderConstruction, Hydrogen is not found.");
72 
73  const GeoElement *elC = materialManager->getElement("Carbon");
74  if (!elC) throw std::runtime_error("Error in ExcluderConstruction, Carbon is not found.");
75 
76  const GeoElement* elN = materialManager->getElement("Nitrogen");
77  if (!elN) throw std::runtime_error("Error in ExcluderConstruction, Nitrogen is not found.");
78 
79  const GeoElement *elO = materialManager->getElement("Oxygen");
80  if (!elO) throw std::runtime_error("Error in ExcluderConstruction, Oxygen is not found.");
81 
82  const GeoMaterial* LAr = materialManager->getMaterial("std::LiquidArgon");
83  if (!LAr) throw std::runtime_error("Error in ExcluderConstruction, std::LiquidArgon is not found.");
84 
85  const GeoMaterial* Fe = materialManager->getMaterial("std::Iron");
86  if (!Fe) throw std::runtime_error("Error in ExcluderConstruction, std::Iron is not found.");
87 
88  const GeoMaterial* Cu = materialManager->getMaterial("std::Copper");
89  if (!Cu) throw std::runtime_error("Error in ExcluderConstruction, std::Copper is not found.");
90 
91  // How to get Rohacell ????
92  // Taking Margret's one
93  // Define Rohacell Foam.
94  // Rohacell foam has density: 0.11g/cm3
95  std::string name;
96  double density;
97  const GeoElement* C=materialManager->getElement("Carbon");
98  const GeoElement* H=materialManager->getElement("Hydrogen");
99  const GeoElement* O=materialManager->getElement("Oxygen");
100  const GeoElement* N=materialManager->getElement("Nitrogen");
101  GeoMaterial* Rohacell = new GeoMaterial(name="Rohacell", density=0.112*GeoModelKernelUnits::g/Gaudi::Units::cm3);
102  Rohacell->add(C,0.6465);
103  Rohacell->add(H,0.07836);
104  Rohacell->add(O,0.19137);
105  Rohacell->add(N,0.08377);
106  Rohacell->lock();
107 
108  /*
109  a = 12.957*GeoModelKernelUnits::g/Gaudi::Units::mole;
110  density = 0.112*g/cm3;
111  z = 6.18;
112  G4Material* Rohacell = new G4Material(name="Rohacell",z, a, density);
113  */
114 
115  //----------------------------------------------------------------
116  // End of MATERIALS implementation.
117  //----------------------------------------------------------------
118 
119 //----------------------------------------------------------------
120 // Excluder GEOMETRY
121 //----------------------------------------------------------------
122 
123 
124  GeoLogVol* logicEx = nullptr; //pointer to the logical excluder
125  GeoIntrusivePtr<GeoVFullPhysVol> physiEx = nullptr; // return physical volume
126  GeoPcon* fEx;
127 // GeoLogVol* lfEx;
128 // G4VPhysicalVolume* pfEx;
129  GeoPcon* mEx;
130 // GeoLogVol* lmEx;
131 // G4VPhysicalVolume* pmEx;
132  GeoPcon* bEx;
133 // GeoLogVol* lbEx;
134 // G4VPhysicalVolume* pbEx;
135 
136 
137  switch(m_which) {
138  case 0: { // EMEC excluder
139  // DB values
140  double Rmin = 725.*Gaudi::Units::mm;
141  double Rmin_2 = 780.*Gaudi::Units::mm;
142  double Rmax = 980.*Gaudi::Units::mm;
143 
144  double Zall = 626*Gaudi::Units::mm;
145  double Zback = 91*Gaudi::Units::mm;
146  double Zfront = 60*Gaudi::Units::mm;
147 
148  double alpha = 22.5*Gaudi::Units::degree;
149  double beta = 6.375*Gaudi::Units::degree;
150 
151 
152 // double gamma = 8.589*degree;
153  double delta = 2.720*Gaudi::Units::degree;
154 
155 // solidEx = new GeoTubs("MotherEx",Rmin,Rmax,Zall/2.,-(alpha+gamma), 2*(alpha+gamma));
156 // GeoTubs* solidEx = new GeoTubs(Rmin,Rmax,Zall/2.,-(alpha+beta), 2*(alpha+beta));
157 // logicEx = new GeoLogVol(solidEx,LAr, "LArG4TB::EMEC::Excluder");
158 // logicEx->SetVisAttributes(new G4VisAttributes(G4Color(1.,0.,0.)));
159 // logicEx->SetVisAttributes(G4VisAttributes::Invisible);
160 
161  const int zplanes = 2;
162  const double rmin[zplanes] = {Rmin,Rmin};
163  const double rmin_2[zplanes] = {Rmin_2,Rmin_2};
164  const double rmax[zplanes] = {Rmax,Rmax};
165  const double zcoord[2*zplanes] = {-Zall/2., -Zall/2.+Zfront, Zall/2.-Zback, Zall/2.};
166 
167  GeoTrf::Transform3D rot(GeoTrf::Transform3D::Identity());
168 
169  fEx = new GeoPcon(-(alpha-delta),2*(alpha-delta));
170  for(int i=0; i<zplanes; ++i) {
171  fEx->addPlane(zcoord[i],rmin[i],rmax[i]);
172  }
173 // std::string fExName = "LArG4TB::EMEC::Exclude::Front";
174 // lfEx = new GeoLogVol(fEx,Rohacell,fExName);
175 // lfEx->SetVisAttributes(G4VisAttributes::Invisible);
176 // lfEx->SetVisAttributes(new G4VisAttributes(G4Color(1.,0.,0.)));
177 // pfEx = new G4PVPlacement(G4Transform3D(rot,G4ThreeVector()),lfEx,fExName,logicEx,false,1);
178 
179  mEx = new GeoPcon(-(alpha+beta),2*(alpha+beta));
180  for(int i=0; i<zplanes; ++i) {
181  mEx->addPlane(zcoord[i+1],rmin[i],rmax[i]);
182  }
183 // std::string mExName = "LArG4TB::EMEC::Exclude::Middle";
184 // lmEx = new GeoLogVol(mEx,Rohacell,mExName);
185 // lmEx->SetVisAttributes(G4VisAttributes::Invisible);
186 // lmEx->SetVisAttributes(new G4VisAttributes(G4Color(0.,0.,1.)));
187 // pmEx = new G4PVPlacement(G4Transform3D(rot,G4ThreeVector()),lmEx,mExName,logicEx,false,2);
188 
189  bEx = new GeoPcon(-(alpha+beta),2*(alpha+beta));
190  for(int i=0; i<zplanes; ++i) {
191  bEx->addPlane(zcoord[i+2],rmin_2[i],rmax[i]);
192  }
193 // std::string bExName = "LArG4TB::EMEC::Exclude::Back";
194 // lbEx = new GeoLogVol(bEx,Rohacell,bExName);
195 // lbEx->SetVisAttributes(G4VisAttributes::Invisible);
196 // lbEx->SetVisAttributes(new G4VisAttributes(G4Color(0.7,0.,0.5)));
197 // pbEx = new G4PVPlacement(G4Transform3D(rot,G4ThreeVector()),lbEx,bExName,logicEx,false,3);
198  /*
199  G4UnionSolid *usf = new G4UnionSolid("unionSolidf", fEx, mEx, rot, G4ThreeVector());
200  G4UnionSolid *usf1 = new G4UnionSolid("unionSolidf1", usf, bEx, rot, G4ThreeVector());
201  */
202 // const GeoShapeUnion & usf = fEx->add(*((GeoShape*)&((*mEx)<<rot)));
203  const GeoShapeUnion & usf = (*fEx).add(*mEx<<rot);
204  const GeoShapeUnion & usf1 = usf.add(*bEx<<rot);
205  logicEx = new GeoLogVol("LArGeoTB::EMEC::Excluder",&usf1,Rohacell);
206 
207  break;
208  }
209  case 1 : { // FCAL excluder
210 
211  double Rmax = 335.*Gaudi::Units::mm;
212 // double Rmax_1 = 253.*Gaudi::Units::mm;
213  double bepo_Beta = 4.668*Gaudi::Units::degree; // DB !!!
214  double bepo_ty = 90.0*Gaudi::Units::degree; // DB !!
215 
216 // double Zall = (1021.4/2.)*Gaudi::Units::mm;
217  double Zall = (912./2.)*Gaudi::Units::mm;
218 // double Zpara = (168.47/2.)*Gaudi::Units::mm;
219 // double Zpara = (247.87/2.)*Gaudi::Units::mm;
220  double Xall = (171./2.)*Gaudi::Units::mm;
221  double Yall = (300./2.)*Gaudi::Units::mm;
222  double Rmax_1 = Rmax - 2.*Zall*tan(bepo_Beta);
223 
224  GeoPara *pEx = new GeoPara(Zall,Yall,Xall,0*Gaudi::Units::degree,bepo_Beta,0.*Gaudi::Units::degree);
225  GeoCons *tEx = new GeoCons(0.,0.,Rmax,Rmax_1,Zall,0.,M_PI);
226  GeoBox *box = new GeoBox(Yall,Xall,Zall);
227  GeoTrf::RotateX3D Rot(bepo_Beta);
228  GeoTrf::Translation3D trans1(0., sqrt(Rmax_1*Rmax_1 - Yall*Yall) + Xall + Zall*tan(bepo_Beta), 0*Gaudi::Units::mm);
229  GeoTrf::Transform3D offset = trans1 * Rot;
230  const GeoShapeIntersection &is = (*tEx).intersect(*box<<offset);
231 
232  GeoTrf::Transform3D Rot1 = GeoTrf::RotateX3D(bepo_Beta) * GeoTrf::RotateZ3D(bepo_ty) * GeoTrf::RotateY3D(bepo_ty);
233 // G4ThreeVector translation(0., (203.74-168.47/2.)*Gaudi::Units::mm, 0.*Gaudi::Units::mm);
234  GeoTrf::Translation3D translation(0., sqrt(Rmax_1*Rmax_1 - Yall*Yall)-Xall+Zall*tan(bepo_Beta),0.*Gaudi::Units::mm);
235  GeoTrf::Transform3D offset1 = translation * Rot1;
236  const GeoShapeUnion &us = is.add(*pEx<<offset1);
237  std::string bExName = "LArGeoTB::FCAL::Excluder";
238  logicEx = new GeoLogVol(bExName, &us,Rohacell);
239 // logicEx = new GeoLogVol(bExName, &is,Rohacell);
240 
241  break;
242  }
243  case 2 : { // Front excluder
244 
245 
246 // double Rmax = bcry_rlar;
247  double Rmax = 125.5*Gaudi::Units::cm; // DB !!!
248  double bepo_Beta = 4.668*Gaudi::Units::degree; // DB !!!
249 
250  double Zall = (1200./2.)*Gaudi::Units::mm;
251  double angle = 32.*Gaudi::Units::degree;
252 // double Xall = 119.35*Gaudi::Units::cm;
253  double Xall = Rmax*cos(angle/2);
254  double Yall = Rmax*sin(angle/2);
255 
256  GeoTubs *tEx = new GeoTubs(0.,Rmax,Zall,-angle/2.,angle);
257  GeoPara *box = new GeoPara(Xall,Yall,1.1*Zall,0.,-bepo_Beta,0.);
258 
259  GeoTrf::Translate3D offset(0., 0.*Gaudi::Units::mm, 0*Gaudi::Units::mm);
260  const GeoShapeSubtraction &is = (*tEx).subtract((*box)<<(offset));
261 // G4UnionSolid *is = new G4UnionSolid("isEx",tEx,box,Rot,trans1);
262  std::string FrontExName = "LArGeoTB::Front::Excluder";
263  logicEx = new GeoLogVol(FrontExName,&is,Rohacell);
264 
265  break;
266  }
267  case 3 : { // Back excluder
268 
269 // double Rmax = bcry_rlar;
270  double Rmax = 125.5*Gaudi::Units::cm; // DB !!!
271 
272 
273  double Zall = (1600./2.)*Gaudi::Units::mm;
274  double angle = 58.*Gaudi::Units::degree;
275  double Xall = Rmax*cos(angle/2.);
276  double Yall = Rmax*sin(angle/2.);
277 
278  GeoTubs *tEx = new GeoTubs(0.,Rmax,Zall,0.,angle);
279  GeoBox *box = new GeoBox(Xall,Yall,1.1*Zall);
280  GeoTrf::RotateZ3D Rot(angle/2.);
282  GeoTrf::Transform3D offset = trans1 * Rot;
283  const GeoShapeSubtraction &is = (*tEx).subtract((*box)<<(offset));
284  std::string BackExName = "LArGeoTB::Back::Excluder";
285  logicEx = new GeoLogVol(BackExName,&is,Rohacell);
286 
287  break;
288  }
289  }
290 
291 
292  physiEx = new GeoFullPhysVol(logicEx);
293 
294  return physiEx;
295 
296 }

Member Data Documentation

◆ m_which

int LArGeo::ExcluderConstructionH62004::m_which
private

Definition at line 22 of file ExcluderConstructionH62004.h.


The documentation for this class was generated from the following files:
LAr
Definition: LArVolumeBuilder.h:36
DMTest::C
C_v1 C
Definition: C.h:26
StoredMaterialManager::getElement
virtual const GeoElement * getElement(const std::string &name)=0
cm3
#define cm3
M_PI
#define M_PI
Definition: ActiveFraction.h:11
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
StoreGateSvc::retrieve
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
lwtDev::Component::O
@ O
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
H
#define H(x, y, z)
Definition: MD5.cxx:114
lumiFormat.i
int i
Definition: lumiFormat.py:92
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
angle
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
Definition: TRTDetectorFactory_Full.cxx:73
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
LArGeo::ExcluderConstructionH62004::m_which
int m_which
Definition: ExcluderConstructionH62004.h:22
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
python.Utils.unixtools.which
def which(filename, env=os.environ)
UNIX-style which ---------------------------------------------------------—.
Definition: unixtools.py:39
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
StoredMaterialManager::getMaterial
virtual const GeoMaterial * getMaterial(const std::string &name)=0
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
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
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
MuonParameters::beta
@ beta
Definition: MuonParamDefs.h:144
python.SystemOfUnits.degree
tuple degree
Definition: SystemOfUnits.py:106