ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
JiveXML::GeometryWriter Class Reference

Writes the inner detector and calorimeter geometry to an XML file for use with Atlantis. More...

#include <GeometryWriter.h>

Inheritance diagram for JiveXML::GeometryWriter:
Collaboration diagram for JiveXML::GeometryWriter:

Public Member Functions

 GeometryWriter (const std::string &t, const std::string &n, const IInterface *p)
 Constructor. More...
 
virtual StatusCode writeGeometry () override
 Writes the inner detector and calorimeter geometry to an XML file. More...
 
virtual ~GeometryWriter ()
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void writeHeader (std::ofstream &out)
 Writes the header of the XML file. More...
 
void writePixelGeometry (std::ofstream &out)
 Writes the geometry of the pixel detector. More...
 
void writeSCTGeometry (std::ofstream &out)
 Writes the geometry of the silicon detector. More...
 
void writeTRTGeometry (std::ofstream &out)
 Writes the geometry of the TRT detector. More...
 
void writeSolenoidGeometry (std::ofstream &out)
 Writes the (hardcoded) geometry of the solenoid. More...
 
void writeLArGeometry (std::ofstream &out)
 Writes the geometry of the LAr calorimeters. More...
 
void writeMBTSGeometry (std::ofstream &out)
 Writes the geometry of the Minimum Bias Trigger Scintillators. More...
 
void writeTILEGeometry (std::ofstream &out)
 Writes the geometry of the TILE calorimeters. More...
 
void writeFooter (std::ofstream &out)
 Writes the footer of the XML file. More...
 
void writeDiscElement (std::ofstream &out, std::string p, std::string c, std::string n, double rIn, double rOut)
 Writes <ADisc> element to the XML file. More...
 
void writeRectangleElement (std::ofstream &out, std::string p, std::string c, std::string n, double xIn, double xOut, double yIn, double yOut)
 Writes <ARectangle> element to the XML file. More...
 
void writeRectanglishElement (std::ofstream &out, std::string p, std::string c, std::string n, double xIn, double xOut, double yIn, double yOut)
 Writes <AGeneralPath> element to the XML file. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

const InDetDD::PixelDetectorManagerm_pixel_manager {nullptr}
 Pixel detector manager and ID helper. More...
 
const PixelIDm_pixelIdHelper {nullptr}
 
const InDetDD::SCT_DetectorManagerm_silicon_manager {nullptr}
 Silicon detector manager and ID helper. More...
 
const SCT_IDm_sctIdHelper {nullptr}
 
const InDetDD::TRT_DetectorManagerm_trt_manager {nullptr}
 TRT detector manager and ID helper. More...
 
const TRT_IDm_trtIdHelper {nullptr}
 
std::unique_ptr< CaloDetDescrManagerm_calo_manager
 Calorimeter detector manager. More...
 
const TileDetDescrManagerm_tile_manager {nullptr}
 
const LArDetectorManagerm_lar_manager {nullptr}
 
std::vector< double > m_larMin
 
std::vector< double > m_larMax
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Static Private Attributes

static const int m_numCaloTypes = 24
 The number of calorimeter sampling types. More...
 

Detailed Description

Writes the inner detector and calorimeter geometry to an XML file for use with Atlantis.

Definition at line 37 of file GeometryWriter.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ GeometryWriter()

JiveXML::GeometryWriter::GeometryWriter ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)
inline

Constructor.

Parameters
detStorepointer to the detector store service
loglog message stream

Definition at line 46 of file GeometryWriter.h.

46  :
47  AthAlgTool(t,n,p){declareInterface<IGeometryWriter>(this);};

◆ ~GeometryWriter()

virtual JiveXML::GeometryWriter::~GeometryWriter ( )
inlinevirtual

Definition at line 54 of file GeometryWriter.h.

54 {};

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & JiveXML::IGeometryWriter::interfaceID ( )
inlinestaticinherited

Definition at line 27 of file IGeometryWriter.h.

27 { return IID_IGeometryWriter; }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

◆ writeDiscElement()

void JiveXML::GeometryWriter::writeDiscElement ( std::ofstream &  out,
std::string  p,
std::string  c,
std::string  n,
double  rIn,
double  rOut 
)
private

Writes <ADisc> element to the XML file.

Parameters
outstream where the element is written to
pprojection attribute
cfill color from colormap
ndetector/module name
rIninner radius of the disc
rOutouter radius of the disc

◆ writeFooter()

void JiveXML::GeometryWriter::writeFooter ( std::ofstream &  out)
private

Writes the footer of the XML file.

Parameters
outstream where the XML fragment is written to

Definition at line 895 of file GeometryWriter.cxx.

895  {
896 
897  out << "</AGeometry>" << std::endl;
898  }

◆ writeGeometry()

StatusCode JiveXML::GeometryWriter::writeGeometry ( )
overridevirtual

Writes the inner detector and calorimeter geometry to an XML file.

Implements JiveXML::IGeometryWriter.

Definition at line 35 of file GeometryWriter.cxx.

36  {
37  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "writeGeometry()" << endmsg;
38 
39  std::ofstream outputFile("AGeometry.xml");
41 
42  if ( detStore()->retrieve(m_pixel_manager, "Pixel").isFailure() ){
43  if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not retrieve InDetDD::PixelDetectorManager" << endmsg;
44  } else {
45  if (detStore()->retrieve(m_pixelIdHelper, "PixelID").isFailure() ){
46  if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not retrieve PixelIDHelper" << endmsg;
47  } else {
48  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Retrieved PixelIDHelper" << endmsg;
50  }
51  }
52 
53  if ( detStore()->retrieve(m_silicon_manager, "SCT").isFailure() ) {
54  if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not retrieve InDetDD::SCT_DetectorManager" << endmsg;
55  } else {
56  if (detStore()->retrieve(m_sctIdHelper, "SCT_ID").isFailure() ){
57  if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not retrieve SCT_IDHelper" << endmsg;
58  } else {
59  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Retrieved SCT_IDHelper" << endmsg;
61  }
62  }
63 
64  if ( detStore()->retrieve(m_trt_manager, "TRT").isFailure() ) {
65  if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not retrieve InDetDD::TRT_DetectorManager" << endmsg;
66  } else {
67 // No SGKey ? As in graphics/VP1/VP1Systems/VP12DGeometrySystems/StoreGateGeometryReader
68 // if (detStore()->retrieve(m_trtIdHelper, "TRT_ID").isFailure() ){
69  if (detStore()->retrieve(m_trtIdHelper, "").isFailure() ){
70  if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not retrieve TRT_IDHelper" << endmsg;
71  } else {
72  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Retrieved TRT_IDHelper" << endmsg;
74  }
75  }
76 
78 
79  m_calo_manager = buildCaloDetDescr(serviceLocator()
81  , nullptr
82  , nullptr);
83  {
84  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Retrieved CaloDetDescrManager" << endmsg;
85  // Hardcoded LAr zMin, zMax, rMin, rMax
86  m_larMin.reserve(m_numCaloTypes);
87  m_larMax.reserve(m_numCaloTypes);
91  m_larMax[CaloCell_ID::EMB1] = 340.0;
93  m_larMax[CaloCell_ID::EMB2] = 340.0;
95  m_larMax[CaloCell_ID::EMB3] = 340.0;
99  m_larMax[CaloCell_ID::EME1] = 203.4;
100  m_larMin[CaloCell_ID::EME2] = 29.0;
101  m_larMax[CaloCell_ID::EME2] = 203.4;
102  m_larMin[CaloCell_ID::EME3] = 29.0;
103  m_larMax[CaloCell_ID::EME3] = 203.4;
104  m_larMin[CaloCell_ID::HEC0] = 37.2;
105  m_larMax[CaloCell_ID::HEC0] = 203.4;
106  m_larMin[CaloCell_ID::HEC1] = 47.5;
107  m_larMax[CaloCell_ID::HEC1] = 203.4;
108  m_larMin[CaloCell_ID::HEC2] = 47.5;
109  m_larMax[CaloCell_ID::HEC2] = 203.4;
110  m_larMin[CaloCell_ID::HEC3] = 47.5;
111  m_larMax[CaloCell_ID::HEC3] = 203.4;
113  }
114 
115  if ( detStore()->retrieve(m_tile_manager, "Tile").isFailure() ) {
116  if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not retrieve TileDetDescrManager" << endmsg;
117  } else {
118  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Retrieved TileDetDescrManager" << endmsg;
120  }
121 
122  if ( detStore()->retrieve(m_lar_manager, "LArMgr").isFailure() ) {
123  if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not retrieve LArDetectorManager for MBTS" << endmsg;
124  } else {
125  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Retrieved LArDetectorManager for MBTS" << endmsg;
127  }
129  outputFile.close();
130 
131  return StatusCode::SUCCESS;
132  }

◆ writeHeader()

void JiveXML::GeometryWriter::writeHeader ( std::ofstream &  out)
private

Writes the header of the XML file.

Parameters
outstream where the XML fragment is written to

