ROOT logo
#ifndef _KGeometry
#define _KGeometry

#include "TH3I.h"
#include "TH2F.h"

TH2F *KHisProject(void *,Int_t , Int_t);

class KGeometry {

private:
public:
  
  TH3I    *EG;        //electrode geometry
  TH3I    *DM;        //detector material
  Int_t nx;           //x-divisions
  Int_t ny;           //y-divisions
  Int_t nz;           //z-divisions 
  
  // Constructors of the class
  KGeometry();
  ~KGeometry();
  KGeometry(TH3I *x){GetGrid(x,0); };
  KGeometry(TH3I *x, TH3I *y){GetGrid(x,0); GetGrid(x,1);};
  // Setting up grids
  void GetGrid(TH3I *,Short_t =0); 
  Int_t SetBoundaryConditions();
  inline int SetElecVolt(int i){return ((i<<16)|32768);};
  Double_t GetStepSize(Int_t, Int_t);
  Double_t GetStepSize(Int_t, Float_t);
  // Mapping and projections
  //  TH2F *ProjectToGeometry(void *,Int_t,Int_t);
  TH3F *MapToGeometry(Double_t *, Double_t =1);
  TH3F *GetGeom();
  void Reset(Int_t=0,Int_t=0);
  //  Double_t InterpolateToGeometry();
  // Electrodes generators
  void ElRectangle(Float_t *Pos, Float_t *Size, Int_t Wei, Int_t Mat);
  void ElRectangle(Float_t *Pos, Float_t *Size, TH3F *, Float_t);
  void ElLine(Float_t *r0,Float_t *r1, Float_t *W, Int_t Wei, Int_t Mat);
  void ElCylinder(Float_t *Pos,Float_t R, Float_t L,Int_t O, Int_t Wei, Int_t Mat); 
  Float_t GetLowEdge(Int_t);
  Float_t GetUpEdge(Int_t);


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