![]() |
Project
|
#include <FairPrimaryGenerator.h>
Inherits TNamed.
Inherited by o2::eventgen::PrimaryGenerator.
Public Member Functions | |
| 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 () |
Protected Member Functions | |
| FairPrimaryGenerator (const FairPrimaryGenerator &) | |
| FairPrimaryGenerator & | operator= (const FairPrimaryGenerator &) |
| virtual void | MakeVertex () |
| virtual void | MakeBeamAngle () |
| void | MakeEventPlane () |
| ClassDef (FairPrimaryGenerator, 5) | |
Protected Attributes | |
| Double_t | fBeamX0 |
| Double_t | fBeamY0 |
| Double_t | fBeamSigmaX |
| Double_t | fBeamSigmaY |
| Double_t | fBeamAngleX0 |
| Double_t | fBeamAngleY0 |
| Double_t | fBeamAngleX |
| Double_t | fBeamAngleY |
| Double_t | fBeamAngleSigmaX |
| Double_t | fBeamAngleSigmaY |
| TVector3 | fBeamDirection |
| Double_t | fPhiMin |
| Double_t | fPhiMax |
| Double_t | fPhi |
| Double_t * | fTargetZ |
| Int_t | fNrTargets |
| Double_t | fTargetDz |
| TVector3 | fVertex |
| Int_t | fNTracks |
| Bool_t | fSmearVertexZ |
| Bool_t | fSmearGausVertexZ |
| Bool_t | fSmearVertexXY |
| Bool_t | fSmearGausVertexXY |
| Bool_t | fBeamAngle |
| Bool_t | fEventPlane |
| FairGenericStack * | fStack |
| TObjArray * | fGenList |
| TIterator * | fListIter |
| FairMCEventHeader * | fEvent |
| Bool_t | fdoTracking |
| Int_t | fMCIndexOffset |
| Int_t | fEventNr |
Static Protected Attributes | |
| static Int_t | fTotPrim = 0 |
Definition at line 39 of file FairPrimaryGenerator.h.
| FairPrimaryGenerator::FairPrimaryGenerator | ( | ) |
Default constructor.
Definition at line 30 of file FairPrimaryGenerator.cxx.
| FairPrimaryGenerator::FairPrimaryGenerator | ( | const char * | name, |
| const char * | title = "FAIR Generator" |
||
| ) |
Constructor with name and title
Definition at line 68 of file FairPrimaryGenerator.cxx.
|
virtual |
Destructor.
Definition at line 156 of file FairPrimaryGenerator.cxx.
|
protected |
Copy constructor
Definition at line 106 of file FairPrimaryGenerator.cxx.
|
inline |
Register a generator derived from FairGenerator.
Definition at line 56 of file FairPrimaryGenerator.h.
|
virtual |
Public method AddTrack Adding a track to the MC stack. To be called within the ReadEvent methods of the registered generators.
| pdgid | Particle ID (PDG code) |
| px,py,pz | Momentum coordinates [GeV] |
| vx,vy,vz | Track origin relative to event vertex |
Reimplemented in o2::eventgen::PrimaryGenerator.
Definition at line 279 of file FairPrimaryGenerator.cxx.
|
protected |
|
virtual |
Clone this object (used in MT mode only)
Clone generators in the list
Definition at line 396 of file FairPrimaryGenerator.cxx.
|
inline |
Swich on/off the tracking of a particle
Definition at line 154 of file FairPrimaryGenerator.h.
|
virtual |
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.
| pStack | The particle stack |
Reimplemented in o2::eventgen::PrimaryGenerator.
Definition at line 212 of file FairPrimaryGenerator.cxx.
|
inline |
Accessor to the MCEvent
Definition at line 150 of file FairPrimaryGenerator.h.
|
inline |
Definition at line 144 of file FairPrimaryGenerator.h.
|
inline |
Definition at line 156 of file FairPrimaryGenerator.h.
|
virtual |
Initialize the generater (if needed!)
Initialize list of generators
Reimplemented in o2::eventgen::PrimaryGenerator.
Definition at line 144 of file FairPrimaryGenerator.cxx.
|
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.
|
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.
|
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.
|
protected |
Assignment operator
Definition at line 165 of file FairPrimaryGenerator.cxx.
| void FairPrimaryGenerator::SetBeam | ( | Double_t | beamX0, |
| Double_t | beamY0, | ||
| Double_t | beamSigmaX, | ||
| Double_t | beamSigmaY | ||
| ) |
Set beam position and widths.
| 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.
| 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.
|
inline |
Set the pointer to the MCEvent
Definition at line 147 of file FairPrimaryGenerator.h.
|
inline |
Definition at line 65 of file FairPrimaryGenerator.h.
| void FairPrimaryGenerator::SetEventPlane | ( | Double_t | phiMin, |
| Double_t | phiMax | ||
| ) |
Public method SetEventPlane
| 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.
| 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.
| targetZ | z position of target center |
| targetDz | full target thickness |
Definition at line 438 of file FairPrimaryGenerator.cxx.
| void FairPrimaryGenerator::SmearGausVertexXY | ( | Bool_t | flag | ) |
Definition at line 536 of file FairPrimaryGenerator.cxx.
| void FairPrimaryGenerator::SmearGausVertexZ | ( | Bool_t | flag | ) |
Definition at line 522 of file FairPrimaryGenerator.cxx.
| void FairPrimaryGenerator::SmearVertexXY | ( | Bool_t | flag | ) |
Definition at line 529 of file FairPrimaryGenerator.cxx.
| void FairPrimaryGenerator::SmearVertexZ | ( | Bool_t | flag | ) |
Enable vertex smearing in z and/or xy direction
Definition at line 514 of file FairPrimaryGenerator.cxx.
|
protected |
Flag for beam gradient calculation
Definition at line 217 of file FairPrimaryGenerator.h.
|
protected |
Beam angle width (Gaussian) in x [rad]
Definition at line 182 of file FairPrimaryGenerator.h.
|
protected |
Beam angle width (Gaussian) in y [rad]
Definition at line 184 of file FairPrimaryGenerator.h.
|
protected |
Actual beam angle at target in x [rad]
Definition at line 178 of file FairPrimaryGenerator.h.
|
protected |
Nominal beam angle at target in x [rad]
Definition at line 174 of file FairPrimaryGenerator.h.
|
protected |
Actual beam angle at target in y [rad]
Definition at line 180 of file FairPrimaryGenerator.h.
|
protected |
Nominal beam angle at target in y [rad]
Definition at line 176 of file FairPrimaryGenerator.h.
|
protected |
Actual beam direction at the vertex
Definition at line 186 of file FairPrimaryGenerator.h.
|
protected |
Beam width (Gaussian) in x [cm]
Definition at line 169 of file FairPrimaryGenerator.h.
|
protected |
Beam width (Gaussian) in y [cm]
Definition at line 171 of file FairPrimaryGenerator.h.
|
protected |
Nominal beam position at target in x [cm]
Definition at line 165 of file FairPrimaryGenerator.h.
|
protected |
Nominal beam position at target in y [cm]
Definition at line 167 of file FairPrimaryGenerator.h.
|
protected |
go to tracking
Definition at line 230 of file FairPrimaryGenerator.h.
|
protected |
Pointer to MCEventHeader
Definition at line 228 of file FairPrimaryGenerator.h.
|
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.
|
protected |
Flag for event plane rotation
Definition at line 219 of file FairPrimaryGenerator.h.
|
protected |
List of registered generators
Definition at line 224 of file FairPrimaryGenerator.h.
|
protected |
Iterator over generator list
Definition at line 226 of file FairPrimaryGenerator.h.
|
protected |
Number of MC tracks before a Generator is called, needed for MC index update
Definition at line 233 of file FairPrimaryGenerator.h.
|
protected |
Number of targets;
Definition at line 198 of file FairPrimaryGenerator.h.
|
protected |
Number of primary tracks in current event
Definition at line 206 of file FairPrimaryGenerator.h.
|
protected |
Actual event plane rotation angle [rad]
Definition at line 193 of file FairPrimaryGenerator.h.
|
protected |
Upper limit for the event plane rotation angle [rad]
Definition at line 191 of file FairPrimaryGenerator.h.
|
protected |
Lower limit for the event plane rotation angle [rad]
Definition at line 189 of file FairPrimaryGenerator.h.
|
protected |
Flag for gaus vertex smearing in xy
Definition at line 215 of file FairPrimaryGenerator.h.
|
protected |
Flag for gaus vertex smearing in z
Definition at line 211 of file FairPrimaryGenerator.h.
|
protected |
Flag for vertex smearing in xy
Definition at line 213 of file FairPrimaryGenerator.h.
|
protected |
Flag for uniform vertex smearing in z
Definition at line 209 of file FairPrimaryGenerator.h.
|
protected |
Pointer to MC stack
Definition at line 222 of file FairPrimaryGenerator.h.
|
protected |
Full target thickness [cm]
Definition at line 200 of file FairPrimaryGenerator.h.
|
protected |
Nominal z position of center of targets [cm]
Definition at line 196 of file FairPrimaryGenerator.h.
|
staticprotected |
Number of all primaries of this run
Definition at line 235 of file FairPrimaryGenerator.h.
|
protected |
Vertex position of current event [cm]
Definition at line 203 of file FairPrimaryGenerator.h.