Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #ifndef __FIELDMAPS_H__
0002 #define __FIELDMAPS_H__
0003 
0004 //===========================================================
0005 /// \file FieldMaps.h
0006 /// \brief Base class for E field distortions
0007 /// \author Carlos Perez Lara
0008 //===========================================================
0009 
0010 #include "TH3F.h"
0011 
0012 class FieldMaps {
0013  public:
0014   FieldMaps();
0015   virtual ~FieldMaps();
0016   void ReadFile();
0017   void SetDebugLevel(int n) {fDebug=n;}
0018   void TPCDimensions(float irad, float orad, float hzet) {fInnerRadius=irad; fOutterRadius=orad; fHalfLength=hzet;}
0019   void TPCGridSize(int nr, int np, int nz) {fNRadialSteps=nr; fNAzimuthalSteps=np; fNLongitudinalSteps=nz;}
0020   void OutputFileName(std::string a) {fFileNameRoot=a;}
0021   void LSFileName(std::string a) {fLSNameRoot=a;}
0022   void MirrorZ() {fMirrorZ=true;}
0023   void Make(int n=-1);
0024   virtual void ComputeE()=0;
0025 
0026  protected:
0027   void InitMaps();
0028   void SaveMaps();
0029   float ReadCharge(float rprime, float phiprime, float zprime, float dr, float dphi,float dz);
0030 
0031   int fDebug;
0032   int fRadialBin;
0033 
0034   TH3F *fEr;
0035   TH3F *fEp;
0036   TH3F *fEz;
0037   TH3F *fRho;
0038 
0039   float fInnerRadius;
0040   float fOutterRadius;
0041   float fHalfLength;
0042   int fNRadialSteps;
0043   int fNAzimuthalSteps;
0044   int fNLongitudinalSteps;
0045   std::string fFileNameRoot;
0046   std::string fLSNameRoot;
0047   bool fMirrorZ;
0048 };
0049 
0050 #endif /* __FIELDMAPS_H__ */