FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairMesh.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 // -------------------------------------------------------------------------
9 // ----- FairMesh header file -----
10 // ----- original author D.Bertini -----
11 // ----- adapted april 2010 O.Hartmann -----
12 // -------------------------------------------------------------------------
13 
14 #ifndef FAIRMESH_H
15 #define FAIRMESH_H
16 
17 #include <Rtypes.h> // for Double_t, Int_t, etc
18 #include <TH2.h> // for TH2D
19 #include <TObject.h> // for TObject
20 #include <TString.h> // for TString
21 
26 class FairMesh : public TObject
27 {
28  public:
30  FairMesh();
31  FairMesh(const char*);
32 
34  virtual ~FairMesh();
35 
37  Double_t GetXmin() const { return fXmin; };
38  Double_t GetYmin() const { return fYmin; };
39  Double_t GetZmin() const { return fZmin; };
40 
41  Double_t GetXmax() const { return fXmax; };
42  Double_t GetYmax() const { return fYmax; };
43  Double_t GetZmax() const { return fZmax; };
44 
46  void SetX(Double_t xmin, Double_t xmax, Int_t nbin)
47  {
48  fXmin = xmin;
49  fXmax = xmax;
50  NXbin = nbin;
51  }
52  void SetY(Double_t ymin, Double_t ymax, Int_t nbin)
53  {
54  fYmin = ymin;
55  fYmax = ymax;
56  NYbin = nbin;
57  }
58  void SetZ(Double_t zmin, Double_t zmax, Int_t nbin)
59  {
60  fZmin = zmin;
61  fZmax = zmax;
62  NZbin = nbin;
63  }
64 
65  TH2D* GetMeshTid() { return fMeshTid; }
66  TH2D* GetMeshFlu() { return fMeshFlu; }
67  TH2D* GetMeshSEU() { return fMeshSEU; }
68  /*** Output to screen */
69  // virtual void Print(const Option_t* opt = 0) const {;}
70 
71  Double_t GetDiag() { return fDiag; }
72  Double_t GetBinVolume() { return fBinVolume; }
73 
74  void fillTID(Double_t x, Double_t y, Double_t we) { fMeshTid->Fill(x, y, we); }
75  void fillFluence(Double_t x, Double_t y, Double_t we) { fMeshFlu->Fill(x, y, we); }
76  void fillSEU(Double_t x, Double_t y, Double_t we) { fMeshSEU->Fill(x, y, we); }
77  void Scale(Double_t fac)
78  {
79  fMeshTid->Scale(fac);
80  fMeshFlu->Scale(fac);
81  fMeshSEU->Scale(fac);
82  }
83 
84  void calculate();
85 
86  void print();
87 
88  protected:
89  Double_t fXmin, fYmin, fZmin;
90  Double_t fXmax, fYmax, fZmax;
91  Int_t NXbin, NYbin, NZbin;
92  Double_t fBinVolume;
93  Double_t fDiag;
94  TH2D* fMeshTid; // !mesh
95  TH2D* fMeshFlu; // !mesh
96  TH2D* fMeshSEU; // !mesh
97  TString fhname; // !mesh
98 
99  private:
100  FairMesh(const FairMesh&);
101  FairMesh& operator=(const FairMesh&);
102 
103  ClassDef(FairMesh, 1);
104 };
105 
106 #endif
Double_t GetYmin() const
Definition: FairMesh.h:38
Int_t NYbin
Definition: FairMesh.h:91
void calculate()
Definition: FairMesh.cxx:62
void print()
Definition: FairMesh.cxx:92
Double_t GetYmax() const
Definition: FairMesh.h:42
TH2D * GetMeshTid()
Definition: FairMesh.h:65
void fillTID(Double_t x, Double_t y, Double_t we)
Definition: FairMesh.h:74
Double_t fXmax
Definition: FairMesh.h:90
Double_t GetXmin() const
Definition: FairMesh.h:37
Double_t GetZmin() const
Definition: FairMesh.h:39
Double_t fBinVolume
Definition: FairMesh.h:92
Int_t NXbin
Definition: FairMesh.h:91
TH2D * fMeshFlu
Definition: FairMesh.h:95
Double_t fYmin
Definition: FairMesh.h:89
FairMesh()
Definition: FairMesh.cxx:22
void SetY(Double_t ymin, Double_t ymax, Int_t nbin)
Definition: FairMesh.h:52
void Scale(Double_t fac)
Definition: FairMesh.h:77
TH2D * GetMeshFlu()
Definition: FairMesh.h:66
Double_t GetBinVolume()
Definition: FairMesh.h:72
Double_t fYmax
Definition: FairMesh.h:90
void SetX(Double_t xmin, Double_t xmax, Int_t nbin)
Definition: FairMesh.h:46
TH2D * fMeshSEU
Definition: FairMesh.h:96
virtual ~FairMesh()
Definition: FairMesh.cxx:90
Double_t GetZmax() const
Definition: FairMesh.h:43
TH2D * fMeshTid
Definition: FairMesh.h:94
void fillSEU(Double_t x, Double_t y, Double_t we)
Definition: FairMesh.h:76
Double_t fZmax
Definition: FairMesh.h:90
Int_t NZbin
Definition: FairMesh.h:91
void SetZ(Double_t zmin, Double_t zmax, Int_t nbin)
Definition: FairMesh.h:58
Double_t fZmin
Definition: FairMesh.h:89
Double_t fDiag
Definition: FairMesh.h:93
TH2D * GetMeshSEU()
Definition: FairMesh.h:67
Double_t GetXmax() const
Definition: FairMesh.h:41
void fillFluence(Double_t x, Double_t y, Double_t we)
Definition: FairMesh.h:75
TString fhname
Definition: FairMesh.h:97
Double_t fXmin
Definition: FairMesh.h:89
Double_t GetDiag()
Definition: FairMesh.h:71