Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
main.eostest.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file main.eostest.cpp
1 #include <iostream>
2 #include <fstream>
3 #include <iomanip>
4 #include <cstring>
5 #include <ctime>
6 #include <sstream>
7 #include <TApplication.h>
8 #include <TCanvas.h>
9 #include <TGraph.h>
10 
11 #include "eos.h"
12 #include "eo3.h"
13 #include "eo1.h"
14 #include "eoChiral.h"
15 #include "eoHadron.h"
16 #include "rmn.h"
17 
18 using namespace std ;
19 
20 
21 int main(int argc, char **argv)
22 {
23  TApplication theApp("App", &argc, argv);
24  // pointers to all the main objects
25  EoS *eos ;
26 
27  char * eosfile = "eos/Laine_nf3.dat" ;
28  int ncols = 3, nrows = 286 ;
29  //eos = new EoSs(eosfile,ncols) ;
30  eos = new EoSChiral() ;
31  EoS* eosH = new EoSHadron("eos/eosHadron3D.dat") ;
32 
33  double e=0.5, p, nb=0.2, nq=0., ns=0., vx=0.8, vy=0., vz=0. ;
34  double Q [7] ;
35  transformCV(e, eos->p(e,nb,nq,ns), nb, nq, ns, vx, vy, vz, Q) ;
36  transformPV(eosH, Q, e, p, nb, nq, ns, vx, vy, vz) ;
37  cout<<"HelloWorld;\n" ;
38  transformCV(e, eosH->p(e,nb,nq,ns), nb, nq, ns, vx, vy, vz, Q) ;
39  cout<<"HelloWorld;\n" ;
40 
41  const int N = 500 ;
42  double x[N], y[N] ;
43  for(int i=0; i<N; i++){
44  double Tt, mubt, muqt, must, pt ;
45  double e = i*1.0/N ;
46  double nb = i*0.2/N ;
47  double nq = i*0.1/N ;
48  eosH->eos(0.5, nb, 0., 0., Tt, mubt, muqt, must, pt) ;
49  x[i] = nb;
50  y[i] = mubt ;
51  }
52  TGraph *g = new TGraph(N,x,y) ;
53  g->SetMarkerStyle(22) ;
54  g->SetMarkerSize(0.8) ;
55  g->Draw("AP") ;
56  theApp.Run() ;
57 
58  delete eos ;
59  delete eosH ;
60 }