EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
CMFlashClusterv1.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file CMFlashClusterv1.cc
1
7
#include "
CMFlashClusterv1.h
"
8
9
#include <cmath>
10
#include <utility>
// for swap
11
12
namespace
13
{
14
15
}
16
17
CMFlashClusterv1::CMFlashClusterv1
()
18
: m_cluskey(UINT_MAX)
19
, m_adc(0xFFFFFFFF)
20
{
21
22
for
(
int
i = 0; i < 3; ++i)
m_pos
[i] = NAN;
23
24
}
25
26
void
CMFlashClusterv1::identify
(std::ostream& os)
const
27
{
28
os <<
"---CMFlashClusterv1--------------------"
<< std::endl;
29
os <<
"clusid: "
<<
getClusKey
() << std::dec << std::endl;
30
31
os <<
" (x,y,z) = ("
<<
m_pos
[0];
32
os <<
", "
<< m_pos[1] <<
", "
;
33
os << m_pos[2] <<
") cm"
;
34
35
os <<
" adc = "
<<
getAdc
() << std::endl;
36
37
os << std::endl;
38
os <<
"-----------------------------------------------"
<< std::endl;
39
40
return
;
41
}
42
43
int
CMFlashClusterv1::isValid
()
const
44
{
45
if
(
m_cluskey
== UINT_MAX)
return
0;
46
47
if
(std::isnan(
getX
()))
return
0;
48
if
(std::isnan(
getY
()))
return
0;
49
if
(std::isnan(
getZ
()))
return
0;
50
51
if
(
m_adc
== 0xFFFFFFFF)
return
0;
52
53
return
1;
54
}
55
56
void
CMFlashClusterv1::CopyFrom
(
const
CMFlashCluster
& source )
57
{
58
// do nothing if copying onto oneself
59
if
(
this
== &source )
return
;
60
61
// parent class method
62
CMFlashCluster::CopyFrom
( source );
63
64
setClusKey
( source.
getClusKey
() );
65
setX
( source.
getX
() );
66
setY
( source.
getY
() );
67
setZ
( source.
getZ
() );
68
setAdc
( source.
getAdc
() );
69
70
}
71
fun4all_coresoftware
blob
master
offline
packages
trackbase
CMFlashClusterv1.cc
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:45
using
1.8.2 with
EIC GitHub integration