Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef PHG4TPCENDCAPSUBSYSTEM_H
0004 #define PHG4TPCENDCAPSUBSYSTEM_H
0005 
0006 #include <g4detectors/PHG4DetectorSubsystem.h>
0007 
0008 #include <string>  // for allocator, string
0009 
0010 class PHCompositeNode;
0011 class PHG4Detector;
0012 class PHG4TpcEndCapDetector;
0013 class PHG4SteppingAction;
0014 class PHG4DisplayAction;
0015 
0016 /**
0017  * \brief Detector Subsystem module
0018  *
0019  * The detector is constructed and registered via PHG4TpcEndCapDetector
0020  *
0021  *
0022  * \see PHG4TpcEndCapDetector
0023  * \see PHG4TpcEndCapSubsystem
0024  *
0025  */
0026 class PHG4TpcEndCapSubsystem : public PHG4DetectorSubsystem
0027 {
0028  public:
0029   //! constructor
0030   PHG4TpcEndCapSubsystem(const std::string& name = "PHG4TpcEndCap");
0031 
0032   //! destructor
0033   ~PHG4TpcEndCapSubsystem() override;
0034 
0035   /*!
0036   creates relevant hit nodes that will be populated by the stepping action and stored in the output DST
0037   */
0038   int InitRunSubsystem(PHCompositeNode*) override;
0039 
0040   //! event processing
0041   /*!
0042   get all relevant nodes from top nodes (namely hit list)
0043   and pass that to the stepping action
0044   */
0045   int process_event(PHCompositeNode*) override;
0046 
0047   //! accessors (reimplemented)
0048   PHG4Detector* GetDetector() const override;
0049 
0050   PHG4SteppingAction* GetSteppingAction() const override { return m_SteppingAction; }
0051   //! Print info (from SubsysReco)
0052   void Print(const std::string& what = "ALL") const override;
0053 
0054   PHG4DisplayAction* GetDisplayAction() const override { return m_DisplayAction; }
0055 
0056  protected:
0057   // \brief Set default parameter values
0058   void SetDefaultParameters() override;
0059 
0060  private:
0061   //! detector construction
0062   /*! derives from PHG4Detector */
0063   PHG4TpcEndCapDetector* m_Detector = nullptr;
0064 
0065   //! particle tracking "stepping" action
0066   /*! derives from PHG4SteppingActions */
0067   PHG4SteppingAction* m_SteppingAction = nullptr;
0068 
0069   //! display attribute setting
0070   /*! derives from PHG4DisplayAction */
0071   PHG4DisplayAction* m_DisplayAction = nullptr;
0072 
0073   //! node name for the PHG4Hits
0074   std::string m_HitNodeName;
0075 };
0076 
0077 #endif  // PHG4TPCENDCAPSUBSYSTEM_H