BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnMaterialInfo.h
Go to the documentation of this file.
1
/** BmnMaterialInfo.h
2
* \author Andrey Lebedev <andrey.lebedev@gsi.de> - Original author. First version of code for CBM experiment.
3
* \author Sergey Merts <Sergey.Merts@gmail.com> - Modification for BMN experiment.
4
* @since 2008-2014
5
* @version 1.0
6
**
7
** Data class to store information about detector material.
8
**/
9
10
#ifndef BMNMATERIALINFO_H_
11
#define BMNMATERIALINFO_H_
12
13
#include "
Rtypes.h
"
14
15
#include <sstream>
16
#include <string>
17
18
using
std::string;
19
20
class
BmnMaterialInfo
21
{
22
public
:
23
/* Constructor */
24
BmnMaterialInfo
()
25
:
fLength
(0.)
26
,
fRL
(0.)
27
,
fRho
(0.)
28
,
fZ
(0.)
29
,
fA
(0.)
30
,
fZpos
(0.)
31
,
fName
(
""
)
32
{}
33
34
// This constructor never used!
35
// /* Constructor with assignment
36
// * @param length Length of the material [cm]
37
// * @param rl Radiation length [cm]
38
// * @param rho Density [g/cm^3]
39
// * @param Z
40
// * @param A
41
// * @param zpos Z position of the material
42
// */
43
// BmnMaterialInfo(
44
// Float_t length,
45
// Float_t rl,
46
// Float_t rho,
47
// Float_t Z,
48
// Float_t A,
49
// Float_t zpos,
50
// string name):
51
// fLength(length),
52
// fRL(rl),
53
// fRho(rho),
54
// fZ(Z),
55
// fA(A),
56
// fZpos(zpos),
57
// fName(name) {}
58
59
/* Destructor */
60
virtual
~BmnMaterialInfo
() {};
61
62
/*@return Length of the material */
63
Float_t
GetLength
()
const
{
return
fLength
; }
64
65
/*@return Radiation length */
66
Float_t
GetRL
()
const
{
return
fRL
; }
67
68
/*@return Density */
69
Float_t
GetRho
()
const
{
return
fRho
; }
70
71
/*@return Atomic number */
72
Float_t
GetZ
()
const
{
return
fZ
; }
73
74
/*@return Atomic mass */
75
Float_t
GetA
()
const
{
return
fA
; }
76
77
/*@return Z position of the material */
78
Float_t
GetZpos
()
const
{
return
fZpos
; }
79
80
const
string
&
GetName
()
const
{
return
fName
; }
81
82
/* Sets length of the material */
83
void
SetLength
(
Float_t
length) {
fLength
= length; }
84
85
/* Sets radiation length of the material */
86
void
SetRL
(
Float_t
rl) {
fRL
= rl; }
87
88
/* Sets density */
89
void
SetRho
(
Float_t
rho) {
fRho
= rho; }
90
91
/* Sets atomic number */
92
void
SetZ
(
Float_t
Z) {
fZ
= Z; }
93
94
/* Sets atomic mass */
95
void
SetA
(
Float_t
A) {
fA
= A; }
96
97
/* Sets Z position of the material */
98
void
SetZpos
(
Float_t
zpos) {
fZpos
= zpos; }
99
100
void
SetName
(
const
string
& name) {
fName
= name; }
101
102
/* @return String representation of the class */
103
virtual
std::string
ToString
()
const
104
{
105
std::stringstream ss;
106
ss <<
"MaterialInfo: length="
<<
fLength
<<
" rl="
<<
fRL
<<
" rho="
<<
fRho
<<
" Z="
<<
fZ
<<
" A="
<<
fA
107
<<
" zpos="
<<
fZpos
<<
" name="
<<
fName
<< std::endl;
108
return
ss.str();
109
}
110
111
private
:
112
Float_t
fLength
;
// Length of the material [cm]
113
Float_t
fRL
;
// Radiation length [cm]
114
Float_t
fRho
;
// Density [g/cm^3]
115
Float_t
fZ
;
// Atomic number
116
Float_t
fA
;
// Atomic mass
117
Float_t
fZpos
;
// Z position of the material
118
string
fName
;
// Name of material
119
};
120
121
#endif
/*BMNMATERIALINFO_H_*/
Float_t
float Float_t
Rtypes.h
BmnMaterialInfo::GetA
Float_t GetA() const
Definition
BmnMaterialInfo.h:75
BmnMaterialInfo::SetRho
void SetRho(Float_t rho)
Definition
BmnMaterialInfo.h:89
BmnMaterialInfo::SetLength
void SetLength(Float_t length)
Definition
BmnMaterialInfo.h:83
BmnMaterialInfo::SetName
void SetName(const string &name)
Definition
BmnMaterialInfo.h:100
BmnMaterialInfo::ToString
virtual std::string ToString() const
Definition
BmnMaterialInfo.h:103
BmnMaterialInfo::fA
Float_t fA
Definition
BmnMaterialInfo.h:116
BmnMaterialInfo::fLength
Float_t fLength
Definition
BmnMaterialInfo.h:112
BmnMaterialInfo::fZpos
Float_t fZpos
Definition
BmnMaterialInfo.h:117
BmnMaterialInfo::GetZpos
Float_t GetZpos() const
Definition
BmnMaterialInfo.h:78
BmnMaterialInfo::BmnMaterialInfo
BmnMaterialInfo()
Definition
BmnMaterialInfo.h:24
BmnMaterialInfo::SetA
void SetA(Float_t A)
Definition
BmnMaterialInfo.h:95
BmnMaterialInfo::SetRL
void SetRL(Float_t rl)
Definition
BmnMaterialInfo.h:86
BmnMaterialInfo::GetZ
Float_t GetZ() const
Definition
BmnMaterialInfo.h:72
BmnMaterialInfo::GetLength
Float_t GetLength() const
Definition
BmnMaterialInfo.h:63
BmnMaterialInfo::fRho
Float_t fRho
Definition
BmnMaterialInfo.h:114
BmnMaterialInfo::fRL
Float_t fRL
Definition
BmnMaterialInfo.h:113
BmnMaterialInfo::GetName
const string & GetName() const
Definition
BmnMaterialInfo.h:80
BmnMaterialInfo::fName
string fName
Definition
BmnMaterialInfo.h:118
BmnMaterialInfo::SetZpos
void SetZpos(Float_t zpos)
Definition
BmnMaterialInfo.h:98
BmnMaterialInfo::~BmnMaterialInfo
virtual ~BmnMaterialInfo()
Definition
BmnMaterialInfo.h:60
BmnMaterialInfo::GetRho
Float_t GetRho() const
Definition
BmnMaterialInfo.h:69
BmnMaterialInfo::GetRL
Float_t GetRL() const
Definition
BmnMaterialInfo.h:66
BmnMaterialInfo::fZ
Float_t fZ
Definition
BmnMaterialInfo.h:115
BmnMaterialInfo::SetZ
void SetZ(Float_t Z)
Definition
BmnMaterialInfo.h:92
base
math
BmnMaterialInfo.h
Generated on
for BmnRoot by
1.17.0