Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4DETECTORS_PHG4CYLINDERSTEPPINGACTION_H
0004 #define G4DETECTORS_PHG4CYLINDERSTEPPINGACTION_H
0005 
0006 #include <g4main/PHG4SteppingAction.h>
0007 
0008 #include <string>
0009 
0010 class G4Step;
0011 class G4VPhysicalVolume;
0012 class PHCompositeNode;
0013 class PHG4CylinderDetector;
0014 class PHG4CylinderSubsystem;
0015 class PHG4Hit;
0016 class PHG4HitContainer;
0017 class PHG4Shower;
0018 class PHParameters;
0019 
0020 class PHG4CylinderSteppingAction : public PHG4SteppingAction
0021 {
0022  public:
0023   //! constructor
0024   PHG4CylinderSteppingAction(PHG4CylinderSubsystem *subsys, PHG4CylinderDetector *detector, const PHParameters *parameters);
0025 
0026   //! destructor
0027   ~PHG4CylinderSteppingAction() override;
0028 
0029   //! stepping action
0030   bool UserSteppingAction(const G4Step *, bool) override;
0031 
0032   //! reimplemented from base class
0033   void SetInterfacePointers(PHCompositeNode *) override;
0034 
0035   void SaveLightYield(const int i = 1) { m_SaveLightYieldFlag = i; }
0036 
0037   // needed for hit position crosschecks, if this volume is inside
0038   // another volume the absolut hit coordinates in our G4Hits and
0039   // the local coordinates differ, so checking against our place in z
0040   // goes wrong
0041   bool hasMotherSubsystem() const;
0042 
0043   // this is just needed for use as reference plane for projections
0044   // this is the only detector using this - there is no need to add
0045   // this to our parameters
0046   void SaveAllHits(bool i = true) { m_SaveAllHitsFlag = i; }
0047 
0048   void HitNodeName(const std::string &name) { m_HitNodeName = name; }
0049 
0050  private:
0051   //! pointer to the Subsystem
0052   PHG4CylinderSubsystem *m_Subsystem;
0053   //! pointer to the detector
0054   PHG4CylinderDetector *m_Detector;
0055   const PHParameters *m_Params;
0056 
0057   //! pointer to hit container
0058   PHG4HitContainer *m_HitContainer;
0059   PHG4Hit *m_Hit;
0060   PHG4Shower *m_SaveShower;
0061   G4VPhysicalVolume *m_SaveVolPre;
0062   G4VPhysicalVolume *m_SaveVolPost;
0063   bool m_SaveAllHitsFlag = false;
0064   int m_SaveLightYieldFlag;
0065   int m_SaveTrackId;
0066   int m_SavePreStepStatus;
0067   int m_SavePostStepStatus;
0068   int m_ActiveFlag;
0069   int m_BlackHoleFlag;
0070   int m_UseG4StepsFlag;
0071   double m_Zmin;
0072   double m_Zmax;
0073   double m_Tmin;
0074   double m_Tmax;
0075   std::string m_HitNodeName;
0076 };
0077 
0078 #endif