Definition at line 134 of file GeometryWriter.cxx.

135  {
136  out << "<?xml version=\"1.0\"?>" << std::endl
137  << "<!DOCTYPE AGeometry [" << std::endl
138  << "<!ELEMENT AGeometry (ADisc | ARectangle | ABarrelCalorimeter |" << std::endl
139  << " AEndcapCalorimeter | AGapCalorimeter | AEndcapCryostat |" << std::endl
140  << " ABarrelSiliconDetector | AEndcapSiliconDetector |" << std::endl
141  << " ABarrelTRTDetector | AEndcapTRTDetector)* >" << std::endl
142  << "<!ELEMENT ADisc EMPTY >" << std::endl
143  << "<!ATTLIST ADisc" << std::endl
144  << " p CDATA #REQUIRED" << std::endl
145  << " c CDATA #REQUIRED" << std::endl
146  << " n CDATA #REQUIRED" << std::endl
147  << " rIn CDATA #REQUIRED" << std::endl
148  << " rOut CDATA #REQUIRED" << std::endl
149  << " nIn CDATA \"256\"" << std::endl
150  << " nOut CDATA \"256\">" << std::endl
151  << "<!ELEMENT ARectangle EMPTY >" << std::endl
152  << "<!ATTLIST ARectangle" << std::endl
153  << " p CDATA #REQUIRED" << std::endl
154  << " c CDATA #REQUIRED" << std::endl
155  << " n CDATA #REQUIRED" << std::endl
156  << " xMin CDATA #REQUIRED" << std::endl
157  << " xMax CDATA #REQUIRED" << std::endl
158  << " yMin CDATA #REQUIRED" << std::endl
159  << " yMax CDATA #REQUIRED" << std::endl
160  << " xR (YES|NO) \"YES\"" << std::endl
161  << " yR (YES|NO) \"YES\">" << std::endl
162  << "<!ELEMENT ABarrelCalorimeter EMPTY >" << std::endl
163  << "<!ATTLIST ABarrelCalorimeter" << std::endl
164  << " c CDATA #REQUIRED" << std::endl
165  << " n CDATA #REQUIRED" << std::endl
166  << " sampling CDATA #REQUIRED" << std::endl
167  << " region CDATA #REQUIRED" << std::endl
168  << " rMin CDATA #REQUIRED" << std::endl
169  << " rMax CDATA #REQUIRED" << std::endl
170  << " zMin CDATA #REQUIRED" << std::endl
171  << " zMax CDATA #REQUIRED" << std::endl
172  << " eta0 CDATA #REQUIRED" << std::endl
173  << " deta CDATA #REQUIRED" << std::endl
174  << " neta CDATA #REQUIRED" << std::endl
175  << " meta CDATA #REQUIRED" << std::endl
176  << " phi0 CDATA #REQUIRED" << std::endl
177  << " nphi CDATA #REQUIRED>" << std::endl
178  << "<!ELEMENT AEndcapCalorimeter EMPTY >" << std::endl
179  << "<!ATTLIST AEndcapCalorimeter" << std::endl
180  << " c CDATA #REQUIRED" << std::endl
181  << " n CDATA #REQUIRED" << std::endl
182  << " sampling CDATA #REQUIRED" << std::endl
183  << " region CDATA #REQUIRED" << std::endl
184  << " rMin CDATA #REQUIRED" << std::endl
185  << " rMax CDATA #REQUIRED" << std::endl
186  << " zMin CDATA #REQUIRED" << std::endl
187  << " zMax CDATA #REQUIRED" << std::endl
188  << " eta0 CDATA #REQUIRED" << std::endl
189  << " deta CDATA #REQUIRED" << std::endl
190  << " neta CDATA #REQUIRED" << std::endl
191  << " meta CDATA #REQUIRED" << std::endl
192  << " phi0 CDATA #REQUIRED" << std::endl
193  << " nphi CDATA #REQUIRED>" << std::endl
194  << "<!ELEMENT AGapCalorimeter EMPTY >" << std::endl
195  << "<!ATTLIST AGapCalorimeter" << std::endl
196  << " c CDATA #REQUIRED" << std::endl
197  << " n CDATA #REQUIRED" << std::endl
198  << " sampling CDATA #REQUIRED" << std::endl
199  << " region CDATA #REQUIRED" << std::endl
200  << " rMin CDATA #REQUIRED" << std::endl
201  << " rMax CDATA #REQUIRED" << std::endl
202  << " zMin CDATA #REQUIRED" << std::endl
203  << " zMax CDATA #REQUIRED" << std::endl
204  << " eta CDATA #REQUIRED" << std::endl
205  << " phi0 CDATA #REQUIRED" << std::endl
206  << " nphi CDATA #REQUIRED>" << std::endl
207  << "<!ELEMENT AEndcapCryostat EMPTY >" << std::endl
208  << "<!ATTLIST AEndcapCryostat" << std::endl
209  << " c CDATA #REQUIRED" << std::endl
210  << " n CDATA #REQUIRED" << std::endl
211  << " sampling CDATA #REQUIRED" << std::endl
212  << " region CDATA #REQUIRED" << std::endl
213  << " rMin CDATA #REQUIRED" << std::endl
214  << " rMax CDATA #REQUIRED" << std::endl
215  << " zMin CDATA #REQUIRED" << std::endl
216  << " zMax CDATA #REQUIRED" << std::endl
217  << " neta CDATA #REQUIRED" << std::endl
218  << " nphi CDATA #REQUIRED>" << std::endl
219  << "<!ELEMENT ABarrelSiliconDetector EMPTY >" << std::endl
220  << "<!ATTLIST ABarrelSiliconDetector" << std::endl
221  << " c CDATA #REQUIRED" << std::endl
222  << " n CDATA #REQUIRED" << std::endl
223  << " layer CDATA #REQUIRED" << std::endl
224  << " length CDATA #REQUIRED" << std::endl
225  << " width CDATA #REQUIRED" << std::endl
226  << " thickness CDATA #REQUIRED" << std::endl
227  << " tilt CDATA #REQUIRED" << std::endl
228  << " nz CDATA #REQUIRED" << std::endl
229  << " nphi CDATA #REQUIRED" << std::endl
230  << " r0 CDATA #REQUIRED" << std::endl
231  << " phi0 CDATA #REQUIRED" << std::endl
232  << " zMin CDATA #REQUIRED" << std::endl
233  << " zMax CDATA #REQUIRED>" << std::endl
234  << "<!ELEMENT AEndcapSiliconDetector EMPTY >" << std::endl
235  << "<!ATTLIST AEndcapSiliconDetector" << std::endl
236  << " c CDATA #REQUIRED" << std::endl
237  << " n CDATA #REQUIRED" << std::endl
238  << " layer CDATA #REQUIRED" << std::endl
239  << " length CDATA #REQUIRED" << std::endl
240  << " width CDATA #REQUIRED" << std::endl
241  << " thickness CDATA #REQUIRED" << std::endl
242  << " nz CDATA #REQUIRED" << std::endl
243  << " nphi CDATA #REQUIRED" << std::endl
244  << " rMin CDATA #REQUIRED" << std::endl
245  << " rMax CDATA #REQUIRED" << std::endl
246  << " phi0 CDATA #REQUIRED" << std::endl
247  << " zMin CDATA #REQUIRED" << std::endl
248  << " zMax CDATA #REQUIRED>" << std::endl
249  << "<!ELEMENT ABarrelTRTDetector EMPTY >" << std::endl
250  << "<!ATTLIST ABarrelTRTDetector" << std::endl
251  << " c CDATA #REQUIRED" << std::endl
252  << " n CDATA #REQUIRED" << std::endl
253  << " layer CDATA #REQUIRED" << std::endl
254  << " nphi CDATA #REQUIRED" << std::endl
255  << " rMin CDATA #REQUIRED" << std::endl
256  << " rMax CDATA #REQUIRED" << std::endl
257  << " phiIn CDATA #REQUIRED" << std::endl
258  << " phiOut CDATA #REQUIRED" << std::endl
259  << " zMin CDATA #REQUIRED" << std::endl
260  << " zMax CDATA #REQUIRED>" << std::endl
261  << "<!ELEMENT AEndcapTRTDetector EMPTY >" << std::endl
262  << "<!ATTLIST AEndcapTRTDetector" << std::endl
263  << " c CDATA #REQUIRED" << std::endl
264  << " n CDATA #REQUIRED" << std::endl
265  << " layer CDATA #REQUIRED" << std::endl
266  << " nphi CDATA #REQUIRED" << std::endl
267  << " rMin CDATA #REQUIRED" << std::endl
268  << " rMax CDATA #REQUIRED" << std::endl
269  << " phi0 CDATA #REQUIRED" << std::endl
270  << " zMin CDATA #REQUIRED" << std::endl
271  << " zMax CDATA #REQUIRED>" << std::endl
272  << "]>" << std::endl
273  << "<AGeometry>" << std::endl;
274  }

◆ writeLArGeometry()

