Geant4 VMC
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
source
digits+hits
include
TG4SensitiveDetector.h
Go to the documentation of this file.
1
#ifndef TG4_SENSITIVE_DETECTOR_H
2
#define TG4_SENSITIVE_DETECTOR_H
3
4
//------------------------------------------------
5
// The Geant4 Virtual Monte Carlo package
6
// Copyright (C) 2007 - 2015 Ivana Hrivnacova
7
// All rights reserved.
8
//
9
// For the licensing terms see geant4_vmc/LICENSE.
10
// Contact: root-vmc@cern.ch
11
//-------------------------------------------------
12
17
18
#include <G4VSensitiveDetector.hh>
19
#include <globals.hh>
20
21
class
TG4StepManager
;
22
23
class
TVirtualMCApplication;
24
class
TVirtualMCSensitiveDetector;
25
38
39
class
TG4SensitiveDetector
:
public
G4VSensitiveDetector
40
{
41
public
:
42
TG4SensitiveDetector
(G4String sdName, G4int mediumID);
43
TG4SensitiveDetector
(
44
TVirtualMCSensitiveDetector* userSD, G4int mediumID, G4bool exclusiveSD);
45
virtual
~TG4SensitiveDetector
();
46
47
// methods
48
virtual
G4bool
ProcessHits
(G4Step* step, G4TouchableHistory* history);
49
virtual
G4bool
ProcessHitsOnBoundary
(G4Step* step);
50
virtual
void
ProcessHitsOnTrackStart
();
51
// Was user process hits
52
53
// static get method
54
static
G4int
GetTotalNofSensitiveDetectors
();
55
56
// get methods
57
G4int
GetID
()
const
;
58
G4int
GetMediumID
()
const
;
59
TVirtualMCSensitiveDetector*
GetUserSD
()
const
;
60
61
protected
:
62
void
UserProcessHits
();
63
64
// data members
66
TG4StepManager
*
fStepManager
;
68
TVirtualMCApplication*
fMCApplication
;
70
TVirtualMCSensitiveDetector*
fUserSD
;
71
72
private
:
74
TG4SensitiveDetector
();
76
TG4SensitiveDetector
(
const
TG4SensitiveDetector
& right);
78
TG4SensitiveDetector
&
operator=
(
const
TG4SensitiveDetector
& right);
79
80
// data members
81
static
G4ThreadLocal G4int
fgSDCounter
;
82
83
// data members
84
G4int
fID
;
85
G4int
fMediumID
;
87
std::map<G4LogicalVolume*, G4int>
fLVToVolIdMap
;
88
};
89
90
// inline methods
91
92
inline
G4int
TG4SensitiveDetector::GetTotalNofSensitiveDetectors
()
93
{
95
return
fgSDCounter
;
96
}
97
98
inline
G4int
TG4SensitiveDetector::GetID
()
const
99
{
101
return
fID
;
102
}
103
104
inline
G4int
TG4SensitiveDetector::GetMediumID
()
const
105
{
107
return
fMediumID
;
108
}
109
110
inline
TVirtualMCSensitiveDetector*
TG4SensitiveDetector::GetUserSD
()
const
111
{
113
return
fUserSD
;
114
}
115
116
#endif
// TG4_SENSITIVE_DETECTOR_H
G4VSensitiveDetector
TG4SensitiveDetector::GetID
G4int GetID() const
Definition
TG4SensitiveDetector.h:98
TG4SensitiveDetector::~TG4SensitiveDetector
virtual ~TG4SensitiveDetector()
Definition
TG4SensitiveDetector.cxx:53
TG4SensitiveDetector::GetTotalNofSensitiveDetectors
static G4int GetTotalNofSensitiveDetectors()
Definition
TG4SensitiveDetector.h:92
TG4SensitiveDetector::ProcessHitsOnTrackStart
virtual void ProcessHitsOnTrackStart()
Definition
TG4SensitiveDetector.cxx:106
TG4SensitiveDetector::ProcessHitsOnBoundary
virtual G4bool ProcessHitsOnBoundary(G4Step *step)
Definition
TG4SensitiveDetector.cxx:93
TG4SensitiveDetector::GetMediumID
G4int GetMediumID() const
Definition
TG4SensitiveDetector.h:104
TG4SensitiveDetector::TG4SensitiveDetector
TG4SensitiveDetector(G4String sdName, G4int mediumID)
Definition
TG4SensitiveDetector.cxx:24
TG4SensitiveDetector::ProcessHits
virtual G4bool ProcessHits(G4Step *step, G4TouchableHistory *history)
Definition
TG4SensitiveDetector.cxx:81
TG4SensitiveDetector::fMCApplication
TVirtualMCApplication * fMCApplication
Cached pointer to thread-local VMC application.
Definition
TG4SensitiveDetector.h:68
TG4SensitiveDetector::fStepManager
TG4StepManager * fStepManager
Cached pointer to thread-local step manager.
Definition
TG4SensitiveDetector.h:66
TG4SensitiveDetector::TG4SensitiveDetector
TG4SensitiveDetector(const TG4SensitiveDetector &right)
Not implemented.
TG4SensitiveDetector::fMediumID
G4int fMediumID
Definition
TG4SensitiveDetector.h:85
TG4SensitiveDetector::operator=
TG4SensitiveDetector & operator=(const TG4SensitiveDetector &right)
Not implemented.
TG4SensitiveDetector::fUserSD
TVirtualMCSensitiveDetector * fUserSD
User sensitive detector.
Definition
TG4SensitiveDetector.h:70
TG4SensitiveDetector::fLVToVolIdMap
std::map< G4LogicalVolume *, G4int > fLVToVolIdMap
map logical volume -> volume id
Definition
TG4SensitiveDetector.h:87
TG4SensitiveDetector::TG4SensitiveDetector
TG4SensitiveDetector()
Not implemented.
TG4SensitiveDetector::UserProcessHits
void UserProcessHits()
Definition
TG4SensitiveDetector.cxx:63
TG4SensitiveDetector::fID
G4int fID
sensitive detector ID
Definition
TG4SensitiveDetector.h:84
TG4SensitiveDetector::GetUserSD
TVirtualMCSensitiveDetector * GetUserSD() const
Definition
TG4SensitiveDetector.h:110
TG4SensitiveDetector::fgSDCounter
static G4ThreadLocal G4int fgSDCounter
sensitive detector counter
Definition
TG4SensitiveDetector.h:81
TG4StepManager
Geant4 implementation of the TVirtualMC interface methods for access to Geant4 at step level.
Definition
TG4StepManager.h:56
Generated on
for Geant4 VMC by
1.17.0