BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
MpdLAQGSMGenerator Class Reference

#include <MpdLAQGSMGenerator.h>

Inheritance diagram for MpdLAQGSMGenerator:
Collaboration diagram for MpdLAQGSMGenerator:

Classes

struct  la_tab_t

Public Member Functions

 MpdLAQGSMGenerator ()
 Default constructor without arguments should not be used.
 MpdLAQGSMGenerator (const char *fileName, const Bool_t use_collider_system=kTRUE, Int_t QGSM_format_ID=0, Int_t Max_Event_Number=0)
 Standard constructor.
virtual ~MpdLAQGSMGenerator ()
 Destructor.
virtual Bool_t Init ()
void InitGenerator (const char *light_particles_filename)
virtual Bool_t ReadEvent (FairPrimaryGenerator *primGen)
 Reads on event from the input file and pushes the tracks onto the stack.
virtual Bool_t GetEventHeader (char *ss)
Bool_t SkipEvents (Int_t nSkip)
Bool_t general_fgets (char *ss, Int_t nn=250, FILE *p=0)
Bool_t general_feof (void *p)
void SetXYZ (Double_t x=0., Double_t y=0., Double_t z=0.)
 MpdLAQGSMGenerator ()
 Default constructor without arguments should not be used.
 MpdLAQGSMGenerator (const char *fileName, const Bool_t use_collider_system=kTRUE, Int_t QGSM_format_ID=0, Int_t Max_Event_Number=0)
 Standard constructor.
virtual ~MpdLAQGSMGenerator ()
 Destructor.
virtual Bool_t Init ()
void InitGenerator (const char *light_particles_filename)
virtual Bool_t ReadEvent (FairPrimaryGenerator *primGen)
 Reads on event from the input file and pushes the tracks onto the stack.
virtual Bool_t GetEventHeader (char *ss)
Bool_t SkipEvents (Int_t nSkip)
Bool_t general_fgets (char *ss, Int_t nn=250, FILE *p=0)
Bool_t general_feof (void *p)
void SetXYZ (Double_t x=0., Double_t y=0., Double_t z=0.)

Protected Member Functions

void CloseInput ()
 Private method CloseInput.
Int_t RegisterIons (Int_t Max_Event_Number=0)
 Private method RegisterIons.
Int_t RegisterIons1 ()
Int_t CreatePdgCode (Int_t Z, Int_t A, Int_t Strange, Int_t user=0)
Bool_t FindParticle (Int_t Z, Int_t strange, Int_t lepton, Int_t A, Float_t mass, Int_t &PDG, char name[11])
Bool_t CreateNucleus (Int_t Z, Float_t mass, Int_t pdgCode, char pdgName[11])
void CloseInput ()
 Private method CloseInput.
Int_t RegisterIons (Int_t Max_Event_Number=0)
 Private method RegisterIons.
Int_t RegisterIons1 ()
Int_t CreatePdgCode (Int_t Z, Int_t A, Int_t Strange, Int_t user=0)
Bool_t FindParticle (Int_t Z, Int_t strange, Int_t lepton, Int_t A, Float_t mass, Int_t &PDG, char name[11])
Bool_t CreateNucleus (Int_t Z, Float_t mass, Int_t pdgCode, char pdgName[11])

Protected Attributes

FILE * fInputFile
gzFile fGZInputFile
 Input file.
const Char_t * fFileName
 GZ Input file.
TDatabasePDG * fPDG
 Input file Name.
Int_t fQGSM_format_ID
 PDG database.
Bool_t fUseColliderSystem
std::vector< la_tab_t * > fLa_tab
Bool_t fGZ_input
 list of light particles known for MpdLAQGSMGenerator
Double_t fX
 0: ascii input, 1: gzipped input
Double_t fY
Double_t fZ
std::map< TString, FairIon * > fIonMap
 STL map from ion name to FairIon.

Detailed Description

Definition at line 30 of file MpdLAQGSMGenerator.h.

Constructor & Destructor Documentation

◆ MpdLAQGSMGenerator() [1/4]

MpdLAQGSMGenerator::MpdLAQGSMGenerator ( )

Definition at line 39 of file MpdLAQGSMGenerator.cxx.