void JiveXML::GeometryWriter::writeLArGeometry ( std::ofstream &  out)
private

Writes the geometry of the LAr calorimeters.

Parameters
outstream where the XML fragment is written to

Definition at line 612 of file GeometryWriter.cxx.

612  {
613 
614  const CaloCell_ID *idHelper = m_calo_manager->getCaloCell_ID();
616 
617  // This code is not very efficient in terms of speed. Since it will only be used
618  // when the geometry has changed, the code is made to be easily readable instead.
619  for (int type=0; type<m_numCaloTypes; type++) {
620 
621  for (int region=0; region<8; region++) {
622 
623  for (int inner=0; inner<2; inner++) {
624 
625  int minEtaIndex = 0, maxEtaIndex = 0;
626  double minEta = 0.0;
627  const CaloDetDescrElement *oneSuchElement = 0;
628 
629  for (it=m_calo_manager->element_begin(); it<m_calo_manager->element_end(); ++it) {
630 
631  const CaloDetDescrElement *element = *it;
632  int etaIndex, phiIndex;
633  std::string technology;
634  std::string name;
635 
636  if (!element) continue;
637 
638  Identifier id = element->identify();
639 
640  // Select everything but TILE.
641  if (element->is_tile()) continue;
642 
643  // Select only this sampling.
644  if (element->getSampling() != type) continue;
645 
646  // Select only this region.
647  if (element->is_lar_fcal()) {
648  if (idHelper->eta(id) != idHelper->eta_min(id) || idHelper->side(id) < 0) continue;
649  } else {
650  if (idHelper->region(id) != region) continue;
651  }
652 
653  // Differentiate between the LAr inner/outer endcap
654  if (inner > 0 && !idHelper->is_em_endcap_inner(id)) continue;
655 
656  // Skip -z, we will mirror +z.
657  if (element->z() < 0) continue;
658 
659  // Select only the first element in phi.
660  etaIndex = idHelper->eta(id);
661  phiIndex = idHelper->phi(id);
662  if (phiIndex > 0) continue;
663 
664  if (!oneSuchElement) {
665  oneSuchElement = element;
666  minEtaIndex = maxEtaIndex = etaIndex;
667  minEta = element->eta();
668  } else {
669  if (etaIndex < minEtaIndex) {
670  minEtaIndex = etaIndex;
671  minEta = element->eta();
672  }
673  if (etaIndex > maxEtaIndex) {
674  maxEtaIndex = etaIndex;
675  }
676  }
677  }
678 
679  if (oneSuchElement) {
680 
681  std::string color;
682  std::string name;
683  int sampling = 0;
684  enum {BARREL, ENDCAP, FORWARD} part = BARREL;
685 
686  const CaloDetDescriptor *descriptor = oneSuchElement->descriptor();
687 
688  switch(type) {
690  color = "ECAL";
691  name = "LAr Presampler";
692  sampling = 0;
693  part = BARREL;
694  break;
695  case CaloCell_ID::EMB1:
696  case CaloCell_ID::EMB2:
697  case CaloCell_ID::EMB3:
698  color = "ECAL";
699  name = "LAr";
700  sampling = type - CaloCell_ID::PreSamplerB;
701  part = BARREL;
702  break;
704  color = "ECAL";
705  name = "LAr_EC_Presampler";
706  part = ENDCAP;
707  break;
708  case CaloCell_ID::EME1:
709  case CaloCell_ID::EME2:
710  case CaloCell_ID::EME3:
711  color = "ECAL";
712  name = inner ? "LAr Inner Endcap" : "LAr Outer Endcap";
713  sampling = type - CaloCell_ID::PreSamplerE;
714  part = ENDCAP;
715  break;
716  case CaloCell_ID::HEC0:
717  case CaloCell_ID::HEC1:
718  case CaloCell_ID::HEC2:
719  case CaloCell_ID::HEC3:
720  color = "HCAL";
721  name = "HEC";
722  sampling = type - CaloCell_ID::HEC0;
723  part = ENDCAP;
724  break;
725  case CaloCell_ID::FCAL0:
726  color = "ECAL";
727  name = "FCAL EM";
728  part = FORWARD;
729  break;
730  case CaloCell_ID::FCAL1:
731  color = "HCAL";
732  name = "FCAL HAD 1";
733  part = FORWARD;
734  break;
735  case CaloCell_ID::FCAL2:
736  color = "HCAL";
737  name = "FCAL HAD 2";
738  part = FORWARD;
739  break;
740  }
741 
742  double phi0 = 180./M_PI * (oneSuchElement->phi()-oneSuchElement->dphi()/2.);
743  int numPhi = (int) round(2.*M_PI / oneSuchElement->dphi());
744  int numEta = maxEtaIndex - minEtaIndex + 1;
745 
746  switch (part) {
747  case BARREL:
748  out << "<ABarrelCalorimeter c=\"" << color << "\" n=\"" << name << "\""
749  << " sampling=\"" << sampling << "\" region=\"" << region%8 << "\""
750  << " rMin=\"" << (oneSuchElement->r()-oneSuchElement->dr()/2.)/10. << "\""
751  << " rMax=\"" << (oneSuchElement->r()+oneSuchElement->dr()/2.)/10. << "\""
752  << " zMin=\"" << m_larMin[type] << "\""
753  << " zMax=\"" << m_larMax[type] << "\""
754  << " eta0=\"" << minEta-oneSuchElement->deta()/2. << "\""
755  << " deta=\"" << oneSuchElement->deta() << "\""
756  << " neta=\"" << numEta << "\""
757  << " meta=\"" << minEtaIndex << "\""
758  << " phi0=\"" << phi0 << "\""
759  << " nphi=\"" << numPhi << "\""
760  << " />" << std::endl;
761  break;
762  case ENDCAP:
763  out << "<AEndcapCalorimeter c=\"" << color << "\" n=\"" << name << "\""
764  << " sampling=\"" << sampling << "\" region=\"" << region%8 << "\""
765  << " rMin=\"" << m_larMin[type] << "\""
766  << " rMax=\"" << m_larMax[type] << "\""
767  << " zMin=\"" << (oneSuchElement->z()-oneSuchElement->dz()/2.)/10. << "\""
768  << " zMax=\"" << (oneSuchElement->z()+oneSuchElement->dz()/2.)/10. << "\""
769  << " eta0=\"" << minEta-oneSuchElement->deta()/2. << "\""
770  << " deta=\"" << oneSuchElement->deta() << "\""
771  << " neta=\"" << numEta << "\""
772  << " meta=\"" << minEtaIndex << "\""
773  << " phi0=\"" << phi0 << "\""
774  << " nphi=\"" << numPhi << "\""
775  << " />" << std::endl;
776  break;
777  case FORWARD:
778  out << "<ADisc p=\"YX\" c=\"" << color << "\" n=\"" << name << "\""
779  << " rIn=\"" << descriptor->calo_r_min()/10. << "\""
780  << " rOut=\"" << descriptor->calo_r_max()/10. << "\""
781  << " />" << std::endl;
782  out << "<ARectangle p=\"RZ\" c=\"" << color << "\" n=\"" << name << "\""
783  << " xMin=\"" << descriptor->calo_z_min()/10. << "\""
784  << " xMax=\"" << descriptor->calo_z_max()/10. << "\""
785  << " yMin=\"" << descriptor->calo_r_min()/10. << "\""
786  << " yMax=\"" << descriptor->calo_r_max()/10. << "\""
787  << " />" << std::endl;
788  }
789  }
790  }
791  }
792  }
793  }

◆ writeMBTSGeometry()

void JiveXML::GeometryWriter::writeMBTSGeometry ( std::ofstream &  out)
private

Writes the geometry of the Minimum Bias Trigger Scintillators.

Parameters
outstream where the XML fragment is written to

Definition at line 795 of file GeometryWriter.cxx.

