GGS(GenericGEANT4Simulation)Software  2.7.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
Public Member Functions | Data Fields
GGSTPrimaryDisInfo Class Reference

A simple class to carry informations about the disappearance of the primary particle. More...

#include <GGSTPrimaryDisInfo.h>

Inheritance diagram for GGSTPrimaryDisInfo:
Inheritance graph
[legend]
Collaboration diagram for GGSTPrimaryDisInfo:
Collaboration graph
[legend]

Public Member Functions

 GGSTPrimaryDisInfo ()
 Constructor.
 
 ~GGSTPrimaryDisInfo ()
 Destructor.
 
void Clear (Option_t *="")
 Resets all the members.
 
Float_t * GetInteractionPoint ()
 The interaction point. More...
 
int GetNProducts ()
 Returns the number of particles produced by the disappearance of the primary. More...
 
GGSTParticleGetProduct (int iProduct)
 Retrieves a particle produced by the disappearance of the primary. More...
 

Data Fields

GGSTParticle primary
 Descriptor for the primary particle. More...
 
TString processName
 Name of the process that made the primary disappear.
 
TClonesArray * products
 Particles produced by the disappearance of the primary.
 
TString volumeName
 The name of the physical volume where the primary disappeared.
 

Detailed Description

A simple class to carry informations about the disappearance of the primary particle.

This class stores information about the disappearance of the primary particle, either because of an interaction or exit from the world volume.

Definition at line 22 of file GGSTPrimaryDisInfo.h.

Member Function Documentation

Float_t* GGSTPrimaryDisInfo::GetInteractionPoint ( )
inline

The interaction point.

Simple getter that returns primary.pos.

Returns
Pointer to a Float_t[3] containing the (x,y,z) coordinates of the interaction point.

Definition at line 49 of file GGSTPrimaryDisInfo.h.

49 { return primary.pos; }
GGSTParticle primary
Descriptor for the primary particle.
Float_t pos[3]
Point of generation [cm].
Definition: GGSTParticle.h:23
int GGSTPrimaryDisInfo::GetNProducts ( )

Returns the number of particles produced by the disappearance of the primary.

Returns
The number of produced particles (-1 if no information about products is available)

Definition at line 28 of file GGSTPrimaryDisInfo.cpp.

28  {
29  if (products) {
30  return products->GetEntries();
31  } else {
32  return -1;
33  }
34 }
TClonesArray * products
Particles produced by the disappearance of the primary.
GGSTParticle * GGSTPrimaryDisInfo::GetProduct ( int  iProduct)

Retrieves a particle produced by the disappearance of the primary.

Parameters
iProductThe desired produced particle.
Returns
Pointer to the produced particle (nullptr if nProduct is out of range or if no info about products is available).

Definition at line 36 of file GGSTPrimaryDisInfo.cpp.

36  {
37  int nProducts = GetNProducts();
38  if (iProduct < nProducts && iProduct > -1) {
39  return (GGSTParticle *)(products->At(iProduct));
40  } else {
41  return nullptr;
42  }
43 }
int GetNProducts()
Returns the number of particles produced by the disappearance of the primary.
Class to store G4 particles.
Definition: GGSTParticle.h:19
TClonesArray * products
Particles produced by the disappearance of the primary.

Field Documentation

GGSTParticle GGSTPrimaryDisInfo::primary

Descriptor for the primary particle.

The kinematic properties of the particle (position, momentum, time) are relative to the disappearance point.

Definition at line 35 of file GGSTPrimaryDisInfo.h.


The documentation for this class was generated from the following files: