Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
EIC
Project Juggler
Commits
5d8eec8c
Commit
5d8eec8c
authored
Feb 15, 2022
by
Sylvester Joosten
Browse files
Updated for new EICD
parent
13cb2c8b
Changes
4
Hide whitespace changes
Inline
Side-by-side
JugReco/src/components/TrackerHitReconstruction.cpp
View file @
5d8eec8c
...
...
@@ -44,12 +44,13 @@ namespace Jug {
*/
class
TrackerHitReconstruction
:
public
GaudiAlgorithm
,
AlgorithmIDMixin
<>
{
public:
Gaudi
::
Property
<
double
>
m_timeResolution
{
this
,
"timeResolution"
,
10
};
Rndm
::
Numbers
m_gaussDist
;
Gaudi
::
Property
<
float
>
m_timeResolution
{
this
,
"timeResolution"
,
10
};
// in ns
DataHandle
<
eic
::
RawTrackerHitCollection
>
m_inputHitCollection
{
"inputHitCollection"
,
Gaudi
::
DataHandle
::
Reader
,
this
};
DataHandle
<
eic
::
TrackerHitCollection
>
m_outputHitCollection
{
"outputHitCollection"
,
Gaudi
::
DataHandle
::
Writer
,
this
};
/// Pointer to the geometry service
SmartIF
<
IGeoSvc
>
m_geoSvc
;
...
...
@@ -74,11 +75,6 @@ namespace Jug {
<<
endmsg
;
return
StatusCode
::
FAILURE
;
}
IRndmGenSvc
*
randSvc
=
svc
<
IRndmGenSvc
>
(
"RndmGenSvc"
,
true
);
StatusCode
sc
=
m_gaussDist
.
initialize
(
randSvc
,
Rndm
::
Gauss
(
0.0
,
m_timeResolution
.
value
()));
if
(
!
sc
.
isSuccess
())
{
return
StatusCode
::
FAILURE
;
}
return
StatusCode
::
SUCCESS
;
}
...
...
@@ -115,11 +111,13 @@ namespace Jug {
// - XYZ segmentation: xx -> sigma_x, yy-> sigma_y, zz -> sigma_z, tt -> 0
// This is properly in line with how we get the local coordinates for the hit
// in the TrackerSourceLinker.
eic
::
TrackerHit
hit
{{
ahit
.
ID
().
value
,
algorithmID
()},
// Hit ID
ahit
.
cellID
(),
// Raw DD4hep cell ID
{
pos
.
x
()
/
mm
,
pos
.
y
()
/
mm
,
pos
.
z
()
/
mm
,
(
float
)
ahit
.
time
()
/
1000
},
// mm
, ns
eic
::
TrackerHit
hit
{{
ahit
.
ID
().
value
,
algorithmID
()},
// Hit ID
ahit
.
cellID
(),
// Raw DD4hep cell ID
{
pos
.
x
()
/
mm
,
pos
.
y
()
/
mm
,
pos
.
z
()
/
mm
}
,
// mm
{
get_variance
(
dim
[
0
]
/
mm
),
get_variance
(
dim
[
1
]
/
mm
),
// variance (see note above)
std
::
size
(
dim
)
>
2
?
get_variance
(
dim
[
2
]
/
mm
)
:
0.
,
0
},
std
::
size
(
dim
)
>
2
?
get_variance
(
dim
[
2
]
/
mm
)
:
0.
},
(
float
)
ahit
.
time
()
/
1000
,
// ns
m_timeResolution
,
// in ns
static_cast
<
float
>
(
ahit
.
charge
()
/
1.0e6
),
// Collected energy (GeV)
0.0
f
};
// Error on the energy
rec_hits
->
push_back
(
hit
);
...
...
JugTrack/src/components/GenFitTrackFitter.cpp
View file @
5d8eec8c
...
...
@@ -208,8 +208,8 @@ namespace Jug::Reco {
TMatrixDSym
hitCov
(
2
);
hitCov
.
UnitMatrix
();
hitCov
(
0
,
0
)
=
ahit
.
covMatrix
().
xx
/
(
100.0
);
// go from mm^2 to cm^2
hitCov
(
1
,
1
)
=
ahit
.
covMatrix
().
yy
/
(
100.0
);
// go from mm^2 to cm^2
hitCov
(
0
,
0
)
=
ahit
.
positionError
().
xx
/
(
100.0
);
// go from mm^2 to cm^2
hitCov
(
1
,
1
)
=
ahit
.
positionError
().
yy
/
(
100.0
);
// go from mm^2 to cm^2
if
(
msgLevel
(
MSG
::
DEBUG
))
{
...
...
JugTrack/src/components/SingleTrackSourceLinker.cpp
View file @
5d8eec8c
...
...
@@ -137,9 +137,9 @@ namespace Jug::Reco {
// construct the covariance matrix
Acts
::
SymMatrix2
cov
=
Acts
::
SymMatrix2
::
Zero
();
cov
(
0
,
0
)
=
ahit
.
covMatrix
().
xx
*
Acts
::
UnitConstants
::
mm
*
ahit
.
covMatrix
().
xx
*
Acts
::
UnitConstants
::
mm
;
cov
(
1
,
1
)
=
ahit
.
covMatrix
().
yy
*
Acts
::
UnitConstants
::
mm
*
ahit
.
covMatrix
().
yy
*
Acts
::
UnitConstants
::
mm
;
ahit
.
positionError
().
xx
*
Acts
::
UnitConstants
::
mm
*
Acts
::
UnitConstants
::
mm
;
cov
(
1
,
1
)
=
ahit
.
positionError
().
yy
*
Acts
::
UnitConstants
::
mm
*
Acts
::
UnitConstants
::
mm
;
// Above we only consider the two position coordinates the comment below shows how to add time
// which we will probably want to try later.
...
...
JugTrack/src/components/TrackerSourceLinker.cpp
View file @
5d8eec8c
...
...
@@ -92,8 +92,8 @@ namespace Jug::Reco {
for
(
const
auto
&
ahit
:
*
hits
)
{
Acts
::
SymMatrix2
cov
=
Acts
::
SymMatrix2
::
Zero
();
cov
(
0
,
0
)
=
ahit
.
covMatrix
().
xx
*
mm_acts
*
mm_acts
;
// note mm = 1 (Acts)
cov
(
1
,
1
)
=
ahit
.
covMatrix
().
yy
*
mm_acts
*
mm_acts
;
cov
(
0
,
0
)
=
ahit
.
positionError
().
xx
*
mm_acts
*
mm_acts
;
// note mm = 1 (Acts)
cov
(
1
,
1
)
=
ahit
.
positionError
().
yy
*
mm_acts
*
mm_acts
;
if
(
msgLevel
(
MSG
::
DEBUG
))
{
debug
()
<<
"cov matrix:
\n
"
<<
cov
<<
endmsg
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment