Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
genRho.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file genRho.cc
1 #include <iostream>
2 #include <fstream>
3 #include <string>
4 #include "QPileUpToy.h"
5 
6 int main() {
7  std::string kFileNameRoot="rho";
8  float kInnerRadius = 30; //cm
9  float kOutterRadius = 80; //cm
10  float kHalfLength = 80; //cm
11  int kNRadialSteps;
12  int kNAzimuthalSteps;
13  int kNLongitudinalSteps;
14 
15  std::cout << "fetching geo.dat..." << std::endl;
16  std::ifstream ifile("geo.dat");
17  ifile >> kFileNameRoot;
18  ifile >> kInnerRadius; //cm
19  ifile >> kOutterRadius; //cm
20  ifile >> kHalfLength; //cm
21  ifile.close();
22  kNRadialSteps = (kOutterRadius-kInnerRadius)*10;
23  kNAzimuthalSteps = 18;
24  kNLongitudinalSteps = kHalfLength*20;
25 
26 
27  QPileUp *initialdensity;
28  initialdensity = new QPileUpToy(1.0/76628.0/*gasfactor [Vs]*/, 425.0 /*multiplicity*/, 5e+4/*rate [Hz]*/, 6); // PHENIX
29  //initialdensity = new QPileUpToy(1.0/76628.0/*gasfactor [Vs]*/, 950.0 /*multiplicity*/, 5e+4/*rate [Hz]*/, 20, 1.5); // ALICE
30  //initialdensity = new QPileUpToy(1.0/76628.0/*gasfactor [Vs]*/, 425.0 /*multiplicity*/, 15e+3/*rate [Hz]*/, 0); // STAR
31  initialdensity->SetDebugLevel(2);
32  initialdensity->OutputFileName(kFileNameRoot);
33  initialdensity->TPCDimensions( kInnerRadius, kOutterRadius, kHalfLength );
34  initialdensity->TPCGridSize( kNRadialSteps, kNAzimuthalSteps, kNLongitudinalSteps );
35  initialdensity->Make();
36 
37  delete initialdensity;
38  return 0;
39 }