ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
G4Sim
MCTruthBase
src
RecordingEnvelope.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef MCTruthBase_RECORDINGENVELOPE_H
6
#define MCTruthBase_RECORDINGENVELOPE_H
7
8
// Athena headers
9
#include "
TrackRecord/TrackRecordCollection.h
"
10
11
// STL headers
12
#include <string>
13
14
class
G4LogicalVolume;
15
class
G4Step;
16
class
G4VPhysicalVolume;
17
22
23
class
RecordingEnvelope
24
{
25
public
:
26
28
RecordingEnvelope
(
const
std::string& envelopeVolumeName,
const
std::string& trackRecordCollectionName);
29
31
~RecordingEnvelope
();
32
36
bool
Initialize
();
37
40
void
BeginOfEvent
(
TrackRecordCollection
*);
41
44
inline
int
GetLevel
()
const
;
45
47
inline
const
std::string&
GetVolumeName
()
const
;
48
51
inline
const
G4LogicalVolume*
GetLogicalVolume
()
const
;
52
55
inline
const
std::string&
GetTrackRecordCollectionName
()
const
;
56
59
void
AddTrackRecord
(
const
G4Step* aStep);
60
private
:
64
bool
checkDaughters
(
const
G4LogicalVolume *possibleParent,
const
G4VPhysicalVolume *thePhysicalVolume,
int
& level)
const
;
65
68
int
m_level
;
69
72
73
G4LogicalVolume *
m_logicalVolume
;
74
76
const
std::string
m_envelopeVolumeName
;
77
79
TrackRecordCollection
*
m_trackRecordCollection
{};
80
std::string
m_trackRecordCollectionName
;
81
};
82
83
const
std::string&
RecordingEnvelope::GetVolumeName
()
const
84
{
85
return
m_envelopeVolumeName
;
86
}
87
88
const
G4LogicalVolume*
RecordingEnvelope::GetLogicalVolume
()
const
89
{
90
return
m_logicalVolume
;
91
}
92
93
const
std::string&
RecordingEnvelope::GetTrackRecordCollectionName
()
const
94
{
95
return
m_trackRecordCollectionName
;
96
}
97
98
int
RecordingEnvelope::GetLevel
()
const
99
{
100
return
m_level
;
101
}
102
103
#endif
//MCTruthBase_RECORDINGENVELOPE_H
TrackRecordCollection.h
TrackRecordCollection
AtlasHitsVector< TrackRecord > TrackRecordCollection
Definition
TrackRecordCollection.h:12
RecordingEnvelope::m_logicalVolume
G4LogicalVolume * m_logicalVolume
Pointer to the G4LogicalVolume used by this recording envelope.
Definition
RecordingEnvelope.h:73
RecordingEnvelope::m_level
int m_level
The number of levels beneath the world that the G4LogicalVolume called m_envelopeVolumeName lies.
Definition
RecordingEnvelope.h:68
RecordingEnvelope::GetTrackRecordCollectionName
const std::string & GetTrackRecordCollectionName() const
Returns the name of the TrackRecordCollection to which tracks crossing this recording envelope should...
Definition
RecordingEnvelope.h:93
RecordingEnvelope::m_envelopeVolumeName
const std::string m_envelopeVolumeName
Name of the G4LogicalVolume used by this recording envelope.
Definition
RecordingEnvelope.h:76
RecordingEnvelope::GetVolumeName
const std::string & GetVolumeName() const
Returns the name of the recording envelope volume.
Definition
RecordingEnvelope.h:83
RecordingEnvelope::m_trackRecordCollection
TrackRecordCollection * m_trackRecordCollection
TrackRecordCollection used by this envelope.
Definition
RecordingEnvelope.h:79
RecordingEnvelope::m_trackRecordCollectionName
std::string m_trackRecordCollectionName
Definition
RecordingEnvelope.h:80
RecordingEnvelope::GetLogicalVolume
const G4LogicalVolume * GetLogicalVolume() const
Returns the pointer to the G4LogicalVolume used by this recording envelope.
Definition
RecordingEnvelope.h:88
RecordingEnvelope::AddTrackRecord
void AddTrackRecord(const G4Step *aStep)
Add a TrackRecord to the TrackRecordCollection owned by this recording envelope based on the informat...
Definition
RecordingEnvelope.cxx:68
RecordingEnvelope::checkDaughters
bool checkDaughters(const G4LogicalVolume *possibleParent, const G4VPhysicalVolume *thePhysicalVolume, int &level) const
Recursively called method used to hunt for the G4LogicalVolume associated with this recording envelop...
Definition
RecordingEnvelope.cxx:34
RecordingEnvelope::RecordingEnvelope
RecordingEnvelope(const std::string &envelopeVolumeName, const std::string &trackRecordCollectionName)
Constructor.
Definition
RecordingEnvelope.cxx:20
RecordingEnvelope::GetLevel
int GetLevel() const
Returns the number of levels beneath the world volume that the G4LogicalVolume associated with this r...
Definition
RecordingEnvelope.h:98
RecordingEnvelope::Initialize
bool Initialize()
Finds the pointer to the G4LogicalVolume called m_envelopeVolumeName and the number of levels beneath...
Definition
RecordingEnvelope.cxx:55
RecordingEnvelope::~RecordingEnvelope
~RecordingEnvelope()
Destructor.
Definition
RecordingEnvelope.cxx:29
RecordingEnvelope::BeginOfEvent
void BeginOfEvent(TrackRecordCollection *)
Called at the start of each G4 event.
Definition
RecordingEnvelope.cxx:64
Generated on
for ATLAS Offline Software by
1.17.0