Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:22:06

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 // This is the subsystem code (header file) for the hcal prototype detector
0004 // created on 1/27/2014, Liang, HeXC
0005 //
0006 #ifndef G4CALOPROTOTYPE_PHG4HCALPROTOTYPESUBSYSTEM_H
0007 #define G4CALOPROTOTYPE_PHG4HCALPROTOTYPESUBSYSTEM_H
0008 
0009 #include <g4main/PHG4Subsystem.h>
0010 
0011 #include <Geant4/G4Types.hh>
0012 #include <Geant4/G4String.hh>
0013 
0014 #include <string>                  // for string
0015 
0016 class PHCompositeNode;
0017 class PHG4Detector;
0018 class PHG4HcalPrototypeDetector;
0019 class PHG4HcalPrototypeSteppingAction;
0020 class PHG4EventAction;
0021 class PHG4SteppingAction;
0022 
0023 class PHG4HcalPrototypeSubsystem: public PHG4Subsystem
0024 {
0025 
0026   public:
0027 
0028   //! constructor
0029   PHG4HcalPrototypeSubsystem( const std::string &name = "BLOCK", const int layer = 0 );
0030 
0031   //! destructor
0032   virtual ~PHG4HcalPrototypeSubsystem( void )
0033   {}
0034 
0035   //! init
0036   /*!
0037   creates the detector_ object and place it on the node tree, under "DETECTORS" node (or whatever)
0038   reates the stepping action and place it on the node tree, under "ACTIONS" node
0039   creates relevant hit nodes that will be populated by the stepping action and stored in the output DST
0040   */
0041   int Init(PHCompositeNode *);
0042 
0043   //! event processing
0044   /*!
0045   get all relevant nodes from top nodes (namely hit list)
0046   and pass that to the stepping action
0047   */
0048   int process_event(PHCompositeNode *);
0049 
0050   //! accessors (reimplemented)
0051   virtual PHG4Detector* GetDetector( void ) const;
0052   virtual PHG4SteppingAction* GetSteppingAction( void ) const;
0053 
0054   void SetYRot(const G4double dbl) {rot_in_y = dbl;}
0055   void SetZRot(const G4double dbl) {rot_in_z = dbl;}
0056 
0057   void SetMaterial(const std::string &mat) {material = mat;}
0058   PHG4EventAction* GetEventAction() const {return eventAction_;}
0059   void SetActive(const int i = 1) {active = i;}
0060   void SetAbsorberActive(const int i = 1) {absorberactive = i;}
0061   void SuperDetector(const std::string &name) {superdetector = name;}
0062   const std::string SuperDetector() {return superdetector;}
0063 
0064   void BlackHole(const int i=1) {blackhole = i;}
0065 
0066   private:
0067 
0068   //! detector geometry
0069   /*! defives from PHG4Detector */
0070   PHG4HcalPrototypeDetector* detector_;
0071 
0072   //! particle tracking "stepping" action
0073   /*! derives from PHG4SteppingActions */
0074   PHG4HcalPrototypeSteppingAction* steppingAction_;
0075   PHG4EventAction *eventAction_;
0076   G4double dimension[3];
0077   G4double rot_in_y;
0078   G4double rot_in_z;
0079 
0080   G4String material;
0081   int active;
0082   int absorberactive;
0083   int layer;
0084   int blackhole;
0085   std::string detector_type;
0086   std::string superdetector;
0087 };
0088 
0089 #endif