Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4IHCAL_PHG4IHCALSTEPPINGACTION_H
0004 #define G4IHCAL_PHG4IHCALSTEPPINGACTION_H
0005 
0006 #include <g4main/PHG4SteppingAction.h>
0007 
0008 #include <string>  // for string
0009 
0010 class G4Step;
0011 class G4VPhysicalVolume;
0012 class PHCompositeNode;
0013 class TowerInfoContainer;
0014 class PHG4IHCalDetector;
0015 class PHParameters;
0016 class PHG4Hit;
0017 class PHG4HitContainer;
0018 class PHG4Shower;
0019 class TH2;
0020 
0021 class PHG4IHCalSteppingAction : public PHG4SteppingAction
0022 {
0023  public:
0024   //! constructor
0025   PHG4IHCalSteppingAction(PHG4IHCalDetector *, PHParameters *parameters);
0026 
0027   //! destructor
0028   ~PHG4IHCalSteppingAction() override;
0029 
0030   //! stepping action
0031   bool UserSteppingAction(const G4Step *, bool) override;
0032 
0033   int InitWithNode(PHCompositeNode *topNode) override;
0034 
0035   //! reimplemented from base class
0036   void SetInterfacePointers(PHCompositeNode *) override;
0037 
0038   void SetHitNodeName(const std::string &type, const std::string &name) override;
0039 
0040   void CreateNodeTree(PHCompositeNode *topNode);
0041 
0042  private:
0043   bool NoHitSteppingAction(const G4Step *aStep);
0044   //! pointer to the detector
0045   PHG4IHCalDetector *m_Detector{nullptr};
0046 
0047   //! efficiency maps from Mephi
0048   TH2 *m_MapCorrHist{nullptr};
0049 
0050   //! pointer to hit container
0051   PHG4HitContainer *m_HitContainer{nullptr};
0052   PHG4HitContainer *m_AbsorberHitContainer{nullptr};
0053   PHG4Hit *m_Hit{nullptr};
0054   PHParameters *m_Params{nullptr};
0055   PHG4HitContainer *m_SaveHitContainer{nullptr};
0056   PHG4Shower *m_SaveShower{nullptr};
0057   G4VPhysicalVolume *m_SaveVolPre{nullptr};
0058   G4VPhysicalVolume *m_SaveVolPost{nullptr};
0059   int m_SaveTrackId{-1};
0060   int m_SavePreStepStatus{-1};
0061   int m_SavePostStepStatus{-1};
0062   // since getting parameters is a map search we do not want to
0063   // do this in every step, the parameters used are cached
0064   // in the following variables
0065   int m_IsActive{0};
0066   int m_IsBlackHole{0};
0067   int m_LightScintModelFlag{0};
0068   bool m_doG4Hit{true};
0069   double m_tmin{-20.};
0070   double m_tmax{60.};
0071   double m_dt{100.};
0072 
0073   std::string m_AbsorberNodeName;
0074   std::string m_HitNodeName;
0075 
0076   TowerInfoContainer *m_CaloInfoContainer{nullptr};
0077 };
0078 
0079 #endif  // G4IHCAL_PHG4IHCALSTEPPINGACTION_H