795  {
796  // volume hierarchy tree leading from MBTS_mother to scintillators:
797  // MBTS_mother
798  // MBTSAirEnv <--- 8 copies
799  // MBTSAluEnv
800  // MBTSAirInAlu
801  // MBTS1
802  // MBTS2
803  // MBTSPlug2In <--- skip this one
804 
805  PVConstLink myVol = m_lar_manager->getTreeTop(1U);
806  for (unsigned int c=0; c< myVol->getNChildVols();c++)
807  {
808  PVConstLink child = myVol->getChildVol(c);
809  if((child->getLogVol())->getName()=="MBTS_mother")
810  {
811  int sampling=0,numPhi=0;
812  std::string stringOfNames="";
813 
814  GeoTrf::Vector3D translate = (child->getX()).translation(); // vector from origin to MBTS_mother
815 
816  double zlocation = translate.z();
817  if(zlocation<0)
818  zlocation=-zlocation;
819 
820  GeoTrf::Transform3D transformToScin; // for calculating the vector from MBTS_mother to MBTS scintilators
821 
822  PVConstLink pvAirEnv = 0;
823  for (unsigned int cc=0; cc< child->getNChildVols();cc++) {
824  if(((child->getChildVol(cc))->getLogVol())->getName()=="MBTSAirEnv") {
825  pvAirEnv = child->getChildVol(cc);
826  transformToScin = child->getXToChildVol(cc);
827  numPhi++;
828  }
829  }
830  if(!pvAirEnv) {
831  if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not find MBTSAirEnv" << endmsg;
832  return;
833  }
834 
835  PVConstLink pvAluEnv = 0;
836  for (unsigned int ichildAirEnv=0; ichildAirEnv<pvAirEnv->getNChildVols(); ichildAirEnv++) {
837  if(((pvAirEnv->getChildVol(ichildAirEnv))->getLogVol())->getName()=="MBTSAluEnv") {
838  pvAluEnv = pvAirEnv->getChildVol(ichildAirEnv);
839  transformToScin = transformToScin * pvAirEnv->getXToChildVol(ichildAirEnv);
840  }
841  }
842  if(!pvAluEnv) {
843  if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not find MBTSAluEnv" << endmsg;
844  return;
845  }
846 
847  PVConstLink pvAirInAlu = 0;
848  for (unsigned int ichildAluEnv=0; ichildAluEnv<pvAluEnv->getNChildVols(); ichildAluEnv++) {
849  if(((pvAluEnv->getChildVol(ichildAluEnv))->getLogVol())->getName()=="MBTSAirInAlu") {
850  pvAirInAlu = pvAluEnv->getChildVol(ichildAluEnv);
851  transformToScin = transformToScin * pvAluEnv->getXToChildVol(ichildAluEnv);
852  }
853  }
854  if(!pvAirInAlu) {
855  if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not find MBTSAirInAlu" << endmsg;
856  return;
857  }
858 
859  for (unsigned int ichildAirInAlu=0; ichildAirInAlu<pvAirInAlu->getNChildVols(); ichildAirInAlu++) {
860  PVConstLink childschild = pvAirInAlu->getChildVol(ichildAirInAlu);
861  if((childschild->getLogVol())->getShape()->typeID() == GeoTrd::getClassTypeID() )
862  {
863  std::string currentName = (childschild->getLogVol())->getName();
864  if(currentName!="MBTS1" && currentName!="MBTS2") continue;
865  if(stringOfNames.find(currentName,0) == std::string::npos)
866  {
867  stringOfNames+=" " + currentName;
868  GeoTrf::Vector3D translateToScin = (transformToScin * pvAirInAlu->getXToChildVol(ichildAirInAlu)).translation();
869  const GeoTrd* theTrd = dynamic_cast<const GeoTrd*> ((childschild->getLogVol())->getShape());
870  double rho=pow(translateToScin.x(),2.0) + pow(translateToScin.y(),2.0);
871  rho=pow(rho,0.5);
872  double RMin=rho-theTrd->getZHalfLength();
873  double RMax=rho+theTrd->getZHalfLength();
874  double zmovement=translateToScin.z();
875  double zthickness=theTrd->getXHalfLength1();
876  out << "<AEndcapCryostat c=\"HCAL\" n=\"Minimum Bias Trigger Scintillators\""
877  << " sampling=\"" << sampling << "\" region=\"" << 0 << "\""
878  << " rMin=\"" << RMin/10. << "\""
879  << " rMax=\"" << RMax/10. << "\""
880  << " zMin=\"" << (zlocation+zmovement-zthickness)/10. << "\""
881  << " zMax=\"" << (zlocation+zmovement+zthickness)/10. << "\""
882  << " neta=\"" << "1" << "\""
883  << " nphi=\"" << numPhi << "\""
884  << " />" << std::endl;
885  sampling++;
886  }
887  }
888  }
889 
890 
891  }
892  }
893  }

◆ writePixelGeometry()

void JiveXML::GeometryWriter::writePixelGeometry ( std::ofstream &  out)
private

Writes the geometry of the pixel detector.

Parameters
outstream where the XML fragment is written to

Definition at line 276 of file GeometryWriter.cxx.

276  {
277 
278  InDetDD::SiDetectorElementCollection::const_iterator it;
279 
280  for (it=m_pixel_manager->getDetectorElementBegin(); it<m_pixel_manager->getDetectorElementEnd(); ++it) {
281 
282  const InDetDD::SiDetectorElement *element = *it;
283 
284  // Just an extra precaution to avoid crashes.
285  if (!element) continue;
286 
287  if (element->isBarrel() && m_pixelIdHelper->phi_module(element->identify()) == 0
288  && m_pixelIdHelper->eta_module(element->identify()) == m_pixelIdHelper->eta_module_min(element->identify())) {
289 
290  double rMin = element->rMin();
291  double rMax = element->rMax();
292  double zMax = element->zMax();
293  const InDetDD::SiDetectorElement *next = element->nextInEta();
294  while (next) {
295  if (next->rMin() < rMin) rMin = next->rMin();
296  if (next->rMax() > rMax) rMax = next->rMax();
297  if (next->zMax() > zMax) zMax = next->zMax();
298  next = next->nextInEta();
299  }
300  zMax += 5;
301 
302  out << "<ABarrelSiliconDetector c=\"" << "PIX" << "\" n=\"" << "Pixel" << "\""
303  << " layer=\"" << m_pixelIdHelper->layer_disk(element->identify()) << "\""
304  << " length=\"" << element->length()/10. << "\""
305  << " width=\"" << element->width()/10. << "\""
306  << " thickness=\"" << (rMax - rMin - element->sinTilt()*element->width())/40. << "\""
307  << " tilt=\"" << 180./M_PI * asin(element->sinTilt()) << "\""
308  << " nz=\"" << m_pixelIdHelper->eta_module_max(element->identify())
309  - m_pixelIdHelper->eta_module_min(element->identify())+1 << "\""
310  << " nphi=\"" << m_pixelIdHelper->phi_module_max(element->identify())+1 << "\""
311  << " r0=\"" << (rMin+rMax)/20. << "\""
312  << " phi0=\"" << 180./M_PI * (element->phiMin()+element->phiMax())/2. << "\""
313  << " zMin=\"" << -zMax/10. << "\""
314  << " zMax=\"" << zMax/10. << "\""
315  << " />" << std::endl;
316  //if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Pixel barrel out: " << out << endmsg;
317  }
318 
319  if (element->isEndcap() && element->zMin() > 0 && m_pixelIdHelper->phi_module(element->identify()) == 0
320  && m_pixelIdHelper->eta_module(element->identify()) == m_pixelIdHelper->eta_module_min(element->identify())) {
321 
322  double rMin = element->rMin();
323  double rMax = element->rMax();
324  double zMin = element->zMin();
325  double zMax = element->zMax();
326  const InDetDD::SiDetectorElement *next = element->nextInEta();
327  while (next) {
328  if (next->zMin() < 0) continue;
329  if (next->rMin() < rMin) rMin = next->rMin();
330  if (next->rMax() > rMax) rMax = next->rMax();
331  if (next->zMin() < zMin) zMin = next->zMin();
332  if (next->zMax() > zMax) zMax = next->zMax();
333  next = next->nextInEta();
334  }
335  zMin -= 5;
336  zMax += 5;
337 
338  out << "<AEndcapSiliconDetector c=\"" << "PIX" << "\" n=\"" << "Pixel" << "\""
339  << " layer=\"" << m_pixelIdHelper->layer_disk(element->identify()) << "\""
340  << " length=\"" << element->length()/10. << "\""
341  << " width=\"" << element->width()/10. << "\""
342  << " thickness=\"" << (rMax - rMin - element->sinTilt()*element->width())/40. << "\""
343  << " nz=\"" << m_pixelIdHelper->eta_module_max(element->identify())
344  - m_pixelIdHelper->eta_module_min(element->identify())+1 << "\""
345  << " nphi=\"" << m_pixelIdHelper->phi_module_max(element->identify())+1 << "\""
346  << " rMin=\"" << rMin/10. << "\""
347  << " rMax=\"" << rMax/10. << "\""
348  << " phi0=\"" << 180./M_PI * (element->phiMin()+element->phiMax())/2. << "\""
349  << " zMin=\"" << zMin/10. << "\""
350  << " zMax=\"" << zMax/10. << "\""
351  << " />" << std::endl;
352  //if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Pixel endcap out: " << out << endmsg;
353  }
354  }
355  }

◆ writeRectangleElement()

void JiveXML::GeometryWriter::writeRectangleElement ( std::ofstream &  out,
std::string  p,
std::string  c,
std::string  n,
double  xIn,
double  xOut,
double  yIn,
double  yOut 
)
private

Writes <ARectangle> element to the XML file.

Parameters
outstream where the element is written to
pprojection attribute
cfill color from colormap
ndetector/module name
xIninner x coordinate
xOutouter x coordinate
yIninner y coordinate
yOutouter y coordinate

◆ writeRectanglishElement()

void JiveXML::GeometryWriter::writeRectanglishElement ( std::ofstream &  out,
std::string  p,
std::string  c,
std::string  n,
double  xIn,
double  xOut,
double  yIn,
double  yOut 
)
private

