BOSS
7.1.2
BESIII Offline Software System
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
x
z
Typedefs
c
d
e
g
h
i
l
m
n
o
p
r
s
t
Enumerations
Enumerator
a
b
c
d
e
f
i
k
l
m
n
o
p
r
s
t
u
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
v
w
Enumerations
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
v
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Related Symbols
:
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
v
w
x
Files
File List
File Members
All
!
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
!
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
!
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
h
i
j
k
l
m
n
p
r
s
t
u
v
w
z
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
w
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
BesSensitiveDetector.cc
Go to the documentation of this file.
1
//---------------------------------------------------------------------------//
2
//////// BOOST --- BESIII Object_Oriented Simulation Tool //
3
////---------------------------------------------------------------------------//
4
////Author : Dengzy
5
////Created: Aug, 2004
6
////Modified:
7
////Comment:
8
////$Id: BesSensitiveDetector.cc
9
10
// A pure virtual class that represents a generic Bes sensitive
11
// Detector. Bes subsystems should inherit from this class when
12
// implementing their hit scoring.
13
14
#include "
BesSensitiveDetector.hh
"
15
#include "
BesSensitiveManager.hh
"
16
#include "
BesTruthTrack.hh
"
17
18
//
19
// Constructor
20
//
21
BesSensitiveDetector::BesSensitiveDetector
(
const
G4String name)
22
: G4VSensitiveDetector(name)
23
{
24
BesSensitiveManager
* manager =
BesSensitiveManager::GetSensitiveManager
();
25
manager->
AddSensitiveDetector
(
this
);
26
}
21
BesSensitiveDetector::BesSensitiveDetector
(
const
G4String name) {
…
}
27
28
// Ask the sensitive detector manager
29
//
30
void
BesSensitiveDetector::GetCurrentTrackIndex
(G4int& trackIndex, G4int& g4TrackId)
const
31
{
32
BesSensitiveManager
* manager =
BesSensitiveManager::GetSensitiveManager
();
33
if
(manager)
34
{
35
trackIndex = manager->
GetCurrentTrackIndex
();
36
std::vector<BesTruthTrack*>* trackList = manager->
GetTrackList
();
37
if
(trackList)
38
{
39
G4int size = trackList->size();
40
if
(size>0)
41
{
42
for
(G4int i=0;i<size;i++)
43
{
44
if
( (*trackList)[i]->GetIndex() == trackIndex )
45
{
46
g4TrackId = (*trackList)[i]->GetG4TrackId();
47
break
;
48
}
49
}
50
}
51
}
52
}
53
}
30
void
BesSensitiveDetector::GetCurrentTrackIndex
(G4int& trackIndex, G4int& g4TrackId)
const
{
…
}
54
55
56
57
58
59
60
61
BesSensitiveDetector.hh
BesSensitiveManager.hh
BesTruthTrack.hh
BesSensitiveDetector::GetCurrentTrackIndex
void GetCurrentTrackIndex(G4int &trackIndex, G4int &g4TrackId) const
Definition
BesSensitiveDetector.cc:30
BesSensitiveDetector::BesSensitiveDetector
BesSensitiveDetector(const G4String name)
Definition
BesSensitiveDetector.cc:21
BesSensitiveManager
Definition
BesSensitiveManager.hh:73
BesSensitiveManager::GetCurrentTrackIndex
G4int GetCurrentTrackIndex() const
Definition
BesSensitiveManager.hh:93
BesSensitiveManager::AddSensitiveDetector
void AddSensitiveDetector(BesSensitiveDetector *detector)
Definition
BesSensitiveManager.hh:88
BesSensitiveManager::GetTrackList
std::vector< BesTruthTrack * > * GetTrackList()
Definition
BesSensitiveManager.hh:94
BesSensitiveManager::GetSensitiveManager
static BesSensitiveManager * GetSensitiveManager()
Definition
BesSensitiveManager.hh:85
7.1.2
Simulation
BOOST
TruSim
TruSim-00-00-18
src
BesSensitiveDetector.cc
Generated by
1.12.0