10#ifndef CBMUNIGENGENERATOR
11#define CBMUNIGENGENERATOR
14#include "FairGenerator.h"
28class FairPrimaryGenerator;
95 virtual Bool_t
ReadEvent(FairPrimaryGenerator* primGen);
132 void AddPrimary(FairPrimaryGenerator* primGen, Int_t pdgCode,
const TVector3& momentum);
191 void ProcessIon(FairPrimaryGenerator* primGen, Int_t pdgCode,
const TVector3& momentum);
Generates input to transport simulation from files in Unigen format.
Double_t fPhi
Event plane rotation angle.
Int_t fNofEvents
Number of processed events.
void ProcessIon(FairPrimaryGenerator *primGen, Int_t pdgCode, const TVector3 &momentum)
Treat a composite particle (ion)
static const Int_t kPdgMass
Decomposition of ion PDG code.
CbmUnigenGenerator & operator=(const CbmUnigenGenerator &)=delete
Assignment operator forbidden.
TString fFileName
Input file name.
CbmUnigenGenerator(const char *fileName="", EMode mode=kStandard)
Default constructor.
UEvent * fEvent
Current input event.
void AddPrimary(FairPrimaryGenerator *primGen, Int_t pdgCode, const TVector3 &momentum)
Add a primary particle to the event generator.
TFile * fFile
Input ROOT file.
EMode fMode
Rotation mode.
std::map< TString, FairIon * > fIonMap
Map from ion name to FairIon.
Int_t GetIonCharge(Int_t pdgCode) const
Charge number of an ion.
Double_t fGammaCM
Gamma factor of CM in lab frame.
Bool_t GetNextEntry()
Get next entry from input tree.
Int_t GetIonLambdas(Int_t pdgCode) const
Number of Lambdas in an ion.
TTree * fTree
Input ROOT tree.
Double_t fBetaCM
CM velocity in the lab frame.
virtual ~CbmUnigenGenerator()
Destructor.
Int_t GetNumAvailableEvents()
Get the maximum number of events available in the input file.
Int_t fCurrentEntry
Current entry number.
void CloseInput()
Close the input file.
Int_t RegisterIons()
Register ions to the simulation.
@ kNoRotation
No event rotation.
@ kStandard
Rotate events to zero event plane (default)
@ kRotateFixed
Rotate events around z by a fixed angle.
@ kReuseEvents
Reuse events if more are requested than present.
Bool_t Init()
Initialisation.
Bool_t fIsInit
Flag whether generator is initialised.
static const Int_t kPdgLambda
Decomposition of ion PDG code.
Int_t fAvailableEvents
Maximum number of events in the input file.
ClassDef(CbmUnigenGenerator, 5)
CbmUnigenGenerator(const CbmUnigenGenerator &)=delete
Copy constructor forbidden.
Int_t GetIonMass(Int_t pdgCode) const
Mass number of an ion.
static const Int_t kPdgCharge
Decomposition of ion PDG code.
Int_t fNofPrimaries
Number of primaries registered in current event.
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
Read one event from the input file.