Geant4
v4-10.4-release
메인 페이지
관련된 페이지
모듈
네임스페이스
클래스
파일들
파일 목록
파일 멤버
모두
클래스
네임스페이스들
파일들
함수
변수
타입정의
열거형 타입
열거형 멤버
Friends
매크로
그룹들
페이지들
examples
extended
optical
LXe
src
LXeScintSD.cc
이 파일의 문서화 페이지로 가기
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
// $Id: LXeScintSD.cc 110138 2018-05-16 07:31:43Z gcosmo $
27
//
30
//
31
//
32
#include "
LXeScintSD.hh
"
33
#include "
LXeScintHit.hh
"
34
#include "
G4VPhysicalVolume.hh
"
35
#include "
G4LogicalVolume.hh
"
36
#include "
G4Track.hh
"
37
#include "
G4Step.hh
"
38
#include "
G4ParticleDefinition.hh
"
39
#include "
G4VTouchable.hh
"
40
#include "
G4TouchableHistory.hh
"
41
#include "
G4ios.hh
"
42
#include "
G4VProcess.hh
"
43
44
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45
46
LXeScintSD::LXeScintSD
(
G4String
name
)
47
:
G4VSensitiveDetector
(name)
48
{
49
fScintCollection
=
nullptr
;
50
collectionName
.
insert
(
"scintCollection"
);
51
}
52
53
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
54
55
LXeScintSD::~LXeScintSD
() {}
56
57
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
58
59
void
LXeScintSD::Initialize
(
G4HCofThisEvent
* hitsCE){
60
fScintCollection
=
new
LXeScintHitsCollection
61
(
SensitiveDetectorName
,
collectionName
[0]);
62
//A way to keep all the hits of this event in one place if needed
63
static
G4int
hitsCID = -1;
64
if
(hitsCID<0){
65
hitsCID =
GetCollectionID
(0);
66
}
67
hitsCE->
AddHitsCollection
( hitsCID,
fScintCollection
);
68
}
69
70
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
71
72
G4bool
LXeScintSD::ProcessHits
(
G4Step
* aStep,
G4TouchableHistory
* ){
73
G4double
edep
= aStep->
GetTotalEnergyDeposit
();
74
if
(edep==0.)
return
false
;
//No edep so dont count as hit
75
76
G4StepPoint
* thePrePoint = aStep->
GetPreStepPoint
();
77
G4TouchableHistory
* theTouchable =
78
(
G4TouchableHistory
*)(aStep->
GetPreStepPoint
()->
GetTouchable
());
79
G4VPhysicalVolume
* thePrePV = theTouchable->
GetVolume
();
80
81
G4StepPoint
* thePostPoint = aStep->
GetPostStepPoint
();
82
83
//Get the average position of the hit
84
G4ThreeVector
pos
= thePrePoint->
GetPosition
() + thePostPoint->
GetPosition
();
85
pos/=2.;
86
87
LXeScintHit
* scintHit =
new
LXeScintHit
(thePrePV);
88
89
scintHit->
SetEdep
(edep);
90
scintHit->
SetPos
(pos);
91
92
fScintCollection
->
insert
(scintHit);
93
94
return
true
;
95
}
96
97
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
98
99
void
LXeScintSD::EndOfEvent
(
G4HCofThisEvent
* ) {}
100
101
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
102
103
void
LXeScintSD::clear
() {}
104
105
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
106
107
void
LXeScintSD::DrawAll
() {}
108
109
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
110
111
void
LXeScintSD::PrintAll
() {}
G4VSensitiveDetector::GetCollectionID
virtual G4int GetCollectionID(G4int i)
Definition:
G4VSensitiveDetector.cc:102
G4VSensitiveDetector
Definition:
G4VSensitiveDetector.hh:50
LXeScintHitsCollection
G4THitsCollection< LXeScintHit > LXeScintHitsCollection
Definition:
LXeScintHit.hh:79
name
const XML_Char * name
Definition:
expat.h:151
LXeScintSD::clear
virtual void clear()
Definition:
LXeScintSD.cc:103
LXeScintHit::SetEdep
void SetEdep(G4double de)
Definition:
LXeScintHit.hh:63
G4StepPoint::GetTouchable
const G4VTouchable * GetTouchable() const
pos
static const G4double pos
Definition:
G4ElectroNuclearCrossSection.cc:66
G4Step::GetPreStepPoint
G4StepPoint * GetPreStepPoint() const
LXeScintSD::~LXeScintSD
virtual ~LXeScintSD()
Definition:
LXeScintSD.cc:55
G4ios.hh
LXeScintSD::Initialize
virtual void Initialize(G4HCofThisEvent *)
Definition:
LXeScintSD.cc:59
G4HCofThisEvent::AddHitsCollection
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
Definition:
G4HCofThisEvent.cc:61
G4StepPoint
Definition:
G4StepPoint.hh:68
G4String
Definition:
examples/extended/parallel/TopC/ParN02/AnnotatedFiles/G4String.hh:45
G4VProcess.hh
G4VSensitiveDetector::SensitiveDetectorName
G4String SensitiveDetectorName
Definition:
G4VSensitiveDetector.hh:105
LXeScintSD.hh
Definition of the LXeScintSD class.
LXeScintSD::PrintAll
virtual void PrintAll()
Definition:
LXeScintSD.cc:111
G4double
double G4double
Definition:
G4Types.hh:76
G4bool
bool G4bool
Definition:
G4Types.hh:79
LXeScintSD::fScintCollection
LXeScintHitsCollection * fScintCollection
Definition:
LXeScintSD.hh:58
G4VPhysicalVolume.hh
G4CollectionNameVector::insert
void insert(G4String str)
Definition:
G4CollectionNameVector.hh:42
G4THitsCollection::insert
G4int insert(T *aHit)
Definition:
examples/extended/parallel/TopC/ParN02/AnnotatedFiles/G4THitsCollection.hh:105
G4TouchableHistory
Definition:
G4TouchableHistory.hh:53
G4TouchableHistory::GetVolume
G4VPhysicalVolume * GetVolume(G4int depth=0) const
G4StepPoint::GetPosition
const G4ThreeVector & GetPosition() const
G4VTouchable.hh
LXeScintSD::EndOfEvent
virtual void EndOfEvent(G4HCofThisEvent *)
Definition:
LXeScintSD.cc:99
G4Step::GetTotalEnergyDeposit
G4double GetTotalEnergyDeposit() const
G4Step
Definition:
G4Step.hh:76
G4Step::GetPostStepPoint
G4StepPoint * GetPostStepPoint() const
LXeScintSD::DrawAll
virtual void DrawAll()
Definition:
LXeScintSD.cc:107
edep
Double_t edep
Definition:
human_phantom/macro.C:13
G4Track.hh
CLHEP::Hep3Vector
Definition:
ThreeVector.h:41
G4LogicalVolume.hh
G4int
int G4int
Definition:
G4Types.hh:78
G4VSensitiveDetector::collectionName
G4CollectionNameVector collectionName
Definition:
G4VSensitiveDetector.hh:99
LXeScintHit::SetPos
void SetPos(G4ThreeVector xyz)
Definition:
LXeScintHit.hh:67
G4VPhysicalVolume
Definition:
G4VPhysicalVolume.hh:82
G4TouchableHistory.hh
LXeScintSD::ProcessHits
virtual G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *)
Definition:
LXeScintSD.cc:72
G4Step.hh
G4ParticleDefinition.hh
LXeScintHit
Definition:
LXeScintHit.hh:46
G4HCofThisEvent
Definition:
examples/extended/parallel/TopC/ParN02/AnnotatedFiles/G4HCofThisEvent.hh:64
LXeScintHit.hh
Definition of the LXeScintHit class.
LXeScintSD::LXeScintSD
LXeScintSD(G4String name)
Definition:
LXeScintSD.cc:46
다음에 의해 생성됨 :
1.8.5