File indexing completed on 2025-08-05 08:15:12
0001 #include <iostream>
0002 #include <fstream>
0003 #include <string>
0004 #include <TMath.h>
0005 #include "FieldMaps.h"
0006 #include "FieldMapsLaplace.h"
0007
0008 int main(int nvar, char ** cvar) {
0009 std::string kFileNameRoot="rho";
0010 float kInnerRadius = 30;
0011 float kOutterRadius = 80;
0012 float kHalfLength = 80;
0013 int kNRadialSteps = 50;
0014 int kNAzimuthalSteps = 1;
0015 int kNLongitudinalSteps = 160;
0016
0017 std::cout << "fetching geo.dat..." << std::endl;
0018 std::ifstream ifile("geo.dat");
0019 ifile >> kFileNameRoot;
0020 ifile >> kInnerRadius;
0021 ifile >> kOutterRadius;
0022 ifile >> kHalfLength;
0023 ifile >> kNRadialSteps;
0024 ifile >> kNAzimuthalSteps;
0025 ifile >> kNLongitudinalSteps;
0026 ifile.close();
0027
0028 int binR = -1;
0029 TString par;
0030 if(nvar>1) {
0031 par = cvar[1];
0032 binR = par.Atoi();
0033 if(TMath::IsNaN(binR)) binR = -1;
0034 }
0035 std::cout << "routine for binR = " << binR << std::endl;
0036
0037 FieldMaps *map;
0038 map = new FieldMapsLaplace();
0039 map->SetDebugLevel(1);
0040 map->OutputFileName(kFileNameRoot);
0041 map->TPCDimensions( kInnerRadius, kOutterRadius, kHalfLength );
0042 map->TPCGridSize( kNRadialSteps, kNAzimuthalSteps, kNLongitudinalSteps );
0043 map->MirrorZ();
0044 map->Make( binR );
0045
0046 delete map;
0047 return 0;
0048 }