ATLAS Offline Software
Loading...
Searching...
No Matches
LArBarrelGeometry.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// LArBarrelGeometry.hh
6
7#ifndef LARG4BARREL_LARBARRELGEOMETRY_H
8#define LARG4BARREL_LARBARRELGEOMETRY_H
9
10#include "ILArBarrelGeometry.h"
12
15#include "G4ThreeVector.hh"
16#include "G4StepPoint.hh"
17#include "G4Step.hh"
18#include "G4LogicalVolume.hh"
19#include "G4LogicalVolumeStore.hh"
20#include "G4TouchableHistory.hh"
21
22#include <string>
23
24// Forward declarations.
25class LArG4Identifier;
26class G4Step;
31
32namespace LArG4 {
33
34 namespace Barrel {
35
36 class Geometry: public extends<AthService, ILArBarrelGeometry> {
37
38 public:
39
40 //constructor
41 Geometry(const std::string& name, ISvcLocator * pSvcLocator);
42
43 virtual ~Geometry() = default;
44
45 virtual StatusCode initialize() override final;
46 virtual StatusCode finalize() override final;
47
48 virtual void initializeForSDCreation() override final;
49
50 // Full identifier computation from a G4 step
51 virtual LArG4Identifier CalculateIdentifier( const G4Step* ) const override final;
52
53 // Super resolution identifier computation from a G4 step
54 virtual LArG4Identifier CalculateSuperResolutionIdentifier(const G4Step* a_step) const override final;
55
56
57 // Given a point compute all quantities (cell number, distance to electrode, etc...)
58 virtual void findCell( CalcData & currentCellData, const double & x, const double & y, const double & z,
59 const double & r, const double & eta, const double & phi, const bool detail) const override final;
60
61 private:
62
63 LArG4Identifier CalculateECAMIdentifier( const G4Step* , const G4int indEcam, const bool inSTAC=true,int zside=1) const;
64 bool CheckLArIdentifier(int sampling,int region, int eta,int phi) const;
65 bool CheckDMIdentifier(int type, int sampling, int region, int eta, int phi) const;
66
67 // detector name, for translated geometry
68 Gaudi::Property<std::string> m_detectorName{this, "DetectorName", "LArMgr"};
69 // to handle small difference (mostly phi wrapping and +-z symmetry)
70 // between atlas and test beam
71 Gaudi::Property<bool> m_testbeam{this, "TestBeam", false};
72
73 // Super-resolution granularity: number of sub-cell bins in each dimension
74 Gaudi::Property<int> m_nBinsEtaSR{this, "nBinsEtaSR", 16, "Number of SR sub-cell bins in eta"};
75 Gaudi::Property<int> m_nBinsPhiSR{this, "nBinsPhiSR", 16, "Number of SR sub-cell bins in phi"};
76 Gaudi::Property<int> m_nBinsRadiusSR{this, "nBinsRadiusSR", 5, "Number of SR sub-cell bins in radius"};
77
78 G4String m_ecamName;
79
80 // global EMBarrel dimensions
81 double m_rMinAccordion{0.};
82 double m_rMaxAccordion{0.};
83 double m_zMinBarrel{0.};
84 double m_zMaxBarrel{0.};
86 double m_etaMaxBarrel{0.};
87
88 // GU 11/06/2003 total number of cells in phi
89 int m_NCellTot{0}; // either 64 or 1024 for TestBeam or Atlas
90 int m_NCellMax{0}; // 1024
91
92 // Accordion parameters
93 int m_Nbrt{0}; // number of straight sections (=14)
94 int m_Nbrt1{0}; // number of folds (=15)
95
96 // Accordion parameters, refering to the neutral fibre
97 double m_gam0{0.}; //phi position for the first absorber neutral fiber
98 double m_rint_eleFib{0.}; //2.78
99
100 double *m_rc{nullptr};
101 double *m_phic{nullptr};
102 double *m_xc{nullptr};
103 double *m_yc{nullptr};
104 double *m_delta{nullptr};
105 int m_parity{0};
106
107 // to access G4 geometry
112
113 bool m_iflSAG{false};
114
115 // intermediate values for phi cell computation
116 G4int m_NRphi{0};
117 G4double m_Rmin{0.};
118 G4double m_Rmax{0.};
119 G4double m_Rphi[5000] = {0};
120 G4double m_dR{0.};
121
122 // function to compute distance to electrode
123 double Distance_Ele(const double &x, const double &y,
124 const int &PhiC, int &Num_Straight, const int &Num_Coude,
125 double &xl) const;
126 // function to compute distance to absorber
127 double Distance_Abs(const double &x, const double &y,
128 const int &nabs, const int &Num_Straight, const int &Num_Coude) const;
129
130 // longitudinal and eta segmentation of electrodes
131 G4int SampSeg(G4double,G4double,G4double,G4int&,G4int&,G4int&,G4int&,G4int&) const;
132
134
136 void GetRphi();
138 G4double Phi0(G4double) const;
140 G4int PhiGap(const double &, const double &, const double &) const;
141
142 protected:
143
145
146
147 } ;
148
149 } //end of Barrel namespace
150
151} // end of LArG4 namespace
152
153#endif // LARG4BARREL_LARBARRELGEOMETRY_H
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define y
#define x
#define z
virtual LArG4Identifier CalculateIdentifier(const G4Step *) const override final
bool CheckDMIdentifier(int type, int sampling, int region, int eta, int phi) const
Gaudi::Property< std::string > m_detectorName
const LArCoudeAbsorbers * m_coudeabs
Gaudi::Property< int > m_nBinsEtaSR
const LArStraightAbsorbers * m_absorber
Gaudi::Property< int > m_nBinsPhiSR
bool CheckLArIdentifier(int sampling, int region, int eta, int phi) const
G4double Phi0(G4double) const
virtual void initializeForSDCreation() override final
virtual ~Geometry()=default
void GetRphi()
phi vs r of first absorber in nominal geometry
double Distance_Ele(const double &x, const double &y, const int &PhiC, int &Num_Straight, const int &Num_Coude, double &xl) const
Gaudi::Property< bool > m_testbeam
Gaudi::Property< int > m_nBinsRadiusSR
const LArCoudeElectrodes * m_coudeelec
const LArStraightElectrodes * m_electrode
Geometry(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize() override final
G4int PhiGap(const double &, const double &, const double &) const
LArG4Identifier CalculateECAMIdentifier(const G4Step *, const G4int indEcam, const bool inSTAC=true, int zside=1) const
virtual LArG4Identifier CalculateSuperResolutionIdentifier(const G4Step *a_step) const override final
G4int SampSeg(G4double, G4double, G4double, G4int &, G4int &, G4int &, G4int &, G4int &) const
double Distance_Abs(const double &x, const double &y, const int &nabs, const int &Num_Straight, const int &Num_Coude) const
virtual void findCell(CalcData &currentCellData, const double &x, const double &y, const double &z, const double &r, const double &eta, const double &phi, const bool detail) const override final
virtual StatusCode finalize() override final
Support class for PropertyMgr.
Definition Property.h:23
int r
Definition globals.cxx:22
=============================================================================
STL namespace.
#define private