Back to home page

sPhenix code displayed by LXR

 
 

    


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

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