Back to home page

sPhenix code displayed by LXR

 
 

    


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

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