Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 // $Id$
0004 
0005 /*!
0006  * \file ${file_name}
0007  * \brief
0008  * \author Mickey Chiu <chiu@bnl.gov>
0009  * \version $Revision$
0010  * \date $Date$
0011  */
0012 
0013 #ifndef G4DETECTORS_PHG4BBCSUBSYSTEM_H
0014 #define G4DETECTORS_PHG4BBCSUBSYSTEM_H
0015 
0016 #include "PHG4DetectorSubsystem.h"
0017 
0018 #include <string>
0019 
0020 class PHCompositeNode;
0021 class PHG4Detector;
0022 class PHG4DisplayAction;
0023 class PHG4BbcDetector;
0024 class PHG4SteppingAction;
0025 
0026 /**
0027  * \brief Fun4All module to simulate the BBC detector, aka MBD.
0028  *
0029  * The detector is constructed and registered via PHG4BbcDetector
0030  *
0031  * The PHG4SteppingAction needs to be updated more, but will provide the info for the hit time
0032  *
0033  * \see PHG4BbcDetector
0034  * \see PHG4BbcSubsystem
0035  *
0036  */
0037 class PHG4BbcSubsystem : public PHG4DetectorSubsystem
0038 {
0039  public:
0040   //! constructor
0041   PHG4BbcSubsystem(const std::string& name = "BBC");
0042 
0043   //! destructor
0044   ~PHG4BbcSubsystem(void) override;
0045 
0046   /*!
0047   creates relevant hit nodes that will be populated by the stepping action and stored in the output DST
0048   */
0049   int InitRunSubsystem(PHCompositeNode*) override;
0050 
0051   //! event processing
0052   /*!
0053   get all relevant nodes from top nodes (namely hit list)
0054   and pass that to the stepping action
0055   */
0056   int process_event(PHCompositeNode*) override;
0057 
0058   //! accessors (reimplemented)
0059   PHG4Detector* GetDetector() const override;
0060   PHG4SteppingAction* GetSteppingAction(void) const override { return m_SteppingAction; };
0061   PHG4DisplayAction* GetDisplayAction() const override { return m_DisplayAction; }
0062 
0063   //! Print info (from SubsysReco)
0064   void Print(const std::string& what = "ALL") const override;
0065 
0066  protected:
0067   // \brief Set default parameter values
0068   void SetDefaultParameters() override;
0069 
0070   //! MBD geometry and construction
0071   /*! derives from PHG4Detector */
0072   PHG4BbcDetector* m_Detector = nullptr;
0073 
0074   //! particle tracking "stepping" action
0075   /*! derives from PHG4SteppingActions */
0076   PHG4SteppingAction* m_SteppingAction = nullptr;
0077 
0078   //! display attribute setting
0079   /*! derives from PHG4DisplayAction */
0080   PHG4DisplayAction* m_DisplayAction = nullptr;
0081 
0082   std::string m_HitNodeName;
0083   std::string m_SupportNodeName;
0084 };
0085 
0086 #endif