BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnNdetCell.cxx
Go to the documentation of this file.
1
/** @file BmnNdetCell.cxx
2
** @author Nikolay Karpushkin <karpushkin@inr.ru>
3
** @date 27.03.2022
4
**
5
** Code of Class for Bmn Ndet Cell data container in event
6
**/
7
8
#include "
BmnNdetCell.h
"
9
10
#include "BmnDetectorList.h"
11
12
BmnNdetCell::BmnNdetCell
()
13
:
FairHit
()
14
,
BmnNdetAddressMixin
()
15
,
fAddress
(0)
16
,
fSignal
(0)
17
{
18
SetTimeStamp(0.);
19
SetDetectorID(
kNDET
);
20
}
21
22
BmnNdetCell::BmnNdetCell
(uint32_t address,
23
double
time,
24
double
signal,
25
TVector3
posHit,
26
TVector3
posHitErr,
27
int
pointIndx)
28
:
FairHit
(
kNDET
, posHit, posHitErr, pointIndx)
29
,
BmnNdetAddressMixin
()
30
,
fAddress
(address)
31
,
fSignal
(signal)
32
{
33
SetTimeStamp(time);
34
}
35
36
// Copy constructor
37
BmnNdetCell::BmnNdetCell
(
const
BmnNdetCell
& other)
38
:
FairHit
(other)
39
,
BmnNdetAddressMixin
()
40
,
fAddress
(other.
fAddress
)
41
,
fSignal
(other.
fSignal
)
42
{}
43
44
// Move constructor
45
BmnNdetCell::BmnNdetCell
(
BmnNdetCell
&& other)
46
:
FairHit
(
std
::move(other))
47
,
BmnNdetAddressMixin
()
48
,
fAddress
(other.
fAddress
)
49
,
fSignal
(other.
fSignal
)
50
{
51
other.fAddress = 0;
52
other.fSignal = 0;
53
}
54
55
// Copy assignment operator
56
BmnNdetCell
&
BmnNdetCell::operator=
(
const
BmnNdetCell
& other)
57
{
58
if
(
this
!= &other) {
59
FairHit::operator=(other);
60
fAddress
= other.
fAddress
;
61
fSignal
= other.
fSignal
;
62
}
63
return
*
this
;
64
}
65
66
// Move assignment operator
67
BmnNdetCell
&
BmnNdetCell::operator=
(
BmnNdetCell
&& other)
68
{
69
if
(
this
!= &other) {
70
FairHit::operator=(std::move(other));
71
fAddress
= other.fAddress;
72
fSignal
= other.fSignal;
73
other.fAddress = 0;
74
other.fSignal = 0;
75
}
76
return
*
this
;
77
}
78
79
BmnNdetCell::~BmnNdetCell
() {}
80
81
void
BmnNdetCell::Print
(
Option_t
* option)
const
82
{
83
printf(
"%s: %s\n"
,
GetClassName
(),
BmnNdetAddress::GetInfoString
(
GetAddress
()).c_str());
84
printf(
" Signal: %.2f\n"
,
fSignal
);
85
printf(
" Time: %.2f\n"
,
GetTime
());
86
}
87
88
void
BmnNdetCell::ResetTimeEnergy
()
89
{
90
SetSignal
(0.);
91
SetTimeStamp(0.);
92
ResetLinks();
93
SetRefIndex(-1);
94
}
95
96
void
BmnNdetCell::reset
()
97
{
98
ResetTimeEnergy
();
99
TVector3
zero;
100
SetPosition(zero);
101
SetPositionError(zero);
102
}
Option_t
const char Option_t
kNDET
@ kNDET
Definition
BmnDetectorList.h:35
BmnNdetAddressMixin
interface to use the address methods
Definition
BmnNdetAddressMixin.h:16
BmnNdetAddress::GetInfoString
static std::string GetInfoString(uint32_t address)
Return a formatted string with all address components.
Definition
BmnNdetAddress.h:55
BmnNdetCell::GetAddress
uint32_t GetAddress() const
Definition
BmnNdetCell.h:44
BmnNdetCell::SetSignal
void SetSignal(double signal)
Definition
BmnNdetCell.h:40
BmnNdetCell::GetTime
double GetTime() const
Definition
BmnNdetCell.h:46
BmnNdetCell::~BmnNdetCell
virtual ~BmnNdetCell()
Definition
BmnNdetCell.cxx:79
BmnNdetCell::Print
virtual void Print(Option_t *option="") const override
Definition
BmnNdetCell.cxx:81
BmnNdetCell::fSignal
double fSignal
Definition
BmnNdetCell.h:50
BmnNdetCell::reset
void reset()
Definition
BmnNdetCell.cxx:96
BmnNdetCell::BmnNdetCell
BmnNdetCell()
Definition
BmnNdetCell.cxx:12
BmnNdetCell::operator=
BmnNdetCell & operator=(const BmnNdetCell &)
Definition
BmnNdetCell.cxx:56
BmnNdetCell::fAddress
uint32_t fAddress
Definition
BmnNdetCell.h:49
BmnNdetCell::ResetTimeEnergy
void ResetTimeEnergy()
Definition
BmnNdetCell.cxx:88
BmnNdetCell::GetClassName
virtual const char * GetClassName() const
Definition
BmnNdetCell.h:33
FairHit
TVector3
BmnNdetCell.h
std
Definition
json.hpp:4446
detectors
ndet
BmnNdetCell.cxx
Generated on
for BmnRoot by
1.17.0