Geant4
10.00.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
F04StackingAction.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
//
26
// $Id: F04StackingAction.cc 68021 2013-03-13 13:36:07Z gcosmo $
27
//
30
//
31
32
#include "
F04StackingAction.hh
"
33
34
#include "
G4RunManager.hh
"
35
36
#include "
G4Track.hh
"
37
#include "
G4ParticleTypes.hh
"
38
#include "
G4ParticleDefinition.hh
"
39
40
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41
42
F04StackingAction::F04StackingAction
() {}
43
44
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45
46
F04StackingAction::~F04StackingAction
() {}
47
48
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
49
50
G4ClassificationOfNewTrack
51
F04StackingAction::ClassifyNewTrack
(
const
G4Track
* aTrack)
52
{
53
G4ParticleDefinition
* particleType = aTrack->
GetDefinition
();
54
const
G4String
name
= particleType->
GetParticleName
();
55
56
// keep primary particle
57
if
(aTrack->
GetParentID
() == 0)
return
fUrgent
;
58
59
if
(particleType !=
G4Proton::ProtonDefinition
() &&
60
particleType !=
G4Neutron::NeutronDefinition
() &&
61
particleType !=
G4KaonPlus::KaonPlusDefinition
() &&
62
particleType !=
G4PionPlus::PionPlusDefinition
() &&
63
particleType !=
G4MuonPlus::MuonPlusDefinition
() &&
64
particleType !=
G4Positron::PositronDefinition
())
return
fKill
;
65
66
if
(name !=
"pi+"
&& name !=
"mu+"
)
return
fKill
;
67
68
// if (name == "mu+") G4RunManager::GetRunManager()->rndmSaveThisEvent();
69
70
return
fUrgent
;
71
}
72
73
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
74
75
void
F04StackingAction::NewStage
() {}
76
77
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
78
79
void
F04StackingAction::PrepareNewEvent
() {}
G4Track::GetDefinition
G4ParticleDefinition * GetDefinition() const
G4Track::GetParentID
G4int GetParentID() const
G4KaonPlus::KaonPlusDefinition
static G4KaonPlus * KaonPlusDefinition()
Definition:
G4KaonPlus.cc:108
G4MuonPlus::MuonPlusDefinition
static G4MuonPlus * MuonPlusDefinition()
Definition:
G4MuonPlus.cc:94
fUrgent
Definition:
G4ClassificationOfNewTrack.hh:42
G4RunManager.hh
G4Track.hh
name
G4String name
Definition:
TRTMaterials.hh:40
G4Proton::ProtonDefinition
static G4Proton * ProtonDefinition()
Definition:
G4Proton.cc:88
F04StackingAction::~F04StackingAction
virtual ~F04StackingAction()
Definition:
F04StackingAction.cc:46
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:111
G4ParticleDefinition::GetParticleName
const G4String & GetParticleName() const
Definition:
G4ParticleDefinition.hh:159
G4ParticleTypes.hh
G4PionPlus::PionPlusDefinition
static G4PionPlus * PionPlusDefinition()
Definition:
G4PionPlus.cc:93
F04StackingAction::F04StackingAction
F04StackingAction()
Definition:
F04StackingAction.cc:42
G4ParticleDefinition.hh
F04StackingAction::ClassifyNewTrack
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *aTrack)
Definition:
F04StackingAction.cc:51
G4Positron::PositronDefinition
static G4Positron * PositronDefinition()
Definition:
G4Positron.cc:89
F04StackingAction::PrepareNewEvent
virtual void PrepareNewEvent()
Definition:
F04StackingAction.cc:79
G4ClassificationOfNewTrack
G4ClassificationOfNewTrack
Definition:
G4ClassificationOfNewTrack.hh:40
fKill
Definition:
G4ClassificationOfNewTrack.hh:45
F04StackingAction::NewStage
virtual void NewStage()
Definition:
F04StackingAction.cc:75
G4Track
Definition:
G4Track.hh:73
F04StackingAction.hh
Definition of the F04StackingAction class.
G4Neutron::NeutronDefinition
static G4Neutron * NeutronDefinition()
Definition:
G4Neutron.cc:99
G4String
Definition:
G4String.hh:45
geant4.10.00.p02
examples
extended
field
field04
src
F04StackingAction.cc
Generated on Thu Dec 31 2015 10:39:44 for Geant4 by
1.8.8