Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:17:46

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4DETECTORS_PHG4CYLINDERGEOMV1_H
0004 #define G4DETECTORS_PHG4CYLINDERGEOMV1_H
0005 
0006 #include "PHG4CylinderGeom.h"
0007 
0008 #include <cmath>
0009 #include <iostream>  // for cout, ostream
0010 
0011 class PHParameters;
0012 
0013 class PHG4CylinderGeomv1 : public PHG4CylinderGeom
0014 {
0015  public:
0016   PHG4CylinderGeomv1() {}
0017   PHG4CylinderGeomv1(const double r, const double zmi, const double zma, const double thickn)
0018     : radius(r)
0019     , zmin(zmi)
0020     , zmax(zma)
0021     , thickness(thickn)
0022   {
0023   }
0024 
0025   ~PHG4CylinderGeomv1() override {}
0026 
0027   // from PHObject
0028   void identify(std::ostream& os = std::cout) const override;
0029 
0030   int get_layer() const override { return layer; }
0031   double get_radius() const override { return radius; }
0032   double get_thickness() const override { return thickness; }
0033   double get_zmin() const override { return zmin; }
0034   double get_zmax() const override { return zmax; }
0035 
0036   void set_layer(const int i) override { layer = i; }
0037   void set_radius(const double r) override { radius = r; }
0038   void set_thickness(const double t) override { thickness = t; }
0039   void set_zmin(const double z) override { zmin = z; }
0040   void set_zmax(const double z) override { zmax = z; }
0041 
0042   //! load parameters from PHParameters, which interface to Database/XML/ROOT files
0043   void ImportParameters(const PHParameters& param) override;
0044 
0045  protected:
0046   int layer = -1;
0047   double radius = NAN;
0048   double zmin = NAN;
0049   double zmax = NAN;
0050   double thickness = NAN;
0051 
0052   ClassDefOverride(PHG4CylinderGeomv1, 1)
0053 };
0054 
0055 #endif