Referenced by CreateNucleus().

Here is the caller graph for this function:

◆ MpdLAQGSMGenerator() [2/4]

MpdLAQGSMGenerator::MpdLAQGSMGenerator ( const char * fileName,
const Bool_t use_collider_system = kTRUE,
Int_t QGSM_format_ID = 0,
Int_t Max_Event_Number = 0 )
Parameters
fileNameThe input file name

Definition at line 44 of file MpdLAQGSMGenerator.cxx.

References CloseInput(), TString::Contains(), fFileName, fGZ_input, fGZInputFile, fInputFile, fIonMap, fPDG, fQGSM_format_ID, fUseColliderSystem, fX, fY, fZ, Init(), TDatabasePDG::Instance(), and RegisterIons().

Here is the call graph for this function:

◆ ~MpdLAQGSMGenerator() [1/2]

MpdLAQGSMGenerator::~MpdLAQGSMGenerator ( )
virtual

Definition at line 100 of file MpdLAQGSMGenerator.cxx.

References CloseInput(), fLa_tab, and i.

Here is the call graph for this function:

◆ MpdLAQGSMGenerator() [3/4]

MpdLAQGSMGenerator::MpdLAQGSMGenerator ( )

◆ MpdLAQGSMGenerator() [4/4]

MpdLAQGSMGenerator::MpdLAQGSMGenerator ( const char * fileName,
const Bool_t use_collider_system = kTRUE,
Int_t QGSM_format_ID = 0,
Int_t Max_Event_Number = 0 )
Parameters
fileNameThe input file name

◆ ~MpdLAQGSMGenerator() [2/2]

virtual MpdLAQGSMGenerator::~MpdLAQGSMGenerator ( )
virtual

Member Function Documentation

◆ CloseInput() [1/2]

void MpdLAQGSMGenerator::CloseInput ( )
protected

Just for convenience. Closes the input file properly. Called from destructor and from ReadEvent.

Definition at line 513 of file MpdLAQGSMGenerator.cxx.

References fGZ_input, fGZInputFile, and fInputFile.

Referenced by MpdLAQGSMGenerator(), MpdLAQGSMGeneratorExt::MpdLAQGSMGeneratorExt(), ~MpdLAQGSMGenerator(), and GetEventHeader().

Here is the caller graph for this function:

◆ CloseInput() [2/2]

void MpdLAQGSMGenerator::CloseInput ( )
protected

Just for convenience. Closes the input file properly. Called from destructor and from ReadEvent.

◆ CreateNucleus() [1/2]

Bool_t MpdLAQGSMGenerator::CreateNucleus ( Int_t Z,
Float_t mass,
Int_t pdgCode,
char pdgName[11] )
protected

Definition at line 980 of file MpdLAQGSMGenerator.cxx.

References fPDG, and TParticlePDG::Print().

Referenced by RegisterIons(), and RegisterIons1().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateNucleus() [2/2]

Bool_t MpdLAQGSMGenerator::CreateNucleus ( Int_t Z,
Float_t mass,
Int_t pdgCode,
char pdgName[11] )
protected

References MpdLAQGSMGenerator(), and fIonMap.

Here is the call graph for this function:

◆ CreatePdgCode() [1/2]

Int_t MpdLAQGSMGenerator::CreatePdgCode ( Int_t Z,
Int_t A,
Int_t Strange,
Int_t user = 0 )
protected

Definition at line 528 of file MpdLAQGSMGenerator.cxx.

Referenced by FindParticle().

Here is the caller graph for this function:

◆ CreatePdgCode() [2/2]

Int_t MpdLAQGSMGenerator::CreatePdgCode ( Int_t Z,
Int_t A,
Int_t Strange,
Int_t user = 0 )
protected

◆ FindParticle() [1/2]

Bool_t MpdLAQGSMGenerator::FindParticle ( Int_t Z,
Int_t strange,
Int_t lepton,
Int_t A,
Float_t mass,
Int_t & PDG,
char name[11] )
protected

Definition at line 800 of file MpdLAQGSMGenerator.cxx.

References CreatePdgCode(), fLa_tab, and i.

