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

#include <MovableTableConstructionH62004.h>

Collaboration diagram for LArGeo::MovableTableConstructionH62004:

Public Member Functions

 MovableTableConstructionH62004 ()
 
virtual ~MovableTableConstructionH62004 ()
 
virtual PVLink GetEnvelope ()
 
void SetManager (LArDetDescrManager *mgr)
 

Private Attributes

GeoPhysVol * m_H62004MovableTablePhysical
 
LArDetDescrManager * m_detectorManager
 

Detailed Description

Definition at line 18 of file MovableTableConstructionH62004.h.

Constructor & Destructor Documentation

◆ MovableTableConstructionH62004()

LArGeo::MovableTableConstructionH62004::MovableTableConstructionH62004 ( )

Definition at line 47 of file MovableTableConstructionH62004.cxx.

49  m_detectorManager(nullptr)
50 {
51 }

◆ ~MovableTableConstructionH62004()

LArGeo::MovableTableConstructionH62004::~MovableTableConstructionH62004 ( )
virtualdefault

Member Function Documentation

◆ GetEnvelope()

PVLink LArGeo::MovableTableConstructionH62004::GetEnvelope ( )
virtual

Definition at line 59 of file MovableTableConstructionH62004.cxx.

60 {
61 
63 
64  // Get access to the material manager:
65 
66  ISvcLocator *svcLocator = Gaudi::svcLocator();
67  StatusCode sc;
68  IMessageSvc * msgSvc;
69  sc = svcLocator->service("MessageSvc", msgSvc, true );
70  if (sc==StatusCode::FAILURE) {
71  throw std::runtime_error("Error in MovableTableConstructionH62004, cannot access MessageSvc");
72  }
73 
74  MsgStream log(msgSvc, "LArGeo::MovableTableConstructionH62004");
75  log << MSG::INFO << "+ HELLO from LArGeo::MovableTableConstructionH62004 +" << endmsg;
76 
77 
79  sc=svcLocator->service("DetectorStore", detStore, false );
80  if (sc==StatusCode::FAILURE) {
81  throw std::runtime_error("Error in MovableTableConstructionH62004, cannot access DetectorStore");
82  }
83 
84 
85 
86  // Get the materials from the material manager:-----------------------------------------------------//
87  // //
88 
89  StoredMaterialManager* materialManager = nullptr;
90  sc=detStore->retrieve(materialManager, std::string("MATERIALS"));
91  if (StatusCode::SUCCESS != sc) return nullptr;
92 
93  const GeoMaterial *Air = materialManager->getMaterial("std::Air");
94  if (!Air) throw std::runtime_error("Error in MovableTableConstructionH62004, std::Air is not found.");
95 
96  // Is this ok for the Scintillator?
97  // I don't really know for sure what kind of a scintillator we have.
98  // Lots of Scintillators are PMMA (Plexiglas), which has a composition of C5 H8 O2 and density 1.18 g/cm3
99  // The Tile uses a composition of C H (density 1.032)
100  // The old FrontBeam testbeam code uses a composition of C9 H10 (density 1.032)
101  // ... because it's easiest at the moment and not all that different from the fractional
102  // composition of the old tb code, take the Tile material (polysterene)...
103  const GeoMaterial *Scint = materialManager->getMaterial("std::Polystyrene");
104  if (!Scint) throw std::runtime_error("Error in MovableTableConstructionH62004, std::Polystyrene is not found.");
105 
106  //-------------------------------------------------------------------------------------------------//
108  // Define geometry
110 
111 
112  // Here we creat the envelope for the Moveable FrontBeam Instrumentation. This code is repeated
113  // createEnvelope() method below. There should be a way to avoid this repitition.
114 
115 
116  std::string baseName = "LAr::TBH62004";
117  std::string H62004MovableName = baseName + "::MovableTable";
118 
119  //
120  // Define dimension of Movable part & position of Front part
121  //
122  double bttb_x = 15.0*Gaudi::Units::cm;
123  double bttb_y = 15.0*Gaudi::Units::cm;
124  double bttb_z = 120.0*Gaudi::Units::cm;
125  //double bttb_pos = 833.5*Gaudi::Units::cm;
126  //
127  // Define S scintilator dimension and positions
128  //
129  double btas_x = 7.5*Gaudi::Units::cm;
130  double btas_y = 7.5*Gaudi::Units::cm;
131  double btas_z = 1.0*Gaudi::Units::cm;
132  double bb2_x = 3.0*Gaudi::Units::cm;
133  double btas_pos[3] = {100.*Gaudi::Units::cm, 219.5*Gaudi::Units::cm, 232.0*Gaudi::Units::cm};
134  double bh_x = 30.0*Gaudi::Units::cm;
135  double bh_d = 6.0*Gaudi::Units::cm;
136  double bh_shift = 12.0*Gaudi::Units::cm;
137  double bb_shift = 2.5*Gaudi::Units::cm;
138 
139  double mwpc_pos[4] = {44.5*Gaudi::Units::cm, 12.5*Gaudi::Units::cm, 87.0*Gaudi::Units::cm, 185.3*Gaudi::Units::cm};
140  double bpc_pos[2] = {140.5*Gaudi::Units::cm, 130.5*Gaudi::Units::cm};
141 
142  GeoBox* H62004MovableShape = new GeoBox( bttb_x, bttb_y, bttb_z );
143  const GeoLogVol* H62004FrontBeamLogical = new GeoLogVol( H62004MovableName, H62004MovableShape, Air );
144 
145  m_H62004MovableTablePhysical = new GeoPhysVol(H62004FrontBeamLogical);
146  //m_H62004MovableTablePhysical->add( new GeoNameTag("LArTBFrontBeamPos") );
147 
148  //------ W1,W2,B1 Scintillators
149  // In the old stand-alone code, all three were round with a radius of 5cm
150  // and 7.5mm thickness.
151  // Logbooks in the control-room say that their xyz sizes are:
152  // B1 : 30 x 30 x 10 Gaudi::Units::mm
153  // W1,2 : 150 x 150 x 10 Gaudi::Units::mm
154  // They are certainly not round, so stick with the logbook values
155  // The beam sees the instrumentation in the following order:
156  // W1, W2, B1, MWPC5
157 
158  log << MSG::INFO << "Create Movable Scintillators ..." << endmsg;
159 
160  // Create scintillator S1(num=4),S2,S3(num= 6,7)
161 
162  GeoBox* ScintShapeS1 = new GeoBox((btas_x-1.*Gaudi::Units::cm)/2., (btas_y-1.*Gaudi::Units::cm)/2., btas_z/2.);
163  GeoBox* ScintShapeS23 = new GeoBox(btas_x/2., btas_y/2., btas_z/2.);
164  std::string ScintName = H62004MovableName + "::Scintillator";
165  GeoLogVol* S1ScintLogical = new GeoLogVol( ScintName, ScintShapeS1, Scint );
166  GeoLogVol* S23ScintLogical = new GeoLogVol( ScintName, ScintShapeS23, Scint );
167  GeoIntrusivePtr<GeoPhysVol> S1ScintPhysical = new GeoPhysVol( S1ScintLogical );
168  GeoIntrusivePtr<GeoPhysVol> S2ScintPhysical = new GeoPhysVol( S23ScintLogical );
169 
170  m_H62004MovableTablePhysical->add( new GeoIdentifierTag(4) );
171  m_H62004MovableTablePhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*Gaudi::Units::cm, 0.*Gaudi::Units::cm, btas_pos[0]-bttb_z ) ) ) ;
172  m_H62004MovableTablePhysical->add(S1ScintPhysical);
173  for ( unsigned int i = 1; i <3; ++i ) {
174  m_H62004MovableTablePhysical->add( new GeoIdentifierTag(i+5) );
175  m_H62004MovableTablePhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*Gaudi::Units::cm, 0.*Gaudi::Units::cm, btas_pos[i]-bttb_z ) ) ) ;
176  m_H62004MovableTablePhysical->add( S2ScintPhysical );
177  }
178  // Create scintilators H (copy num 5) and B2 (copy num 8)
179  GeoBox* boxH = new GeoBox(bh_x/2., bh_x/2., btas_z/2.);
180  GeoTubs* tubH = new GeoTubs(0., bh_d/2., btas_z/2., 0., 2*M_PI);
181  const GeoShapeSubtraction &shapeHSc = (*boxH).subtract(*tubH);
182  GeoLogVol* logHSc = new GeoLogVol( ScintName, &shapeHSc, Scint);
183  GeoIntrusivePtr<GeoPhysVol> physHSc = new GeoPhysVol(logHSc);
184  m_H62004MovableTablePhysical->add( new GeoIdentifierTag(5) );
185  m_H62004MovableTablePhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*Gaudi::Units::cm, 0.*Gaudi::Units::cm, (btas_pos[0]-bttb_z) + bh_shift) ) ) ;
186  m_H62004MovableTablePhysical->add(physHSc);
187 
188  GeoBox* boxB = new GeoBox(bb2_x/2., bb2_x/2., (btas_z+2.5*Gaudi::Units::cm)/2.);
189  GeoLogVol* logBSc = new GeoLogVol( ScintName, boxB, Scint);
190  GeoIntrusivePtr<GeoPhysVol> physBSc = new GeoPhysVol(logBSc);
191  m_H62004MovableTablePhysical->add( new GeoIdentifierTag(8) );
192  m_H62004MovableTablePhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*Gaudi::Units::cm, 0.*Gaudi::Units::cm, (btas_pos[2]-bttb_z) + bb_shift ) ) ) ;
193  m_H62004MovableTablePhysical->add(physBSc);
194 
195  //----- Done with Scintillators
196 
197  //------ Now create MWPC N2 & N3 & N4
198  log << MSG::INFO << " Create MWPC's " << endmsg;
199 
200  MWPCConstruction MWPC(1.*Gaudi::Units::mm);
201  PVLink MwpcPhysical = MWPC.GetEnvelope();
202 
203  for(int i = 1; i < 4; ++i){
204  m_H62004MovableTablePhysical->add( new GeoIdentifierTag(i+1) );
205  m_H62004MovableTablePhysical->add( new GeoTransform(GeoTrf::Translate3D( 0.*Gaudi::Units::cm, 0.*Gaudi::Units::cm, mwpc_pos[i]-bttb_z ) ) );
206  m_H62004MovableTablePhysical->add( MwpcPhysical );
207  }
208  //----- Done with the MWPC
209 
210  //----- Now create BPC
211  log << MSG::INFO << " Create BPC 5&6 " << endmsg;
212 
213  BPCConstruction BPC(false);
214  PVLink BPCPhysical = BPC.GetEnvelope();
215  for(int i=1; i<3; ++i) {
216  m_H62004MovableTablePhysical->add( new GeoIdentifierTag(7-i) );
217  m_H62004MovableTablePhysical->add( new GeoTransform(GeoTrf::Translate3D( 0.*Gaudi::Units::cm, 0.*Gaudi::Units::cm, bpc_pos[i-1]-bttb_z) ) );
218  m_H62004MovableTablePhysical->add(BPCPhysical);
219  }
220 
221  // End Moveable FrontBeam detectors
222 
223 
225 }

◆ SetManager()

void LArGeo::MovableTableConstructionH62004::SetManager ( LArDetDescrManager *  mgr)
inline

Definition at line 27 of file MovableTableConstructionH62004.h.

Member Data Documentation

◆ m_detectorManager

LArDetDescrManager* LArGeo::MovableTableConstructionH62004::m_detectorManager
private

Definition at line 36 of file MovableTableConstructionH62004.h.

◆ m_H62004MovableTablePhysical

GeoPhysVol* LArGeo::MovableTableConstructionH62004::m_H62004MovableTablePhysical
private

Definition at line 34 of file MovableTableConstructionH62004.h.


The documentation for this class was generated from the following files:
LArGeo::MovableTableConstructionH62004::m_detectorManager
LArDetDescrManager * m_detectorManager
Definition: MovableTableConstructionH62004.h:36
M_PI
#define M_PI
Definition: ActiveFraction.h:11
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
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
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
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
LArGeo::MovableTableConstructionH62004::m_H62004MovableTablePhysical
GeoPhysVol * m_H62004MovableTablePhysical
Definition: MovableTableConstructionH62004.h:34
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