![]() |
FairShip
|
A FairRoot generator that reads particle data from ROOT TTrees. More...
#include <TTreeGenerator.h>
Public Member Functions | |
| TTreeGenerator () | |
| ~TTreeGenerator () override | |
| Bool_t | Init (const char *fileName, int startEvent) override |
| Bool_t | Init (const char *fileName) override |
| Bool_t | ReadEvent (FairPrimaryGenerator *primGen) override |
| Long64_t | GetNEvents () const |
| Long64_t | GetCurrentEvent () const |
| void | SetTreeName (const char *treeName) |
| virtual Bool_t | Init (const std::vector< std::string > &inFiles, int startNumber) |
| virtual Bool_t | Init (const std::vector< std::string > &inFiles) |
| Public Member Functions inherited from SHiP::Generator | |
| Generator ()=default | |
| ~Generator () override | |
| virtual void | UseExternalFile (std::string x, Int_t i) |
| virtual void | UseExternalFile (std::vector< std::string > &inFiles, Int_t i) |
| void | SetMaxTheta (Double_t thetaX, Double_t thetaY) |
| Int_t | nrOfGeoRejections () const |
| Long64_t | GetCounter (const std::string &name) const |
| void | SetCounter (const std::string &name, Long64_t value) |
| void | IncrementCounter (const std::string &name, Long64_t delta=1) |
Private Member Functions | |
| Bool_t | InitBranches () |
Private Attributes | |
| TFile * | fInputFile |
| Input ROOT file pointer. | |
| TTree * | fInputTree |
| Input TTree pointer. | |
| TString | fTreeName |
| Name of the TTree to read. | |
| Long64_t | fNEvents |
| Total number of events in the tree. | |
| Long64_t | fCurrentEvent |
| Current event index (0-based). | |
| Double_t | fPx |
| Particle momentum x-component (GeV/c). | |
| Double_t | fPy |
| Particle momentum y-component (GeV/c). | |
| Double_t | fPz |
| Particle momentum z-component (GeV/c). | |
| Double_t | fX |
| Particle position x-coordinate (cm). | |
| Double_t | fY |
| Particle position y-coordinate (cm). | |
| Double_t | fZ |
| Particle position z-coordinate (cm). | |
| Int_t | fPdgId |
| PDG particle identification code. | |
| Double_t | fWeight |
| Event weight factor. | |
Additional Inherited Members | |
| Protected Member Functions inherited from SHiP::Generator | |
| bool | IsInVesselAcceptance (Double_t px, Double_t py, Double_t pz) const |
| Protected Attributes inherited from SHiP::Generator | |
| std::optional< std::string > | fextFile |
| Int_t | firstEvent = 0 |
| Double_t | fMaxThetaX = 0 |
| Double_t | fMaxThetaY = 0 |
| bool | fUseVesselAcceptance = false |
| Int_t | fnGeoRejects = 0 |
| std::unordered_map< std::string, int64_t > | fCounters |
A FairRoot generator that reads particle data from ROOT TTrees.
The expected TTree structure contains the following branches:
Definition at line 28 of file TTreeGenerator.h.
| SHiP::TTreeGenerator::TTreeGenerator | ( | ) |
Definition at line 11 of file TTreeGenerator.cxx.
|
override |
Definition at line 27 of file TTreeGenerator.cxx.
|
inline |
Definition at line 39 of file TTreeGenerator.h.
|
inline |
Definition at line 38 of file TTreeGenerator.h.
|
overridevirtual |
Implements SHiP::Generator.
Definition at line 34 of file TTreeGenerator.cxx.
|
overridevirtual |
Implements SHiP::Generator.
Definition at line 36 of file TTreeGenerator.cxx.
|
inlinevirtual |
Reimplemented from SHiP::Generator.
Definition at line 33 of file Generator.h.
|
inlinevirtual |
Reimplemented from SHiP::Generator.
Definition at line 27 of file Generator.h.
|
private |
Definition at line 117 of file TTreeGenerator.cxx.
|
override |
Definition at line 98 of file TTreeGenerator.cxx.
|
inline |
Definition at line 40 of file TTreeGenerator.h.
|
private |
Current event index (0-based).
Definition at line 48 of file TTreeGenerator.h.
|
private |
Input ROOT file pointer.
Definition at line 43 of file TTreeGenerator.h.
|
private |
Input TTree pointer.
Definition at line 44 of file TTreeGenerator.h.
|
private |
Total number of events in the tree.
Definition at line 47 of file TTreeGenerator.h.
|
private |
PDG particle identification code.
Definition at line 56 of file TTreeGenerator.h.
|
private |
Particle momentum x-component (GeV/c).
Definition at line 50 of file TTreeGenerator.h.
|
private |
Particle momentum y-component (GeV/c).
Definition at line 51 of file TTreeGenerator.h.
|
private |
Particle momentum z-component (GeV/c).
Definition at line 52 of file TTreeGenerator.h.
|
private |
Name of the TTree to read.
Definition at line 45 of file TTreeGenerator.h.
|
private |
Event weight factor.
Definition at line 57 of file TTreeGenerator.h.
|
private |
Particle position x-coordinate (cm).
Definition at line 53 of file TTreeGenerator.h.
|
private |
Particle position y-coordinate (cm).
Definition at line 54 of file TTreeGenerator.h.
|
private |
Particle position z-coordinate (cm).
Definition at line 55 of file TTreeGenerator.h.