Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ZDC_BRANModule.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "ZDC_BRANModule.h"
6 
7 
8 #include "GeoModelKernel/GeoBox.h"
9 #include "GeoModelKernel/GeoTube.h"
10 #include "GeoModelKernel/GeoLogVol.h"
11 #include "GeoModelKernel/GeoNameTag.h"
12 #include "GeoModelKernel/GeoPhysVol.h"
13 #include "GeoModelKernel/GeoFullPhysVol.h"
14 #include "GeoModelKernel/GeoIdentifierTag.h"
15 #include "GeoModelKernel/GeoAlignableTransform.h"
16 #include "GeoModelKernel/GeoDefinitions.h"
17 #include "GeoModelKernel/Units.h"
18 #include "GaudiKernel/SystemOfUnits.h"
20 #include "GeoModelKernel/GeoMaterial.h"
21 #include "GaudiKernel/MsgStream.h"
22 #include "ZdcIdentifier/ZdcID.h"
23 
25 
26 /*
27  * For now we create the Run3 BRAN only. The detector is a stack of plates in z
28  * with grooves milled vertically to allow channels for silica rods to be placed in.
29  * The stack ordering is Cu, Al, Cu, Cu, Al, Cu. This will be simplified here by
30  * creating a copper body with aluminum plates placed within.
31 */
32 void ZDC_BRANModule::create(GeoFullPhysVol* mother, StoredMaterialManager *materialManager, const ZdcID *zdcID){
33 
34  MsgStream LogStream(Athena::getMessageSvc(), "ZDC_ZDCModule::create");
35 
36  const GeoMaterial *OpAir = materialManager->getMaterial("ZDC::opticalAir" );
37  const GeoMaterial *OpSilica = materialManager->getMaterial("ZDC::opticalSilica");
38  const GeoMaterial *copper = materialManager->getMaterial("std::Copper" );
39  const GeoMaterial *aluminum = materialManager->getMaterial("std::Aluminium" );
40 
41  // geometric constants. All units are in millimeters unless otherwise specified.
42  // All dimensions are gathered from technical drawings available at TODO: insert link to tech drawings
43  const float width = 88.0; // x dimension of the module
44  const float height = 180.0; // y dimension of the module
45  const float channelSide = 11.0; // side dimension of the silica rod channels
46  const float pitch = 2.0*channelSide; // distance between adjacent silica rod channels
47  const float faceDepth = 10.0; // z depth of the front and back faces
48  const float alPlateDepth = 14.5; // z depth of the aluminum plates
49  const float innerPlateDepth = 25.5; // z depth of the inner plates
50  const float rodDia = 10.0; // diameter of the silica rods
51  const float depth = 2.0 *(faceDepth + alPlateDepth + innerPlateDepth); // y dimension of the module
52 
53  GeoBox *Cu_Body = new GeoBox (width * Gaudi::Units::mm * 0.5, height * Gaudi::Units::mm * 0.5, depth * Gaudi::Units::mm * 0.5 );
54  GeoBox *Al_Plate = new GeoBox (width * Gaudi::Units::mm * 0.5, height * Gaudi::Units::mm * 0.5, alPlateDepth * Gaudi::Units::mm * 0.5 );
55  GeoBox *Air_Channel = new GeoBox (channelSide * Gaudi::Units::mm * 0.5, height * Gaudi::Units::mm * 0.5, channelSide * Gaudi::Units::mm * 0.5 );
56  GeoTube *Silica_Rod = new GeoTube (0.0 * Gaudi::Units::mm , rodDia * Gaudi::Units::mm * 0.5, height * Gaudi::Units::mm * 0.5 );
57 
58  GeoLogVol *Cu_Body_Logical = new GeoLogVol("BRAN_Cu_Body_Logical" , Cu_Body , copper );
59  GeoLogVol *Al_Plate_Logical = new GeoLogVol("BRAN_Al_Plate_Logical" , Al_Plate , aluminum);
60  GeoLogVol *Air_Channel_Logical = new GeoLogVol("BRAN_Air_Channel_Logical" , Air_Channel , OpAir );
61  GeoLogVol *Silica_Rod_Logical = new GeoLogVol("BRAN_Rod_Logical" , Silica_Rod , OpSilica);
62 
63  // Create the copper body
64  GeoFullPhysVol *Cu_Body_Physical = new GeoFullPhysVol(Cu_Body_Logical);
65 
66  //Create the IDs and names here since we aren't doing any channel separation
70 
71  char airName[64], rodName[64], aluName[64];
72  sprintf(airName, "ZDC::BRAN_Air %s", airID.getString().c_str());
73  sprintf(aluName, "ZDC::BRAN_Alu %s", aluID.getString().c_str());
74  sprintf(rodName, "ZDC::BRAN_Rod %s", rodID.getString().c_str());
75 
76  //Assemble the silica rods in the air channels
77  GeoFullPhysVol *Air_Channel_Pyisical = new GeoFullPhysVol(Air_Channel_Logical);
78  Air_Channel_Pyisical->add(new GeoNameTag(rodName));
79  Air_Channel_Pyisical->add(new GeoIdentifierTag(rodID.get_identifier32().get_compact()));
80  Air_Channel_Pyisical->add(new GeoAlignableTransform(GeoTrf::RotateX3D(90 * Gaudi::Units::deg)));
81  Air_Channel_Pyisical->add(new GeoFullPhysVol(Silica_Rod_Logical));
82 
83  GeoFullPhysVol *Al_Plate_Physical = new GeoFullPhysVol(Al_Plate_Logical);
84 
85  /*This is a strange loop but the arrangement of the rods is
86  * ----------------------------------
87  * | {-1,-1} {-1,0} {-1,1} |
88  * | {-1} {1} |
89  * | {1,-1} {1,0} {1,1} |
90  * ----------------------------------
91  */
92  for(int i : {-1,1}){
93  /*************************************************
94  * Place the inner air channels with silica included
95  **************************************************/
96  Cu_Body_Physical->add(new GeoNameTag(airName));
97  Cu_Body_Physical->add(new GeoIdentifierTag(airID.get_identifier32().get_compact()));
98  Cu_Body_Physical->add(new GeoAlignableTransform(GeoTrf::TranslateX3D( i * channelSide * Gaudi::Units::mm)));
99  Cu_Body_Physical->add(Air_Channel_Pyisical);
100 
101  /*************************************************
102  * Place the aluminum plates
103  **************************************************/
104  Cu_Body_Physical->add(new GeoNameTag(aluName));
105  Cu_Body_Physical->add(new GeoIdentifierTag(aluID.get_identifier32().get_compact()));
106  Cu_Body_Physical->add(new GeoAlignableTransform(GeoTrf::TranslateZ3D( i * (innerPlateDepth + alPlateDepth * 0.5) * Gaudi::Units::mm)));
107  Cu_Body_Physical->add(Al_Plate_Physical);
108 
109  for(int j : {-1,0,1}){
110  /*************************************************
111  * Place the outter air channels
112  **************************************************/
113  Cu_Body_Physical->add(new GeoNameTag(airName));
114  Cu_Body_Physical->add(new GeoIdentifierTag(airID.get_identifier32().get_compact()));
115  Cu_Body_Physical->add(new GeoAlignableTransform(GeoTrf::Translate3D( j * pitch * Gaudi::Units::mm, 0.0, i * (innerPlateDepth - channelSide) * Gaudi::Units::mm )));
116  Cu_Body_Physical->add(Air_Channel_Pyisical);
117  }
118  }
119 
120  // Place the copper body in the mother volume
121  char volName[64];
123  sprintf(volName, "Zdc::BRAN_Mod %s", id.getString().c_str());
124  mother->add(new GeoNameTag(volName));
125  mother->add(new GeoIdentifierTag(id.get_identifier32().get_compact()));
126  mother->add(new GeoAlignableTransform(m_trf));
127  mother->add(Cu_Body_Physical);
128 
129 }
egammaParameters::depth
@ depth
pointing depth of the shower as calculated in egammaqgcld
Definition: egammaParamDefs.h:276
HOUSING
@ HOUSING
Definition: ZdcID.h:22
python.SystemOfUnits.mm
float mm
Definition: SystemOfUnits.py:97
ZDC_BRANModule.h
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
ZDC_ModuleBase::m_module
int m_module
Definition: ZDC_ModuleBase.h:48
ZDC_BRANModule::create
virtual void create(GeoFullPhysVol *mother, StoredMaterialManager *materialManager, const ZdcID *zdcID) override
Definition: ZDC_BRANModule.cxx:32
Identifier::get_identifier32
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
deg
#define deg
Definition: SbPolyhedron.cxx:17
AIR
@ AIR
Definition: ZdcID.h:22
ZDC_ModuleBase::m_trf
GeoTrf::Transform3D m_trf
Definition: ZDC_ModuleBase.h:50
READOUT
@ READOUT
Definition: ZdcID.h:22
Identifier32::get_compact
value_type get_compact() const
Get the compact id.
Definition: Identifier32.h:44
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
ZdcID::channel_id
Identifier channel_id(int side, int module, int type, int channel) const
Definition: ZdcID.h:205
lumiFormat.i
int i
Definition: lumiFormat.py:85
StoredMaterialManager.h
ZDC_ModuleBase::m_side
int m_side
Definition: ZDC_ModuleBase.h:47
ZdcID.h
Identifier::getString
std::string getString() const
Provide a string form of the identifier - hexadecimal.
Definition: Identifier.cxx:25
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
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
ACTIVE
@ ACTIVE
Definition: ZdcID.h:21
INACTIVE
@ INACTIVE
Definition: ZdcID.h:21
ZdcID
Definition: ZdcID.h:25
Identifier
Definition: IdentifierFieldParser.cxx:14