Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4DETECTORS_PHG4OUTERHCALSTEPPINGACTION_H
0004 #define G4DETECTORS_PHG4OUTERHCALSTEPPINGACTION_H
0005 
0006 #include <g4main/PHG4SteppingAction.h>
0007 
0008 class G4Step;
0009 class G4VPhysicalVolume;
0010 class PHCompositeNode;
0011 class TowerInfoContainer;
0012 class PHG4OuterHcalDetector;
0013 class PHParameters;
0014 class PHG4Hit;
0015 class PHG4HitContainer;
0016 class PHG4Shower;
0017 class TH2;
0018 
0019 class PHG4OuterHcalSteppingAction : public PHG4SteppingAction
0020 {
0021  public:
0022   //! constructor
0023   PHG4OuterHcalSteppingAction(PHG4OuterHcalDetector *, const PHParameters *parameters);
0024 
0025   //! destructor
0026   ~PHG4OuterHcalSteppingAction() override;
0027 
0028   //! stepping action
0029   bool UserSteppingAction(const G4Step *, bool) override;
0030 
0031   int InitWithNode(PHCompositeNode *topNode) override;
0032 
0033   //! reimplemented from base class
0034   void SetInterfacePointers(PHCompositeNode *) override;
0035 
0036   void FieldChecker(const G4Step *);
0037   void EnableFieldChecker(const int i = 1) { m_EnableFieldCheckerFlag = i; }
0038   void CreateNodeTree(PHCompositeNode *topNode);
0039 
0040  private:
0041   bool NoHitSteppingAction(const G4Step *aStep);
0042   //! pointer to the detector
0043   PHG4OuterHcalDetector *m_Detector = nullptr;
0044 
0045   //! efficiency maps from Mephi
0046   TH2 *m_MapCorrHist = nullptr;
0047 
0048   //! pointer to hit container
0049   PHG4HitContainer *m_Hits = nullptr;
0050   PHG4HitContainer *m_AbsorberHits = nullptr;
0051   PHG4Hit *m_Hit = nullptr;
0052   const PHParameters *m_Params = nullptr;
0053   PHG4HitContainer *m_SaveHitContainer = nullptr;
0054   PHG4Shower *m_SaveShower = nullptr;
0055   G4VPhysicalVolume *m_SaveVolPre = nullptr;
0056   G4VPhysicalVolume *m_SaveVolPost = nullptr;
0057   int m_SaveTrackId = -1;
0058   int m_SavePreStepStatus = -1;
0059   int m_SavePostStepStatus = -1;
0060   int m_EnableFieldCheckerFlag = -1;
0061 
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_IsActiveFlag = -1;
0066   int m_IsBlackHoleFlag = -1;
0067   int m_NScintiPlates = -1;
0068   int m_LightScintModelFlag = 0;
0069   bool m_doG4Hit = true;
0070   double m_tmin = -20.;
0071   double m_tmax = 60.;
0072   double m_dt = 100.;
0073   TowerInfoContainer *m_CaloInfoContainer = nullptr;
0074 };
0075 
0076 #endif  // G4DETECTORS_PHG4OUTERHCALSTEPPINGACTION_H