26 #include "G4VSensitiveDetector.hh"
34 namespace Simulation {
91 this->G4VSensitiveDetector::SetFilter(
this);
98 {
return this->G4VSensitiveDetector::SensitiveDetectorName; }
100 virtual std::string
path()
const
101 {
return this->G4VSensitiveDetector::GetPathName(); }
104 {
return this->G4VSensitiveDetector::GetFullPathName(); }
107 {
return this->G4VSensitiveDetector::isActive(); }
110 {
return this->G4VSensitiveDetector::GetCollectionID(i); }
113 {
return this->G4VSensitiveDetector::GetROgeometry(); }
121 virtual G4bool
Accept(
const G4Step* step)
const
137 if ( coll.empty() ) {
138 except(
"Geant4Sensitive: No collection defined for %s [Invalid name]",
c_name());
140 collectionName.push_back(coll);
141 return collectionName.size()-1;
Handle class to hold the information of a sensitive detector.
virtual void clear()
G4VSensitiveDetector interface: Method invoked if the event was aborted.
Geant4Kernel & worker(unsigned long thread_identifier, bool create_if=false)
Access worker instance by it's identifier.
static unsigned long int thread_self()
Access thread identifier.
bool accept(const G4Step *step) const
Callback before hit processing starts. Invoke all filters.
virtual ~RefCountedSequence()
Default destructor.
virtual void begin(G4HCofThisEvent *hce)
G4VSensitiveDetector interface: Method invoked at the begining of each event.
DD4hep::Simulation::Geant4SensDet Geant4SensDet
Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference.
virtual void clear()
G4VSensitiveDetector interface: Method invoked if the event was aborted.
virtual const std::string & sensitiveType() const
Access to the sensitive type of the detector.
static void decrement(T *)
Decrement count according to type information.
#define DECLARE_GEANT4SENSITIVEDETECTOR(id)
Interface class to access properties of the underlying Geant4 sensitive detector structure.
virtual size_t defineCollection(const std::string &coll)
Initialize the usage of a hit collection. Returns the collection identifier.
virtual bool process(G4Step *step, G4TouchableHistory *hist)
Function to process hits.
virtual G4bool Accept(const G4Step *step) const
Callback if the sequence should be accepted or filtered off.
RefCountedSequence(T *seq)
Initializing constructor.
virtual void updateContext(Geant4Context *ctxt)
Set or update client context.
virtual void Initialize(G4HCofThisEvent *hce)
Method invoked at the begining of each event.
G4String GetName() const
Overload to avoid ambiguity between G4VSensitiveDetector and G4VSDFilter.
Geant4SensDetActionSequence * sensitiveAction(const std::string &name)
Access to the sensitive detector action from the actioncontainer object.
virtual SensitiveDetector sensitiveDetector(const std::string &name) const =0
Retrieve a sensitive detector by it's name from the detector description.
DD4hep::Simulation::Geant4SensDet Geant4tracker
virtual const std::string & sensitiveType() const
Access to the sensitive type of the detector.
const char * c_name() const
Access name of the action.
Geant4Context * m_context
Reference to the Geant4 context.
void except(const char *fmt,...) const
Support of exceptions: Print fatal message and throw runtime_error.
void releasePtr(T &p)
Helper to delete objects from heap and reset the pointer. Saves many many lines of code...
virtual G4bool ProcessHits(G4Step *step, G4TouchableHistory *hist)
Method for generating hit(s) using the information of G4Step object.
int m_outputLevel
Default property: Output level.
virtual SensitiveDetector sensitiveDetector() const
Access to the LCDD sensitive detector handle.
virtual G4VReadOutGeometry * readoutGeometry() const
Access to the readout geometry of the sensitive detector.
Class, which allows all Geant4Action derivatives to access the DDG4 kernel structures.
virtual void end(G4HCofThisEvent *hce)
G4VSensitiveDetector interface: Method invoked at the end of each event.
SensitiveDetector m_sensitive
Access to the geant4 sensitive detector handle.
virtual bool isActive() const
Is the detector active?
RefCountedSequence< T > Base
DD4hep::Simulation::Geant4SensDet Geant4calorimeter
Class of the Geant4 toolkit. See http://www-geant4.kek.jp/Reference.
RefCountedSequence()
Default constructor.
virtual void EndOfEvent(G4HCofThisEvent *hce)
Method invoked at the end of each event.
virtual G4int GetCollectionID(G4int i)
This is a utility method which returns the hits collection ID.
Geant4Context * workerContext()
Thread's Geant4 execution context.
static void increment(T *)
Increment count according to type information.
virtual std::string path() const
G4VSensitiveDetector internals: Access to the detector path name.
virtual ~Geant4SensDet()
Destructor.
virtual std::string fullPath() const
G4VSensitiveDetector internals: Access to the detector path name.
The main interface to the DD4hep detector description package.
Private helper to support sequence reference counting.
Concrete implementation of the G4VSensitiveDetector calling the registered sequence object...
size_t defineCollections(Geant4ActionSD *sens_det)
Called at construction time of the sensitive detector to declare all hit collections.
static Geant4Kernel & instance(LCDD &lcdd)
Instance accessor.
Default base class for all Geant 4 actions and derivates thereof.
Geant4SensDet(const std::string &nam, Geometry::LCDD &lcdd)
Constructor. The detector element is identified by the name.
PrintLevel getOutputLevel(const std::string object) const
Retrieve the global output level of a named object.