ROOT logo
#ifndef _KField
#define _KField

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// ElectricField Class                                                  //
//                                                                      //
// Class for callculation of electric field in silicon                  //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "TMath.h"
#include "nrutil.h"
#include "math.h"
#include <stdio.h>
#include <stdlib.h>
#include "TH3F.h"
#include "TH2F.h"
#include "TVector3.h"

Float_t KInterpolate2D(TH3F *, Float_t ,Float_t, Int_t=3, Int_t=1);

class KField {

private:
  Int_t Method;   // Method to calculate the intermediate points
  Int_t dim;
public:
  TH3F *U;
  TH3F *Ex;
  TH3F *Ey;
  TH3F *Ez;
  TH3F *E;

  KField() {U=NULL; Ex=NULL; Ey=NULL; Ez=NULL;};
 ~KField();
 void  CalFieldXYZ(Float_t x, Float_t y, Float_t z, Float_t *E); 
 TVector3 *CalFieldXYZ(Float_t x, Float_t y, Float_t z); 
 Float_t CalPotXYZ(Float_t x, Float_t y, Float_t z);
 static Float_t GetFieldPoint(Float_t *, Float_t *);
 Int_t CalField();
 Int_t GetDim(){return dim;};
 Double_t Mobility(Float_t E,Float_t T,Float_t Charg,Double_t Neff, Int_t which);
 Double_t Mobility(Float_t cx,Float_t cy,Float_t cz, Float_t T,Float_t Charg,Double_t Neff, Int_t which);
 Double_t DriftVelocity(Float_t E,Float_t Charg, Float_t T, Double_t Neff, Int_t which);
 Double_t DriftVelocity(Float_t cx,Float_t cy,Float_t cz, Float_t Charg, Float_t T, Double_t Neff, Int_t which);
 TH2F *Draw(Char_t *opt,Int_t=3, Int_t=1);
 // Double_t Alpha(Double_t , Short_t , Int_t=0);
 // inline static Double_t alpha(Double_t E) {return Alpha(E,-1,0);} 
 // inline static Double_t beta(Double_t E) {return Alpha(E,1,0);} 
  inline static Double_t alpha(Double_t E) {return 2.3e-1*TMath::Exp(-6.78*(2e7/(E*1e6)-1));};
   inline static Double_t beta(Double_t E) {return 1.3e-3*TMath::Exp(-13.2*(2e7/(E*1e6)-1));};
  Float_t M(Int_t, Float_t, Float_t, Float_t);
  //  Float_t M(TH1D *,Float_t);


 ClassDef(KField,1) 
   };
#endif
 KField.h:1
 KField.h:2
 KField.h:3
 KField.h:4
 KField.h:5
 KField.h:6
 KField.h:7
 KField.h:8
 KField.h:9
 KField.h:10
 KField.h:11
 KField.h:12
 KField.h:13
 KField.h:14
 KField.h:15
 KField.h:16
 KField.h:17
 KField.h:18
 KField.h:19
 KField.h:20
 KField.h:21
 KField.h:22
 KField.h:23
 KField.h:24
 KField.h:25
 KField.h:26
 KField.h:27
 KField.h:28
 KField.h:29
 KField.h:30
 KField.h:31
 KField.h:32
 KField.h:33
 KField.h:34
 KField.h:35
 KField.h:36
 KField.h:37
 KField.h:38
 KField.h:39
 KField.h:40
 KField.h:41
 KField.h:42
 KField.h:43
 KField.h:44
 KField.h:45
 KField.h:46
 KField.h:47
 KField.h:48
 KField.h:49
 KField.h:50
 KField.h:51
 KField.h:52
 KField.h:53
 KField.h:54
 KField.h:55
 KField.h:56
 KField.h:57
 KField.h:58
 KField.h:59