14 #ifndef DD4HEP_DDG4_GEANT4ESCAPECOUNTER_H
15 #define DD4HEP_DDG4_GEANT4ESCAPECOUNTER_H
26 namespace Simulation {
46 virtual bool process(G4Step* step, G4TouchableHistory* history);
71 #include "CLHEP/Units/SystemOfUnits.h"
72 #include "G4VProcess.hh"
75 using namespace DD4hep;
76 using namespace DD4hep::Simulation;
82 string coll_name =
name()+
"Hits";
99 string hdlr_path = handler.
path();
111 print(
"+++ Track:%4d %8.2f MeV [%s] %s Geant4 path:%s",
115 h.
track->SetTrackStatus(fStopAndKill);
DDG4 tracker hit class used by the generic DDG4 tracker sensitive detector.
std::string path() const
Helper: Access the placement path of a Geant4 touchable object as a string.
void mark(const G4Track *track) const
Mark the track to be kept for MC truth propagation during hit processing.
double length
Length of the track segment contributing to this hit.
Direction momentum
Hit direction.
HitCollection * collection(size_t which)
Retrieve the hits collection associated with this detector by its serial number.
static void decrement(T *)
Decrement count according to type information.
double energyDeposit
Energy deposit in the tracker hit.
Class to measure the energy of escaping tracks.
Helper class to ease the extraction of information from a G4Track object.
const std::string creatorName() const
Physical process of the track generation.
Helper class to ease the extraction of information from a G4Step object.
int pdgID() const
Access the PDG particle identification.
virtual bool process(G4Step *step, G4TouchableHistory *history)
G4VSensitiveDetector interface: Method for generating hit(s) using the information of G4Step object...
long long int cellID
cellID
const std::string & name() const
Access name of the action.
void print(const char *fmt,...) const
Support for messages with variable output level using output level.
The base class for Geant4 sensitive detector actions implemented by users.
size_t m_collectionID
Collection identifiers.
const std::string & name() const
Track's particle name.
Position prePos() const
Returns the pre-step position.
double time() const
Track time.
Position position
Hit position.
long long int volumeID(const G4Step *step)
Returns the volumeID of the sensitive volume corresponding to the step.
void add(TYPE *hit_pointer)
Add a new hit with a check, that the hit is of the same type.
Helper class to ease the extraction of information from a G4Touchable object.
ROOT::Math::XYZVector Position
virtual ~Geant4EscapeCounter()
Default destructor.
Generic hit container class using Geant4HitWrapper objects.
bool m_needsControl
Default property: Flag to create control instance.
Geant4EscapeCounter(Geant4Context *ctxt, const std::string &name, DetElement det, LCDD &lcdd)
Standard constructor.
static void increment(T *)
Increment count according to type information.
double energy() const
Track's energy.
Handle class describing a detector element.
Generic context to extend user, run and event information.
The main interface to the DD4hep detector description package.
std::vector< std::string > m_detectorNames
Geant4Action & declareProperty(const std::string &nam, T &val)
Declare property.
int id() const
Track's identifier.
#define DECLARE_GEANT4SENSITIVE(name)