File indexing completed on 2025-08-06 08:19:21
0001
0002
0003 #ifndef G4MAIN_PHG4ETAPHIPARAMETERIZATION_H
0004 #define G4MAIN_PHG4ETAPHIPARAMETERIZATION_H
0005
0006 #include <Geant4/G4Types.hh> // for G4int
0007 #include <Geant4/G4VPVParameterisation.hh>
0008
0009 #include <iostream> // for cout, ostream
0010 #include <vector>
0011
0012 class G4Tubs;
0013 class G4VPhysicalVolume;
0014
0015
0016
0017
0018 class PHG4EtaPhiParameterization : public G4VPVParameterisation
0019 {
0020 public:
0021 PHG4EtaPhiParameterization(
0022 unsigned int neta,
0023 double minEta,
0024 double maxEta,
0025 unsigned int nphi,
0026 double startPhi,
0027 double deltaPhi,
0028 double radiusIn,
0029 double radiusOut,
0030 double centerZ
0031 );
0032
0033 ~PHG4EtaPhiParameterization() override;
0034
0035 virtual void Print(std::ostream& os = std::cout) const;
0036 void ComputeTransformation(const G4int copyNo,
0037 G4VPhysicalVolume* physVol) const override;
0038
0039 using G4VPVParameterisation::ComputeDimensions;
0040 void ComputeDimensions(G4Tubs& ring, const G4int copyNo,
0041 const G4VPhysicalVolume* physVol) const override;
0042
0043 int GetIEta(int copyNo) const { return _ieta.at(copyNo); }
0044 int GetIPhi(int copyNo) const { return _iphi.at(copyNo); }
0045
0046 private:
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058 private:
0059 unsigned int _neta;
0060 double _minEta;
0061 double _maxEta;
0062 unsigned int _nphi;
0063 double _startPhi;
0064 double _deltaPhi;
0065 double _radiusIn;
0066 double _radiusOut;
0067 double _centerZ;
0068 std::vector<double> _zpos;
0069 std::vector<double> _zhalf;
0070 std::vector<double> _phi0;
0071 std::vector<double> _phi1;
0072 std::vector<int> _ieta;
0073 std::vector<int> _iphi;
0074 };
0075
0076 #endif