Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
CMFlashClusterv3.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file CMFlashClusterv3.cc
1
7
#include "
CMFlashClusterv3.h
"
8
9
#include <cmath>
10
#include <utility>
// for swap
11
12
void
CMFlashClusterv3::identify
(std::ostream&
os
)
const
13
{
14
os <<
"---CMFlashClusterv3--------------------"
<< std::endl;
15
16
os <<
" (x,y,z) = ("
<<
m_pos
[0];
17
os <<
", "
<< m_pos[1] <<
", "
;
18
os << m_pos[2] <<
") cm"
;
19
20
os <<
" adc = "
<<
getAdc
() << std::endl;
21
22
os << std::endl;
23
os <<
"-----------------------------------------------"
<< std::endl;
24
25
return
;
26
}
27
28
int
CMFlashClusterv3::isValid
()
const
29
{
30
if
(std::isnan(
getX
()))
return
0;
31
if
(std::isnan(
getY
()))
return
0;
32
if
(std::isnan(
getZ
()))
return
0;
33
34
35
if
(std::isnan(
getX1
()))
return
0;
36
if
(std::isnan(
getY1
()))
return
0;
37
if
(std::isnan(
getZ1
()))
return
0;
38
39
40
if
(std::isnan(
getX2
()))
return
0;
41
if
(std::isnan(
getY2
()))
return
0;
42
if
(std::isnan(
getZ2
()))
return
0;
43
44
if
(
m_adc
== 0xFFFFFFFF)
return
0;
45
if
(
m_adc1
== 0xFFFFFFFF)
return
0;
46
if
(
m_adc2
== 0xFFFFFFFF)
return
0;
47
48
return
1;
49
}
50
51
void
CMFlashClusterv3::CopyFrom
(
const
CMFlashCluster
&
source
)
52
{
53
// do nothing if copying onto oneself
54
if
(
this
== &source )
return
;
55
56
// parent class method
57
CMFlashCluster::CopyFrom
( source );
58
59
setX
( source.
getX
() );
60
setY
( source.
getY
() );
61
setZ
( source.
getZ
() );
62
63
64
setX1
( source.
getX1
() );
65
setY1
( source.
getY1
() );
66
setZ1
( source.
getZ1
() );
67
68
setX2
( source.
getX2
() );
69
setY2
( source.
getY2
() );
70
setZ2
( source.
getZ2
() );
71
72
setLayer1
( source.
getLayer1
() );
73
setLayer2
( source.
getLayer2
() );
74
75
setAdc
( source.
getAdc
() );
76
setAdc1
( source.
getAdc1
() );
77
setAdc2
( source.
getAdc2
() );
78
setIsRGap
( source.
getIsRGap
() );
79
setIsPhiGap
( source.
getIsPhiGap
() );
80
81
}
82
coresoftware
blob
master
offline
packages
trackbase
CMFlashClusterv3.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:09
using
1.8.2 with
sPHENIX GitHub integration