5#ifndef SHIPGEN_TTREEGENERATOR_H_
6#define SHIPGEN_TTREEGENERATOR_H_
8#include "FairPrimaryGenerator.h"
14class FairPrimaryGenerator;
34 Bool_t
Init(
const char* fileName,
int startEvent)
override;
35 Bool_t
Init(
const char* fileName)
override;
36 Bool_t
ReadEvent(FairPrimaryGenerator* primGen)
override;
virtual Bool_t Init(const char *, int)=0
TTree * fInputTree
Input TTree pointer.
TFile * fInputFile
Input ROOT file pointer.
Long64_t GetNEvents() const
Double_t fPz
Particle momentum z-component (GeV/c).
Long64_t fCurrentEvent
Current event index (0-based).
Long64_t fNEvents
Total number of events in the tree.
Bool_t ReadEvent(FairPrimaryGenerator *primGen) override
Int_t fPdgId
PDG particle identification code.
void SetTreeName(const char *treeName)
Long64_t GetCurrentEvent() const
Double_t fPy
Particle momentum y-component (GeV/c).
Bool_t Init(const char *fileName, int startEvent) override
Double_t fZ
Particle position z-coordinate (cm).
TString fTreeName
Name of the TTree to read.
Double_t fPx
Particle momentum x-component (GeV/c).
Double_t fX
Particle position x-coordinate (cm).
~TTreeGenerator() override
Double_t fWeight
Event weight factor.
Double_t fY
Particle position y-coordinate (cm).