Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:58

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4DETECTORS_PHG4ENVELOPEDETECTOR_H
0004 #define G4DETECTORS_PHG4ENVELOPEDETECTOR_H
0005 
0006 #include <g4main/PHG4Detector.h>
0007 
0008 #include <Geant4/G4String.hh>  // for G4String
0009 #include <Geant4/G4Types.hh>
0010 
0011 #include <string>
0012 
0013 class G4LogicalVolume;
0014 class G4VPhysicalVolume;
0015 class PHCompositeNode;
0016 class PHG4Subsystem;
0017 
0018 class PHG4EnvelopeDetector : public PHG4Detector
0019 {
0020  public:
0021   // Constructor
0022   PHG4EnvelopeDetector(PHG4Subsystem *subsys, PHCompositeNode *Node, const std::string &dnam);
0023 
0024   // Destructor
0025   ~PHG4EnvelopeDetector() override = default;
0026 
0027   // Construct
0028   void ConstructMe(G4LogicalVolume *world) override;
0029 
0030   // Volume accessors
0031   bool IsInEnvelope(G4VPhysicalVolume *) const;
0032 
0033   void SetPlace(G4double place_in_x, G4double place_in_y, G4double place_in_z)
0034   {
0035     _placeInX = place_in_x;
0036     _placeInY = place_in_y;
0037     _placeInZ = place_in_z;
0038   }
0039 
0040   void SetInnerRadius(G4double radius) { _innerRadius = radius; }
0041   void SetOuterRadius(G4double radius) { _outerRadius = radius; }
0042   void SetCylinderLength(G4double length) { _dZ_cyl = length; }
0043 
0044   void SetActive(const int i = 1) { _active = i; }
0045   int IsActive() const { return _active; }
0046 
0047   void SuperDetector(const std::string &name) { _superdetector = name; }
0048   const std::string &SuperDetector() const { return _superdetector; }
0049 
0050   int get_Layer() const { return _layer; }
0051 
0052  private:
0053   G4double _placeInX;
0054   G4double _placeInY;
0055   G4double _placeInZ;
0056   G4double _innerRadius;
0057   G4double _outerRadius;
0058   G4double _dZ;
0059   G4double _dZ_cyl;
0060   G4double _sPhi;
0061   G4double _dPhi;
0062 
0063   G4String _materialCrystal;
0064 
0065   int _active;
0066   int _layer;
0067 
0068   std::string _superdetector;
0069 };
0070 
0071 #endif