GRSISort
"v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TGRSITransition.cxx
Go to the documentation of this file.
1
#include "
TGRSITransition.h
"
2
3
#include <iostream>
4
5
TGRSITransition::TGRSITransition
()
6
{
7
// Default constructor for TGRSITransition
8
Clear
();
9
}
10
11
void
TGRSITransition::Print
(Option_t*)
const
12
{
13
// Prints information about the TGRSITransition
14
std::cout <<
"**************************"
<< std::endl;
15
std::cout <<
"TGRSITransition:"
<< std::endl;
16
std::cout <<
"Energy: "
<<
fEnergy
<<
" +/- "
<<
fEnergyUncertainty
<< std::endl;
17
std::cout <<
"Intensity: "
<<
fIntensity
<<
" +/- "
<<
fIntensityUncertainty
<< std::endl;
18
std::cout <<
"**************************"
<< std::endl;
19
}
20
21
std::string
TGRSITransition::PrintToString
()
const
22
{
23
// Writes transitions in a way that is nicer to ourput.
24
std::string buffer;
25
buffer.append(Form(
"%lf\t"
,
fEnergy
));
26
buffer.append(Form(
"%lf\t"
,
fEnergyUncertainty
));
27
buffer.append(Form(
"%lf\t"
,
fIntensity
));
28
buffer.append(Form(
"%lf\t"
,
fIntensityUncertainty
));
29
return
buffer;
30
}
31
32
void
TGRSITransition::Clear
(Option_t*)
33
{
34
// Clears TGRSITransition
35
fEnergy
= 0.;
36
fEnergyUncertainty
= 0.;
37
fIntensity
= 0.;
38
fIntensityUncertainty
= 0.;
39
}
40
41
int
TGRSITransition::Compare
(
const
TObject* obj)
const
42
{
43
// Compares the intensities of the TGRSITransitions and returns
44
//-1 if this > obj
45
// 0 if this == obj
46
// 1 if this < obj
47
if
(
fIntensity
>
static_cast<
const
TGRSITransition
*
>
(obj)->
fIntensity
) {
48
return
-1;
49
}
50
if
(
fIntensity
==
static_cast<
const
TGRSITransition
*
>
(obj)->
fIntensity
) {
51
return
0;
52
}
//(fIntensity < static_cast<const TGRSITransition*>(obj)->fIntensity)
53
return
1;
54
55
std::cout << __PRETTY_FUNCTION__ <<
": Error, intensity neither greater, nor equal, nor smaller than provided intensity!"
<< std::endl;
// NOLINT(cppcoreguidelines-pro-type-const-cast, cppcoreguidelines-pro-bounds-array-to-pointer-decay)
56
return
-9;
57
}
TGRSITransition.h
TGRSITransition
Definition
TGRSITransition.h:23
TGRSITransition::fIntensity
double fIntensity
Definition
TGRSITransition.h:55
TGRSITransition::TGRSITransition
TGRSITransition()
Definition
TGRSITransition.cxx:5
TGRSITransition::Clear
void Clear(Option_t *opt="") override
Definition
TGRSITransition.cxx:32
TGRSITransition::Compare
int Compare(const TObject *obj) const override
Definition
TGRSITransition.cxx:41
TGRSITransition::Print
void Print(Option_t *opt="") const override
Definition
TGRSITransition.cxx:11
TGRSITransition::fEnergy
double fEnergy
Definition
TGRSITransition.h:53
TGRSITransition::fIntensityUncertainty
double fIntensityUncertainty
Definition
TGRSITransition.h:56
TGRSITransition::fEnergyUncertainty
double fEnergyUncertainty
Definition
TGRSITransition.h:54
TGRSITransition::PrintToString
std::string PrintToString() const
Definition
TGRSITransition.cxx:21
libraries
TAnalysis
TNucleus
TGRSITransition.cxx
GRSISort ("v4.0.0.5") Reference Guide Generated on Mon Feb 3 2025 16:38:05.