DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Geant4UserParticleHandler.cpp
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 
14 // Framework include files
15 #include <DD4hep/Printout.h>
16 #include <DD4hep/InstanceCount.h>
19 #include <CLHEP/Units/SystemOfUnits.h>
20 
21 using namespace dd4hep::sim;
22 
25 : Geant4Action(ctxt,nam)
26 {
28  declareProperty("MinimalKineticEnergy",m_kinEnergyCut = 100e0*CLHEP::MeV);
29  m_needsControl = true;
30 }
31 
35 }
36 
38 void Geant4UserParticleHandler::generate(G4Event* /* event */, Geant4ParticleHandler* /* handler */) {
39  //printout(INFO,name(),"+++ Generate event");
40 }
41 
43 void Geant4UserParticleHandler::begin(const G4Event* /* event */) {
44 }
45 
47 void Geant4UserParticleHandler::end(const G4Event* /* event */) {
48  //printout(INFO,name(),"+++ End event");
49 }
50 
52 void Geant4UserParticleHandler::step(const G4Step* /* step */, G4SteppingManager* /* mgr */, Particle& /* particle */) {
53 }
54 
56 void Geant4UserParticleHandler::begin(const G4Track* /* track */, Particle& /* particle */) {
57 }
58 
60 void Geant4UserParticleHandler::end(const G4Track* /* track */, Particle& /* particle */) {
61 }
62 
64 void Geant4UserParticleHandler::combine(Particle& /* to_be_deleted */, Particle& /* remaining_parent */) {
65 }
66 
68 bool Geant4UserParticleHandler::keepParticle(Particle& particle) {
70 }
dd4hep::sim::Geant4UserParticleHandler::keepParticle
virtual bool keepParticle(Particle &particle)
Callback to be answered if the particle MUST be kept during recombination step.
Geant4ParticleHandler
Geant4Action to collect the MC particle information.
dd4hep::sim::Geant4UserParticleHandler::generate
virtual void generate(G4Event *event, Geant4ParticleHandler *handler)
Event generation action callback.
dd4hep::sim::Geant4UserParticleHandler::~Geant4UserParticleHandler
virtual ~Geant4UserParticleHandler()
Default destructor.
dd4hep::sim::Geant4UserParticleHandler::Geant4UserParticleHandler
Geant4UserParticleHandler(Geant4Context *context, const std::string &nam)
Standard constructor.
dd4hep::InstanceCount::increment
static void increment(T *)
Increment count according to type information.
Definition: InstanceCount.h:98
Geant4UserParticleHandler.h
dd4hep::sim::Geant4UserParticleHandler::step
virtual void step(const G4Step *step, G4SteppingManager *mgr, Particle &particle)
User stepping callback.
Geant4ParticleHandler.h
dd4hep::sim::Geant4UserParticleHandler::combine
virtual void combine(Particle &to_be_deleted, Particle &remaining_parent)
Callback when parent should be combined.
dd4hep::sim::Geant4UserParticleHandler::end
virtual void end(const G4Event *event)
Post-event action callback.
dd4hep::InstanceCount::decrement
static void decrement(T *)
Decrement count according to type information.
Definition: InstanceCount.h:102
dd4hep::sim::Geant4Action
Default base class for all Geant 4 actions and derivates thereof.
Definition: Geant4Action.h:113
dd4hep::sim::Geant4ParticleHandler::defaultKeepParticle
static bool defaultKeepParticle(Particle &particle)
Default callback to be answered if the particle should be kept if NO user handler is installed.
dd4hep::sim
Namespace for the Geant4 based simulation part of the AIDA detector description toolkit.
Definition: Geant4Output2EDM4hep.cpp:49
dd4hep::sim::Geant4UserParticleHandler::begin
virtual void begin(const G4Event *event)
Pre-event action callback.
InstanceCount.h
Printout.h
dd4hep::sim::Geant4Context
Generic context to extend user, run and event information.
Definition: Geant4Context.h:201