DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
DDG4
include
DDG4
Geant4MonteCarloTruth.h
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
#ifndef DDG4_GEANT4MONTECARLOTRUTH_H
15
#define DDG4_GEANT4MONTECARLOTRUTH_H
16
17
// Framework include files
18
#include <
DDG4/Geant4Action.h
>
19
20
// C/C++ include files
21
#include <map>
22
23
// Forward declarations
24
class
G4Step;
25
class
G4Track;
26
class
G4Event;
27
29
namespace
dd4hep
{
30
32
namespace
sim {
33
34
// Forward declarations
35
class
Geant4Particle;
36
38
43
class
Geant4MonteCarloTruth
{
44
protected
:
46
Geant4MonteCarloTruth
();
47
public
:
49
virtual
~Geant4MonteCarloTruth
();
51
virtual
void
mark
(
const
G4Track* track) = 0;
53
virtual
void
mark
(
const
G4Track* track,
int
reason) = 0;
55
virtual
void
mark
(
const
G4Step* step) = 0;
57
virtual
void
mark
(
const
G4Step* step,
int
reason) = 0;
58
};
59
61
66
class
Geant4DummyTruthHandler
:
public
Geant4Action
,
public
Geant4MonteCarloTruth
{
67
public
:
69
Geant4DummyTruthHandler
(
Geant4Context
* ctxt,
const
std::string& nam);
71
virtual
~Geant4DummyTruthHandler
();
73
virtual
void
mark
(
const
G4Track* track)
override
;
75
virtual
void
mark
(
const
G4Track* track,
int
reason)
override
;
77
virtual
void
mark
(
const
G4Step* step)
override
;
79
virtual
void
mark
(
const
G4Step* step,
int
reason)
override
;
80
};
81
82
}
// End namespace sim
83
}
// End namespace dd4hep
84
85
#endif // DDG4_GEANT4MONTECARLOTRUTH_H
dd4hep::sim::Geant4DummyTruthHandler::Geant4DummyTruthHandler
Geant4DummyTruthHandler(Geant4Context *ctxt, const std::string &nam)
Standard constructor.
Definition:
Geant4MonteCarloTruth.cpp:31
dd4hep::sim::Geant4MonteCarloTruth::mark
virtual void mark(const G4Step *step)=0
Mark a Geant4 track of the step to be kept for later MC truth analysis.
dd4hep::sim::Geant4MonteCarloTruth::mark
virtual void mark(const G4Step *step, int reason)=0
Store a track produced in a step to be kept for later MC truth analysis.
dd4hep::sim::Geant4MonteCarloTruth::Geant4MonteCarloTruth
Geant4MonteCarloTruth()
Standard constructor.
Definition:
Geant4MonteCarloTruth.cpp:21
dd4hep::sim::Geant4MonteCarloTruth
Default Interface class to handle monte carlo truth records.
Definition:
Geant4MonteCarloTruth.h:43
dd4hep::sim::Geant4Action
Default base class for all Geant 4 actions and derivates thereof.
Definition:
Geant4Action.h:113
dd4hep::sim::Geant4DummyTruthHandler::mark
virtual void mark(const G4Track *track) override
Mark a Geant4 track to be kept for later MC truth analysis. Default flag: CREATED_HIT.
Definition:
Geant4MonteCarloTruth.cpp:42
dd4hep::sim::Geant4DummyTruthHandler
Void implementation of the Monte-Carlo thruth handler doing nothing at all.
Definition:
Geant4MonteCarloTruth.h:66
dd4hep
Namespace for the AIDA detector description toolkit.
Definition:
AlignmentsCalib.h:28
dd4hep::sim::Geant4DummyTruthHandler::~Geant4DummyTruthHandler
virtual ~Geant4DummyTruthHandler()
Default destructor.
Definition:
Geant4MonteCarloTruth.cpp:37
dd4hep::sim::Geant4MonteCarloTruth::~Geant4MonteCarloTruth
virtual ~Geant4MonteCarloTruth()
Default destructor.
Definition:
Geant4MonteCarloTruth.cpp:26
dd4hep::sim::Geant4MonteCarloTruth::mark
virtual void mark(const G4Track *track)=0
Mark a Geant4 track to be kept for later MC truth analysis.
dd4hep::sim::Geant4MonteCarloTruth::mark
virtual void mark(const G4Track *track, int reason)=0
Store a track, with a flag.
Geant4Action.h
dd4hep::sim::Geant4Context
Generic context to extend user, run and event information.
Definition:
Geant4Context.h:201
Generated on Tue Dec 10 2024 18:30:08 for DD4hep by
1.8.18