Geant4
10.03
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ExN04TrackerSD.cc
Go to the documentation of this file.
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
//
28
//
29
// $Id: ExN04TrackerSD.cc 77801 2013-11-28 13:33:20Z gcosmo $
30
//
31
32
#include "ExN04TrackerSD.hh"
33
#include "ExN04TrackerHit.hh"
34
#include "
G4Step.hh
"
35
#include "G4HCofThisEvent.hh"
36
#include "
G4TouchableHistory.hh
"
37
38
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
39
ExN04TrackerSD::ExN04TrackerSD
(
G4String
name
)
40
:
G4VSensitiveDetector
(name)
41
{
42
G4String
HCname;
43
collectionName
.
insert
(HCname=
"trackerCollection"
);
44
}
45
46
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
47
ExN04TrackerSD::~ExN04TrackerSD
(){;}
48
49
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
50
void
ExN04TrackerSD::Initialize
(
G4HCofThisEvent
* HCE)
51
{
52
static
int
HCID = -1;
53
trackerCollection
=
new
ExN04TrackerHitsCollection
54
(
SensitiveDetectorName
,
collectionName
[0]);
55
if
(HCID<0)
56
{ HCID =
GetCollectionID
(0); }
57
HCE->
AddHitsCollection
(HCID,
trackerCollection
);
58
}
59
60
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
61
G4bool
ExN04TrackerSD::ProcessHits
(
G4Step
* aStep,
G4TouchableHistory
*)
62
{
63
G4double
edep = aStep->
GetTotalEnergyDeposit
();
64
if
(edep==0.)
return
false
;
65
66
ExN04TrackerHit
* newHit =
new
ExN04TrackerHit
();
67
newHit->
SetEdep
( edep );
68
newHit->
SetPos
( aStep->
GetPreStepPoint
()->
GetPosition
() );
69
trackerCollection
->
insert
( newHit );
70
71
return
true
;
72
}
73
74
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
75
void
ExN04TrackerSD::EndOfEvent
(
G4HCofThisEvent
*)
76
{
77
}
78
79
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
80
void
ExN04TrackerSD::clear
()
81
{
82
}
83
84
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
85
void
ExN04TrackerSD::DrawAll
()
86
{
87
}
88
89
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
90
void
ExN04TrackerSD::PrintAll
()
91
{
92
}
ExN04TrackerHitsCollection
G4THitsCollection< ExN04TrackerHit > ExN04TrackerHitsCollection
Definition:
ExN04TrackerHit.hh:66
G4VSensitiveDetector::SensitiveDetectorName
G4String SensitiveDetectorName
Definition:
G4VSensitiveDetector.hh:105
G4TouchableHistory.hh
ExN04TrackerHit::SetPos
void SetPos(G4ThreeVector xyz)
Definition:
ExN04TrackerHit.hh:57
ExN04TrackerHit::SetEdep
void SetEdep(G4double de)
Definition:
ExN04TrackerHit.hh:55
G4VSensitiveDetector
Definition:
G4VSensitiveDetector.hh:50
G4Step.hh
G4THitsCollection::insert
G4int insert(T *aHit)
Definition:
G4THitsCollection.hh:105
G4InuclParticleNames::name
const char * name(G4int ptype)
Definition:
G4InuclParticleNames.hh:77
G4VSensitiveDetector::GetCollectionID
virtual G4int GetCollectionID(G4int i)
Definition:
G4VSensitiveDetector.cc:102
G4Step::GetPreStepPoint
G4StepPoint * GetPreStepPoint() const
ExN04TrackerSD::~ExN04TrackerSD
~ExN04TrackerSD()
Definition:
ExN04TrackerSD.cc:47
G4CollectionNameVector::insert
void insert(G4String str)
Definition:
G4CollectionNameVector.hh:42
ExN04TrackerSD::ProcessHits
G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist)
Definition:
ExN04TrackerSD.cc:61
ExN04TrackerSD::EndOfEvent
void EndOfEvent(G4HCofThisEvent *HCE)
Definition:
ExN04TrackerSD.cc:75
ExN04TrackerSD::Initialize
void Initialize(G4HCofThisEvent *HCE)
Definition:
ExN04TrackerSD.cc:50
G4StepPoint::GetPosition
const G4ThreeVector & GetPosition() const
G4bool
bool G4bool
Definition:
G4Types.hh:79
G4Step
Definition:
G4Step.hh:76
G4Step::GetTotalEnergyDeposit
G4double GetTotalEnergyDeposit() const
G4HCofThisEvent::AddHitsCollection
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
Definition:
G4HCofThisEvent.cc:57
ExN04TrackerSD::ExN04TrackerSD
ExN04TrackerSD(G4String name)
Definition:
ExN04TrackerSD.cc:39
G4TouchableHistory
Definition:
G4TouchableHistory.hh:53
ExN04TrackerSD::clear
void clear()
Definition:
ExN04TrackerSD.cc:80
G4HCofThisEvent
Definition:
G4HCofThisEvent.hh:64
ExN04TrackerHit
Definition:
ExN04TrackerHit.hh:40
G4VSensitiveDetector::collectionName
G4CollectionNameVector collectionName
Definition:
G4VSensitiveDetector.hh:99
ExN04TrackerSD::DrawAll
void DrawAll()
Definition:
ExN04TrackerSD.cc:85
G4double
double G4double
Definition:
G4Types.hh:76
ExN04TrackerSD::PrintAll
void PrintAll()
Definition:
ExN04TrackerSD.cc:90
ExN04TrackerSD::trackerCollection
ExN04TrackerHitsCollection * trackerCollection
Definition:
ExN04TrackerSD.hh:55
G4String
Definition:
G4String.hh:45
geant4.10.03
examples
extended
eventgenerator
HepMC
HepMCEx01
src
ExN04TrackerSD.cc
Generated on Thu Feb 14 2002 02:27:48 for Geant4 by
1.8.8