Writes <AGeneralPath> element to the XML file.

This element is basically a rectangle, but its (xOut,yIn) corner has been removed. (Used for SCT endcaps.)

Parameters
outstream where the element is written to
pprojection attribute
cfill color from colormap
ndetector/module name
xIninner x coordinate
xOutouter x coordinate
yIninner y coordinate
yOutouter y coordinate

◆ writeSCTGeometry()

void JiveXML::GeometryWriter::writeSCTGeometry ( std::ofstream &  out)
private

Writes the geometry of the silicon detector.

Parameters
outstream where the XML fragment is written to

Definition at line 357 of file GeometryWriter.cxx.

357  {
358 
359  InDetDD::SiDetectorElementCollection::const_iterator it;
360 
361  for (it=m_silicon_manager->getDetectorElementBegin(); it<m_silicon_manager->getDetectorElementEnd(); ++it) {
362 
363  const InDetDD::SiDetectorElement *element = *it;
364 
365  // Just an extra precaution to avoid crashes.
366  if (!element) continue;
367 
368  if (element->isBarrel() && element->zMax() > 0 && m_sctIdHelper->phi_module(element->identify()) == 0
369  && m_sctIdHelper->eta_module(element->identify()) == m_sctIdHelper->eta_module_min(element->identify())
370  && m_sctIdHelper->side(element->identify()) > 0) {
371 
372  double rMin = element->rMin();
373  double rMax = element->rMax();
374  double zMax = element->zMax();
375  const InDetDD::SiDetectorElement *next = element->nextInEta();
376  while (next) {
377  if (next->rMin() < rMin) rMin = next->rMin();
378  if (next->rMax() > rMax) rMax = next->rMax();
379  if (next->zMax() > zMax) zMax = next->zMax();
380  next = next->nextInEta();
381  }
382  next = element->otherSide();
383  while (next) {
384  if (next->rMin() < rMin) rMin = next->rMin();
385  if (next->rMax() > rMax) rMax = next->rMax();
386  if (next->zMax() > zMax) zMax = next->zMax();
387  next = next->nextInEta();
388  }
389  zMax += 5;
390 
391  out << "<ABarrelSiliconDetector c=\"" << "SIL" << "\" n=\"" << "Silicon" << "\""
392  << " layer=\"" << m_sctIdHelper->layer_disk(element->identify()) << "\""
393  << " length=\"" << element->length()/10. << "\""
394  << " width=\"" << element->width()/10. << "\""
395  << " thickness=\"" << 2. * (rMax - rMin - element->sinTilt()*element->width())/10. << "\""
396  << " tilt=\"" << 180./M_PI * asin(element->sinTilt()) << "\""
397  << " nz=\"" << m_sctIdHelper->eta_module_max(element->identify())
398  - m_sctIdHelper->eta_module_min(element->identify())+1 << "\""
399  << " nphi=\"" << m_sctIdHelper->phi_module_max(element->identify())+1 << "\""
400  << " r0=\"" << (rMin+rMax)/20. << "\""
401  << " phi0=\"" << 180./M_PI * (element->phiMin()+element->phiMax())/2. << "\""
402  << " zMin=\"" << -zMax/10. << "\""
403  << " zMax=\"" << zMax/10. << "\""
404  << " />" << std::endl;
405  //if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "SCT barrel out: " << out << endmsg;
406  }
407 
408  if (element->isEndcap() && element->zMin() > 0 && m_sctIdHelper->phi_module(element->identify()) == 0
409  && m_sctIdHelper->eta_module(element->identify()) == m_sctIdHelper->eta_module_min(element->identify())
410  && m_sctIdHelper->side(element->identify()) > 0) {
411 
412  double rMin = element->rMin();
413  double rMax = element->rMax();
414  double zMin = element->zMin();
415  double zMax = element->zMax();
416  const InDetDD::SiDetectorElement *next = element->nextInEta();
417  while (next) {
418  if (next->zMin() < 0) continue;
419  if (next->rMin() < rMin) rMin = next->rMin();
420  if (next->rMax() > rMax) rMax = next->rMax();
421  if (next->zMin() < zMin) zMin = next->zMin();
422  if (next->zMax() > zMax) zMax = next->zMax();
423  next = next->nextInEta();
424  }
425  next = element->otherSide();
426  while (next) {
427  if (next->zMin() < 0) continue;
428  if (next->rMin() < rMin) rMin = next->rMin();
429  if (next->rMax() > rMax) rMax = next->rMax();
430  if (next->zMin() < zMin) zMin = next->zMin();
431  if (next->zMax() > zMax) zMax = next->zMax();
432  next = next->nextInEta();
433  }
434  zMin -= 5;
435  zMax += 5;
436 
437  out << "<AEndcapSiliconDetector c=\"" << "SIL" << "\" n=\"" << "Silicon" << "\""
438  << " layer=\"" << m_sctIdHelper->layer_disk(element->identify()) << "\""
439  << " length=\"" << element->length()/10. << "\""
440  << " width=\"" << element->width()/10. << "\""
441  << " thickness=\"" << 2. * (rMax - rMin - element->sinTilt()*element->width())/10. << "\""
442  << " nz=\"" << m_sctIdHelper->eta_module_max(element->identify())
443  - m_sctIdHelper->eta_module_min(element->identify())+1 << "\""
444  << " nphi=\"" << m_sctIdHelper->phi_module_max(element->identify())+1 << "\""
445  << " rMin=\"" << rMin/10. << "\""
446  << " rMax=\"" << rMax/10. << "\""
447  << " phi0=\"" << 180./M_PI * (element->phiMin()+element->phiMax())/2. << "\""
448  << " zMin=\"" << zMin/10. << "\""
449  << " zMax=\"" << zMax/10. << "\""
450  << " />" << std::endl;
451  //if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "SCT endcap out: " << out << endmsg;
452  }
453  }
454  }

◆ writeSolenoidGeometry()

void JiveXML::GeometryWriter::writeSolenoidGeometry ( std::ofstream &  out)
private

Writes the (hardcoded) geometry of the solenoid.

Parameters
outstream where the XML fragment is written to

Definition at line 533 of file GeometryWriter.cxx.

533  {
534 
535  double zIn = -265.0;
536  double zOut = 265.0;
537  double rIn = 122.9;
538  double rOut = 127.4;
539 
540  out << "<ADisc p=\"YX\" c=\"Sol\" n=\"Solenoid\""
541  << " rIn=\"" << rIn << "\""
542  << " rOut=\"" << rOut << "\" />"
543  << std::endl;
544 
545  out << "<ARectangle p=\"RZ\" c=\"Sol\" n=\"Solenoid\""
546  << " xMin=\"" << zIn << "\""
547  << " xMax=\"" << zOut << "\""
548  << " yMin=\"" << rIn << "\""
549  << " yMax=\"" << rOut << "\""
550  << " xR=\"NO\" />"
551  << std::endl;
552  }

◆ writeTILEGeometry()

void JiveXML::GeometryWriter::writeTILEGeometry ( std::ofstream &  out)
private

Writes the geometry of the TILE calorimeters.

Parameters
outstream where the XML fragment is written to

Definition at line 555 of file GeometryWriter.cxx.

