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
EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
BeastMagneticField
delphes_EIC
Doxygen_Assist
east
eic-smear
EicRoot
eicsmear-jetexample
eicsmeardetectors
EicToyModel
estarlight
Fun4All-lmon
fun4all_coresoftware
blob
master
calibrations
generators
offline
database
framework
packages
CaloBase
CaloReco
centrality
ClusterIso
compressor
Half
HelixHough
intt
jetbackground
KFParticle_sPHENIX
micromegas
mvtx
NodeDump
particleflow
PHField
PHGenFitPkg
PHGeometry
PHTpcTracker
tpc
tpccalib
tpcdaq
trackbase
ActsSurfaceMaps.cc
ActsSurfaceMaps.h
ActsTrackingGeometry.h
CMFlashCluster.h
CMFlashClusterContainer.h
CMFlashClusterContainerLinkDef.h
CMFlashClusterContainerv1.cc
CMFlashClusterContainerv1.h
CMFlashClusterContainerv1LinkDef.h
CMFlashClusterLinkDef.h
CMFlashClusterv1.cc
CMFlashClusterv1.h
CMFlashClusterv1LinkDef.h
TpcSeedTrackMap.cc
TpcSeedTrackMap.h
TpcSeedTrackMapLinkDef.h
TpcSeedTrackMapv1.cc
TpcSeedTrackMapv1.h
TpcSeedTrackMapv1LinkDef.h
TrkrCluster.h
TrkrClusterContainer.cc
TrkrClusterContainer.h
TrkrClusterContainerLinkDef.h
TrkrClusterContainerv1.cc
TrkrClusterContainerv1.h
TrkrClusterContainerv1LinkDef.h
TrkrClusterContainerv2.cc
TrkrClusterContainerv2.h
TrkrClusterContainerv2LinkDef.h
TrkrClusterContainerv3.cc
TrkrClusterContainerv3.h
TrkrClusterContainerv3LinkDef.h
TrkrClusterHitAssoc.cc
TrkrClusterHitAssoc.h
TrkrClusterHitAssocLinkDef.h
TrkrClusterHitAssocv1.cc
TrkrClusterHitAssocv1.h
TrkrClusterHitAssocv1LinkDef.h
TrkrClusterHitAssocv2.cc
TrkrClusterHitAssocv2.h
TrkrClusterHitAssocv2LinkDef.h
TrkrClusterHitAssocv3.cc
TrkrClusterHitAssocv3.h
TrkrClusterHitAssocv3LinkDef.h
TrkrClusterIterationMap.cc
TrkrClusterIterationMap.h
TrkrClusterIterationMapLinkDef.h
TrkrClusterIterationMapv1.cc
TrkrClusterIterationMapv1.h
TrkrClusterIterationMapv1LinkDef.h
TrkrClusterLinkDef.h
TrkrClusterv1.cc
TrkrClusterv1.h
TrkrClusterv1LinkDef.h
TrkrClusterv2.cc
TrkrClusterv2.h
TrkrClusterv2LinkDef.h
TrkrClusterv3.cc
TrkrClusterv3.h
TrkrClusterv3LinkDef.h
TrkrDefs.cc
TrkrDefs.h
TrkrHit.h
TrkrHitLinkDef.h
TrkrHitSet.cc
TrkrHitSet.h
TrkrHitSetContainer.cc
TrkrHitSetContainer.h
TrkrHitSetContainerLinkDef.h
TrkrHitSetContainerv1.cc
TrkrHitSetContainerv1.h
TrkrHitSetContainerv1LinkDef.h
TrkrHitSetLinkDef.h
TrkrHitSetv1.cc
TrkrHitSetv1.h
TrkrHitSetv1LinkDef.h
TrkrHitTruthAssoc.h
TrkrHitTruthAssocLinkDef.h
TrkrHitTruthAssocv1.cc
TrkrHitTruthAssocv1.h
TrkrHitTruthAssocv1LinkDef.h
TrkrHitv1.cc
TrkrHitv1.h
TrkrHitv1LinkDef.h
TrkrHitv2.cc
TrkrHitv2.h
TrkrHitv2LinkDef.h
trackbase_historic
trackreco
trigger
vararray
QA
simulation
fun4all_eic_qa
fun4all_eic_tutorials
fun4all_eicdetectors
fun4all_eicmacros
fun4all_g4jleic
fun4all_GenFit
fun4all_macros
fun4all_tutorials
g4exampledetector
g4lblvtx
online_distribution
PEPSI
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
TrkrClusterv3.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file TrkrClusterv3.cc
1
7
#include "
TrkrClusterv3.h
"
8
9
#include <cmath>
10
#include <utility>
// for swap
11
12
namespace
13
{
14
// square convenience function
15
template
<
class
T>
inline
constexpr
T
square
(
const
T
&
x
)
16
{
return
x*
x
; }
17
}
18
19
TrkrClusterv3::TrkrClusterv3
()
20
: m_cluskey(TrkrDefs::CLUSKEYMAX)
21
, m_subsurfkey(TrkrDefs::SUBSURFKEYMAX)
22
, m_adc(0xFFFFFFFF)
23
{
24
for
(
int
i = 0; i < 2; i++)
25
{
26
m_local
[i] = NAN;
27
for
(
int
j = 0; j < 2; j ++)
28
{
29
m_actsLocalErr
[i][j] = NAN;
30
}
31
}
32
}
33
34
void
TrkrClusterv3::identify
(std::ostream& os)
const
35
{
36
os <<
"---TrkrClusterv3--------------------"
<< std::endl;
37
os <<
"clusid: "
<<
getClusKey
() << std::dec << std::endl;
38
39
os <<
" (rphi,z) = ("
<<
getLocalX
();
40
os <<
", "
<<
getLocalY
() <<
") cm "
;
41
42
os <<
" adc = "
<<
getAdc
() << std::endl;
43
44
os <<
"Error "
<< std::endl;
45
os <<
" ( "
;
46
os <<
getActsLocalError
(0, 0) <<
" , "
;
47
os <<
getActsLocalError
(0, 1) <<
" ) "
<< std::endl;
48
os <<
" ( "
;
49
os <<
getActsLocalError
(1, 0) <<
", "
;
50
os <<
getActsLocalError
(1, 1) <<
" ) "
<< std::endl;
51
52
os << std::endl;
53
os <<
"-----------------------------------------------"
<< std::endl;
54
55
return
;
56
}
57
58
int
TrkrClusterv3::isValid
()
const
59
{
60
if
(
m_cluskey
== TrkrDefs::CLUSKEYMAX) {
return
0; }
61
for
(
int
i = 0; i < 2; ++i)
62
{
63
if
(std::isnan(
getPosition
(i))) {
return
0; }
64
for
(
int
j = 0; j < 2; ++j)
65
{
if
(std::isnan(
getActsLocalError
(i,j))) {
return
0; }}
66
}
67
if
(
m_adc
== 0xFFFFFFFF) {
return
0; }
68
69
return
1;
70
}
71
72
void
TrkrClusterv3::CopyFrom
(
const
TrkrCluster
& source )
73
{
74
// do nothing if copying onto oneself
75
if
(
this
== &source )
return
;
76
77
// parent class method
78
TrkrCluster::CopyFrom
( source );
79
80
setClusKey
( source.
getClusKey
() );
81
setLocalX
( source.
getLocalX
() );
82
setLocalY
( source.
getLocalY
() );
83
84
for
(
int
j = 0; j < 2; ++j)
85
for
(
int
i = 0; i < 2; ++i)
86
{
setActsLocalError
(i, j, source.
getActsLocalError
(i, j)); }
87
88
setSubSurfKey
( source.
getSubSurfKey
() );
89
setAdc
( source.
getAdc
() );
90
}
91
92
float
TrkrClusterv3::getRPhiError
()
const
93
{
return
std::sqrt(
m_actsLocalErr
[0][0]); }
94
95
float
TrkrClusterv3::getZError
()
const
96
{
return
std::sqrt(
m_actsLocalErr
[1][1]); }
97
98
void
TrkrClusterv3::setActsLocalError
(
unsigned
int
i,
unsigned
int
j,
99
float
value
)
100
{
101
m_actsLocalErr
[i][j] =
value
;
102
}
fun4all_coresoftware
blob
master
offline
packages
trackbase
TrkrClusterv3.cc
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:46
using
1.8.2 with
EIC GitHub integration