GGS(GenericGEANT4Simulation)Software
2.7.0
Main Page
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Macros
src
montecarlo
dataobjs
GGSTHadrIntInfo.cpp
Go to the documentation of this file.
1
/*
2
* GGSTHadrIntInfo.cpp
3
*
4
* Created on: 08 Jun 2011
5
* Author: Nicola Mori
6
*/
7
10
#include "montecarlo/dataobjs/GGSTHadrIntInfo.h"
11
12
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
13
GGSTHadrIntInfo::GGSTHadrIntInfo
() : products(NULL) {
Clear
(); }
14
15
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
16
GGSTHadrIntInfo::~GGSTHadrIntInfo
() {
delete
products
; }
17
18
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
19
20
void
GGSTHadrIntInfo::Clear
(Option_t *) {
21
primary
.
Clear
();
22
targetPDGCode
= 0;
23
originalTrackID
= 0;
24
processName
=
""
;
25
if
(
products
)
26
products
->Clear(
"C"
);
27
}
28
29
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
30
31
int
GGSTHadrIntInfo::GetNProducts
() {
32
if
(
products
) {
33
return
products
->GetEntries();
34
}
else
{
35
return
-1;
36
}
37
}
38
39
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
40
41
GGSTParticle
*
GGSTHadrIntInfo::GetProduct
(
int
iProduct) {
42
int
nProducts =
GetNProducts
();
43
if
(iProduct < nProducts && iProduct > -1) {
44
return
(
GGSTParticle
*)(
products
->At(iProduct));
45
}
else
{
46
return
NULL;
47
}
48
}
49
50
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
51
52
ClassImp(
GGSTHadrIntInfo
)
53
54
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
GGSTHadrIntInfo::originalTrackID
Int_t originalTrackID
Track ID of the original primary particle.
Definition:
GGSTHadrIntInfo.h:47
GGSTHadrIntInfo::primary
GGSTParticle primary
The particle originating the interaction.
Definition:
GGSTHadrIntInfo.h:37
GGSTHadrIntInfo::GetProduct
GGSTParticle * GetProduct(int iProduct)
Retrieves the particles produced in the interaction.
Definition:
GGSTHadrIntInfo.cpp:41
GGSTHadrIntInfo::GetNProducts
int GetNProducts()
Returns the number of particles produced in the interaction.
Definition:
GGSTHadrIntInfo.cpp:31
GGSTHadrIntInfo::products
TClonesArray * products
Particles produced in the interaction.
Definition:
GGSTHadrIntInfo.h:49
GGSTParticle::Clear
void Clear(Option_t *option)
Resets data members.
Definition:
GGSTParticle.cpp:26
GGSTHadrIntInfo
A simple class to carry informations about hadronic interactions.
Definition:
GGSTHadrIntInfo.h:24
GGSTParticle
Class to store G4 particles.
Definition:
GGSTParticle.h:19
GGSTHadrIntInfo::~GGSTHadrIntInfo
~GGSTHadrIntInfo()
Destructor.
Definition:
GGSTHadrIntInfo.cpp:16
GGSTHadrIntInfo::targetPDGCode
Int_t targetPDGCode
PDG code of target nucleus.
Definition:
GGSTHadrIntInfo.h:46
GGSTHadrIntInfo::Clear
void Clear(Option_t *="")
Resets all the members.
Definition:
GGSTHadrIntInfo.cpp:20
GGSTHadrIntInfo::GGSTHadrIntInfo
GGSTHadrIntInfo()
Constructor.
Definition:
GGSTHadrIntInfo.cpp:13
GGSTHadrIntInfo::processName
TString processName
Hadronic process name.
Definition:
GGSTHadrIntInfo.h:48
Generated on Wed Jul 8 2020 07:29:44 for GGS(GenericGEANT4Simulation)Software by
1.8.5