Back to home page

sPhenix code displayed by LXR

 
 

    


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

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_PHG4PSTOFSUBSYSTEM_H
0014 #define G4DETECTORS_PHG4PSTOFSUBSYSTEM_H
0015 
0016 #include "PHG4DetectorGroupSubsystem.h"
0017 
0018 #include <string>
0019 
0020 class PHCompositeNode;
0021 class PHG4Detector;
0022 class PHG4PSTOFDetector;
0023 class PHG4SteppingAction;
0024 
0025 /**
0026  * \brief Fun4All module to simulate the Barrel PSTOF detector.
0027  *
0028  * The detector is constructed and registered via PHG4PSTOFDetector
0029  *
0030  * The PHG4SteppingAction needs to be written, but will provide the info for the hit time
0031  *
0032  * \see PHG4PSTOFDetector
0033  * \see PHG4PSTOFSubsystem
0034  *
0035  */
0036 class PHG4PSTOFSubsystem : public PHG4DetectorGroupSubsystem
0037 {
0038  public:
0039   //! constructor
0040   PHG4PSTOFSubsystem(const std::string& name = "PSTOF");
0041 
0042   //! destructor
0043   ~PHG4PSTOFSubsystem(void) override
0044   {
0045   }
0046 
0047   /*!
0048   creates the detector_ object and place it on the node tree, under "DETECTORS" node (or whatever)
0049   reates the stepping action and place it on the node tree, under "ACTIONS" node
0050   creates relevant hit nodes that will be populated by the stepping action and stored in the output DST
0051   */
0052   int InitRunSubsystem(PHCompositeNode*) override;
0053 
0054   //! event processing
0055   /*!
0056   get all relevant nodes from top nodes (namely hit list)
0057   and pass that to the stepping action
0058   */
0059   int process_event(PHCompositeNode*) override;
0060 
0061   //! accessors (reimplemented)
0062   PHG4Detector* GetDetector(void) const override;
0063   PHG4SteppingAction* GetSteppingAction(void) const override;
0064   //! Print info (from SubsysReco)
0065   void Print(const std::string& what = "ALL") const override;
0066 
0067  private:
0068   void SetDefaultParameters() override;
0069 
0070   //! detector geometry
0071   /*! defives from PHG4Detector */
0072   PHG4PSTOFDetector* detector_ = nullptr;
0073 
0074   //! particle tracking "stepping" action
0075   /*! derives from PHG4SteppingActions */
0076   PHG4SteppingAction* steppingAction_ = nullptr;
0077 };
0078 
0079 #endif