Referenced by MpdLAQGSMGeneratorExt::ExtractEventFromTxt(), ReadEvent(), MpdLAQGSMGeneratorExt::ReadEventFromTxt(), RegisterIons(), and RegisterIons1().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindParticle() [2/2]

Bool_t MpdLAQGSMGenerator::FindParticle ( Int_t Z,
Int_t strange,
Int_t lepton,
Int_t A,
Float_t mass,
Int_t & PDG,
char name[11] )
protected

◆ general_feof() [1/2]

Bool_t MpdLAQGSMGenerator::general_feof ( void * p)

Definition at line 550 of file MpdLAQGSMGenerator.cxx.

References fGZ_input, fGZInputFile, and fInputFile.

Referenced by RegisterIons().

Here is the caller graph for this function:

◆ general_feof() [2/2]

Bool_t MpdLAQGSMGenerator::general_feof ( void * p)

◆ general_fgets() [1/2]

Bool_t MpdLAQGSMGenerator::general_fgets ( char * ss,
Int_t nn = 250,
FILE * p = 0 )

Definition at line 170 of file MpdLAQGSMGenerator.cxx.

References fGZ_input, fGZInputFile, and fInputFile.

Referenced by MpdLAQGSMGeneratorExt::ExtractEventFromTxt(), GetEventHeader(), ReadEvent(), MpdLAQGSMGeneratorExt::ReadEventFromTxt(), RegisterIons(), SkipEvents(), and MpdLAQGSMGeneratorExt::SkipEvents().

Here is the caller graph for this function:

◆ general_fgets() [2/2]

Bool_t MpdLAQGSMGenerator::general_fgets ( char * ss,
Int_t nn = 250,
FILE * p = 0 )

◆ GetEventHeader() [1/2]

Bool_t MpdLAQGSMGenerator::GetEventHeader ( char * ss)
virtual

Definition at line 184 of file MpdLAQGSMGenerator.cxx.

References CloseInput(), TString::Contains(), fGZ_input, fGZInputFile, fInputFile, fQGSM_format_ID, and general_fgets().

Referenced by MpdLAQGSMGeneratorExt::ExtractEventFromTxt(), ReadEvent(), MpdLAQGSMGeneratorExt::ReadEventFromTxt(), RegisterIons(), SkipEvents(), and MpdLAQGSMGeneratorExt::SkipEvents().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetEventHeader() [2/2]

virtual Bool_t MpdLAQGSMGenerator::GetEventHeader ( char * ss)
virtual

◆ Init() [1/2]

virtual Bool_t MpdLAQGSMGenerator::Init ( )
inlinevirtual

Definition at line 61 of file MpdLAQGSMGenerator.h.

References InitGenerator().

Referenced by MpdLAQGSMGenerator(), MpdLAQGSMGeneratorExt::MpdLAQGSMGeneratorExt(), MpdLAQGSMGeneratorExt::ExtractEventFromTxt(), ReadEvent(), and MpdLAQGSMGeneratorExt::ReadEventFromTxt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Init() [2/2]

virtual Bool_t MpdLAQGSMGenerator::Init ( )
inlinevirtual

Definition at line 61 of file MpdLAQGSMGenerator.h.

References InitGenerator().

Here is the call graph for this function:

◆ InitGenerator() [1/2]

void MpdLAQGSMGenerator::InitGenerator ( const char * light_particles_filename)

Definition at line 113 of file MpdLAQGSMGenerator.cxx.

References MpdLAQGSMGenerator::la_tab_t::A, TString::Data(), fLa_tab, MpdLAQGSMGenerator::la_tab_t::lepton, MpdLAQGSMGenerator::la_tab_t::mass, MpdLAQGSMGenerator::la_tab_t::name, MpdLAQGSMGenerator::la_tab_t::pdg, MpdLAQGSMGenerator::la_tab_t::strange, and MpdLAQGSMGenerator::la_tab_t::Z.

Referenced by Init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitGenerator() [2/2]

void MpdLAQGSMGenerator::InitGenerator ( const char * light_particles_filename)

◆ ReadEvent() [1/2]

Bool_t MpdLAQGSMGenerator::ReadEvent ( FairPrimaryGenerator * primGen)
virtual

