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
FwdHoughNodeGroup.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file FwdHoughNodeGroup.h
1
//
2
// AYK (ayk@bnl.gov)
3
//
4
// Hough transform node definitions for a forward tracker;
5
//
6
7
#include <
HoughNodeGroup.h
>
8
9
#ifndef _FWD_HOUGH_NODE_GROUP_
10
#define _FWD_HOUGH_NODE_GROUP_
11
12
class
TrKalmanNodeLocation
;
13
14
class
FwdHoughNodeGroup
:
public
HoughNodeGroup
15
{
16
public
:
17
FwdHoughNodeGroup
(
unsigned
id
):
HoughNodeGroup
(id),
mLocation
(0),
mMarsToTemplate
(0),
18
mTemplate
(0),
mCylindricalCoordSystem
(
false
),
mUseCartesian
(
true
) {};
19
~FwdHoughNodeGroup
() {};
20
21
void
SetLocation
(
TrKalmanNodeLocation
*location) {
mLocation
= location; };
22
TrKalmanNodeLocation
*
GetLocation
()
const
{
return
mLocation
; };
23
24
t_hough_range
Pack
(
const
TVector3 &
vtx
) {
25
return
PackCore
(vtx,
mTemplate
);
26
};
27
t_hough_range
PackFromTo
(
const
EicTrackingDigiHit
*hit,
double
nSigma,
double
spSmearing,
28
const
KalmanNodeWrapper
*kfwrapper,
double
sign
) {
29
30
EicKfNodeTemplate
*kftmpl = kfwrapper->
GetKfNodeTemplate
();
31
32
double
tmplCoord[hit->
GetMdim
()];
33
34
for
(
unsigned
iq=0; iq<hit->
GetMdim
(); iq++)
35
tmplCoord[iq] = hit->
_GetCoord
(iq) +
36
nSigma*kftmpl->
GetSigma
(iq) + sign*kftmpl->
GetSmearingValue
(spSmearing, hit, iq);
37
38
TVector3 vvNd = kftmpl->
TemplateToThreeDee
(tmplCoord);
39
40
// FIXME: this clearly should be optimized;
41
TVector3 vvGl =
LocalToMaster
(kfwrapper->
GetNodeToMasterMtx
(), vvNd);
42
43
return
PackCore
(vvGl, kftmpl);
44
};
45
t_hough_range
PackFrom
(
const
EicTrackingDigiHit
*hit,
double
nSigma,
double
spSmearing,
46
const
KalmanNodeWrapper
*kfwrapper) {
47
return
PackFromTo
(hit, -nSigma, spSmearing, kfwrapper, -1.);
48
};
49
t_hough_range
PackTo
(
const
EicTrackingDigiHit
*hit,
double
nSigma,
double
spSmearing,
50
const
KalmanNodeWrapper
*kfwrapper) {
51
return
PackFromTo
(hit, nSigma, spSmearing, kfwrapper, 1.);
52
};
53
54
//void SetSmearingValues(const double sme[]) {
55
//for(unsigned iq=0; iq<mTemplate->GetMdim(); iq++)
56
// mSmearingValues.push_back(sme[iq]);
57
//};
58
void
SetTemplate
(
const
EicKfNodeTemplate
*tmpl) {
mTemplate
= tmpl; };
59
60
void
SetMarsToTemplateMtx
(
const
TGeoHMatrix *mtx) {
mMarsToTemplate
= mtx; };
61
const
TGeoHMatrix *
GetMarsToTemplateMtx
()
const
{
return
mMarsToTemplate
; };
62
63
void
SetCartesianFlag
(
bool
useCartesian) {
mUseCartesian
= useCartesian; }
64
bool
GetCartesianFlag
()
const
{
return
mUseCartesian
; }
65
66
private
:
67
bool
mCylindricalCoordSystem
;
68
69
bool
mUseCartesian
;
70
71
TrKalmanNodeLocation
*
mLocation
;
72
73
// FIXME: is not mTemplate enough?;
74
const
TGeoHMatrix *
mMarsToTemplate
;
75
76
const
EicKfNodeTemplate
*
mTemplate
;
77
78
//std::vector<double> mSmearingValues;
79
80
t_hough_range
PackCore
(
const
TVector3 &vvGl,
const
EicKfNodeTemplate
*kftmpl) {
81
double
crs[2];
82
83
TVector3 vvTmpl =
MasterToLocal
(
mMarsToTemplate
, vvGl);
84
if
(
mUseCartesian
)
85
for
(
unsigned
xy=0; xy<kftmpl->
GetMdim
(); xy++)
86
crs[xy] = vvTmpl[xy];
87
else
88
kftmpl->
CartesianToCylindrical
(vvTmpl, crs);
89
90
{
91
int
strips[2];
92
93
for
(
unsigned
xy=0; xy<kftmpl->
GetMdim
(); xy++)
94
strips[xy] = (
int
)floor((crs[xy] -
GetMin
(xy))/
GetGra
(xy));
95
96
return
HoughPack
(strips);
97
}
98
};
99
};
100
101
#endif
EicRoot
blob
master
eic
htree
FwdHoughNodeGroup.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:35
using
1.8.2 with
EIC GitHub integration