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 // Given a point compute all quantities (cell number, distance to electrode, etc...)
54 virtual void findCell( CalcData & currentCellData, const double & x, const double & y, const double & z,
55 const double & r, const double & eta, const double & phi, const bool detail) const override final;
56
57 private:
58
59 LArG4Identifier CalculateECAMIdentifier( const G4Step* , const G4int indEcam, const bool inSTAC=true,int zside=1) const;
60 bool CheckLArIdentifier(int sampling,int region, int eta,int phi) const;
61 bool CheckDMIdentifier(int type, int sampling, int region, int eta, int phi) const;
62
63 // detector name, for translated geometry
64 Gaudi::Property<std::string> m_detectorName{this, "DetectorName", "LArMgr"};
65 // to handle small difference (mostly phi wrapping and +-z symmetry)
66 // between atlas and test beam
67 Gaudi::Property<bool> m_testbeam{this, "TestBeam", false};
68
69 G4String m_ecamName;
70
71 // global EMBarrel dimensions
72 double m_rMinAccordion{0.};
73 double m_rMaxAccordion{0.};
74 double m_zMinBarrel{0.};
75 double m_zMaxBarrel{0.};
77 double m_etaMaxBarrel{0.};
78
79 // GU 11/06/2003 total number of cells in phi
80 int m_NCellTot{0}; // either 64 or 1024 for TestBeam or Atlas
81 int m_NCellMax{0}; // 1024
82
83 // Accordion parameters
84 int m_Nbrt{0}; // number of straight sections (=14)
85 int m_Nbrt1{0}; // number of folds (=15)
86
87 // Accordion parameters, refering to the neutral fibre
88 double m_gam0{0.}; //phi position for the first absorber neutral fiber
89 double m_rint_eleFib{0.}; //2.78
90
91 double *m_rc{nullptr};
92 double *m_phic{nullptr};
93 double *m_xc{nullptr};
94 double *m_yc{nullptr};
95 double *m_delta{nullptr};
96 int m_parity{0};
97
98 // to access G4 geometry
103
104 bool m_iflSAG{false};
105
106 // intermediate values for phi cell computation
107 G4int m_NRphi{0};
108 G4double m_Rmin{0.};
109 G4double m_Rmax{0.};
110 G4double m_Rphi[5000] = {0};
111 G4double m_dR{0.};
112
113 // function to compute distance to electrode
114 double Distance_Ele(const double &x, const double &y,
115 const int &PhiC, int &Num_Straight, const int &Num_Coude,
116 double &xl) const;
117 // function to compute distance to absorber
118 double Distance_Abs(const double &x, const double &y,
119 const int &nabs, const int &Num_Straight, const int &Num_Coude) const;
120
121 // longitudinal and eta segmentation of electrodes
122 G4int SampSeg(G4double,G4double,G4double,G4int&,G4int&,G4int&,G4int&,G4int&) const;
123
125
127 void GetRphi();
129 G4double Phi0(G4double) const;
131 G4int PhiGap(const double &, const double &, const double &) const;
132
133 protected:
134
136
137
138 } ;
139
140 } //end of Barrel namespace
141
142} // end of LArG4 namespace
143
144#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
const LArStraightAbsorbers * m_absorber
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
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
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