Abstract method in base class.

Parameters
primGenpointer to the FairPrimaryGenerator

Reimplemented in MpdLAQGSMGeneratorExt, and MpdLAQGSMGeneratorExt.

Definition at line 338 of file MpdLAQGSMGenerator.cxx.

References TMath::Abs(), fGZ_input, fGZInputFile, FindParticle(), fInputFile, fLa_tab, fPDG, fQGSM_format_ID, fUseColliderSystem, fX, fY, fZ, general_fgets(), GetEventHeader(), Init(), TVector2::Phi(), TVector2::Set(), TParticle::SetPolarisation(), and TMath::Sqrt().

Here is the call graph for this function:

◆ ReadEvent() [2/2]

virtual Bool_t MpdLAQGSMGenerator::ReadEvent ( FairPrimaryGenerator * primGen)
virtual

Abstract method in base class.

Parameters
primGenpointer to the FairPrimaryGenerator

Reimplemented in MpdLAQGSMGeneratorExt, and MpdLAQGSMGeneratorExt.

◆ RegisterIons() [1/2]

Int_t MpdLAQGSMGenerator::RegisterIons ( Int_t Max_Event_Number = 0)
protected

Goes through the input file and registers any ion needed.

Definition at line 562 of file MpdLAQGSMGenerator.cxx.

References CreateNucleus(), fabs(), FindParticle(), fInputFile, fIonMap, fPDG, fQGSM_format_ID, general_feof(), general_fgets(), GetEventHeader(), kNeutronMass, and kProtonMass.

Referenced by MpdLAQGSMGenerator(), and MpdLAQGSMGeneratorExt::MpdLAQGSMGeneratorExt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterIons() [2/2]

Int_t MpdLAQGSMGenerator::RegisterIons ( Int_t Max_Event_Number = 0)
protected

Goes through the input file and registers any ion needed.

◆ RegisterIons1() [1/2]

Int_t MpdLAQGSMGenerator::RegisterIons1 ( )
protected

Definition at line 711 of file MpdLAQGSMGenerator.cxx.

References CreateNucleus(), fabs(), FindParticle(), fIonMap, fLa_tab, fPDG, i, kNeutronMass, and kProtonMass.

Here is the call graph for this function:

◆ RegisterIons1() [2/2]

Int_t MpdLAQGSMGenerator::RegisterIons1 ( )
protected

◆ SetXYZ() [1/2]

void MpdLAQGSMGenerator::SetXYZ ( Double_t x = 0.,
Double_t y = 0.,
Double_t z = 0. )
inline

Definition at line 81 of file MpdLAQGSMGenerator.h.

References fX, fY, fZ, x, y, and z.

◆ SetXYZ() [2/2]

void MpdLAQGSMGenerator::SetXYZ ( Double_t x = 0.,
Double_t y = 0.,
Double_t z = 0. )
inline

Definition at line 81 of file MpdLAQGSMGenerator.h.

References fX, fY, fZ, x, y, and z.

◆ SkipEvents() [1/2]

Bool_t MpdLAQGSMGenerator::SkipEvents ( Int_t nSkip)

Definition at line 298 of file MpdLAQGSMGenerator.cxx.

References fGZ_input, fGZInputFile, fInputFile, general_fgets(), and GetEventHeader().

Referenced by run8_sim_bmn(), run_sim_bmn(), run_sim_bmn(), run_sim_bmn(), run_sim_bmn_ecal(), run_sim_bmn_zdc(), and run_sim_src().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SkipEvents() [2/2]

Bool_t MpdLAQGSMGenerator::SkipEvents ( Int_t nSkip)

Member Data Documentation

◆ fFileName

const Char_t * MpdLAQGSMGenerator::fFileName
protected

◆ fGZ_input

◆ fGZInputFile

◆ fInputFile

◆ fIonMap

std::map< TString, FairIon * > MpdLAQGSMGenerator::fIonMap
protected

◆ fLa_tab

◆ fPDG

◆ fQGSM_format_ID

◆ fUseColliderSystem

◆ fX

◆ fY

◆ fZ


The documentation for this class was generated from the following files: