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

#include <TableConstructionH62002.h>

Collaboration diagram for LArGeo::TableConstructionH62002:

Public Member Functions

 TableConstructionH62002 ()
 
virtual ~TableConstructionH62002 ()
 
virtual PVLink GetEnvelope ()
 
void SetManager (LArDetDescrManager *)
 

Private Attributes

GeoPhysVol * m_H62002TablePhysical
 

Detailed Description

Definition at line 19 of file TableConstructionH62002.h.

Constructor & Destructor Documentation

◆ TableConstructionH62002()

LArGeo::TableConstructionH62002::TableConstructionH62002 ( )

Definition at line 47 of file TableConstructionH62002.cxx.

48  : m_H62002TablePhysical(nullptr)
49 {
50 }

◆ ~TableConstructionH62002()

LArGeo::TableConstructionH62002::~TableConstructionH62002 ( )
virtualdefault

Member Function Documentation

◆ GetEnvelope()

PVLink LArGeo::TableConstructionH62002::GetEnvelope ( )
virtual

Definition at line 58 of file TableConstructionH62002.cxx.

59 {
60 
62 
63 
64  ISvcLocator *svcLocator = Gaudi::svcLocator();
65  IMessageSvc * msgSvc;
66  if (svcLocator->service("MessageSvc", msgSvc, true )==StatusCode::FAILURE) {
67  throw std::runtime_error("Error in TableConstructionH62002, cannot access MessageSvc");
68  }
69 
70  MsgStream log(msgSvc, "LArGeo::TableConstructionH62002");
71  log << MSG::INFO;
72  log << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
73  log << "+ +" << std::endl;
74  log << "+ HELLO from LArGeo::TableConstructionH62002 +" << std::endl;
75  log << "+ +" << std::endl;
76  log << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
77 
78 
80  if (svcLocator->service("DetectorStore", detStore, false )==StatusCode::FAILURE) {
81  throw std::runtime_error("Error in TableConstructionH62002, cannot access DetectorStore");
82  }
83 
84  ServiceHandle<IGeoDbTagSvc> geoDbTagSvc ("GeoDbTagSvc", "WallsConstruction");
85  if (geoDbTagSvc.retrieve().isFailure()) {
86  throw std::runtime_error ("Cannot locate GeoDbTagSvc!!");
87  }
88 
89  // Get the materials from the material manager:-----------------------------------------------------//
90  // //
91  StoredMaterialManager* materialManager = nullptr;
92  if (StatusCode::SUCCESS != detStore->retrieve(materialManager, std::string("MATERIALS"))) return nullptr;
93 
94  const GeoMaterial *Air = materialManager->getMaterial("std::Air");
95  if (!Air) throw std::runtime_error("Error in TableConstructionH62002, std::Air is not found.");
96 
97  const GeoMaterial *Aluminium = materialManager->getMaterial("std::Aluminium");
98  if (!Aluminium) throw std::runtime_error("Error in TableConstructionH62002, std::Aluminium is not found.");
99 
100  // Is this ok for the Scintillator?
101  // I don't really know for sure what kind of a scintillator we have.
102  // Lots of Scintillators are PMMA (Plexiglas), which has a composition of C5 H8 O2 and density 1.18 g/cm3
103  // The Tile uses a composition of C H (density 1.032)
104  // The old testbeam code uses a composition of C9 H10 (density 1.032)
105  // ... because it's easiest at the moment and not all that different from the fractional
106  // composition of the old tb code, take the Tile material (polysterene)...
107  const GeoMaterial *Scint = materialManager->getMaterial("std::Polystyrene");
108  if (!Scint) throw std::runtime_error("Error in TableConstructionH62002, std::Polystyrene is not found.");
109 
110  const GeoMaterial *Mylar = materialManager->getMaterial("std::Mylar");
111  if (!Mylar) throw std::runtime_error("Error in TableConstructionH62002, std::Mylar is not found.");
112 
113 
114  // //
115  //-------------------------------------------------------------------------------------------------//
116 
117  std::string AtlasVersion = geoDbTagSvc->atlasVersion();
118  std::string LArVersion = geoDbTagSvc->LAr_VersionOverride();
119 
120  std::string detectorKey = LArVersion.empty() ? AtlasVersion : LArVersion;
121  std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr";
122 
123 
125  // Define geometry
127 
128 
129  // Here we creat the envelope for the Moveable Table Instrumentation. This code is repeated
130  // createEnvelope() method below. There should be a way to avoid this repitition.
131 
132  //------ The Table
133 
134  std::string baseName = "LAr::TBH62002";
135  std::string H62002TableName = baseName + "::Table";
136 
137  const double H62002TableXY = 150.*Gaudi::Units::mm;
138  const double H62002TableZ = 1200.*Gaudi::Units::mm;
139 
140 
141  GeoBox* H62002TableShape = new GeoBox( H62002TableXY, H62002TableXY, H62002TableZ );
142  const GeoLogVol* H62002TableLogical = new GeoLogVol( H62002TableName, H62002TableShape, Air );
143 
144  m_H62002TablePhysical = new GeoPhysVol(H62002TableLogical);
145  //m_H62002TablePhysical->add( new GeoNameTag("LArTBTablePos") );
146 
147 
148 
149 
150 
151  //------ F1/F2Scintillators
152  log << "Create F1/F2 Scintillators ..." << std::endl;
153 
154  // Universal size:
155  const double Fx = 10.0*Gaudi::Units::mm;
156  const double Fy = 10.0*Gaudi::Units::mm;
157  const double Fz = 10.0*Gaudi::Units::mm;
158 
159  std::vector<double> v_ScintZ;
160  v_ScintZ.push_back(2195.*Gaudi::Units::mm); // <-- = btas_pos
161  v_ScintZ.push_back(2320.*Gaudi::Units::mm);
162  const double ScintDx = Fx;
163  const double ScintDy = Fy;
164  const double ScintDz = Fz;
165 
166  // Create one Scintillator and place it twice along z:
167 
168  GeoBox* ScintShape = new GeoBox(ScintDx, ScintDy, ScintDz); // A generic Box Scintillator
169  std::string ScintName = baseName + "::Scintillator";
170  GeoLogVol* ScintLogical = new GeoLogVol( ScintName, ScintShape, Scint );
171  GeoIntrusivePtr<GeoPhysVol> ScintPhysical = new GeoPhysVol( ScintLogical );
172  for ( unsigned int i = 0; i < v_ScintZ.size(); i++ ) {
173  m_H62002TablePhysical->add( new GeoIdentifierTag(i) );
174  m_H62002TablePhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*Gaudi::Units::cm, 0.*Gaudi::Units::cm, (v_ScintZ[ i ]-H62002TableZ) ) ) );
175  log << MSG::INFO << " Position the F Scintillator at: " << v_ScintZ[ i ] << endmsg ;
176  m_H62002TablePhysical->add( ScintPhysical );
177  }
178 
179  //----- Done with F1/F2 Scintillators
180 
181 
182 
183 
184 
185 
186  //------ Get the MWPCs from LArGeoH6Cryostats
187  const int MwpcNumber = 3;
188  std::vector<double> v_MwpcPos;
189  v_MwpcPos.push_back(105.*Gaudi::Units::mm);
190  v_MwpcPos.push_back(825.*Gaudi::Units::mm);
191  v_MwpcPos.push_back(1815.*Gaudi::Units::mm);
192  double WireStep = 1.*Gaudi::Units::mm;
193  MWPCConstruction mwpcXConstruction (WireStep);
194  PVLink mwpcEnvelope = mwpcXConstruction.GetEnvelope();
195  for ( int imwpc = 0; imwpc<MwpcNumber ; imwpc++)
196  {
197  m_H62002TablePhysical->add(new GeoIdentifierTag(imwpc+2));
198  m_H62002TablePhysical->add( new GeoTransform(GeoTrf::Translate3D( 0.*Gaudi::Units::cm, 0.*Gaudi::Units::cm, (v_MwpcPos[imwpc]-H62002TableZ) ) ) );
199  m_H62002TablePhysical->add(mwpcEnvelope);
200  }
201  //------ Done with creating an MWPC from LArGeoH6Cryostats
202 
203 
204 
205  // End Moveable Table detectors
206 
207 
208  return m_H62002TablePhysical;
209 }

