Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
geant4-projects
cosmic-rays
Commits
184027d5
Commit
184027d5
authored
Jul 25, 2019
by
MARCOS ANTONIO DE OLIVEIRA DEROS
Browse files
print particles in sensitive detecor
parent
fb796b71
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/B1SD.hh
View file @
184027d5
...
...
@@ -25,6 +25,7 @@ public:
private:
B1HitsCollection
*
hitCollection
;
G4int
HCID
;
G4int
track_id
;
};
#endif
src/B1SD.cc
View file @
184027d5
...
...
@@ -19,10 +19,19 @@ B1SD::~B1SD() {
G4bool
B1SD
::
ProcessHits
(
G4Step
*
step
,
G4TouchableHistory
*
ROhist
)
{
G4TouchableHandle
touchable
=
step
->
GetPreStepPoint
()
->
GetTouchableHandle
();
B1Hits
*
hit
=
new
B1Hits
();
hit
->
get_track
(
step
);
hitCollection
->
insert
(
hit
);
return
true
;
const
G4String
particle_name
=
step
->
GetTrack
()
->
GetDynamicParticle
()
->
GetParticleDefinition
()
->
GetParticleName
();
//G4cout << particle_def->GetParticleName() << G4endl;
G4int
track
=
step
->
GetTrack
()
->
GetTrackID
();
if
(
track
!=
track_id
)
{
B1Hits
*
hit
=
new
B1Hits
();
hit
->
set_partdef
(
particle_name
);
hitCollection
->
insert
(
hit
);
track_id
=
track
;
return
true
;
}
else
{
return
true
;
}
}
void
B1SD
::
Initialize
(
G4HCofThisEvent
*
HCE
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment