BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
MpdUrqmdGenerator.h
Go to the documentation of this file.
1// -------------------------------------------------------------------------
2// ----- MpdUrqmdGenerator header file -----
3// ----- Created 11/06/04 by V. Friese / D.Bertini -----
4// -------------------------------------------------------------------------
5
6/** MpdUrqmdGenerator.h
7 *@ author V.Friese <v.friese@gsi.de>
8 *@author D.Bertini <d.bertini@gsi.de>
9 *
10 The MpdUrqmdGenerator reads the output file 14 (ftn14) from UrQMD. The UrQMD
11 calculation has to be performed in the CM system of the collision; Lorentz
12 transformation into the lab is performed by this class.
13 Derived from FairGenerator.
14**/
15#define GZIP_SUPPORT // version with gz support
16
17#ifndef MPDURQMDGENERATOR_H
18#define MPDURQMDGENERATOR_H
19
20#include "FairGenerator.h"
21
22#include <fstream>
23#include <map>
24
25#ifdef GZIP_SUPPORT
26#ifndef __CLING__
27#include <zlib.h>
28#endif
29#endif
30
31class TVirtualMCStack;
32class FairPrimaryGenerator;
33
35{
36 public:
37 /** Default constructor without arguments should not be used. **/
39
40 /** Standard constructor.
41 * @param fileName The input file name
42 **/
43 MpdUrqmdGenerator(const char* fileName);
44
45 /** Destructor. **/
47
48 /** Reads on event from the input file and pushes the tracks onto
49 ** the stack. Abstract method in base class.
50 ** @param primGen pointer to the primary generator
51 **/
52 Bool_t ReadEvent(FairPrimaryGenerator* primGen);
53
54 // Skip some events in file
55 Bool_t SkipEvents(Int_t count);
56
57 void SetEventPlane(Double_t phiMin, Double_t phiMax);
58
59 void SetXYZ(Double32_t x = 0., Double32_t y = 0., Double32_t z = 0.)
60 {
61 fX = x;
62 fY = y;
63 fZ = z;
64 }
65
66 private:
67#ifdef GZIP_SUPPORT
68#ifndef __CLING__
69 gzFile fInputFile; //! Input file
70#endif
71#else
72 FILE* fInputFile; //! Input file
73#endif
74
75 std::map<Int_t, Int_t> fParticleTable; //! Map from UrQMD PID to PDGPID
76
77 Double32_t fPhiMin, fPhiMax; // Limits of event plane angle
78 Bool_t fEventPlaneSet; // Flag whether event plane angle is used
79
80 const Char_t* fFileName; //! Input file name
81
82 Double32_t fX, fY, fZ; // Point vertex coordinates [cm]
83
84 /** Private method ReadConversionTable. Reads the conversion table
85 from UrQMD particle code to PDG particle code and fills the
86 conversion map. Is called from the constructor. **/
88
91
93};
94
95#endif
bool Bool_t
int Int_t
double Double32_t
char Char_t
double Double_t
#define ClassDef(name, id)
MpdUrqmdGenerator()
Default constructor without arguments should not be used.
MpdUrqmdGenerator & operator=(const MpdUrqmdGenerator &)=delete
std::map< Int_t, Int_t > fParticleTable
Input file.
const Char_t * fFileName
Double32_t fPhiMin
Map from UrQMD PID to PDGPID.
MpdUrqmdGenerator(const MpdUrqmdGenerator &)=delete
Bool_t ReadEvent(FairPrimaryGenerator *primGen)
Reads on event from the input file and pushes the tracks onto the stack.
void ReadConversionTable()
Private method ReadConversionTable.
Bool_t SkipEvents(Int_t count)
~MpdUrqmdGenerator()
Destructor.
Double32_t fX
Input file name.
void SetEventPlane(Double_t phiMin, Double_t phiMax)
void SetXYZ(Double32_t x=0., Double32_t y=0., Double32_t z=0.)