Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4MICROMEGAS_PHG4MICROMEGASSTEPPINGACTION_H
0004 #define G4MICROMEGAS_PHG4MICROMEGASSTEPPINGACTION_H
0005 
0006 /*!
0007  * \file PHG4MicromegasSteppingAction.h
0008  * \author Hugo Pereira Da Costa <hugo.pereira-da-costa@cea.fr>
0009  */
0010 
0011 #include <g4main/PHG4Hit.h>  // for PHG4Hit
0012 #include <g4main/PHG4SteppingAction.h>
0013 
0014 #include <memory>
0015 #include <string>  // for string
0016 
0017 class PHG4MicromegasDetector;
0018 
0019 class G4Step;
0020 class G4VPhysicalVolume;
0021 class PHCompositeNode;
0022 class PHG4HitContainer;
0023 class PHParameters;
0024 
0025 class PHG4MicromegasSteppingAction : public PHG4SteppingAction
0026 {
0027  public:
0028   //! constructor
0029   PHG4MicromegasSteppingAction(PHG4MicromegasDetector*, const PHParameters* parameters);
0030 
0031   //! stepping action
0032   bool UserSteppingAction(const G4Step*, bool) override;
0033 
0034   //! reimplemented from base class
0035   void SetInterfacePointers(PHCompositeNode*) override;
0036 
0037   void SetHitNodeName(const std::string& type, const std::string& name) override;
0038 
0039  private:
0040   //! pointer to the detector
0041   PHG4MicromegasDetector* m_Detector{nullptr};
0042 
0043   const PHParameters* m_Params{nullptr};
0044 
0045   //! pointer to hit container
0046   PHG4HitContainer* m_HitContainer{nullptr};
0047 
0048   //! pointer to support hit container
0049   PHG4HitContainer* m_SupportHitContainer{nullptr};
0050 
0051   //! running hit
0052   std::unique_ptr<PHG4Hit> m_hit;
0053 
0054   PHG4HitContainer* m_SaveHitContainer{nullptr};
0055   G4VPhysicalVolume* m_SaveVolPre{nullptr};
0056   G4VPhysicalVolume* m_SaveVolPost{nullptr};
0057 
0058   int m_SaveTrackId{-1};
0059   int m_SavePreStepStatus{-1};
0060   int m_SavePostStepStatus{-1};
0061   int m_ActiveFlag{0};
0062   int m_BlackHoleFlag{0};
0063   double m_EdepSum{0};
0064   double m_EionSum{0};
0065 
0066   std::string m_HitNodeName;
0067   std::string m_SupportNodeName;
0068 };
0069 
0070 #endif  // MICROMEGASSTEPPINGACTION_H