555  {
556 
557  const TileID *tileIdHelper = m_tile_manager->get_id();
559  for (tileIt=m_tile_manager->tile_descriptors_begin(); tileIt!=m_tile_manager->tile_descriptors_end(); ++tileIt) {
560  const TileDetDescriptor *descriptor = *tileIt;
561  if (!descriptor) continue;
562 
563  int i;
564  for (i=0; i<descriptor->n_samp(); i++) {
565 
566  if (descriptor->zcenter(i) <= 0) continue;
567 
568  std::string name;
569  if (tileIdHelper->is_tile_barrel(descriptor->identify())) name = "TILE Barrel";
570  else if (tileIdHelper->is_tile_extbarrel(descriptor->identify())) name = "Extended TILE";
571  else if (tileIdHelper->is_tile_gap(descriptor->identify())) name = "ITC Gap";
572  else if (tileIdHelper->is_tile_gapscin(descriptor->identify())) name = "ITC Gap Scintillator";
573  else name = "TILE";
574 
575  if (!name.compare(0, 3, "ITC")) {
576 
577  out << "<AGapCalorimeter c=\"" << "HCAL" << "\" n=\"" << name << "\""
578  << " sampling=\"" << (i < 3 ? i : 3) << "\" region=\"" << 0 << "\""
579  << " rMin=\"" << (descriptor->rcenter(i)-descriptor->dr(i)/2.)/10. << "\""
580  << " rMax=\"" << (descriptor->rcenter(i)+descriptor->dr(i)/2.)/10. << "\""
581  << " zMin=\"" << (descriptor->zcenter(i)-descriptor->dz(i)/2.)/10. << "\""
582  << " zMax=\"" << (descriptor->zcenter(i)+descriptor->dz(i)/2.)/10. << "\""
583  << " eta=\"" << (i < 3 ? tileIdHelper->eta_min(descriptor->identify())-i+2 : i) << "\""
584  << " phi0=\"" << descriptor->phi_min() << "\""
585  << " nphi=\"" << descriptor->n_phi() << "\""
586  << " />" << std::endl;
587  } else {
588  int section = tileIdHelper->section(descriptor->identify());
589  int side = tileIdHelper->side(descriptor->identify());
590  int module = tileIdHelper->module(descriptor->identify());
591  int tower = tileIdHelper->tower(descriptor->identify());
592  Identifier id = tileIdHelper->cell_id(section, side, module, tower, i);
593 
594  out << "<ABarrelCalorimeter c=\"" << "HCAL" << "\" n=\"" << name << "\""
595  << " sampling=\"" << i << "\" region=\"" << 0 << "\""
596  << " rMin=\"" << (descriptor->rcenter(i)-descriptor->dr(i)/2.)/10. << "\""
597  << " rMax=\"" << (descriptor->rcenter(i)+descriptor->dr(i)/2.)/10. << "\""
598  << " zMin=\"" << (descriptor->zcenter(i)-descriptor->dz(i)/2.)/10. << "\""
599  << " zMax=\"" << (descriptor->zcenter(i)+descriptor->dz(i)/2.)/10. << "\""
600  << " eta0=\"" << descriptor->eta_min(i) << "\""
601  << " deta=\"" << descriptor->deta(i) << "\""
602  << " neta=\"" << descriptor->n_eta(i) << "\""
603  << " meta=\"" << tileIdHelper->eta_min(id) << "\""
604  << " phi0=\"" << descriptor->phi_min() << "\""
605  << " nphi=\"" << descriptor->n_phi() << "\""
606  << " />" << std::endl;
607  }
608  }
609  }
610  }

◆ writeTRTGeometry()

void JiveXML::GeometryWriter::writeTRTGeometry ( std::ofstream &  out)
private

Writes the geometry of the TRT detector.

Parameters
outstream where the XML fragment is written to

Definition at line 456 of file GeometryWriter.cxx.

456  {
457 
458  InDetDD::TRT_DetElementCollection::const_iterator it;
459 
460  for (it=m_trt_manager->getDetectorElementBegin(); it<m_trt_manager->getDetectorElementEnd(); ++it) {
461 
462  const InDetDD::TRT_BaseElement *elementIn = *it;
463  // Just an extra precaution to avoid crashes.
464  if (!elementIn) continue;
465  Identifier id = elementIn->identify();
466 
467  if (m_trtIdHelper->phi_module(id) != 0) continue;
468  if (m_trtIdHelper->straw_layer(id) != 0) continue;
469  Amg::Vector3D posIn = elementIn->strawTransform(0) * Amg::Vector3D(0., 0., 0.);
470  if (posIn.z() < 0) continue;
471 
472  const InDetDD::TRT_BaseElement *elementOut;
473 
474  if (m_trtIdHelper->is_barrel(id)) {
477  0,
479 
480  // Just an extra precaution to avoid crashes.
481  if (!elementOut) continue;
482 
483  Amg::Vector3D posOut = elementOut->strawTransform(0) * Amg::Vector3D(0.,0.,0.);
484  // HepGeom::Point3D<double> posOut = elementOut->strawTransform(0) * HepGeom::Point3D<double>(0., 0., 0.);
485 
486  const InDetDD::TRT_BarrelElement *element = dynamic_cast<const InDetDD::TRT_BarrelElement *>(elementIn);
487  if (!element) continue;
488  int nphi = (int) round(2.*M_PI / fabs(element->nextInPhi()->center().phi() - element->center().phi()));
489  double dphiIn = 2.*M_PI / (nphi * m_trtIdHelper->straw_max(elementIn->identify()));
490  double dphiOut = 2.*M_PI / (nphi * m_trtIdHelper->straw_max(elementOut->identify()));
491 
492  out << "<ABarrelTRTDetector c=\"TRT\" n=\"TRT\""
493  << " layer=\"" << m_trtIdHelper->layer_or_wheel(id) << "\""
494  << " nphi=\"" << nphi << "\""
495  << " rMin=\"" << posIn.perp()/10. - .4 << "\""
496  << " rMax=\"" << posOut.perp()/10. + .4 << "\""
497  << " phiIn=\"" << 180./M_PI * (posIn.phi() - dphiIn - 2e-3) << "\""
498  << " phiOut=\"" << 180./M_PI * (posOut.phi() - dphiOut - 2e-3) << "\""
499  << " zMin=\"" << -(posIn.z() + elementIn->strawLength()/2.)/10. << "\""
500  << " zMax=\"" << (posIn.z() + elementIn->strawLength()/2.)/10. << "\""
501  << " />" << std::endl;
502  //if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "TRT barrel out: " << out << endmsg;
503  } else {
504  elementOut = m_trt_manager->getEndcapElement(1,//m_trtIdHelper->barrel_ec(id),
507  0);
508 
509  // Just an extra precaution to avoid crashes.
510  if (!elementOut) continue;
511 
512  //HepGeom::Point3D<double> posOut = elementOut->strawTransform(m_trtIdHelper->straw_max(id)) * HepGeom::Point3D<double>(0., 0., 0.);
513  Amg::Vector3D posOut = elementOut->strawTransform(m_trtIdHelper->straw_max(id)) * Amg::Vector3D(0.,0.,0.);
514 
515  // floor() instead of round() becuase we are neglecting the space between two modules
516  int nphi = (int) floor(2.*M_PI / fabs(posOut.phi() - posIn.phi()));
517 
518  out << "<AEndcapTRTDetector c=\"TRT\" n=\"TRT\""
519  << " layer=\"" << m_trtIdHelper->layer_or_wheel(id) << "\""
520  << " nphi=\"" << nphi << "\""
521  << " rMin=\"" << (posIn.perp()-elementIn->strawLength()/2.)/10. << "\""
522  << " rMax=\"" << (posIn.perp()+elementIn->strawLength()/2.)/10. << "\""
523  << " phi0=\"" << 180./M_PI * posIn.phi() << "\""
524  << " zMin=\"" << posIn.z()/10. << "\""
525  << " zMax=\"" << posOut.z()/10. << "\""
526  << " />" << std::endl;
527  //if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "TRT endcap out: " << out << endmsg;
528  }
529 
530  }
531  }

Member Data Documentation

◆ m_calo_manager

std::unique_ptr<CaloDetDescrManager> JiveXML::GeometryWriter::m_calo_manager
private

Calorimeter detector manager.

Definition at line 169 of file GeometryWriter.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_lar_manager

const LArDetectorManager* JiveXML::GeometryWriter::m_lar_manager {nullptr}
private

Definition at line 172 of file GeometryWriter.h.

◆ m_larMax

std::vector<double> JiveXML::GeometryWriter::m_larMax
private

Definition at line 178 of file GeometryWriter.h.

◆ m_larMin

std::vector<double> JiveXML::GeometryWriter::m_larMin
private

Definition at line 177 of file GeometryWriter.h.

◆ m_numCaloTypes

const int JiveXML::GeometryWriter::m_numCaloTypes = 24
staticprivate

The number of calorimeter sampling types.

Definition at line 175 of file GeometryWriter.h.

◆ m_pixel_manager

const InDetDD::PixelDetectorManager* JiveXML::GeometryWriter::m_pixel_manager {nullptr}
private

Pixel detector manager and ID helper.

Definition at line 157 of file GeometryWriter.h.

◆ m_pixelIdHelper

const PixelID* JiveXML::GeometryWriter::m_pixelIdHelper {nullptr}
private

Definition at line 158 of file GeometryWriter.h.

◆ m_sctIdHelper

const SCT_ID* JiveXML::GeometryWriter::m_sctIdHelper {nullptr}
private

Definition at line 162 of file GeometryWriter.h.

◆ m_silicon_manager

const InDetDD::SCT_DetectorManager* JiveXML::GeometryWriter::m_silicon_manager {nullptr}
private

Silicon detector manager and ID helper.

Definition at line 161 of file GeometryWriter.h.

◆ m_tile_manager

const TileDetDescrManager* JiveXML::GeometryWriter::m_tile_manager {nullptr}
private

Definition at line 171 of file GeometryWriter.h.

◆ m_trt_manager

const InDetDD::TRT_DetectorManager* JiveXML::GeometryWriter::m_trt_manager {nullptr}
private

TRT detector manager and ID helper.

Definition at line 165 of file GeometryWriter.h.

◆ m_trtIdHelper

const TRT_ID* JiveXML::GeometryWriter::m_trtIdHelper {nullptr}
private

