![]() |
Project
|
#include <PrimaryGenerator.h>
Inherits FairPrimaryGenerator.
Public Member Functions | |
PrimaryGenerator ()=default | |
~PrimaryGenerator () override | |
Bool_t | GenerateEvent (FairGenericStack *pStack) override |
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 mother1=-1, Int_t mother2=-1, Int_t daughter1=-1, Int_t daughter2=-1, Bool_t wanttracking=true, Double_t e=-9e9, Double_t tof=0., Double_t weight=0., TMCProcess proc=kPPrimary, Int_t generatorStatus=0) |
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) override |
Bool_t | Init () override |
Bool_t | embedInto (TString fname) |
void | setExternalVertexForNextEvent (double x, double y, double z) |
void | setVertexMode (o2::conf::VertexMode const &mode, o2::dataformats::MeanVertexObject const *obj=nullptr) |
void | setApplyVertex (bool onoff) |
void | setGeneratorId (int id) |
void | setGeneratorDescription (std::string const &desc) |
Protected Member Functions | |
void | setInteractionDiamond (const Double_t *xyz, const Double_t *sigmaxyz) |
void | setInteractionVertex (const o2::dataformats::MCEventHeader *event) |
void | fixInteractionVertex () |
Protected Attributes | |
float | mExternalVertexX = 0 |
float | mExternalVertexY = 0 |
float | mExternalVertexZ = 0 |
bool | mHaveExternalVertex = false |
TFile * | mEmbedFile = nullptr |
TTree * | mEmbedTree = nullptr |
Int_t | mEmbedEntries = 0 |
Int_t | mEmbedIndex = 0 |
o2::dataformats::MCEventHeader * | mEmbedEvent = nullptr |
bool | mApplyVertex = true |
o2::conf::VertexMode | mVertexMode = o2::conf::VertexMode::kDiamondParam |
std::unique_ptr< o2::dataformats::MeanVertexObject > | mMeanVertex |
custom primary generator in order to be able to deal with specific O2 matters, like initialisation, generation, ...
Definition at line 43 of file PrimaryGenerator.h.
|
default |
default constructor
|
override |
void o2::eventgen::PrimaryGenerator::AddTrack | ( | Int_t | pdgid, |
Double_t | px, | ||
Double_t | py, | ||
Double_t | pz, | ||
Double_t | vx, | ||
Double_t | vy, | ||
Double_t | vz, | ||
Int_t | mother1 = -1 , |
||
Int_t | mother2 = -1 , |
||
Int_t | daughter1 = -1 , |
||
Int_t | daughter2 = -1 , |
||
Bool_t | wanttracking = true , |
||
Double_t | e = -9e9 , |
||
Double_t | tof = 0. , |
||
Double_t | weight = 0. , |
||
TMCProcess | proc = kPPrimary , |
||
Int_t | generatorStatus = 0 |
||
) |
ALICE-o2 AddTrack with mother/daughter indices
add track
add event vertex to track vertex
check if particle to be tracked exists in PDG database
set all other parameters required by PushTrack
if it is a K0/antiK0 to be tracked, convert it into K0s/K0L.
NOTE: we could think of pushing the K0/antiK0 without tracking first and then push she K0s/K0L for tracking. In this way we would properly keep track of this conversion, but there is the risk of messing up with the indices, so this is not done for the time being.
compute particle energy if negative
add track to stack
Definition at line 131 of file PrimaryGenerator.cxx.
|
override |
override, to set encoded status code correctly
Definition at line 218 of file PrimaryGenerator.cxx.
Bool_t o2::eventgen::PrimaryGenerator::embedInto | ( | TString | fname | ) |
Public embedding methods
embed into
check if a file is already open
open file
get tree
get entries
connect MC event header
success
Definition at line 334 of file PrimaryGenerator.cxx.
|
protected |
generate and fix interaction vertex
Definition at line 284 of file PrimaryGenerator.cxx.
|
override |
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 |
generate event
normal generation if no embedding
this is for embedding
setup interaction vertex
notify event generators
generate event
add embedding info to event header
increment embedding counter
success
Definition at line 79 of file PrimaryGenerator.cxx.
|
override |
initialize the generator
init
embedding
base class init
Definition at line 55 of file PrimaryGenerator.cxx.
|
inline |
Definition at line 88 of file PrimaryGenerator.h.
void o2::eventgen::PrimaryGenerator::setExternalVertexForNextEvent | ( | double | x, |
double | y, | ||
double | z | ||
) |
Definition at line 249 of file PrimaryGenerator.cxx.
|
inline |
Definition at line 92 of file PrimaryGenerator.h.
Definition at line 91 of file PrimaryGenerator.h.
|
protected |
copy constructor operator= set interaction diamond position
|
protected |
set interaction vertex position
set interaction vertex
Definition at line 232 of file PrimaryGenerator.cxx.
void o2::eventgen::PrimaryGenerator::setVertexMode | ( | o2::conf::VertexMode const & | mode, |
o2::dataformats::MeanVertexObject const * | obj = nullptr |
||
) |
Definition at line 262 of file PrimaryGenerator.cxx.
|
protected |
Definition at line 119 of file PrimaryGenerator.h.
|
protected |
Definition at line 115 of file PrimaryGenerator.h.
|
protected |
Definition at line 117 of file PrimaryGenerator.h.
|
protected |
embedding members
Definition at line 113 of file PrimaryGenerator.h.
|
protected |
Definition at line 116 of file PrimaryGenerator.h.
|
protected |
Definition at line 114 of file PrimaryGenerator.h.
|
protected |
Definition at line 109 of file PrimaryGenerator.h.
|
protected |
Definition at line 109 of file PrimaryGenerator.h.
|
protected |
Definition at line 109 of file PrimaryGenerator.h.
|
protected |
Definition at line 110 of file PrimaryGenerator.h.
|
protected |
Definition at line 121 of file PrimaryGenerator.h.
|
protected |
Definition at line 120 of file PrimaryGenerator.h.