GGS(GenericGEANT4Simulation)Software  2.7.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
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......
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 
32  if (products) {
33  return products->GetEntries();
34  } else {
35  return -1;
36  }
37 }
38 
39 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
40 
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......
Int_t originalTrackID
Track ID of the original primary particle.
GGSTParticle primary
The particle originating the interaction.
GGSTParticle * GetProduct(int iProduct)
Retrieves the particles produced in the interaction.
int GetNProducts()
Returns the number of particles produced in the interaction.
TClonesArray * products
Particles produced in the interaction.
void Clear(Option_t *option)
Resets data members.
A simple class to carry informations about hadronic interactions.
Class to store G4 particles.
Definition: GGSTParticle.h:19
~GGSTHadrIntInfo()
Destructor.
Int_t targetPDGCode
PDG code of target nucleus.
void Clear(Option_t *="")
Resets all the members.
GGSTHadrIntInfo()
Constructor.
TString processName
Hadronic process name.