Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:15:12

0001 #ifndef __LAPLACESOLUTION_H__
0002 #define __LAPLACESOLUTION_H__
0003 
0004 //
0005 //  Hello Space Charge Fans:  (although you should hate space charge)
0006 //
0007 //    This is a code that implements the calculations of space charge contributions
0008 //  In a cylindrical TPC.  It uses the solutions discovered by Stefan Rossegger for
0009 //  the ALICE experiment.  These solutions use various Bessel functions as a series
0010 //  solution to the "point charge in a conducting cylinder" problem imposed by 
0011 //  The typical configuration of a TPC found at a collider.
0012 //
0013 //    These calculations have only a single dimension [length] and we shall choose 
0014 //  the units of cm throughout the calculations.
0015 //
0016 //                                                TKH
0017 //                                                12-3-2015
0018 //
0019 
0020 #define NumberOfOrders 15  // Convergence problems after 15; Rossegger used 30
0021 #include <string>
0022 
0023 class LaplaceSolution
0024 {
0025  public:
0026   LaplaceSolution(std::string filename);
0027   LaplaceSolution(double a=30, double b=80, double L=80);
0028   virtual ~LaplaceSolution() {}
0029 
0030   void Verbosity(int v) {verbosity=v;}
0031   double Rmn (int m, int n, double r);  //Rmn function from Rossegger
0032   double Rmn1(int m, int n, double r);  //Rmn1 function from Rossegger
0033   double Rmn2(int m, int n, double r);  //Rmn2 function from Rossegger
0034   double RPrime(int m, int n, double a, double r);  // RPrime function from Rossegger
0035   
0036   double Rnk(int n, int k, double r);  //Rnk function from Rossegger
0037 
0038   double Ez  (double r, double phi, double z, double r1, double phi1, double z1);
0039   double Er  (double r, double phi, double z, double r1, double phi1, double z1);
0040   double Ephi(double r, double phi, double z, double r1, double phi1, double z1);
0041 
0042  protected:
0043   bool fByFile;
0044   double a,b,L;  //  InnerRadius, OuterRadius, Length of 1/2 the TPC.
0045   int verbosity;
0046   double pi;
0047 
0048   void FindBetamn(double epsilon);  // Routine used to fill the Betamn array with resolution epsilon...
0049   void FindMunk(double epsilon);    // Routine used to fill the Munk array with resolution epsilon...
0050 
0051   double Betamn[NumberOfOrders][NumberOfOrders];  //  Betamn array from Rossegger
0052   double N2mn[NumberOfOrders][NumberOfOrders];    //  N2mn array from Rossegger
0053   double Munk[NumberOfOrders][NumberOfOrders];    //  Munk array from Rossegger
0054   double ByFileER(double r, double phi, double z, double r1, double phi1, double z1);
0055   double ByFileEZ(double r, double phi, double z, double r1, double phi1, double z1);
0056 
0057 
0058 };
0059 
0060 #endif /* __LAPLACESOLUTION_H__ */
0061 
0062 
0063