// ----------------------------------------------------------------- // $Id: // // Description: // Driver Class for Runge-Kutta-Method // User specifies output binning/accuracy in r and z // Output is the deviation map file // // Environment: // Software developed for the PANDA Detector at FAIR. // // Author List: // Felix Boehmer TUM (original author) // // ----------------------------------------------------------------- #ifndef TPCINHFIELDDRIFTER_H #define TPCINHFIELDDRIFTER_H #include #include #include "TVector3.h" #include "TpcRungeKutta.h" class PndFieldMap; class PndMultiField; class TpcEFieldCyl; class FairField; class TpcDigiPar; class TpcInhFieldDrifter { public: // ---------------- Constructors -------------------------------- /*standard constructor */ TpcInhFieldDrifter(TpcEFieldCyl* eField, FairField* bField, const char* outFile, const char* paramFile, /* "[...]/tpc/tpc.par" */ const int rBins, const int zBins, const int split=-1, /* single bin in r to process */ const int zsplit=-1); TpcInhFieldDrifter(const TVector3& eNom, const TVector3& bNom, const char* outFile, const char* paramFile, /* "[...]/tpc/tpc.par" */ const int rBins, const int zBins, const int split=-1, /* single bin in r to process */ const int zsplit=-1); //version with constant, non-dynamic friction term TpcInhFieldDrifter(const TVector3& eNom, const TVector3& bNom, const double friction, const char* outFile, const char* paramFile, /* "[...]/tpc/tpc.par" */ const int rBins, const int zBins, const int split=-1, /* single bin in r to process */ const int zsplit=-1); /*alternative version, using TpcEFieldCyl as E and B field internally */ TpcInhFieldDrifter(const char* eFieldFile, const char* bFieldFile, double beamMom, const char* outFile, const char* paramFile, const int rBins, const int zBins, const int split=-1, const int zsplit=-1); ~TpcInhFieldDrifter(); //---- Methods -------------------------------------------------------- void run(); //start /*Easy way to set constant fields without changing input files */ void setConstE(TVector3 cE) {frunKut->setConstE(cE);} void setConstB(TVector3 cB) {frunKut->setConstB(cB);} void setZStep(int zbins) {fzstepwidth=zbins;} void setUseReadoutWindow(Bool_t opt=kTRUE){fUseReadoutWindow=opt;} void setManBins(Bool_t opt=kTRUE){fManCalc=opt;} void addZBin(int bin) {fZtoCalc.push_back(bin);} private: int frBins, fzBins, fsplit, fsplitz;/*split the task for evaluation on cluster? -1: no split any other int: number of row (in r) to process */ int fzstepwidth; double ftpcMinR, ftpcMaxR, ftpcMinZ, ftpcMaxZ, frBinWidth, fzBinWidth, fsc, ffriction, fvDrift; const char* foutFile; const char* fparamFile; void writeToFile(const char* bla); void initParams(); //create parameter environment and read in Bool_t fManCalc; Bool_t fUseReadoutWindow; TpcRungeKutta* frunKut; TpcDigiPar* fpar; std::vector< std::vector > fdevX; //x-deviation std::vector< std::vector > fdevY; //y-deviation std::vector< std::vector > ftime; //total RK-time std::vector< std::vector > fstepCount; //amount of RK-steps std::vector< std::vector > fpathLength; //total real drift-path std::vector< int > fcalcZbins; std::vector fZtoCalc; //control vector for the evolution of the drift velocity. //contains vectors of 3 components of the vector v and the Runge Kutta time std::vector*>* fvelocity_control; public: ClassDef(TpcInhFieldDrifter,1) }; #endif