Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:20:45

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4CALOPROTOTYPE_PHG4SPACALPROTOTYPE4SUBSYSTEM_H
0004 #define G4CALOPROTOTYPE_PHG4SPACALPROTOTYPE4SUBSYSTEM_H
0005 
0006 #include <g4detectors/PHG4DetectorSubsystem.h>
0007 
0008 #include <string>  // for string
0009 
0010 class PHCompositeNode;
0011 class PHG4Detector;
0012 class PHG4SpacalPrototype4Detector;
0013 class PHG4SteppingAction;
0014 
0015 class PHG4SpacalPrototype4Subsystem : public PHG4DetectorSubsystem
0016 {
0017  public:
0018   //! constructor
0019   explicit PHG4SpacalPrototype4Subsystem(const std::string& name = "CEMC");
0020 
0021   //! destructor
0022   virtual ~PHG4SpacalPrototype4Subsystem(void) {}
0023 
0024   //! init
0025   /*!
0026    creates the detector_ object and place it on the node tree, under "DETECTORS" node (or whatever)
0027    reates the stepping action and place it on the node tree, under "ACTIONS" node
0028    creates relevant hit nodes that will be populated by the stepping action and stored in the output DST
0029    */
0030   int InitRunSubsystem(PHCompositeNode*);
0031 
0032   //! event processing
0033   /*!
0034    get all relevant nodes from top nodes (namely hit list)
0035    and pass that to the stepping action
0036    */
0037   int process_event(PHCompositeNode*);
0038 
0039   //! accessors (reimplemented)
0040   virtual PHG4Detector* GetDetector(void) const;
0041   PHG4SteppingAction* GetSteppingAction(void) const { return steppingAction_; }
0042 
0043   void
0044   Print(const std::string& what = "ALL") const;
0045 
0046  private:
0047   //! load the default parameter to param
0048   void SetDefaultParameters();
0049 
0050   //! detector geometry
0051   /*! derives from PHG4Detector */
0052   PHG4SpacalPrototype4Detector* detector_;
0053 
0054   //! particle tracking "stepping" action
0055   /*! derives from PHG4SteppingActions */
0056   PHG4SteppingAction* steppingAction_;
0057 };
0058 
0059 #endif