Pluto v6.3.0
Loading...
Searching...
No Matches
PHUrReader.h
Go to the documentation of this file.
1#ifndef __PHUrReader_h__
2#define __PHUrReader_h__
3
4
5#include "PHUrDilep.h"
6#include "PHUrEventHeader.h"
8#include "PHUrParticle.h"
9#include "PHUrAddon.h"
10
11#include "TString.h"
12#include "TClonesArray.h"
13
14#include "PBulkInterface.h"
15
16
17#include <vector>
18#include <map>
19#include <fstream>
20
21using namespace std;
22
23
24class PHUrReader : public PBulkInterface {
25
26
27private:
28
29
30 PHUrDilep dilep; // urqmd dilepton shining code
31
32 //-------------------------------------------------
33 // ascii io
34 TString fInputName;
35 TString fOutputName;
36 ifstream fInputAscii;
37 FILE *fOutputAscii;
38 //-------------------------------------------------
39
40 //-------------------------------------------------
41 // urqmd structure f15
42 PHUrEventHeader evtheader;
43 PHUrEventHeader evtheaderCP;
44 PHUrCollisionHeader colheader;
45 vector< vector<PHUrParticle> > collisionsIn;
46 vector< vector<PHUrParticle> > collisionsOut;
47 vector< PHUrCollisionHeader > collisions;
48 //-------------------------------------------------
49
50
51 //-------------------------------------------------
52 // event handling
53 Int_t fNumPart;
54 Int_t fNumPartAddon;
55 Int_t fNumMax;
56 static TClonesArray *fAdd;
57 static TClonesArray *fEvent; // should be set to PLUTO TREE
58 Int_t fEvtCt;
59 //-------------------------------------------------
60
61 //-------------------------------------------------
62 // particle ids etc
63 map <Int_t,Int_t> mUrqmdToPdg;
64 map <Int_t,TString> mUrqmdProcess;
65 map <Int_t,Int_t> mapIDs;
66 vector <Int_t > funknownIDs;
67 map<Int_t , Int_t> fmapIds[3];
68 Int_t pdg_param ;
69 Int_t pid_param ;
70 //-------------------------------------------------
71
72
73 //-------------------------------------------------
74 // flags
75 Bool_t printEvtHeader;
76 Bool_t printColHeader;
77 Bool_t printParticle ;
78 Int_t outputNonDiLeptons;
79 Bool_t outputLeptons;
80 Bool_t outputFreezeoutDiLeptons;
81 //-------------------------------------------------
82
83 void ClearVector(vector<vector<PHUrParticle> >& v);
84 Bool_t ReadEvent();
85 const Char_t *GetUrQMDProcess(Int_t);
86public:
87
88 PHUrReader(TString inputfile="");
90
91 void Input (TString filename);
92 void Output(TString filename);
93 void SetOutputNonDileptons (Int_t doit) { outputNonDiLeptons = doit;}
94 void SetOutputLeptons (Bool_t doit=kTRUE) { outputLeptons = doit;}
95 void SetOutputFreezeoutDileptons(Bool_t doit=kTRUE) { outputFreezeoutDiLeptons = doit;}
96 void SetMaxNumParticles(Int_t max) { fNumMax = max; }
97 void SetMapID(Int_t Id_in,Int_t Id_out) ;
98
99 virtual bool Modify(PParticle **array, int *decay_done, int *num, int maxnum); //Modify particle bulk
100 void CreateAddonArray(TTree *T, Int_t stacksize);
101 PHUrAddon *CreateAddon(Int_t& index);
102 void CreateParticleArray(TTree *T, Int_t stacksize);
103 PParticle *CreateParticle(Int_t &index);
104 Int_t GetNFreeSlots() { return fNumMax - fEvent->GetEntries() ;}
105 static TClonesArray *getAddon() { return fAdd ;}
106 static TClonesArray *getEvent() { return fEvent;}
107
108 static Int_t UserAnalysis(PParticle**, Int_t);
109
110 ClassDef(PHUrReader, 0)
111};
112
113
114#endif
Float_t T
Definition NiNi_2AGeV.C:7
void Output(TString filename)
void Input(TString filename)
PParticle * CreateParticle(Int_t &index)
void CreateAddonArray(TTree *T, Int_t stacksize)
void SetOutputFreezeoutDileptons(Bool_t doit=kTRUE)
Definition PHUrReader.h:95
void SetOutputLeptons(Bool_t doit=kTRUE)
Definition PHUrReader.h:94
virtual bool Modify(PParticle **array, int *decay_done, int *num, int maxnum)
PHUrReader(TString inputfile="")
Definition PHUrReader.cc:27
static Int_t UserAnalysis(PParticle **, Int_t)
void SetOutputNonDileptons(Int_t doit)
Definition PHUrReader.h:93
void SetMaxNumParticles(Int_t max)
Definition PHUrReader.h:96
void SetMapID(Int_t Id_in, Int_t Id_out)
Int_t GetNFreeSlots()
Definition PHUrReader.h:104
static TClonesArray * getAddon()
Definition PHUrReader.h:105
static TClonesArray * getEvent()
Definition PHUrReader.h:106
PHUrAddon * CreateAddon(Int_t &index)
void CreateParticleArray(TTree *T, Int_t stacksize)
TString filename("eta_dalitz_a")