FairRoot/PandaRoot
PndRadMapBoxMesh.h
Go to the documentation of this file.
1 #ifndef __PNDRADMAPBOXMESH_HH__
2 #define __PNDRADMAPBOXMESH_HH__
3 #include <TH2D.h>
4 #include <TROOT.h>
5 #include <TFormula.h>
6 #include <TMatrixD.h>
7 #include <FairRadMapPoint.h>
8 #include <PndRadMapPlane.h>
9 #include <TDatabasePDG.h>
10 
11 
12 enum quantity{Edep=1 , Dose=2,
13  Fluence=3, SimpleFluence=9, // -> 1/m^2
14  Flux=5 , Kerma=6 , EnergyFluence=4, // not mplemented
15  Density=7, Mass=8, Twos=10};
16 //
17 
18 struct Corner{
19  TVector3 corner1;
20  TVector3 corner2;
21  TVector3 corner3;
22 };
23 
24 /* class PndRadMapPlane { */
25 /* public: */
26 /* PndRadMapPlane(TVector3 _corner1, */
27 /* TVector3 _corner2, */
28 /* TVector3 _corner3, */
29 /* double dist = 0); */
30 /* PndRadMapPlane(); */
31 /* TVector3 LineIntersection(TVector3 begline, */
32 /* TVector3 endline); */
33 /* void SetNormal(TVector3 n){normal = n;}; */
34 /* void SetDistance(double d){distance = d;}; */
35 /* TVector3 GetCorner(int i); */
36 /* TVector3 Corner1(){return corner1;}; */
37 /* TVector3 Corner2(){return corner2;}; */
38 /* TVector3 Corner3(){return corner3;}; */
39 /* double Distance(){return distance;}; */
40 /* TVector3 Normal(){return normal;}; */
41 /* private: */
42 /* TVector3 normal; */
43 /* TVector3 corner1; */
44 /* TVector3 corner2; */
45 /* TVector3 corner3; */
46 /* double distance; */
47 /* }; */
48 
49 
51  public:
53  PndRadMapBoxMesh(PndRadMapBoxMesh& m);//copy cons
54  PndRadMapBoxMesh(const char* Name,
55  int Xbins, Double_t Xlow, Double_t Xhigh,
56  int Ybins, Double_t Ylow, Double_t Yhigh,
57  int Zbins, Double_t Zlow, Double_t Zhigh);
58  PndRadMapBoxMesh(const char* name,
59  int xbins, Double_t xlow, Double_t xhigh,
60  int ybins, Double_t ylow, Double_t yhigh,
61  Double_t zlow, Double_t zhigh,
62  orientation plane = ZX,
63  quantity Quantity=Edep);
65 
66 
67  void SetFilter(const char* filter);
68  void SetQuantity(quantity Quantity=Edep);
69  void SetOrientation(orientation plane,
70  Double_t rotate = 99999,
71  axis Ax = Xx);
72  void SetOrientation(Double_t rotate = 99999,
73  axis Ax = Xx);
74  void SetVerbosityLevel(int verbose = 0);
75  void Fill(FairRadMapPoint *p);
77  void Transform(Double_t X, Double_t Y, Double_t Z,
78  Double_t& X0, Double_t& Y0, Double_t& Z0);
79  void Transform(TVector3 InV,
80  TVector3& OutV);
81 
82  void Scale(Double_t sca);
83  void Save(TFile* fout);
84  void Save();
85  TH2D* GetHisto();
87  Double_t CalcFluence(FairRadMapPoint *p);
88 
89  protected:
90  bool IsInside(Double_t X, Double_t Y, Double_t Z);
91  bool IsInside(FairRadMapPoint *p);
92  bool IsInside();
93  void Fill(Int_t gBin, Double_t val);
94  void Fill(Double_t X, Double_t Y, Double_t Z, Double_t we=1);
95  void makeHisto(const char* Orient, Double_t rotate,
96  int Hbins, Double_t Hlow, Double_t Hhigh,
97  int Vbins, Double_t Vlow, Double_t Vhigh,
98  Double_t dlow/*, Double_t dhigh --unused parameter */);
99 
100  TH2D* _MeshHisto;
101  TH2I* _StatHisto;
104 
110 
111  int _Xbins;
113  int _Ybins;
115  int _Zbins;
117 
119  Double_t _tX, _tY, _tZ;//back-shifted, back-rotated coordinate
120 
121  TFormula _filter;
122  int _verbose;
123 
125  TVector3 InterSection;
126 
127  private:
129  TDatabasePDG *pdg;
130  TParticlePDG* pdgpart;
131 };
132 
133 
134 void InvMatVecProd(TMatrixD mat, TVector3 vec, TVector3& res);
135 
136 #endif
TVector3 corner3
void makeHisto(const char *Orient, Double_t rotate, int Hbins, Double_t Hlow, Double_t Hhigh, int Vbins, Double_t Vlow, Double_t Vhigh, Double_t dlow)
void Fill(FairRadMapPoint *p)
orientation _orientation
TVector3 corner2
Int_t res
Definition: anadigi.C:166
__m128 m
Definition: P4_F32vec4.h:28
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
#define verbose
Double_t CalcFluence(FairRadMapPoint *p)
void SetOrientation(orientation plane, Double_t rotate=99999, axis Ax=Xx)
void SetQuantity(quantity Quantity=Edep)
double Y
Definition: anaLmdDigi.C:68
PndRadMapPlane * _plane
Double_t p
Definition: anasim.C:58
PndRadMapPlane * GetPlane()
Double_t
void Transform(Double_t X, Double_t Y, Double_t Z)
quantity
TParticlePDG * pdgpart
void SetFilter(const char *filter)
axis
Definition: PndRadMapPlane.h:9
void SetVerbosityLevel(int verbose=0)
TString name
TVector3 rotate(TVector3 vec, TGeoRotation *rotma)
double X
Definition: anaLmdDigi.C:68
orientation
TVector3 corner1
double Z
Definition: anaLmdDigi.C:68
void Scale(Double_t sca)
dble_vec_t vec[12]
Definition: ranlxd.cxx:380
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52
debug
void InvMatVecProd(TMatrixD mat, TVector3 vec, TVector3 &res)
TDatabasePDG * pdg