Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
genD.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file genD.cc
1 #include <iostream>
2 #include <fstream>
3 #include <string>
4 #include "Langevin.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 = 50;
12  int kNAzimuthalSteps = 1;
13  int kNLongitudinalSteps = 160;
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 >> kNRadialSteps;
22  ifile >> kNAzimuthalSteps;
23  ifile >> kNLongitudinalSteps;
24  ifile.close();
25 
26  Langevin *langevin = new Langevin();
27  langevin->SetDebugLevel(2);
28  langevin->OutputFileName(kFileNameRoot);
29  langevin->TPCDimensions( kInnerRadius, kOutterRadius, kHalfLength );
30  langevin->TPCGridSize( kNRadialSteps, kNAzimuthalSteps, kNLongitudinalSteps );
31  langevin->Make();
32 
33  delete langevin;
34  return 0;
35 }