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

#include <FrontBeamConstructionH62004.h>

Collaboration diagram for LArGeo::FrontBeamConstructionH62004:

Public Member Functions

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

Private Attributes

GeoPhysVol * m_H62004FrontBeamPhysical
 
LArDetDescrManager * m_detectorManager
 

Detailed Description

Definition at line 18 of file FrontBeamConstructionH62004.h.

Constructor & Destructor Documentation

◆ FrontBeamConstructionH62004()

LArGeo::FrontBeamConstructionH62004::FrontBeamConstructionH62004 ( )

Definition at line 47 of file FrontBeamConstructionH62004.cxx.

48  :m_H62004FrontBeamPhysical(nullptr),
49  m_detectorManager(nullptr)
50 {
51 }

◆ ~FrontBeamConstructionH62004()

LArGeo::FrontBeamConstructionH62004::~FrontBeamConstructionH62004 ( )
virtualdefault

Member Function Documentation

◆ GetEnvelope()

PVLink LArGeo::FrontBeamConstructionH62004::GetEnvelope ( )
virtual

Definition at line 59 of file FrontBeamConstructionH62004.cxx.

60 {
61 
63 
64  // Get access to the material manager:
65 
66  StatusCode sc;
67  ISvcLocator *svcLocator = Gaudi::svcLocator();
68  IMessageSvc * msgSvc;
69  sc=svcLocator->service("MessageSvc", msgSvc, true );
70  if (sc==StatusCode::FAILURE) {
71  throw std::runtime_error("Error in FrontBeamConstructionH62004, cannot access MessageSvc");
72  }
73 
74  MsgStream log(msgSvc, "LArGeo::FrontBeamConstructionH62004");
75  log << MSG::INFO << "+ HELLO from LArGeo::FrontBeamConstructionH62004 +" << endmsg;
76 
77 
79  sc=svcLocator->service("DetectorStore", detStore, false );
80  if (sc==StatusCode::FAILURE) {
81  throw std::runtime_error("Error in FrontBeamConstructionH62004, 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 FrontBeamConstructionH62004, 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 FrontBeamConstructionH62004, 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  //------ The FrontBeam
116 
117  std::string baseName = "LAr::TBH62004";
118  std::string H62004FrontBeamName = baseName + "::FrontBeam";
119 
120  //
121  // Define dimension of Front part & position of Front part
122  //
123  // DB ?
124  const double bard_x = 20.0*Gaudi::Units::cm;
125  const double bard_y = 20.0*Gaudi::Units::cm;
126  //const double bard_z = 35.0*Gaudi::Units::cm;
127  const double bard_z = 100.0*Gaudi::Units::cm;
128  const double fbpc_z[2] = {60.4*Gaudi::Units::cm,112.7*Gaudi::Units::cm};
129  // Position in exp_hall
130  //const double z_bard=-2160.0*Gaudi::Units::cm+80.1*Gaudi::Units::cm+16.*Gaudi::Units::cm+bard_z;
131  //const double z_bardm=-2160.0*Gaudi::Units::cm+1362.3*Gaudi::Units::cm;
132 
133 
134 
135  GeoBox* H62004FrontBeamShape = new GeoBox( bard_x, bard_y, bard_z );
136  const GeoLogVol* H62004FrontBeamLogical = new GeoLogVol( H62004FrontBeamName, H62004FrontBeamShape, Air );
137 
138  m_H62004FrontBeamPhysical = new GeoPhysVol(H62004FrontBeamLogical);
139  //m_H62004FrontBeamPhysical->add( new GeoNameTag("LArTBFrontBeamPos") );
140 
141  //------ W1,W2,B1 Scintillators
142  // In the old stand-alone code, all three were round with a radius of 5cm
143  // and 7.5mm thickness.
144  // Logbooks in the control-room say that their xyz sizes are:
145  // B1 : 30 x 30 x 10 Gaudi::Units::mm
146  // W1,2 : 150 x 150 x 10 Gaudi::Units::mm
147  // They are certainly not round, so stick with the logbook values
148  // The beam sees the instrumentation in the following order:
149  // W1, W2, B1, MWPC5
150 
151  log << MSG::INFO << "Create Front Scintillators ..." << endmsg;
152 
153  const double Wxy= 75.0*Gaudi::Units::mm;
154  const double Wz = 5.0*Gaudi::Units::mm;
155  const double Bxy= 15.0*Gaudi::Units::mm;
156  const double Bz = 5.0*Gaudi::Units::mm;
157 
158  std::vector<double> v_ScintXY;
159  std::vector<double> v_ScintZ;
160  v_ScintXY.push_back(Wxy);
161  v_ScintXY.push_back(Wxy);
162  v_ScintXY.push_back(Bxy);
163  v_ScintZ.push_back(10.*Gaudi::Units::mm);
164  v_ScintZ.push_back(40.*Gaudi::Units::mm);
165  v_ScintZ.push_back(180.*Gaudi::Units::mm);
166 
167  // Create one Scintillator and place it twice along z:
168 
169  GeoBox* ScintShapeW = new GeoBox(Wxy, Wxy, Wz);
170  GeoBox* ScintShapeB = new GeoBox(Bxy, Bxy, Bz);
171  std::string ScintName = H62004FrontBeamName + "::Scintillator";
172  GeoLogVol* WScintLogical = new GeoLogVol( ScintName, ScintShapeW, Scint );
173  GeoLogVol* BScintLogical = new GeoLogVol( ScintName, ScintShapeB, Scint );
174  GeoIntrusivePtr<GeoPhysVol> WScintPhysical = new GeoPhysVol( WScintLogical );
175  GeoIntrusivePtr<GeoPhysVol> BScintPhysical = new GeoPhysVol( BScintLogical );
176  //WScintPhysical->add( new GeoNameTag(ScintName) );
177  //BScintPhysical->add( new GeoNameTag(ScintName) );
178  for ( unsigned int i = 0; i < v_ScintZ.size(); i++ ) {
179  m_H62004FrontBeamPhysical->add( new GeoIdentifierTag(i+1) );
180  m_H62004FrontBeamPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*Gaudi::Units::cm, 0.*Gaudi::Units::cm, (v_ScintZ[ i ]-bard_z) ) ) ) ; m_H62004FrontBeamPhysical->add( new GeoNameTag(ScintName) );
181 
182  switch(i) {
183  case 0: case 1: { m_H62004FrontBeamPhysical->add( WScintPhysical ); break; }
184  case 2: { m_H62004FrontBeamPhysical->add( BScintPhysical ); break; }
185  default: { throw std::runtime_error("H62004FrontBeam wants too many Scintillators!!"); break; }
186  }
187  }
188 
189  //----- Done with Scintillators
190 
191 
192 
193  //------ Now create MWPC5
194  log << MSG::INFO << " Create MWPC5 " << endmsg;
195 
196  MWPCConstruction MWPC5 (2.*Gaudi::Units::mm);
197  PVLink MwpcPhysical = MWPC5.GetEnvelope();
198 
199  const double MwpcPos = 445.*Gaudi::Units::mm;
200 
201  m_H62004FrontBeamPhysical->add( new GeoIdentifierTag(5) );
202  m_H62004FrontBeamPhysical->add( new GeoTransform(GeoTrf::Translate3D( 0.*Gaudi::Units::cm, 0.*Gaudi::Units::cm, (MwpcPos-bard_z) ) ) );
203  m_H62004FrontBeamPhysical->add( MwpcPhysical );
204 
205  //----- Done with the MWPC
206 
207  //----- Now create BPC
208  log << MSG::INFO << " Create BPC 1&2 " << endmsg;
209 
210  BPCConstruction BPC (false);
211  PVLink BPCPhysical = BPC.GetEnvelope();
212  for(int i=1; i<3; ++i) {
213  m_H62004FrontBeamPhysical->add( new GeoIdentifierTag(i) );
214  m_H62004FrontBeamPhysical->add( new GeoTransform(GeoTrf::Translate3D( 0.*Gaudi::Units::cm, 0.*Gaudi::Units::cm, (MwpcPos-bard_z) + fbpc_z[i-1]) ) );
215  m_H62004FrontBeamPhysical->add(BPCPhysical);
216  }
217 
218  // End Moveable FrontBeam detectors
219 
220 
222 }

◆ SetManager()

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

Definition at line 27 of file FrontBeamConstructionH62004.h.

Member Data Documentation

◆ m_detectorManager

LArDetDescrManager* LArGeo::FrontBeamConstructionH62004::m_detectorManager
private

Definition at line 36 of file FrontBeamConstructionH62004.h.

◆ m_H62004FrontBeamPhysical

GeoPhysVol* LArGeo::FrontBeamConstructionH62004::m_H62004FrontBeamPhysical
private

Definition at line 34 of file FrontBeamConstructionH62004.h.


The documentation for this class was generated from the following files:
LArGeo::FrontBeamConstructionH62004::m_H62004FrontBeamPhysical
GeoPhysVol * m_H62004FrontBeamPhysical
Definition: FrontBeamConstructionH62004.h:34
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
LArGeo::FrontBeamConstructionH62004::m_detectorManager
LArDetDescrManager * m_detectorManager
Definition: FrontBeamConstructionH62004.h:36
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
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