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

#include <MiddleBeamConstructionH62004.h>

Collaboration diagram for LArGeo::MiddleBeamConstructionH62004:

Public Member Functions

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

Private Attributes

GeoPhysVol * m_H62004MiddleBeamPhysical
 
LArDetDescrManager * m_detectorManager
 

Detailed Description

Definition at line 18 of file MiddleBeamConstructionH62004.h.

Constructor & Destructor Documentation

◆ MiddleBeamConstructionH62004()

LArGeo::MiddleBeamConstructionH62004::MiddleBeamConstructionH62004 ( )

Definition at line 47 of file MiddleBeamConstructionH62004.cxx.

49  m_detectorManager(nullptr)
50 {
51 }

◆ ~MiddleBeamConstructionH62004()

LArGeo::MiddleBeamConstructionH62004::~MiddleBeamConstructionH62004 ( )
virtualdefault

Member Function Documentation

◆ GetEnvelope()

PVLink LArGeo::MiddleBeamConstructionH62004::GetEnvelope ( )
virtual

Definition at line 59 of file MiddleBeamConstructionH62004.cxx.

60 {
61 
63 
64  // Get access to the material manager:
65 
66  ISvcLocator *svcLocator = Gaudi::svcLocator();
67  IMessageSvc * msgSvc;
68  if (svcLocator->service("MessageSvc", msgSvc, true )==StatusCode::FAILURE) {
69  throw std::runtime_error("Error in MiddleBeamConstructionH62004, cannot access MessageSvc");
70  }
71 
72  MsgStream log(msgSvc, "LArGeo::MiddleBeamConstructionH62004");
73  log << MSG::INFO << "+ HELLO from LArGeo::MiddleBeamConstructionH62004 +" << endmsg;
74 
75 
77  if (svcLocator->service("DetectorStore", detStore, false )==StatusCode::FAILURE) {
78  throw std::runtime_error("Error in MiddleBeamConstructionH62004, cannot access DetectorStore");
79  }
80 
81  // Get the materials from the material manager:-----------------------------------------------------//
82  // //
83 
84  StoredMaterialManager* materialManager = nullptr;
85  if (StatusCode::SUCCESS != detStore->retrieve(materialManager, std::string("MATERIALS"))) return nullptr;
86 
87  const GeoMaterial *Air = materialManager->getMaterial("std::Air");
88  if (!Air) throw std::runtime_error("Error in MiddleBeamConstructionH62004, std::Air is not found.");
89 
90  //-------------------------------------------------------------------------------------------------//
91 
92 
93  DecodeVersionKey larVersion("LAr");
94 
95 
97  // Define geometry
99 
100 
101  // Here we creat the envelope for the Moveable FrontBeam Instrumentation. This code is repeated
102  // createEnvelope() method below. There should be a way to avoid this repitition.
103 
104  //------ The FrontBeam
105 
106  std::string baseName = "LAr::TBH62004";
107  std::string H62004MiddleBeamName = baseName + "::MiddleBeam";
108 
109  //
110  // Define dimension of Middle part & position of Front part
111  //
112  double bmtb_x = 12.0*Gaudi::Units::cm;
113  double bmtb_y = 12.0*Gaudi::Units::cm;
114  double bmtb_z = 25.0*Gaudi::Units::cm;
115  //double bmtb_pos = 10.0*Gaudi::Units::cm;
116  double bpco_pos[4] = {1.*Gaudi::Units::cm, 1.*Gaudi::Units::cm, 15.3*Gaudi::Units::cm, 15.3*Gaudi::Units::cm};
117  double bpco_shift[4] = {0.*Gaudi::Units::cm, 7.8*Gaudi::Units::cm, 0.*Gaudi::Units::cm, 7.5*Gaudi::Units::cm};
118  double bpc_old_z = (5.100/2)*Gaudi::Units::cm;
119 
120  GeoBox* H62004MiddleBeamShape = new GeoBox( bmtb_x, bmtb_y, bmtb_z );
121  const GeoLogVol* H62004MiddleBeamLogical = new GeoLogVol( H62004MiddleBeamName, H62004MiddleBeamShape, Air );
122 
123  m_H62004MiddleBeamPhysical = new GeoPhysVol(H62004MiddleBeamLogical);
124 
125 
126  //----- Now create BPC
127  log << MSG::INFO << " Create BPC 1&2 " << endmsg;
128 
129  BPCConstruction *BPC = new BPCConstruction(true);
130  PVLink BPCPhysical = BPC->GetEnvelope();
131  for(int i=0; i<4; ++i) {
132  m_H62004MiddleBeamPhysical->add( new GeoIdentifierTag((3+i/2)*10+i) );
133  switch(i) {
134  case 0: case 2: {
135  m_H62004MiddleBeamPhysical->add( new GeoTransform(GeoTrf::Translate3D( 0.*Gaudi::Units::cm, 0.*Gaudi::Units::cm, bpco_pos[i]+bpco_shift[i]+bpc_old_z-bmtb_z) ) );
136  m_H62004MiddleBeamPhysical->add(BPCPhysical);
137  break;}
138  case 1: case 3: {
139  m_H62004MiddleBeamPhysical->add( new GeoTransform(GeoTrf::RotateZ3D(90.*Gaudi::Units::deg) * GeoTrf::Translate3D( 0.*Gaudi::Units::cm, 0.*Gaudi::Units::cm, bpco_pos[i]+bpco_shift[i]+bpc_old_z-bmtb_z) ) );
140  m_H62004MiddleBeamPhysical->add(BPCPhysical);
141  break;}
142  }
143  }
144 
145  // End Middle FrontBeam detectors
146 
147 
149 }

◆ SetManager()

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

Definition at line 27 of file MiddleBeamConstructionH62004.h.

Member Data Documentation

◆ m_detectorManager

LArDetDescrManager* LArGeo::MiddleBeamConstructionH62004::m_detectorManager
private

Definition at line 35 of file MiddleBeamConstructionH62004.h.

◆ m_H62004MiddleBeamPhysical

GeoPhysVol* LArGeo::MiddleBeamConstructionH62004::m_H62004MiddleBeamPhysical
private

Definition at line 34 of file MiddleBeamConstructionH62004.h.


The documentation for this class was generated from the following files:
LArGeo::MiddleBeamConstructionH62004::m_detectorManager
LArDetDescrManager * m_detectorManager
Definition: MiddleBeamConstructionH62004.h:35
deg
#define deg
Definition: SbPolyhedron.cxx:17
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
DecodeVersionKey
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
Definition: DecodeVersionKey.h:18
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
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
LArGeo::MiddleBeamConstructionH62004::m_H62004MiddleBeamPhysical
GeoPhysVol * m_H62004MiddleBeamPhysical
Definition: MiddleBeamConstructionH62004.h:34