◆ SetManager()

void LArGeo::TableConstructionH62002::SetManager ( LArDetDescrManager *  )
inline

Definition at line 28 of file TableConstructionH62002.h.

28 {}

Member Data Documentation

◆ m_H62002TablePhysical

GeoPhysVol* LArGeo::TableConstructionH62002::m_H62002TablePhysical
private

Definition at line 32 of file TableConstructionH62002.h.


The documentation for this class was generated from the following files:
LArGeo::Fx
GeoGenfun::FunctionNoop Fx(double r, GeoGenfun::GENFUNCTION G, const double Cenx[], const double Ceny[])
Definition: BarrelAuxFunctions.cxx:16
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
EventInfoWrite.AtlasVersion
AtlasVersion
Definition: EventInfoWrite.py:17
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
lumiFormat.i
int i
Definition: lumiFormat.py:92
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
LArGeo::TableConstructionH62002::m_H62002TablePhysical
GeoPhysVol * m_H62002TablePhysical
Definition: TableConstructionH62002.h:32
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
LArGeo::Fy
GeoGenfun::FunctionNoop Fy(double r, GeoGenfun::GENFUNCTION G, const double Cenx[], const double Ceny[])
Definition: BarrelAuxFunctions.cxx:25
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
ServiceHandle< IGeoDbTagSvc >