Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-27 09:07:50

0001 //==========================================================================
0002 //  AIDA Detector description implementation 
0003 //--------------------------------------------------------------------------
0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 // All rights reserved.
0006 //
0007 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 //
0010 // Author     : M.Frank
0011 //
0012 //==========================================================================
0013 #ifndef DDG4_GEANT4SENSDETACTION_H
0014 #define DDG4_GEANT4SENSDETACTION_H
0015 
0016 // Framework include files
0017 #include <DD4hep/Detector.h>
0018 #include <DDG4/Geant4Action.h>
0019 #include <DDG4/Geant4HitCollection.h>
0020 
0021 // Geant4 include files
0022 #include <G4ThreeVector.hh>
0023 #include <G4VTouchable.hh>
0024 
0025 // C/C++ include files
0026 #include <vector>
0027 
0028 // Forward declarations
0029 class G4HCofThisEvent;
0030 class G4Step;
0031 class G4Event;
0032 class G4TouchableHistory;
0033 class G4VHitsCollection;
0034 class G4VReadOutGeometry;
0035 
0036 /// Namespace for the AIDA detector description toolkit
0037 namespace dd4hep {
0038 
0039   // Forward declarations
0040   class Detector;
0041   class DetElement;
0042   class SensitiveDetector;
0043 
0044   /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit
0045   namespace sim {
0046 
0047     // Forward declarations
0048     class Geant4Sensitive;
0049     class Geant4FastSimSpot;
0050     class Geant4StepHandler;
0051     class Geant4HitCollection;
0052     class Geant4SensDetActionSequence;
0053     class Geant4SensDetSequences;
0054 
0055     /// Interface class to access properties of the underlying Geant4 sensitive detector structure
0056     /**
0057      *  \author  M.Frank
0058      *  \version 1.0
0059      *  \ingroup DD4HEP_SIMULATION
0060      */
0061     class Geant4ActionSD: virtual public Geant4Action {
0062     protected:
0063       /// Define standard assignments and constructors
0064       DDG4_DEFINE_ACTION_CONSTRUCTORS(Geant4ActionSD);
0065       /// Standard action constructor
0066       Geant4ActionSD(const std::string& name);
0067       /// Default destructor
0068       virtual ~Geant4ActionSD();
0069     public:
0070       /// Initialize the usage of a hit collection. Returns the collection identifier
0071       virtual std::size_t defineCollection(const std::string& name) = 0;
0072       /// Access to the readout geometry of the sensitive detector
0073       virtual G4VReadOutGeometry* readoutGeometry() const = 0;
0074       /// This is a utility method which returns the hits collection ID
0075       virtual G4int GetCollectionID(G4int i) = 0;
0076       /// Is the detector active?
0077       virtual bool isActive() const = 0;
0078       /// Access to the Detector sensitive detector handle
0079       virtual SensitiveDetector sensitiveDetector() const = 0;
0080       /// G4VSensitiveDetector internals: Access to the detector path name
0081       virtual std::string path() const = 0;
0082       /// G4VSensitiveDetector internals: Access to the detector path name
0083       virtual std::string fullPath() const = 0;
0084       /// Access to the sensitive type of the detector
0085       virtual const std::string& sensitiveType() const = 0;
0086       /// Access the DDG4 action sequence
0087       virtual Geant4SensDetActionSequence* sequence() const = 0;
0088     };
0089 
0090     /// Base class to construct filters for Geant4 sensitive detectors
0091     /**
0092      *  \author  M.Frank
0093      *  \version 1.0
0094      *  \ingroup DD4HEP_SIMULATION
0095      */
0096     class Geant4Filter: public Geant4Action {
0097     protected:
0098       /// Define standard assignments and constructors
0099       DDG4_DEFINE_ACTION_CONSTRUCTORS(Geant4Filter);
0100 
0101     public:
0102       /// Standard constructor
0103       Geant4Filter(Geant4Context* context, const std::string& name);
0104       /// Standard destructor
0105       virtual ~Geant4Filter();
0106 
0107       /// Filter action. Return true if hits should be processed. Default returns true
0108       virtual bool operator()(const G4Step* step) const;
0109 
0110       /// GFLASH/FastSim interface: Filter action. Return true if hits should be processed.
0111       /** The default implementation throws an exception that the 
0112        *  GFLASH / FastSim interface is not implemented.
0113        */
0114       virtual bool operator()(const Geant4FastSimSpot* spot) const;
0115     };
0116 
0117     /// The base class for Geant4 sensitive detector actions implemented by users
0118     /**
0119      *  \author  M.Frank
0120      *  \version 1.0
0121      *  \ingroup DD4HEP_SIMULATION
0122      */
0123     class Geant4Sensitive: public Geant4Action {
0124     public:
0125       enum HitCreationFlags {
0126         SIMPLE_MODE = 0,
0127         MEDIUM_MODE = 1<<0,
0128         DETAILED_MODE = 1<<1
0129       };
0130 
0131     private:
0132       /// Reference to G4 sensitive detector
0133       Geant4ActionSD* m_sensitiveDetector     { nullptr };
0134       /// Reference to the containing action sequence
0135       Geant4SensDetActionSequence* m_sequence { nullptr };
0136 
0137     protected:
0138       /// Property: Hit creation mode. Maybe one of the enum HitCreationFlags
0139       int  m_hitCreationMode                  {       0 };
0140       /// Property: Use the volume manager to access CellID and VolumeID
0141       bool m_useVolumeManager                 {    true };
0142       /// Property: Debug/Print Cell IDs in functions cellID(), volumeID()
0143       bool m_debugVolumeID                    {   false };
0144 
0145 #if defined(G__ROOT) || defined(__CLING__) || defined(__ROOTCLING__)
0146       /// Reference to the detector description object
0147       Detector*            m_detDesc          { nullptr };
0148 #else
0149       /// Reference to the detector description object
0150       Detector&            m_detDesc;
0151 #endif
0152       /// Reference to the detector element describing this sensitive element
0153       DetElement           m_detector         {  };
0154       /// Reference to the sensitive detector element
0155       SensitiveDetector    m_sensitive        {  };
0156       /// Reference to the readout structure
0157       Readout              m_readout          {  };
0158       /// Reference to segmentation
0159       Segmentation         m_segmentation     {  };
0160       /// The list of sensitive detector filter objects
0161       Actors<Geant4Filter> m_filters;
0162 
0163       /// Define standard assignments and constructors
0164       DDG4_DEFINE_ACTION_CONSTRUCTORS(Geant4Sensitive);
0165 
0166     public:
0167       /// Constructor. The sensitive detector element is identified by the detector name
0168       Geant4Sensitive(Geant4Context* context, const std::string& name, DetElement det, Detector& description);
0169 
0170       /// Standard destructor
0171       virtual ~Geant4Sensitive();
0172 
0173       /// Get the detector identifier (DetElement::id())
0174       int id()  const;
0175   
0176       /// Access to the sensitive detector object
0177       Geant4ActionSD& detector() const;
0178 
0179       /// Access to the sensitive detector object
0180       void setDetector(Geant4ActionSD* sens_det);
0181 
0182       /// Access volume manager usage flag. This is a subdetector specific flag
0183       bool useVolumeManager()  const  {
0184         return m_useVolumeManager;
0185       }
0186 
0187       /// Property access to the hit creation mode
0188       int hitCreationMode() const  {
0189         return m_hitCreationMode;
0190       }
0191 
0192       /// G4VSensitiveDetector internals: Access to the detector name
0193       std::string detectorName() const {
0194         return detector().name();
0195       }
0196 
0197       /// G4VSensitiveDetector internals: Access to the detector path name
0198       std::string path() const {
0199         return detector().path();
0200       }
0201 
0202       /// G4VSensitiveDetector internals: Access to the detector path name
0203       std::string fullPath() const {
0204         return detector().fullPath();
0205       }
0206 
0207       /// G4VSensitiveDetector internals: Is the detector active?
0208       bool isActive() const {
0209         return detector().isActive();
0210       }
0211 
0212       /// Access the dd4hep sensitive detector
0213       SensitiveDetector sensitiveDetector() const  {
0214         return m_sensitive;
0215       }
0216 
0217       /// Access to the readout geometry of the sensitive detector
0218       G4VReadOutGeometry* readoutGeometry() const {
0219         return detector().readoutGeometry();
0220       }
0221 
0222       /// Access the detector description object
0223       Detector& detectorDescription()   const;
0224 
0225       /// Mark the track to be kept for MC truth propagation during hit processing
0226       void mark(const G4Track* track) const;
0227 
0228       /// Mark the track of this step to be kept for MC truth propagation during hit processing
0229       void mark(const G4Step* step) const;
0230 
0231       /// Access to the hosting sequence
0232       Geant4SensDetActionSequence& sequence() const;
0233 
0234       /// Add an actor responding to all callbacks. Sequence takes ownership.
0235       void adopt(Geant4Filter* filter);
0236 
0237       /// Add an actor responding to all callbacks to the sequence front. Sequence takes ownership.
0238       void adopt_front(Geant4Filter* filter);
0239 
0240       /// Add an actor responding to all callbacks. Sequence takes ownership.
0241       void adoptFilter(Geant4Action* filter);
0242 
0243       /// Add an actor responding to all callbacks to the sequence front. Sequence takes ownership.
0244       void adoptFilter_front(Geant4Action* filter);
0245 
0246       /// Callback before hit processing starts. Invoke all filters.
0247       /** Return false if any filter returns false
0248        */
0249       bool accept(const G4Step* step) const;
0250 
0251       /// GFLASH/FastSim interface: Callback before hit processing starts. Invoke all filters.
0252       /** Return false if any filter returns false
0253        */
0254       bool accept(const Geant4FastSimSpot* step) const;
0255 
0256       /// Initialize the usage of a single hit collection. Returns the collection ID
0257       template <typename TYPE> std::size_t defineCollection(const std::string& coll_name);
0258 
0259       /// Access HitCollection container names
0260       const std::string& hitCollectionName(std::size_t which) const;
0261 
0262       /// Retrieve the hits collection associated with this detector by its serial number
0263       Geant4HitCollection* collection(std::size_t which);
0264 
0265       /// Retrieve the hits collection associated with this detector by its collection identifier
0266       Geant4HitCollection* collectionByID(std::size_t id);
0267 
0268       /// Define collections created by this sensitivie action object
0269       virtual void defineCollections();
0270 
0271       /// G4VSensitiveDetector interface: Method invoked at the beginning of each event.
0272       /** The hits collection(s) created by this sensitive detector must
0273        *  be set to the G4HCofThisEvent object at one of these two methods.
0274        */
0275       virtual void begin(G4HCofThisEvent* hce);
0276 
0277       /// G4VSensitiveDetector interface: Method invoked at the end of each event.
0278       virtual void end(G4HCofThisEvent* hce);
0279 
0280       /// G4VSensitiveDetector interface: Method invoked if the event was aborted.
0281       /** Hits collections created but not being set to G4HCofThisEvent
0282        *  at the event should be deleted.
0283        *  Collection(s) which have already set to G4HCofThisEvent
0284        *  will be deleted automatically.
0285        */
0286       virtual void clear(G4HCofThisEvent* hce);
0287 
0288       /// Returns the volumeID of the sensitive volume corresponding to the step
0289       /** Combining the VolIDS of the complete geometry path (Geant4TouchableHistory)
0290        * from the current sensitive volume to the world volume
0291        */
0292       long long int volumeID(const G4Step* step);
0293 
0294       /// Returns the volumeID of the sensitive volume corresponding to the G4VTouchable
0295       /** Combining the VolIDS of the complete geometry path (Geant4TouchableHistory)
0296        * from the current sensitive volume to the world volume
0297        */
0298       long long int volumeID(const G4VTouchable* touchable);
0299 
0300       /// Returns the cellID of the sensitive volume corresponding to the step
0301       /** The CellID is the VolumeID + the local coordinates of the sensitive area.
0302        *  Calculated by combining the VolIDS of the complete geometry path (Geant4TouchableHistory)
0303        *  from the current sensitive volume to the world volume
0304        */
0305       long long int cellID(const G4Step* step);
0306 
0307       /// Returns the cellID of the sensitive volume corresponding to the G4VTouchable
0308       /** The CellID is the VolumeID + the local coordinates of the sensitive area.
0309        *  Calculated by combining the VolIDS of the complete geometry path (Geant4TouchableHistory)
0310        *  from the current sensitive volume to the world volume
0311        */
0312       long long int cellID(const G4VTouchable* touchable, const G4ThreeVector& global);
0313 
0314       /// G4VSensitiveDetector interface: Method for generating hit(s) using the information of G4Step object.
0315       virtual bool process(const G4Step* step, G4TouchableHistory* history);
0316 
0317       /// GFLASH/FastSim interface: Method for generating hit(s) using the information of the fast simulation spot object.
0318       /** The default implementation throws an exception that the 
0319        *  GFLASH/FastSim interface is not implemented.
0320        */
0321       virtual bool processFastSim(const Geant4FastSimSpot* spot, G4TouchableHistory* history);
0322     };
0323 
0324     /// The sequencer to host Geant4 sensitive actions called if particles interact with sensitive elements
0325     /**
0326      * Concrete implementation of the sensitive detector action sequence
0327      *
0328      *  \author  M.Frank
0329      *  \version 1.0
0330      *  \ingroup DD4HEP_SIMULATION
0331      */
0332     class Geant4SensDetActionSequence : public Geant4Action {
0333     public:
0334       typedef Geant4HitCollection* (*create_t)(const std::string&, const std::string&, Geant4Sensitive*);
0335       typedef std::pair<std::string, std::pair<Geant4Sensitive*,create_t> > HitCollection;
0336       typedef std::vector<HitCollection> HitCollections;
0337 
0338     protected:
0339       /// Geant4 hit collection context
0340       G4HCofThisEvent*        m_hce  { nullptr };
0341       /// Callback sequence for event initialization action
0342       CallbackSequence        m_begin;
0343       /// Callback sequence for event finalization action
0344       CallbackSequence        m_end;
0345       /// Callback sequence for step processing
0346       CallbackSequence        m_process;
0347       /// Callback sequence to invoke the event deletion
0348       CallbackSequence        m_clear;
0349       /// The list of sensitive detector objects
0350       Actors<Geant4Sensitive> m_actors;
0351       /// The list of sensitive detector filter objects
0352       Actors<Geant4Filter>    m_filters;
0353 
0354       /// Hit collection creators
0355       HitCollections          m_collections;
0356       /// Reference to the sensitive detector element
0357       SensitiveDetector       m_sensitive;
0358       /// Reference to G4 sensitive detector
0359       Geant4ActionSD*         m_detector;
0360       /// The true sensitive type of the detector
0361       std::string             m_sensitiveType;
0362       /// Create a new typed hit collection
0363       template <typename TYPE> static 
0364       Geant4HitCollection* _create(const std::string& det, const std::string& coll, Geant4Sensitive* sd) {
0365         return new Geant4HitCollection(det, coll, sd, (TYPE*) 0);
0366       }
0367 
0368     protected:
0369       /// Define standard assignments and constructors
0370       DDG4_DEFINE_ACTION_CONSTRUCTORS(Geant4SensDetActionSequence);
0371 
0372     public:
0373       /// Standard constructor
0374       Geant4SensDetActionSequence(Geant4Context* context, const std::string& name);
0375 
0376       /// Default destructor
0377       virtual ~Geant4SensDetActionSequence();
0378 
0379       /// Access to the sensitive type of the detector
0380       virtual const std::string& sensitiveType() const   {
0381         return m_sensitiveType;
0382       }
0383 
0384       /// Set or update client context
0385       virtual void updateContext(Geant4Context* ctxt)  override;
0386 
0387       /// Called at construction time of the sensitive detector to declare all hit collections
0388       std::size_t defineCollections(Geant4ActionSD* sens_det);
0389 
0390       /// Initialize the usage of a hit collection. Returns the collection identifier
0391       std::size_t defineCollection(Geant4Sensitive* owner, const std::string& name, create_t func);
0392 
0393       /// Define a named collection containing hist of a specified type
0394       template <typename TYPE> std::size_t defineCollection(Geant4Sensitive* owner, const std::string& coll_name) {
0395         return defineCollection(owner, coll_name, Geant4SensDetActionSequence::_create<TYPE>);
0396       }
0397 
0398       /// Access HitCollection container names
0399       const std::string& hitCollectionName(std::size_t which) const;
0400 
0401       /// Retrieve the hits collection associated with this detector by its serial number
0402       Geant4HitCollection* collection(std::size_t which) const;
0403 
0404       /// Retrieve the hits collection associated with this detector by its collection identifier
0405       Geant4HitCollection* collectionByID(std::size_t id) const;
0406 
0407       /// Register begin-of-event callback
0408       template <typename T> void callAtBegin(T* p, void (T::*f)(G4HCofThisEvent*)) {
0409         m_begin.add(p, f);
0410       }
0411 
0412       /// Register end-of-event callback
0413       template <typename T> void callAtEnd(T* p, void (T::*f)(G4HCofThisEvent*)) {
0414         m_end.add(p, f);
0415       }
0416 
0417       /// Register process-hit callback
0418       template <typename T> void callAtProcess(T* p, void (T::*f)(G4Step*, G4TouchableHistory*)) {
0419         m_process.add(p, f);
0420       }
0421 
0422       /// Register clear callback
0423       template <typename T> void callAtClear(T* p, void (T::*f)(G4HCofThisEvent*)) {
0424         m_clear.add(p, f);
0425       }
0426 
0427       /// Add an actor responding to all callbacks. Sequence takes ownership.
0428       void adopt(Geant4Sensitive* sensitive);
0429 
0430       /// Add an actor responding to all callbacks. Sequence takes ownership.
0431       void adopt(Geant4Filter* filter);
0432 
0433       /// Add an actor responding to all callbacks. Sequence takes ownership.
0434       void adoptFilter(Geant4Action* filter);
0435 
0436       /// Callback before hit processing starts. Invoke all filters.
0437       bool accept(const G4Step* step) const;
0438 
0439       /// GFLASH/FastSim interface: Callback before hit processing starts. Invoke all filters.
0440       bool accept(const Geant4FastSimSpot* step) const;
0441 
0442       /// G4VSensitiveDetector interface: Method invoked at the beginning of each event.
0443       /** The hits collection(s) created by this sensitive detector must
0444        *  be set to the G4HCofThisEvent object at one of these two methods.
0445        */
0446       virtual void begin(G4HCofThisEvent* hce);
0447 
0448       /// G4VSensitiveDetector interface: Method invoked at the end of each event.
0449 
0450       virtual void end(G4HCofThisEvent* hce);
0451       /// G4VSensitiveDetector interface: Method invoked if the event was aborted.
0452       /** Hits collections created but not beibg set to G4HCofThisEvent
0453        *  at the event should be deleted.
0454        *  Collection(s) which have already set to G4HCofThisEvent
0455        *  will be deleted automatically.
0456        */
0457       virtual void clear();
0458 
0459       /// G4VSensitiveDetector interface: Method for generating hit(s) using the information of G4Step object.
0460       virtual bool process(const G4Step* step, G4TouchableHistory* history);
0461 
0462       /// GFLASH/FastSim interface: Method for generating hit(s) using the information of the fast simulation spot object.
0463       virtual bool processFastSim(const Geant4FastSimSpot* spot, G4TouchableHistory* history);
0464     };
0465 
0466     /// Geant4SensDetSequences: class to access groups of sensitive actions
0467     /**
0468      * Concrete implementation of the sensitive detector action sequence
0469      *
0470      * Note Multi-Threading issue:
0471      * Neither callbacks not the action list is protected against multiple 
0472      * threads calling the Geant4 callbacks!
0473      * These must be protected in the user actions themselves.
0474      *
0475      *  \author  M.Frank
0476      *  \version 1.0
0477      *  \ingroup DD4HEP_SIMULATION
0478      */
0479     class Geant4SensDetSequences {
0480     public:
0481       friend class Geant4ActionContainer;
0482       friend class Geant4SensDetActionSequence;
0483       typedef std::map<std::string, Geant4SensDetActionSequence*> Members;
0484     private:
0485       Members m_sequences;
0486       /// Insert sequence member
0487       void insert(const std::string& name, Geant4SensDetActionSequence* seq);
0488 
0489     public:
0490       /// Default constructor
0491       Geant4SensDetSequences() = default;
0492       /// Default destructor
0493       virtual ~Geant4SensDetSequences();
0494       /// Access sequence member by name
0495       Geant4SensDetActionSequence* operator[](const std::string& name) const;
0496       /// Access sequence member by name
0497       Geant4SensDetActionSequence* find(const std::string& name) const;
0498       /// Access to the members
0499       Members& sequences() {
0500         return m_sequences;
0501       }
0502       /// Access to the members CONST
0503       const Members& sequences() const {
0504         return m_sequences;
0505       }
0506       /// Clear the sequence list
0507       void clear();
0508     };
0509 
0510     /// Initialize the usage of a single hit collection. Returns the collection ID
0511     template <typename TYPE> inline std::size_t Geant4Sensitive::defineCollection(const std::string& coll_name) {
0512       return sequence().defineCollection<TYPE>(this, coll_name);
0513     }
0514 
0515     /// Template class to ease the construction of sensitive detectors using particle template specialization
0516     /**
0517      * Templated implementation to realize sensitive detectors.
0518      * Default implementations for all functions are provided in the file
0519      * DDG4/Geant4SensDetAction.inl.
0520      *
0521      * Users may override any of the templated callbacks or the of the virtual functions
0522      * of the base class using explicit template specialization.
0523      * An example may be found in DDG4/plugins/Geant4SDActions.
0524      *
0525      *  \author  M.Frank
0526      *  \version 1.0
0527      *  \ingroup DD4HEP_SIMULATION
0528      */
0529     template <typename T> class Geant4SensitiveAction : public Geant4Sensitive  {
0530     public:
0531       typedef T UserData;
0532     protected:
0533       /// Property: collection name. If not set default is readout name!
0534       std::string m_collectionName  {   };
0535       /// Property: segmentation name for parallel readouts. If not set readout segmentation is used!
0536       std::string m_readoutName     {   };
0537 
0538       /// Collection identifier
0539       std::size_t m_collectionID    { 0 };
0540       /// User data block
0541       UserData    m_userData        {   };
0542 
0543     protected:
0544       /// Define standard assignments and constructors
0545       DDG4_DEFINE_ACTION_CONSTRUCTORS(Geant4SensitiveAction);
0546 
0547     public:
0548       /// Standard , initializing constructor
0549       Geant4SensitiveAction(Geant4Context* context,
0550                             const std::string& name,
0551                             DetElement det,
0552                             Detector& description);
0553 
0554       /// Default destructor
0555       virtual ~Geant4SensitiveAction();
0556 
0557       /// Declare optional properties from embedded structure
0558       void declareOptionalProperties();
0559 
0560       /// Define collections created by this sensitivie action object
0561       virtual void defineCollections();
0562 
0563       /// Access the readout object. Note: if m_readoutName is set, the m_readout != m_sensitive.readout()
0564       Readout readout();
0565       
0566       /// Define readout specific hit collection with volume ID filtering
0567       /** 
0568        *  Convenience function. To be called by specialized sensitive actions inheriting this class.
0569        *
0570        *  - If the property CollectionName ist NOT set, one default collection is declared,
0571        *    with the readout name as the collection name.
0572        *  - If the property CollectionName is set, the readout structure is searched for
0573        *    the corresponding entry and a collection with the corrsponding name is declared.
0574        *    At the same time a VolumeID filter is injected at the front of the sensitive's 
0575        *    filter queue to ONLY act on volume IDs matching this criterium.
0576        */
0577       template <typename HIT> std::size_t declareReadoutFilteredCollection();
0578 
0579       /// Define readout specific hit collection. matching name must be present in readout structure
0580       template <typename HIT> 
0581       std::size_t defineReadoutCollection(const std::string collection_name);
0582 
0583       /// Initialization overload for specialization
0584       virtual void initialize()  final;
0585       /// Finalization overload for specialization
0586       virtual void finalize()  final;
0587 
0588       /// G4VSensitiveDetector interface: Method invoked at the beginning of each event.
0589       virtual void begin(G4HCofThisEvent* hce)  final;
0590       /// G4VSensitiveDetector interface: Method invoked at the end of each event.
0591       virtual void end(G4HCofThisEvent* hce)  final;
0592       /// G4VSensitiveDetector interface: Method invoked if the event was aborted.
0593       virtual void clear(G4HCofThisEvent* hce)  final;
0594 
0595       /// G4VSensitiveDetector interface: Method for generating hit(s) using the G4Step object.
0596       virtual bool process(const G4Step* step,G4TouchableHistory* history)  final;
0597 
0598       /// GFLASH/FastSim interface: Method for generating hit(s) using the information of the fast simulation spot object.
0599       virtual bool processFastSim(const Geant4FastSimSpot* spot, G4TouchableHistory* history)  final;
0600     };
0601 
0602   }    // End namespace sim
0603 }      // End namespace dd4hep
0604 #endif // DDG4_GEANT4SENSDETACTION_H