Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 // $Id: $
0004 
0005 /*!
0006  * \file PHG4GDMLSubsystem.h
0007  * \brief
0008  * \author Jin Huang <jhuang@bnl.gov>
0009  * \version $Revision:   $
0010  * \date $Date: $
0011  */
0012 
0013 #ifndef G4DETECTORS_PHG4GDMLSUBSYSTEM_H
0014 #define G4DETECTORS_PHG4GDMLSUBSYSTEM_H
0015 
0016 #include "PHG4DetectorSubsystem.h"
0017 
0018 #include <string>
0019 
0020 class PHCompositeNode;
0021 class PHG4GDMLDetector;
0022 class PHG4Detector;
0023 class PHG4SteppingAction;
0024 
0025 /*!
0026  * \brief PHG4GDMLSubsystem is a generic detector built from a GDML import
0027  */
0028 class PHG4GDMLSubsystem : public PHG4DetectorSubsystem
0029 {
0030  public:
0031   explicit PHG4GDMLSubsystem(const std::string& name);
0032   ~PHG4GDMLSubsystem() override;
0033 
0034   /*!
0035   creates the m_Detector object and place it on the node tree, under "DETECTORS" node (or whatever)
0036   reates the stepping action and place it on the node tree, under "ACTIONS" node
0037   creates relevant hit nodes that will be populated by the stepping action and stored in the output DST
0038   */
0039   int InitRunSubsystem(PHCompositeNode*) override;
0040 
0041   //! event processing
0042   /*!
0043   get all relevant nodes from top nodes (namely hit list)
0044   and pass that to the stepping action
0045   */
0046   int process_event(PHCompositeNode*) override;
0047 
0048   //! Print info (from SubsysReco)
0049   void Print(const std::string& what = "ALL") const override;
0050 
0051   //! accessors (reimplemented)
0052   PHG4Detector* GetDetector(void) const override;
0053   PHG4SteppingAction* GetSteppingAction(void) const override { return nullptr; }
0054 
0055  private:
0056   void SetDefaultParameters() override;
0057 
0058   //! detector geometry
0059   /*! derives from PHG4Detector */
0060   PHG4GDMLDetector* m_Detector = nullptr;
0061 };
0062 
0063 #endif /* PHG4GDMLSUBSYSTEM_H_ */