#include <FairPrimaryGenerator.h>
|
| FairPrimaryGenerator () |
|
| FairPrimaryGenerator (const char *name, const char *title="FAIR Generator") |
|
virtual | ~FairPrimaryGenerator () |
|
virtual Bool_t | Init () |
|
void | AddGenerator (FairGenerator *generator) |
|
void | SetEventNr (Int_t evtNr) |
|
virtual Bool_t | GenerateEvent (FairGenericStack *pStack) |
|
virtual void | AddTrack (Int_t pdgid, Double_t px, Double_t py, Double_t pz, Double_t vx, Double_t vy, Double_t vz, Int_t parent=-1, Bool_t wanttracking=true, Double_t e=-9e9, Double_t tof=0., Double_t weight=0., TMCProcess proc=kPPrimary) |
|
virtual FairPrimaryGenerator * | ClonePrimaryGenerator () const |
|
void | SetBeam (Double_t beamX0, Double_t beamY0, Double_t beamSigmaX, Double_t beamSigmaY) |
|
void | SetBeamAngle (Double_t beamAngleX0, Double_t beamAngleY0, Double_t beamAngleSigmaX, Double_t beamAngleSigmaY) |
|
void | SetEventPlane (Double_t phiMin, Double_t phiMax) |
|
void | SetTarget (Double_t targetZ, Double_t targetDz) |
|
void | SetMultTarget (Int_t nroftargets, Double_t *targetZ, Double_t targetDz) |
|
void | SmearVertexZ (Bool_t flag) |
|
void | SmearGausVertexZ (Bool_t flag) |
|
void | SmearVertexXY (Bool_t flag) |
|
void | SmearGausVertexXY (Bool_t flag) |
|
TObjArray * | GetListOfGenerators () |
|
void | SetEvent (FairMCEventHeader *event) |
|
FairMCEventHeader * | GetEvent () |
|
void | DoTracking (Bool_t doTracking=kTRUE) |
|
Int_t | GetTotPrimary () |
|
Definition at line 39 of file FairPrimaryGenerator.h.
FairPrimaryGenerator::FairPrimaryGenerator |
( |
| ) |
|
FairPrimaryGenerator::FairPrimaryGenerator |
( |
const char * |
name, |
|
|
const char * |
title = "FAIR Generator" |
|
) |
| |
FairPrimaryGenerator::~FairPrimaryGenerator |
( |
| ) |
|
|
virtual |
void FairPrimaryGenerator::AddGenerator |
( |
FairGenerator * |
generator | ) |
|
|
inline |
void FairPrimaryGenerator::AddTrack |
( |
Int_t |
pdgid, |
|
|
Double_t |
px, |
|
|
Double_t |
py, |
|
|
Double_t |
pz, |
|
|
Double_t |
vx, |
|
|
Double_t |
vy, |
|
|
Double_t |
vz, |
|
|
Int_t |
parent = -1 , |
|
|
Bool_t |
wanttracking = true , |
|
|
Double_t |
e = -9e9 , |
|
|
Double_t |
tof = 0. , |
|
|
Double_t |
weight = 0. , |
|
|
TMCProcess |
proc = kPPrimary |
|
) |
| |
|
virtual |
Public method AddTrack Adding a track to the MC stack. To be called within the ReadEvent methods of the registered generators.
- Parameters
-
pdgid | Particle ID (PDG code) |
px,py,pz | Momentum coordinates [GeV] |
vx,vy,vz | Track origin relative to event vertex |
Definition at line 279 of file FairPrimaryGenerator.cxx.
void FairPrimaryGenerator::DoTracking |
( |
Bool_t |
doTracking = kTRUE | ) |
|
|
inline |
Public method GenerateEvent To be called at the beginning of each event from FairMCApplication. Generates an event vertex and calls the ReadEvent methods from the registered generators.
- Parameters
-
- Returns
- kTRUE if successful, kFALSE if not
Definition at line 212 of file FairPrimaryGenerator.cxx.
TObjArray* FairPrimaryGenerator::GetListOfGenerators |
( |
| ) |
|
|
inline |
Int_t FairPrimaryGenerator::GetTotPrimary |
( |
| ) |
|
|
inline |
Bool_t FairPrimaryGenerator::Init |
( |
| ) |
|
|
virtual |
void FairPrimaryGenerator::MakeBeamAngle |
( |
| ) |
|
|
protectedvirtual |
Private method MakeBeamAngle. If beam angle smearing in xy
is switched on, all tracks in an event are rotated by a Gaussianlike angle distribution around the x and y axis according to the mean beam angle and angle widths set by the SetBeamAngle method. To be called at the beginning of the event from the GenerateEvent method.
Definition at line 499 of file FairPrimaryGenerator.cxx.
void FairPrimaryGenerator::MakeEventPlane |
( |
| ) |
|
|
protected |
Private method MakeEventPlane. If the rotation of the event around the z-axis by a random angle is switched on, the complete event is rotated by the chosen angle. This function is called at the beginning of the event from the GenerateEvent method. The function pick a random rotation angle between fPhiMin and fPhiMax which are set using the function SetEventPlane.
Definition at line 508 of file FairPrimaryGenerator.cxx.
void FairPrimaryGenerator::MakeVertex |
( |
| ) |
|
|
protectedvirtual |
Private method MakeVertex. If vertex smearing in xy is switched on, the event vertex is smeared Gaussianlike in x and y direction according to the mean beam positions and widths set by the SetBeam method. If vertex smearing in z is switched on, the z coordinate of the event vertex is flatly distributed over the extension of the target. To be called at the beginning of the event from the GenerateEvent method.
Definition at line 459 of file FairPrimaryGenerator.cxx.
void FairPrimaryGenerator::SetBeam |
( |
Double_t |
beamX0, |
|
|
Double_t |
beamY0, |
|
|
Double_t |
beamSigmaX, |
|
|
Double_t |
beamSigmaY |
|
) |
| |
Set beam position and widths.
- Parameters
-
beamX0 | mean x position of beam at target |
beamY0 | mean y position of beam at target |
beamSigmaX | Gaussian beam width in x |
beamSigmaY | Gaussian beam width in y |
Definition at line 411 of file FairPrimaryGenerator.cxx.
void FairPrimaryGenerator::SetBeamAngle |
( |
Double_t |
beamAngleX0, |
|
|
Double_t |
beamAngleY0, |
|
|
Double_t |
beamAngleSigmaX, |
|
|
Double_t |
beamAngleSigmaY |
|
) |
| |
Set nominal beam angle and angle widths.
- Parameters
-
beamAngleX0 | mean x angle of beam at target |
beamAngleY0 | mean y angle of beam at target |
beamAngleSigmaX | Gaussian beam angle width in x |
beamAngleSigmaY | Gaussian beam angle width in y |
Definition at line 419 of file FairPrimaryGenerator.cxx.
void FairPrimaryGenerator::SetEventNr |
( |
Int_t |
evtNr | ) |
|
|
inline |
void FairPrimaryGenerator::SetEventPlane |
( |
Double_t |
phiMin, |
|
|
Double_t |
phiMax |
|
) |
| |
Public method SetEventPlane
- Parameters
-
phiMin | Lower limit for event plane angle [rad] |
phiMax | Upper limit for event plane angle [rad] If set, an event plane angle will be generated with flat distrtibution between phiMin and phiMax. |
Definition at line 431 of file FairPrimaryGenerator.cxx.
void FairPrimaryGenerator::SetMultTarget |
( |
Int_t |
nroftargets, |
|
|
Double_t * |
targetZ, |
|
|
Double_t |
targetDz |
|
) |
| |
Set target position for multiple tagets. The thickness is the same for all targets.
- Parameters
-
nroftargets | number of targets |
*targetZ | z positions of target center |
targetDz | full target thickness |
Definition at line 445 of file FairPrimaryGenerator.cxx.
void FairPrimaryGenerator::SetTarget |
( |
Double_t |
targetZ, |
|
|
Double_t |
targetDz |
|
) |
| |
Set target position and thickness.
- Parameters
-
targetZ | z position of target center |
targetDz | full target thickness |
Definition at line 438 of file FairPrimaryGenerator.cxx.
void FairPrimaryGenerator::SmearGausVertexXY |
( |
Bool_t |
flag | ) |
|
void FairPrimaryGenerator::SmearGausVertexZ |
( |
Bool_t |
flag | ) |
|
void FairPrimaryGenerator::SmearVertexXY |
( |
Bool_t |
flag | ) |
|
void FairPrimaryGenerator::SmearVertexZ |
( |
Bool_t |
flag | ) |
|
Bool_t FairPrimaryGenerator::fBeamAngle |
|
protected |
Double_t FairPrimaryGenerator::fBeamAngleSigmaX |
|
protected |
Double_t FairPrimaryGenerator::fBeamAngleSigmaY |
|
protected |
Double_t FairPrimaryGenerator::fBeamAngleX |
|
protected |
Double_t FairPrimaryGenerator::fBeamAngleX0 |
|
protected |
Double_t FairPrimaryGenerator::fBeamAngleY |
|
protected |
Double_t FairPrimaryGenerator::fBeamAngleY0 |
|
protected |
TVector3 FairPrimaryGenerator::fBeamDirection |
|
protected |
Double_t FairPrimaryGenerator::fBeamSigmaX |
|
protected |
Double_t FairPrimaryGenerator::fBeamSigmaY |
|
protected |
Double_t FairPrimaryGenerator::fBeamX0 |
|
protected |
Double_t FairPrimaryGenerator::fBeamY0 |
|
protected |
Bool_t FairPrimaryGenerator::fdoTracking |
|
protected |
Int_t FairPrimaryGenerator::fEventNr |
|
protected |
Event number (Set by the primary generator if not set already by one of the specific generators
Definition at line 239 of file FairPrimaryGenerator.h.
Bool_t FairPrimaryGenerator::fEventPlane |
|
protected |
TObjArray* FairPrimaryGenerator::fGenList |
|
protected |
TIterator* FairPrimaryGenerator::fListIter |
|
protected |
Int_t FairPrimaryGenerator::fMCIndexOffset |
|
protected |
Number of MC tracks before a Generator is called, needed for MC index update
Definition at line 233 of file FairPrimaryGenerator.h.
Int_t FairPrimaryGenerator::fNrTargets |
|
protected |
Int_t FairPrimaryGenerator::fNTracks |
|
protected |
Double_t FairPrimaryGenerator::fPhi |
|
protected |
Double_t FairPrimaryGenerator::fPhiMax |
|
protected |
Double_t FairPrimaryGenerator::fPhiMin |
|
protected |
Bool_t FairPrimaryGenerator::fSmearGausVertexXY |
|
protected |
Bool_t FairPrimaryGenerator::fSmearGausVertexZ |
|
protected |
Bool_t FairPrimaryGenerator::fSmearVertexXY |
|
protected |
Bool_t FairPrimaryGenerator::fSmearVertexZ |
|
protected |
Double_t FairPrimaryGenerator::fTargetDz |
|
protected |
Double_t* FairPrimaryGenerator::fTargetZ |
|
protected |
Int_t FairPrimaryGenerator::fTotPrim = 0 |
|
staticprotected |
TVector3 FairPrimaryGenerator::fVertex |
|
protected |
The documentation for this class was generated from the following files: