Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4TPC_PHG4TPCSUBSYSTEM_H
0004 #define G4TPC_PHG4TPCSUBSYSTEM_H
0005 
0006 #include <g4detectors/PHG4DetectorSubsystem.h>
0007 
0008 #include <string>
0009 
0010 class PHCompositeNode;
0011 class PHG4Detector;
0012 class PHG4DisplayAction;
0013 class PHG4SteppingAction;
0014 class PHG4TpcDetector;
0015 
0016 class PHG4TpcSubsystem : public PHG4DetectorSubsystem
0017 {
0018  public:
0019   //! constructor
0020   PHG4TpcSubsystem(const std::string &name = "TPC", const int layer = 0);
0021 
0022   //! destructor
0023   ~PHG4TpcSubsystem() override;
0024 
0025   /*!
0026   called during InitRun (the original InitRun does common setup and calls this one)
0027   creates the detector object
0028   ceates the stepping action
0029   creates relevant hit nodes that will be populated by the stepping action and stored in the output DST
0030   */
0031   int InitRunSubsystem(PHCompositeNode *) override;
0032 
0033   //! event processing
0034   /*!
0035   get all relevant nodes from top nodes (namely hit list)
0036   and pass that to the stepping action
0037   */
0038   int process_event(PHCompositeNode *) override;
0039 
0040   //! Print info (from SubsysReco)
0041   void Print(const std::string &what = "ALL") const override;
0042 
0043   //! accessors (reimplemented)
0044   PHG4Detector *GetDetector(void) const override;
0045 
0046   PHG4SteppingAction *GetSteppingAction(void) const override { return m_SteppingAction; }
0047 
0048   PHG4DisplayAction *GetDisplayAction() const override { return m_DisplayAction; }
0049 
0050  private:
0051   void SetDefaultParameters() override;
0052 
0053   //! detector geometry
0054   /*! derives from PHG4Detector */
0055   PHG4TpcDetector *m_Detector{nullptr};
0056 
0057   //! detector "stepping" action, executes after every G4 step
0058   /*! derives from PHG4SteppingAction */
0059   PHG4SteppingAction *m_SteppingAction{nullptr};
0060 
0061   //! display attribute setting
0062   /*! derives from PHG4DisplayAction */
0063   PHG4DisplayAction *m_DisplayAction{nullptr};
0064 
0065   std::string m_HitNodeName;
0066   std::string m_AbsorberNodeName;
0067 };
0068 
0069 #endif