Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 // $Id: $
0004 
0005 /*!
0006  * \file PHG4OuterHcalField.h
0007  * \brief
0008  * \author Jin Huang <jhuang@bnl.gov>
0009  * \version $Revision:   $
0010  * \date $Date: $
0011  */
0012 
0013 #ifndef G4DETECTORS_PHG4OUTERHCALFIELD_H
0014 #define G4DETECTORS_PHG4OUTERHCALFIELD_H
0015 
0016 #include <Geant4/G4MagneticField.hh>
0017 #include <Geant4/G4Types.hh>  // for G4double, G4int
0018 
0019 /*!
0020  * \brief PHG4OuterHcalField
0021  *
0022  * After burner to produce magnetic field in outer HCal on top of sPHENIX field map
0023  * In leading order, for the field within the plane of absorber plate,
0024  *  iron absorb almost all the flux, with field in the air-scintillator region
0025  * reduced to 1/relative_permeability_absorber of that in the iron.
0026  * The field strength perpendicular to the plate remain unchanged.
0027  *
0028  * relative_permeability_absorber = 1514, relative permeability for Steel 1006 @ B = 1.06T
0029  * http://www.fieldp.com/magneticproperties.html
0030  */
0031 class PHG4OuterHcalField : public G4MagneticField
0032 {
0033  public:
0034   PHG4OuterHcalField() = delete;
0035 
0036   PHG4OuterHcalField(bool isInIron, G4int steelPlates,
0037                      G4double scintiGap, G4double tiltAngle);
0038 
0039   ~PHG4OuterHcalField() override {}
0040 
0041   void
0042   GetFieldValue(const double Point[4], double *Bfield) const override;
0043 
0044   bool
0045   is_is_in_iron() const
0046   {
0047     return is_in_iron;
0048   }
0049 
0050   void
0051   set_is_in_iron(bool isInIron)
0052   {
0053     is_in_iron = isInIron;
0054   }
0055 
0056   G4int
0057   get_steel_plates() const
0058   {
0059     return n_steel_plates;
0060   }
0061 
0062   void
0063   set_steel_plates(G4int steelPlates)
0064   {
0065     n_steel_plates = steelPlates;
0066   }
0067 
0068   double
0069   get_relative_permeability_absorber() const
0070   {
0071     return relative_permeability_absorber;
0072   }
0073 
0074   void
0075   set_relative_permeability_absorber(double relativePermeabilityAbsorber)
0076   {
0077     relative_permeability_absorber = relativePermeabilityAbsorber;
0078   }
0079 
0080   double
0081   get_relative_permeability_gap() const
0082   {
0083     return relative_permeability_gap;
0084   }
0085 
0086   void
0087   set_relative_permeability_gap(double relativePermeabilityGap)
0088   {
0089     relative_permeability_gap = relativePermeabilityGap;
0090   }
0091 
0092   G4double
0093   get_scinti_gap() const
0094   {
0095     return scinti_gap;
0096   }
0097 
0098   void
0099   set_scinti_gap(G4double scintiGap)
0100   {
0101     scinti_gap = scintiGap;
0102   }
0103 
0104   G4double
0105   get_tilt_angle() const
0106   {
0107     return tilt_angle;
0108   }
0109 
0110   void
0111   set_tilt_angle(G4double tiltAngle)
0112   {
0113     tilt_angle = tiltAngle;
0114   }
0115 
0116  private:
0117   double relative_permeability_absorber = 1514.;
0118   // relative permeability for Steel 1006 @ B = 1.06T
0119   double relative_permeability_gap = 1;
0120 
0121   bool is_in_iron;
0122   G4int n_steel_plates;
0123   G4double scinti_gap;
0124   G4double tilt_angle;
0125 };
0126 
0127 #endif /* G4DETECTORS_PHG4OUTERHCALFIELD_H */