Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 // This file is really -*- C++ -*-.
0003 #ifndef G4INTT_PHG4INTTSUBSYSTEM_H
0004 #define G4INTT_PHG4INTTSUBSYSTEM_H
0005 
0006 #include <g4detectors/PHG4DetectorGroupSubsystem.h>
0007 
0008 #include <string>   // for string
0009 #include <utility>  // for pair
0010 #include <vector>
0011 
0012 class PHCompositeNode;
0013 class PHG4Detector;
0014 class PHG4DisplayAction;
0015 class PHG4InttDetector;
0016 class PHG4SteppingAction;
0017 
0018 class PHG4InttSubsystem : public PHG4DetectorGroupSubsystem
0019 {
0020  public:
0021   typedef std::vector<std::pair<int, int>> vpair;
0022 
0023   //! constructor
0024   PHG4InttSubsystem(const std::string &name = "PHG4InttSubsystem", const vpair &layerconfig = vpair(0));
0025 
0026   //! destructor
0027   ~PHG4InttSubsystem() override;
0028 
0029   //! init
0030   /*!
0031   called during InitRun (the original InitRun does common setup and calls this one)
0032   creates the detector object
0033   ceates the stepping action
0034   creates relevant hit nodes that will be populated by the stepping action and stored in the output DST
0035   */
0036   int InitRunSubsystem(PHCompositeNode *) override;
0037 
0038   //! event processing
0039   /*!
0040   get all relevant nodes from top nodes (namely hit list)
0041   and pass that to the stepping action
0042   */
0043   int process_event(PHCompositeNode *) override;
0044 
0045   //! accessors (reimplemented)
0046   PHG4Detector *GetDetector(void) const override;
0047 
0048   PHG4SteppingAction *GetSteppingAction(void) const override { return m_SteppingAction; }
0049 
0050   PHG4DisplayAction *GetDisplayAction() const override { return m_DisplayAction; }
0051 
0052   void SetSurveyGeometry(bool b) { m_UseSurveyGeometry = b; }
0053 
0054   void Print(const std::string &what = "ALL") const override;
0055 
0056  private:
0057   void SetDefaultParameters() override;
0058 
0059   //! detector geometry
0060   /*! defives from PHG4Detector */
0061   PHG4InttDetector *m_Detector = nullptr;
0062 
0063   //! particle tracking "stepping" action
0064   /*! derives from PHG4SteppingActions */
0065   PHG4SteppingAction *m_SteppingAction = nullptr;
0066 
0067   //! display attribute setting
0068   /*! derives from PHG4DisplayAction */
0069   PHG4DisplayAction *m_DisplayAction = nullptr;
0070 
0071   vpair m_LayerConfigVector;
0072   std::string m_DetectorType;
0073 
0074   std::string m_HitNodeName;
0075   std::string m_AbsorberNodeName;
0076 
0077   //! whether to use the survey geometry
0078   bool m_UseSurveyGeometry = true;
0079 };
0080 
0081 #endif