Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:19:26

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4MVTX_PHG4EICMVTXSUBSYSTEM_H
0004 #define G4MVTX_PHG4EICMVTXSUBSYSTEM_H
0005 
0006 #include <g4detectors/PHG4DetectorGroupSubsystem.h>
0007 
0008 #include <cmath>   // for asin
0009 #include <string>  // for string
0010 
0011 class PHCompositeNode;
0012 class PHG4Detector;
0013 class PHG4DisplayAction;
0014 class PHG4EICMvtxDetector;
0015 class PHG4SteppingAction;
0016 
0017 class PHG4EICMvtxSubsystem : public PHG4DetectorGroupSubsystem
0018 {
0019  public:
0020   //! constructor
0021   PHG4EICMvtxSubsystem(const std::string& name = "PHG4EICMvtxSubsystem", const int _n_layers = 3);
0022 
0023   //! destructor
0024   ~PHG4EICMvtxSubsystem() override;
0025 
0026   //! InitRunSubsystem
0027   /*!
0028   called during InitRun (the original InitRun does common setup and calls this one)
0029   creates the detector object
0030   creates the stepping action
0031   creates relevant hit nodes that will be populated by the stepping action and stored in the output DST
0032   */
0033   int InitRunSubsystem(PHCompositeNode*) override;
0034 
0035   //! event processing
0036   /*!
0037   get all relevant nodes from top nodes (namely hit list)
0038   and pass that to the stepping action
0039   */
0040   int process_event(PHCompositeNode*) override;
0041 
0042   //! accessors (reimplemented)
0043   PHG4Detector* GetDetector(void) const override;
0044   PHG4SteppingAction* GetSteppingAction(void) const override;
0045 
0046   PHG4DisplayAction* GetDisplayAction() const override { return m_DisplayAction; }
0047 
0048  private:
0049   void SetDefaultParameters() override;
0050   static double radii2Turbo(double rMin, double rMid, double rMax, double sensW)
0051   {
0052     // compute turbo angle from radii and sensor width
0053     return std::asin((rMax * rMax - rMin * rMin) / (2 * rMid * sensW));
0054   }
0055   //! detector geometry
0056   /*! defives from PHG4Detector */
0057   PHG4EICMvtxDetector* m_Detector;
0058 
0059   //! particle tracking "stepping" action
0060   /*! derives from PHG4SteppingActions */
0061   PHG4SteppingAction* steppingAction_;
0062 
0063   //! display attribute setting
0064   /*! derives from PHG4DisplayAction */
0065   PHG4DisplayAction* m_DisplayAction;
0066 
0067   // These are passed on to the detector class
0068   unsigned int n_layers;
0069 
0070   std::string detector_type;
0071 };
0072 
0073 #endif