ATLAS Offline Software
LArBarrelPresamplerGeometry.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // LArBarrelPresamplerGeometry.hh
6 
7 #ifndef LARG4BARREL_LARBARRELPRESAMPLERGEOMETRY_H
8 #define LARG4BARREL_LARBARRELPRESAMPLERGEOMETRY_H
9 
12 
14 
15 #include "AthenaKernel/Units.h"
16 #include "globals.hh"
17 
18 
19 // Forward declarations.
20 class LArG4Identifier;
21 class G4Step;
22 
23 namespace LArG4 {
24 
25  namespace BarrelPresampler {
26 
27  class Geometry: public extends<AthService, ILArBarrelPresamplerGeometry> {
28 
29  public:
30 
31  //constructor
32  Geometry(const std::string& name, ISvcLocator * pSvcLocator);
33 
34  virtual ~Geometry();
35 
36  virtual StatusCode initialize() override final;
37 
38  virtual LArG4Identifier CalculateIdentifier( const G4Step* ) const override final;
39  virtual bool findCell(CalcData & currentCellData, G4double xloc,G4double yloc,G4double zloc) const override final;
40 
41  private:
42  LArG4Identifier CalculatePSActiveIdentifier( const G4Step* , const G4int indPS ) const;
43  LArG4Identifier CalculatePS_DMIdentifier( const G4Step* , const G4int indPS ) const;
44 
45  inline G4int determineZSide(const double zCoord) const {
46  // in TB case, only 1 side,
47  // in Atlas case, use overall z to decide side
48  if (m_testbeam) { return 1; }
49  if (zCoord > 0.) { return 1; }
50  return -1;
51  }
52 
53  // detector name, for translated geometry
54  std::string m_detectorName{"LArMgr"};
55 
56 #include "PresParameterDef.h"
57 
58  // end z of the various modules
59  G4double m_end_module[8]{};
60  G4double m_zminPS{3.00*Athena::Units::mm}; // FIXME this should come from the database;
61  G4double m_zpres{1549.*Athena::Units::mm}; // position of mother volume inside nominal Atlas frame
62  G4double m_cat_th{};
63  // z of first cathode in each module
64  G4double m_first_cathod[8]{};
65  // tilt of electrodes
66  G4double m_tilt[8]{};
67  // number of gaps per cell
68  G4int m_ngap_cell[8]{};
69  // pitch in z of gaps
70  G4double m_pitch[8]{};
71  // number of cells per modules
72  G4int m_ncell_module[8]{};
73  // total LAr thickness
74  G4double m_halfThickLAr{0.5*13.*Athena::Units::mm}; // LAr total gap
75  // is this a test beam simulation job
76  bool m_testbeam{false};
77 
78  } ;
79 
80  } //end of Barrel namespace
81 
82 } // end of LArG4 namespace
83 
84 #endif // LARG4BARREL_LARBARRELPRESAMPLERGEOMETRY_H
LArG4::BarrelPresampler::Geometry::m_halfThickLAr
G4double m_halfThickLAr
Definition: LArBarrelPresamplerGeometry.h:74
LArG4::BarrelPresampler::Geometry
Definition: LArBarrelPresamplerGeometry.h:27
LArG4::BarrelPresampler::Geometry::m_cat_th
G4double m_cat_th
Definition: LArBarrelPresamplerGeometry.h:62
LArG4Identifier
Definition: LArG4Identifier.h:121
LArG4::BarrelPresampler::CalcData
Definition: ILArBarrelPresamplerGeometry.h:26
LArG4::BarrelPresampler::Geometry::initialize
virtual StatusCode initialize() override final
initialize geometry parameters this should at some stage be taken from a database....
Definition: LArBarrelPresamplerGeometry.cxx:98
PresParameterDef.h
LArG4::BarrelPresampler::Geometry::findCell
virtual bool findCell(CalcData &currentCellData, G4double xloc, G4double yloc, G4double zloc) const override final
=============================================================================== bool findCell(xloc,...
Definition: LArBarrelPresamplerGeometry.cxx:374
LArG4::BarrelPresampler::Geometry::CalculateIdentifier
virtual LArG4Identifier CalculateIdentifier(const G4Step *) const override final
The following method computes the identifiers in the Presampler volume:
Definition: LArBarrelPresamplerGeometry.cxx:152
LArG4::BarrelPresampler::Geometry::Geometry
Geometry(const std::string &name, ISvcLocator *pSvcLocator)
Definition: LArBarrelPresamplerGeometry.cxx:85
LArG4::BarrelPresampler::Geometry::m_zminPS
G4double m_zminPS
Definition: LArBarrelPresamplerGeometry.h:60
LArG4
Definition: LArWheelCalculatorEnums.h:8
LArG4::BarrelPresampler::Geometry::m_detectorName
std::string m_detectorName
Definition: LArBarrelPresamplerGeometry.h:54
LArG4::BarrelPresampler::Geometry::m_tilt
G4double m_tilt[8]
Definition: LArBarrelPresamplerGeometry.h:66
LArG4::BarrelPresampler::Geometry::m_end_module
G4double m_end_module[8]
Definition: LArBarrelPresamplerGeometry.h:59
LArG4::BarrelPresampler::Geometry::~Geometry
virtual ~Geometry()
Definition: LArBarrelPresamplerGeometry.cxx:93
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArG4::BarrelPresampler::Geometry::determineZSide
G4int determineZSide(const double zCoord) const
Definition: LArBarrelPresamplerGeometry.h:45
LArG4Identifier.h
LArG4::BarrelPresampler::Geometry::m_pitch
G4double m_pitch[8]
Definition: LArBarrelPresamplerGeometry.h:70
LArG4::BarrelPresampler::Geometry::m_ncell_module
G4int m_ncell_module[8]
Definition: LArBarrelPresamplerGeometry.h:72
LArG4::BarrelPresampler::Geometry::m_ngap_cell
G4int m_ngap_cell[8]
Definition: LArBarrelPresamplerGeometry.h:68
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
LArG4::BarrelPresampler::Geometry::CalculatePS_DMIdentifier
LArG4Identifier CalculatePS_DMIdentifier(const G4Step *, const G4int indPS) const
Definition: LArBarrelPresamplerGeometry.cxx:237
Units.h
Wrapper to avoid constant divisions when using units.
LArG4::BarrelPresampler::Geometry::m_zpres
G4double m_zpres
Definition: LArBarrelPresamplerGeometry.h:61
LArG4::BarrelPresampler::Geometry::m_testbeam
bool m_testbeam
Definition: LArBarrelPresamplerGeometry.h:76
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
AthService.h
LArG4::BarrelPresampler::Geometry::CalculatePSActiveIdentifier
LArG4Identifier CalculatePSActiveIdentifier(const G4Step *, const G4int indPS) const
calculate identifier from a G4 step in the PS active region This function should always return a vali...
Definition: LArBarrelPresamplerGeometry.cxx:186
LArG4::BarrelPresampler::Geometry::m_first_cathod
G4double m_first_cathod[8]
Definition: LArBarrelPresamplerGeometry.h:64
ILArBarrelPresamplerGeometry.h