ATLAS Offline Software
Loading...
Searching...
No Matches
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
10
11// STL headers
12#include <string>
13
14class G4LogicalVolume;
15class G4Step;
16class G4VPhysicalVolume;
17
22
24{
25public:
26
28 RecordingEnvelope(const std::string& envelopeVolumeName, const std::string& trackRecordCollectionName);
29
32
36 bool Initialize();
37
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);
60private:
64 bool checkDaughters(const G4LogicalVolume *possibleParent, const G4VPhysicalVolume *thePhysicalVolume, int& level) const;
65
69
72
73 G4LogicalVolume *m_logicalVolume;
74
76 const std::string m_envelopeVolumeName;
77
81};
82
83const std::string& RecordingEnvelope::GetVolumeName() const
84{
86}
87
88const G4LogicalVolume* RecordingEnvelope::GetLogicalVolume() const
89{
90 return m_logicalVolume;
91}
92
97
99{
100 return m_level;
101}
102
103#endif //MCTruthBase_RECORDINGENVELOPE_H
AtlasHitsVector< TrackRecord > TrackRecordCollection
G4LogicalVolume * m_logicalVolume
Pointer to the G4LogicalVolume used by this recording envelope.
int m_level
The number of levels beneath the world that the G4LogicalVolume called m_envelopeVolumeName lies.
const std::string & GetTrackRecordCollectionName() const
Returns the name of the TrackRecordCollection to which tracks crossing this recording envelope should...
const std::string m_envelopeVolumeName
Name of the G4LogicalVolume used by this recording envelope.
const std::string & GetVolumeName() const
Returns the name of the recording envelope volume.
TrackRecordCollection * m_trackRecordCollection
TrackRecordCollection used by this envelope.
std::string m_trackRecordCollectionName
const G4LogicalVolume * GetLogicalVolume() const
Returns the pointer to the G4LogicalVolume used by this recording envelope.
void AddTrackRecord(const G4Step *aStep)
Add a TrackRecord to the TrackRecordCollection owned by this recording envelope based on the informat...
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...
RecordingEnvelope(const std::string &envelopeVolumeName, const std::string &trackRecordCollectionName)
Constructor.
int GetLevel() const
Returns the number of levels beneath the world volume that the G4LogicalVolume associated with this r...
bool Initialize()
Finds the pointer to the G4LogicalVolume called m_envelopeVolumeName and the number of levels beneath...
~RecordingEnvelope()
Destructor.
void BeginOfEvent(TrackRecordCollection *)
Called at the start of each G4 event.