Definition at line 166 of file GeometryWriter.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
CaloDetDescrElement::deta
float deta() const
cell deta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:356
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
TileDetDescrManager::tile_descriptors_begin
tile_descr_const_iterator tile_descriptors_begin() const
Definition: TileDetDescrManager.h:101
Tile_Base_ID::eta_min
int eta_min(const Identifier &id) const
max values (-999 == failure)
Definition: Tile_Base_ID.cxx:1545
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
InDetDD::SiDetectorElement::isEndcap
bool isEndcap() const
InDetDD::TRT_BaseElement::strawLength
virtual const double & strawLength() const =0
Active straw length.
color
Definition: jFexInputByteStreamTool.cxx:25
InDetDD::TRT_BarrelElement
Definition: TRT_BarrelElement.h:44
CaloCell_Base_ID::region
int region(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
TRT_ID::straw_max
int straw_max(const Identifier &id) const
Definition: TRT_ID.cxx:803
JiveXML::GeometryWriter::writeLArGeometry
void writeLArGeometry(std::ofstream &out)
Writes the geometry of the LAr calorimeters.
Definition: GeometryWriter.cxx:612
InDetDD::SolidStateDetectorElementBase::phiMax
double phiMax() const
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
Tile_Base_ID::is_tile_gap
bool is_tile_gap(const Identifier &id) const
Definition: Tile_Base_ID.cxx:223
JiveXML::GeometryWriter::m_pixelIdHelper
const PixelID * m_pixelIdHelper
Definition: GeometryWriter.h:158
TileDetDescriptor::phi_min
float phi_min() const
Definition: TileDetDescriptor.h:166
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
InDetDD::TRT_DetectorManager::getBarrelElement
const TRT_BarrelElement * getBarrelElement(unsigned int positive, unsigned int moduleIndex, unsigned int phiIndex, unsigned int strawLayerIndex) const
Access Barrel Elements:---------------—(Fast)-------------------------—.
Definition: TRT_DetectorManager.cxx:103
LArDetectorManager::getTreeTop
virtual PVConstLink getTreeTop(unsigned int i) const override
Gets the ith tree top.
Definition: LArDetectorManager.cxx:21
JiveXML::GeometryWriter::m_larMax
std::vector< double > m_larMax
Definition: GeometryWriter.h:178
InDetAccessor::phi0
@ phi0
Definition: InDetAccessor.h:33
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
MuonGM::round
float round(const float toRound, const unsigned int decimals)
Definition: Mdt.cxx:27
Tile_Base_ID::side
int side(const Identifier &id) const
Definition: Tile_Base_ID.cxx:153
CaloDetDescrElement::dr
float dr() const
cell dr
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:360
InDetDD::SCT_DetectorManager::getDetectorElementBegin
virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const override
Definition: SCT_DetectorManager.cxx:93
skel.it
it
Definition: skel.GENtoEVGEN.py:396
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
SCT_ID::eta_module_max
int eta_module_max(const Identifier &id) const
Definition: SCT_ID.cxx:191
M_PI
#define M_PI
Definition: ActiveFraction.h:11
CaloCell_ID_FCS::FCAL1
@ FCAL1
Definition: FastCaloSim_CaloCell_ID.h:41
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Tile_Base_ID::is_tile_extbarrel
bool is_tile_extbarrel(const Identifier &id) const
Definition: Tile_Base_ID.cxx:214
JiveXML::GeometryWriter::m_silicon_manager
const InDetDD::SCT_DetectorManager * m_silicon_manager
Silicon detector manager and ID helper.
Definition: GeometryWriter.h:161
Tile_Base_ID::tower
int tower(const Identifier &id) const
Definition: Tile_Base_ID.cxx:165
CaloCell_ID_FCS::HEC2
@ HEC2
Definition: FastCaloSim_CaloCell_ID.h:29
SCT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: SCT_ID.h:740
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
JiveXML::GeometryWriter::m_trt_manager
const InDetDD::TRT_DetectorManager * m_trt_manager
TRT detector manager and ID helper.
Definition: GeometryWriter.h:165
SCT_ID::phi_module_max
int phi_module_max(const Identifier &id) const
Definition: SCT_ID.cxx:213
TileDetDescrManager::tile_descriptors_end
tile_descr_const_iterator tile_descriptors_end() const
Definition: TileDetDescrManager.h:104
JiveXML::GeometryWriter::m_tile_manager
const TileDetDescrManager * m_tile_manager
Definition: GeometryWriter.h:171
InDetDD::SolidStateDetectorElementBase::rMin
double rMin() const
TileDetDescriptor::dz
float dz(unsigned int samp) const
Definition: TileDetDescriptor.h:212
PixelID::eta_module_max
int eta_module_max(const Identifier &id) const
Definition: PixelID.cxx:77
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
dumpTruth.getName
getName
Definition: dumpTruth.py:34
JiveXML::GeometryWriter::m_sctIdHelper
const SCT_ID * m_sctIdHelper
Definition: GeometryWriter.h:162
CaloDetDescriptor::calo_z_max
double calo_z_max() const
'ideal' geometry: z maximal
Definition: CaloDetDescriptor.h:553
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
TileDetDescriptor::n_eta
int n_eta(unsigned int samp) const
Definition: TileDetDescriptor.h:159
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
TRT::Hit::side
@ side
Definition: HitInfo.h:83
TileDetDescriptor::dr
float dr(unsigned int samp) const
Definition: TileDetDescriptor.h:198
CaloDetDescrElement::dz
float dz() const
cell dz
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:379
TileDetDescriptor::identify
Identifier identify(void) const
Definition: TileDetDescriptor.h:249
InDetDD::SiDetectorElement::sinTilt
double sinTilt() const
Compute sin(tilt angle) at a given position: at center.
Definition: SiDetectorElement.cxx:223
compareGeometries.outputFile
string outputFile
Definition: compareGeometries.py:25
InDetDD::TRT_BarrelElement::nextInPhi
const TRT_BarrelElement * nextInPhi() const
Returns the next-in-phi detector element, or zero if none (forseeing gaps, in other words).
JiveXML::GeometryWriter::m_calo_manager
std::unique_ptr< CaloDetDescrManager > m_calo_manager
Calorimeter detector manager.
Definition: GeometryWriter.h:169
python.PyAthena.module
module
Definition: PyAthena.py:131
CaloDetDescrElement::identify
Identifier identify() const override final
cell identifier
Definition: CaloDetDescrElement.cxx:64
ENDCAP
@ ENDCAP
Definition: TRTRadiatorParameters.h:10
TileDetDescriptor::rcenter
float rcenter(unsigned int samp) const
Definition: TileDetDescriptor.h:191
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
CaloCell_ID_FCS::HEC1
@ HEC1
Definition: FastCaloSim_CaloCell_ID.h:28
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
JiveXML::GeometryWriter::writeSCTGeometry
void writeSCTGeometry(std::ofstream &out)
Writes the geometry of the silicon detector.
Definition: GeometryWriter.cxx:357
Tile_Base_ID::is_tile_gapscin
bool is_tile_gapscin(const Identifier &id) const
Definition: Tile_Base_ID.cxx:268
CaloDetDescriptor::calo_z_min
double calo_z_min() const
'ideal' geometry: z minimal
Definition: CaloDetDescriptor.h:548
Tile_Base_ID::module
int module(const Identifier &id) const
Definition: Tile_Base_ID.cxx:159
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
fillPileUpNoiseLumi.next
next
Definition: fillPileUpNoiseLumi.py:52
lumiFormat.i
int i
Definition: lumiFormat.py:85
TileDetDescriptor::zcenter
float zcenter(unsigned int samp) const
Definition: TileDetDescriptor.h:205
TileDetDescriptor::n_samp
int n_samp() const
Definition: TileDetDescriptor.h:219
TileID
Helper class for TileCal offline identifiers.
Definition: TileID.h:68
beamspotman.n
n
Definition: beamspotman.py:731
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
FORWARD
#define FORWARD
Definition: ALFA_SvdCalc.h:34
JiveXML::GeometryWriter::m_trtIdHelper
const TRT_ID * m_trtIdHelper
Definition: GeometryWriter.h:166
TileDetDescriptor
Definition: TileDetDescriptor.h:46
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
JiveXML::GeometryWriter::m_lar_manager
const LArDetectorManager * m_lar_manager
Definition: GeometryWriter.h:172
color
color
Definition: BinsDiffFromStripMedian.h:18
CaloCell_Base_ID::is_em_endcap_inner
bool is_em_endcap_inner(const Identifier id) const
test if the id belongs to the EM Endcap inner wheel
InDetDD::SolidStateDetectorElementBase::width
double width() const
Methods from design (inline)
CaloCell_Base_ID::eta
int eta(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
TileDetDescriptor::eta_min
float eta_min(unsigned int samp) const
Definition: TileDetDescriptor.h:138
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
InDetDD::PixelDetectorManager::getDetectorElementBegin
virtual SiDetectorElementCollection::const_iterator getDetectorElementBegin() const override
Definition: PixelDetectorManager.cxx:110
JiveXML::GeometryWriter::writeTILEGeometry
void writeTILEGeometry(std::ofstream &out)
Writes the geometry of the TILE calorimeters.
Definition: GeometryWriter.cxx:555
InDetDD::TRT_BaseElement::identify
virtual Identifier identify() const override final
identifier of this detector element:
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
TRT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: TRT_ID.h:866
TRT_ID::straw_layer
int straw_layer(const Identifier &id) const
Definition: TRT_ID.h:893
CaloDetDescrElement::is_lar_fcal
bool is_lar_fcal() const
cell belongs to FCAL
Definition: CaloDetDescrElement.cxx:138
JiveXML::GeometryWriter::writeSolenoidGeometry
void writeSolenoidGeometry(std::ofstream &out)
Writes the (hardcoded) geometry of the solenoid.
Definition: GeometryWriter.cxx:533
TRT_ID::layer_or_wheel
int layer_or_wheel(const Identifier &id) const
Definition: TRT_ID.h:884
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
JiveXML::GeometryWriter::writePixelGeometry
void writePixelGeometry(std::ofstream &out)
Writes the geometry of the pixel detector.
Definition: GeometryWriter.cxx:276
InDetDD::TRT_DetectorManager::getDetectorElementBegin
TRT_DetElementCollection::const_iterator getDetectorElementBegin() const
Definition: TRT_DetectorManager.cxx:175
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
InDetDD::SolidStateDetectorElementBase::zMin
double zMin() const
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
CaloDetDescrElement::is_tile
bool is_tile() const
cell belongs to Tile
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:442
PixelID::phi_module_max
int phi_module_max(const Identifier &id) const
Definition: PixelID.cxx:121
SCT_ID::eta_module_min
int eta_module_min(const Identifier &id) const
Definition: SCT_ID.cxx:166
InDetDD::TRT_DetectorManager::getEndcapElement
const TRT_EndcapElement * getEndcapElement(unsigned int positive, unsigned int wheelIndex, unsigned int strawLayerIndex, unsigned int phiIndex) const
Access Endcap Elements:---------------—(Fast)--------------------------—.
Definition: TRT_DetectorManager.cxx:119
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
PixelID::eta_module
int eta_module(const Identifier &id) const
Definition: PixelID.h:651
TRT_ID::straw_layer_max
int straw_layer_max(const Identifier &id) const
Max values for each field (-999 == failure)
Definition: TRT_ID.cxx:782
CaloCell_Base_ID::eta_min
int eta_min(const Identifier regId) const
min value of eta index (-999 == failure)
TileDetDescriptor::deta
float deta(unsigned int samp) const
Definition: TileDetDescriptor.h:152
InDetDD::SolidStateDetectorElementBase::rMax
double rMax() const
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
InDetDD::SiDetectorElement::otherSide
const SiDetectorElement * otherSide() const
Useful for SCT only.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
InDetDD::SolidStateDetectorElementBase::zMax
double zMax() const
InDetDD::SiDetectorElement::isBarrel
bool isBarrel() const
JiveXML::GeometryWriter::m_larMin
std::vector< double > m_larMin
Definition: GeometryWriter.h:177
JiveXML::GeometryWriter::writeTRTGeometry
void writeTRTGeometry(std::ofstream &out)
Writes the geometry of the TRT detector.
Definition: GeometryWriter.cxx:456
CaloCell_Base_ID::phi
int phi(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
TRT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: TRT_ID.h:875
CaloCell_ID_FCS::HEC0
@ HEC0
Definition: FastCaloSim_CaloCell_ID.h:27
eflowRec::phiIndex
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
Definition: EtaPhiLUT.cxx:23
CaloDetDescrElement::dphi
float dphi() const
cell dphi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:358
PixelID::eta_module_min
int eta_module_min(const Identifier &id) const
Definition: PixelID.cxx:94
InDetDD::SiDetectorElement::nextInEta
const SiDetectorElement * nextInEta() const
TileDetDescrManager::tile_descr_const_iterator
tile_descr_vec::const_iterator tile_descr_const_iterator
Definition: TileDetDescrManager.h:48
InDetDD::TRT_BaseElement::strawTransform
const Amg::Transform3D & strawTransform(unsigned int straw) const
Straw transform - fast access in array, in Tracking frame: Amg.
Definition: TRT_BaseElement.cxx:89
TRT_ID::is_barrel
bool is_barrel(const Identifier &id) const
Test for barrel.
Definition: TRT_ID.h:857
a
TList * a
Definition: liststreamerinfos.cxx:10
InDetDD::SolidStateDetectorElementBase::phiMin
double phiMin() const
CaloCell_Base_ID::side
int side(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
h
CaloDetDescriptor
This is a base class for LAr and Tile Descriptors The primary goal is to speed up loops over all the ...
Definition: CaloDetDescriptor.h:58
CaloDetDescrElement::getSampling
CaloCell_ID::CaloSample getSampling() const
cell sampling
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:395
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
CaloDetDescrElement::z
float z() const
cell z
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:367
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
SCT_ID::eta_module
int eta_module(const Identifier &id) const
Definition: SCT_ID.h:746
InDetDD::TRT_BaseElement::center
virtual const Amg::Vector3D & center() const override final
Element Surface: center of a straw layer.
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
BARREL
@ BARREL
Definition: TRTRadiatorParameters.h:10
CaloDetDescrElement::descriptor
const CaloDetDescriptor * descriptor() const
cell descriptor
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:428
SCT_ID::side
int side(const Identifier &id) const
Definition: SCT_ID.h:752
CaloCell_ID_FCS::FCAL2
@ FCAL2
Definition: FastCaloSim_CaloCell_ID.h:42
CaloDetDescrElement::eta
float eta() const
cell eta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:344
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
CaloDetDescrElement::phi
float phi() const
cell phi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:346
Tile_Base_ID::section
int section(const Identifier &id) const
Definition: Tile_Base_ID.cxx:147
InDetDD::SolidStateDetectorElementBase::length
double length() const
Length in eta direction (z - barrel, r - endcap)
CaloDetDescrElement::r
float r() const
cell r
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:348
section
void section(const std::string &sec)
Definition: TestTriggerMenuAccess.cxx:22
CaloCell_ID_FCS::HEC3
@ HEC3
Definition: FastCaloSim_CaloCell_ID.h:30
CaloDetDescriptor::calo_r_max
double calo_r_max() const
'ideal' geometry: r maximal
Definition: CaloDetDescriptor.h:583
PixelID::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:644
Tile_Base_ID::is_tile_barrel
bool is_tile_barrel(const Identifier &id) const
Test of an Identifier to see if it belongs to a particular part of the calorimeter.
Definition: Tile_Base_ID.cxx:205
JiveXML::GeometryWriter::m_pixel_manager
const InDetDD::PixelDetectorManager * m_pixel_manager
Pixel detector manager and ID helper.
Definition: GeometryWriter.h:157
Tile_Base_ID::cell_id
Identifier cell_id(const Identifier &any_id) const
Definition: Tile_Base_ID.cxx:581
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
CaloCell_ID_FCS::FCAL0
@ FCAL0
Definition: FastCaloSim_CaloCell_ID.h:40
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
python.compressB64.c
def c
Definition: compressB64.py:93
JiveXML::GeometryWriter::writeHeader
void writeHeader(std::ofstream &out)
Writes the header of the XML file.
Definition: GeometryWriter.cxx:134
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
buildCaloDetDescr
std::unique_ptr< CaloDetDescrManager > buildCaloDetDescr(ISvcLocator *svcLocator, IMessageSvc *msgSvc, const GeoAlignmentStore *geoAlignStore, const CaloRec::CaloCellPositionShift *cellPosShift)
Definition: CaloDetDescrBuilder.cxx:46
TileDetDescriptor::n_phi
int n_phi() const
Definition: TileDetDescriptor.h:181
InDetDD::SolidStateDetectorElementBase::identify
virtual Identifier identify() const override final
identifier of this detector element (inline)
CaloDetDescriptor::calo_r_min
double calo_r_min() const
'ideal' geometry: r minimal
Definition: CaloDetDescriptor.h:578
CaloConstIteratorAdaptor
Tranform iterator over pointers to iterator over const pointers.
Definition: CaloConstIteratorAdaptor.h:47
JiveXML::GeometryWriter::writeMBTSGeometry
void writeMBTSGeometry(std::ofstream &out)
Writes the geometry of the Minimum Bias Trigger Scintillators.
Definition: GeometryWriter.cxx:795
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
fitman.rho
rho
Definition: fitman.py:532
JiveXML::GeometryWriter::m_numCaloTypes
static const int m_numCaloTypes
The number of calorimeter sampling types.
Definition: GeometryWriter.h:175
fitman.k
k
Definition: fitman.py:528
python.handimod.cc
int cc
Definition: handimod.py:523
InDetDD::TRT_BaseElement
Definition: TRT_BaseElement.h:57
JiveXML::GeometryWriter::writeFooter
void writeFooter(std::ofstream &out)
Writes the footer of the XML file.
Definition: GeometryWriter.cxx:895
TileDetDescrManager::get_id
const TileID * get_id() const
Definition: TileDetDescrManager.h:172
Identifier
Definition: IdentifierFieldParser.cxx:14