EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4EtaParameterization.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4EtaParameterization.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef G4MAIN_PHG4ETAPARAMETERIZATION_H
4 #define G4MAIN_PHG4ETAPARAMETERIZATION_H
5 
6 #include <Geant4/G4Types.hh> // for G4int
7 #include <Geant4/G4VPVParameterisation.hh>
8 
9 #include <iostream> // for cout, ostream
10 #include <vector>
11 
12 class G4Tubs;
13 class G4VPhysicalVolume;
14 
15 // Parameterization to define rings whose size changes with Z to
16 // correspond to fixed width in eta.
17 
18 class PHG4EtaParameterization : public G4VPVParameterisation
19 {
20 public:
21 
23  unsigned int neta, // Binning in eta
24  double minEta, // "
25  double maxEta, // "
26  double startPhi,
27  double deltaPhi,
28  double radiusIn, // Radius of inner face of cylinder
29  double radiusOut, // Radius of outer face of cylinder
30  double centerZ // overall Z of center of rings
31  );
32 
33  ~PHG4EtaParameterization() override;
34 
35  virtual void Print(std::ostream& os = std::cout) const;
36 
37  void ComputeTransformation(const G4int copyNo,
38  G4VPhysicalVolume* physVol) const override;
39 
40  void ComputeDimensions(G4Tubs& ring, const G4int copyNo,
41  const G4VPhysicalVolume* physVol) const override;
42 
43  int GetIEta(int copyNo) const { return _ieta.at(copyNo); }
44 
45 private: // Dummy declarations to get rid of warnings ...
46 
47 // void ComputeDimensions(G4Trd&,const G4int,const G4VPhysicalVolume*) const {}
48 // void ComputeDimensions(G4Trap&,const G4int,const G4VPhysicalVolume*) const {}
49 // void ComputeDimensions(G4Cons&,const G4int,const G4VPhysicalVolume*) const {}
50 // void ComputeDimensions(G4Sphere&,const G4int,const G4VPhysicalVolume*) const {}
51 // void ComputeDimensions(G4Orb&,const G4int,const G4VPhysicalVolume*) const {}
52 // void ComputeDimensions(G4Torus&,const G4int,const G4VPhysicalVolume*) const {}
53 // void ComputeDimensions(G4Para&,const G4int,const G4VPhysicalVolume*) const {}
54 // void ComputeDimensions(G4Hype&,const G4int,const G4VPhysicalVolume*) const {}
55 // void ComputeDimensions(G4Box&,const G4int,const G4VPhysicalVolume*) const {}
56 // void ComputeDimensions(G4Polycone&,const G4int,const G4VPhysicalVolume*) const {}
57 // void ComputeDimensions(G4Polyhedra&,const G4int,const G4VPhysicalVolume*) const {}
58 
59 private:
60 
61  unsigned int _neta;
62  double _minEta;
63  double _maxEta;
64  double _startPhi;
65  double _deltaPhi;
66  double _radiusIn;
67  double _radiusOut;
68  double _centerZ;
69  std::vector<double> _zpos; // Z positions of the rings
70  std::vector<double> _zhalf; // Z half-widths of the rings
71  std::vector<double> _phi0; // Lower edge of phi bins
72  std::vector<double> _phi1; // Upper edge of phi bins
73  std::vector<int> _ieta;
74  std::vector<int> _iphi;
75 };
76 
77 
78 #endif