Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 /*!
0004  * \file ${file_name}
0005  * \brief
0006  * \author Jin Huang <jhuang@bnl.gov>
0007  * \version $$Revision: 1.1 $$
0008  * \date $$Date: 2014/03/24 01:36:44 $$
0009  */
0010 
0011 #ifndef G4DETECTORS_PHG4SPACALSTEPPINGACTION_H
0012 #define G4DETECTORS_PHG4SPACALSTEPPINGACTION_H
0013 
0014 #include "LightCollectionModel.h"
0015 
0016 #include <g4main/PHG4SteppingAction.h>
0017 
0018 class G4Step;
0019 class LightCollectionModel;
0020 class PHCompositeNode;
0021 class PHG4CylinderCellGeomContainer;
0022 class PHG4CylinderCellGeom_Spacalv1;
0023 class PHG4CylinderGeomContainer;
0024 class PHG4CylinderGeom_Spacalv3;
0025 class PHG4SpacalDetector;
0026 class PHG4Hit;
0027 class PHG4HitContainer;
0028 class PHG4Shower;
0029 class PHParameters;
0030 class TowerInfoContainer;
0031 
0032 class PHG4SpacalSteppingAction : public PHG4SteppingAction
0033 {
0034  public:
0035   //! ctor
0036   explicit PHG4SpacalSteppingAction(PHG4SpacalDetector *, const PHParameters *parameters);
0037 
0038   //! dtor
0039   ~PHG4SpacalSteppingAction() override;
0040 
0041   //! stepping action
0042   bool UserSteppingAction(const G4Step *, bool) override;
0043 
0044   int InitWithNode(PHCompositeNode *topNode) override;
0045 
0046   //! reimplemented from base class
0047   void SetInterfacePointers(PHCompositeNode *) override;
0048 
0049   double get_zmin() const;
0050 
0051   double get_zmax() const;
0052 
0053   void SetHitNodeName(const std::string &type, const std::string &name) override;
0054 
0055   int SetUpGeomNode(PHCompositeNode *topNode);
0056 
0057   LightCollectionModel &get_light_collection_model() { return light_collection_model; }
0058 
0059  private:
0060   bool NoHitSteppingAction(const G4Step *aStep);
0061   //! pointer to the detector
0062   PHG4SpacalDetector *m_Detector = nullptr;
0063 
0064   //! pointer to hit container
0065   PHG4HitContainer *m_HitContainer = nullptr;
0066   PHG4HitContainer *m_AbsorberHitContainer = nullptr;
0067   PHG4Hit *m_Hit = nullptr;
0068   PHG4HitContainer *m_CurrentHitContainer = nullptr;
0069   PHG4Shower *m_CurrentShower = nullptr;
0070   const PHParameters *m_Params = nullptr;
0071   int m_SaveTrackid = -1;
0072   int m_SavePostStepStatus = -1;
0073   bool m_doG4Hit = true;
0074   bool m_geomsetup = false;
0075   double m_tmin = -20.;
0076   double m_tmax = 60.;
0077   double m_dt = 100.;
0078 
0079   std::string m_AbsorberNodeName;
0080   std::string m_HitNodeName;
0081   std::string detector;
0082   std::string geonodename;
0083   std::string seggeonodename;
0084 
0085   TowerInfoContainer *m_CaloInfoContainer = nullptr;
0086 
0087   PHG4CylinderCellGeomContainer *_seggeo = nullptr;
0088 
0089   PHG4CylinderGeomContainer *_layergeo = nullptr;
0090 
0091   PHG4CylinderCellGeom_Spacalv1 *_geo = nullptr;
0092 
0093   const PHG4CylinderGeom_Spacalv3 *_layergeom = nullptr;
0094 
0095   LightCollectionModel light_collection_model;
0096 };
0097 
0098 #endif  // PHG4VHcalSteppingAction_h