FairRoot
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
FairMesh.cxx
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 source file -----
10
// ----- original author D.Bertini -----
11
// ----- adapted april 2010 O.Hartmann -----
12
// -------------------------------------------------------------------------
13
14
#include "
FairMesh.h
"
15
16
#include <TMath.h>
// for Sqrt
17
#include <TString.h>
// for TString, operator+
18
#include <iostream>
// for operator<<, basic_ostream, etc
19
20
using namespace
std;
21
22
FairMesh::FairMesh
()
23
: TObject()
24
, fXmin(0.0)
25
, fYmin(0.)
26
, fZmin(0.)
27
, fXmax(0.)
28
, fYmax(0.)
29
, fZmax(0.)
30
, NXbin(0)
31
, NYbin(0)
32
, NZbin(0)
33
, fBinVolume(0.)
34
, fDiag(0.)
35
, fMeshTid(nullptr)
36
, fMeshFlu(nullptr)
37
, fMeshSEU(nullptr)
38
, fhname(
""
)
39
{}
40
41
FairMesh::FairMesh
(
const
char
* fname)
42
: TObject()
43
, fXmin(0.0)
44
, fYmin(0.)
45
, fZmin(0.)
46
, fXmax(0.)
47
, fYmax(0.)
48
, fZmax(0.)
49
, NXbin(0)
50
, NYbin(0)
51
, NZbin(0)
52
, fBinVolume(0.)
53
, fDiag(0.)
54
, fMeshTid(nullptr)
55
, fMeshFlu(nullptr)
56
, fMeshSEU(nullptr)
57
, fhname(fname)
58
{
59
// fhname = fname;
60
}
61
62
void
FairMesh::calculate
()
63
{
64
// compute numbers
65
66
TString tid =
fhname
+
"TID"
;
67
fMeshTid
=
new
TH2D(tid.Data(),
"TID"
,
NXbin
,
fXmin
,
fXmax
,
NYbin
,
fYmin
,
fYmax
);
68
fMeshTid
->Sumw2();
69
70
TString flu =
fhname
+
"FLU"
;
71
fMeshFlu
=
new
TH2D(flu.Data(),
"Fluence"
,
NXbin
,
fXmin
,
fXmax
,
NYbin
,
fYmin
,
fYmax
);
72
fMeshFlu
->Sumw2();
73
74
TString seu =
fhname
+
"SEU"
;
75
fMeshSEU
=
new
TH2D(seu.Data(),
"SEU"
,
NXbin
,
fXmin
,
fXmax
,
NYbin
,
fYmin
,
fYmax
);
76
fMeshSEU
->Sumw2();
77
78
// reseting
79
fMeshTid
->Reset();
80
fMeshFlu
->Reset();
81
fMeshSEU
->Reset();
82
83
fBinVolume
= ((fXmax -
fXmin
) /
NXbin
) * ((
fYmax
-
fYmin
) / NYbin) * ((
fZmax
-
fZmin
) /
NZbin
);
84
85
fDiag
= TMath::Sqrt(((fXmax - fXmin) /
NXbin
) * ((fXmax - fXmin) /
NXbin
)
86
+ ((
fYmax
- fYmin) / NYbin) * ((
fYmax
- fYmin) / NYbin)
87
+ ((
fZmax
-
fZmin
) /
NZbin
) * ((
fZmax
-
fZmin
) /
NZbin
));
88
}
89
90
FairMesh::~FairMesh
() {}
91
92
void
FairMesh::print
()
93
{
94
cout <<
" Xmin "
<<
fXmin
<<
" Xmax "
<<
fXmax
<< endl;
95
cout <<
" Ymin "
<<
fYmin
<<
" Ymax "
<<
fYmax
<< endl;
96
cout <<
" Zmin "
<<
fZmin
<<
" Zmax "
<<
fZmax
<< endl;
97
cout <<
" NX "
<<
NXbin
<<
" NY "
<<
NXbin
<< endl;
98
}
99
100
ClassImp
(
FairMesh
);
FairMesh::NYbin
Int_t NYbin
Definition:
FairMesh.h:91
FairMesh::calculate
void calculate()
Definition:
FairMesh.cxx:62
FairMesh::print
void print()
Definition:
FairMesh.cxx:92
FairMesh::fXmax
Double_t fXmax
Definition:
FairMesh.h:90
FairMesh.h
ClassImp
ClassImp(FairEventBuilder)
FairMesh::fBinVolume
Double_t fBinVolume
Definition:
FairMesh.h:92
FairMesh::NXbin
Int_t NXbin
Definition:
FairMesh.h:91
FairMesh::fMeshFlu
TH2D * fMeshFlu
Definition:
FairMesh.h:95
FairMesh::fYmin
Double_t fYmin
Definition:
FairMesh.h:89
FairMesh::FairMesh
FairMesh()
Definition:
FairMesh.cxx:22
FairMesh::fYmax
Double_t fYmax
Definition:
FairMesh.h:90
FairMesh::fMeshSEU
TH2D * fMeshSEU
Definition:
FairMesh.h:96
FairMesh::~FairMesh
virtual ~FairMesh()
Definition:
FairMesh.cxx:90
FairMesh::fMeshTid
TH2D * fMeshTid
Definition:
FairMesh.h:94
FairMesh::fZmax
Double_t fZmax
Definition:
FairMesh.h:90
FairMesh::NZbin
Int_t NZbin
Definition:
FairMesh.h:91
FairMesh
Definition:
FairMesh.h:26
FairMesh::fZmin
Double_t fZmin
Definition:
FairMesh.h:89
FairMesh::fDiag
Double_t fDiag
Definition:
FairMesh.h:93
FairMesh::fhname
TString fhname
Definition:
FairMesh.h:97
FairMesh::fXmin
Double_t fXmin
Definition:
FairMesh.h:89
FairRoot
base
event
FairMesh.cxx
Generated on Mon Mar 8 2021 12:14:05 for FairRoot by
1.8.5