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
aae2c9f6
Commit
aae2c9f6
authored
Feb 09, 2022
by
Sylvester Joosten
Browse files
Update Juggler for EICD changes
parent
b52349d9
Changes
3
Hide whitespace changes
Inline
Side-by-side
JugTrack/src/components/ParticlesFromTrackFit.cpp
View file @
aae2c9f6
...
...
@@ -39,7 +39,7 @@ namespace Jug::Reco {
*
* \ingroup tracking
*/
class
ParticlesFromTrackFit
:
public
GaudiAlgorithm
,
AlgorithmIDMixin
<
int32_t
>
{
class
ParticlesFromTrackFit
:
public
GaudiAlgorithm
{
public:
//DataHandle<eic::RawTrackerHitCollection> m_inputHitCollection{"inputHitCollection", Gaudi::DataHandle::Reader, this};
DataHandle
<
TrajectoriesContainer
>
m_inputTrajectories
{
"inputTrajectories"
,
Gaudi
::
DataHandle
::
Reader
,
this
};
...
...
@@ -49,11 +49,10 @@ namespace Jug::Reco {
public:
// ill-formed: using GaudiAlgorithm::GaudiAlgorithm;
ParticlesFromTrackFit
(
const
std
::
string
&
name
,
ISvcLocator
*
svcLoc
)
:
GaudiAlgorithm
(
name
,
svcLoc
)
,
AlgorithmIDMixin
(
name
,
info
())
{
:
GaudiAlgorithm
(
name
,
svcLoc
)
{
declareProperty
(
"inputTrajectories"
,
m_inputTrajectories
,
""
);
declareProperty
(
"outputParticles"
,
m_outputParticles
,
""
);
declareProperty
(
"outputTrackParameters"
,
m_outputTrackParameters
,
"A
CTS
Track Parameters"
);
declareProperty
(
"outputTrackParameters"
,
m_outputTrackParameters
,
"A
cts
Track Parameters"
);
}
StatusCode
initialize
()
override
{
...
...
@@ -98,7 +97,6 @@ namespace Jug::Reco {
// Get the fitted track parameter
//
bool
hasFittedParams
=
false
;
int
ID
=
0
;
if
(
traj
.
hasTrackParameters
(
trackTip
))
{
hasFittedParams
=
true
;
const
auto
&
boundParam
=
traj
.
trackParameters
(
trackTip
);
...
...
@@ -119,20 +117,36 @@ namespace Jug::Reco {
debug
()
<<
" chi2 = "
<<
trajState
.
chi2Sum
<<
endmsg
;
}
const
float
boundQoverP
=
parameter
[
Acts
::
eBoundQOverP
];
eic
::
TrackParameters
pars
{
{
ID
++
,
algorithmID
()},
{
parameter
[
Acts
::
eBoundLoc0
],
parameter
[
Acts
::
eBoundLoc1
]},
{
sqrt
(
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc0
,
Acts
::
eBoundLoc0
))),
sqrt
(
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc1
,
Acts
::
eBoundLoc1
)))},
{
parameter
[
Acts
::
eBoundTheta
],
parameter
[
Acts
::
eBoundPhi
]},
{
sqrt
(
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundTheta
,
Acts
::
eBoundTheta
))),
sqrt
(
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundPhi
,
Acts
::
eBoundPhi
)))},
boundQoverP
,
sqrt
(
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundQOverP
,
Acts
::
eBoundQOverP
))),
static_cast
<
float
>
(
parameter
[
Acts
::
eBoundTime
]),
sqrt
(
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundTime
,
Acts
::
eBoundTime
))),
static_cast
<
float
>
(
std
::
copysign
(
1.
,
boundQoverP
))};
// charge
const
std
::
array
<
float
,
21
>
covMatrix
{
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc0
,
Acts
::
eBoundLoc0
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc1
,
Acts
::
eBoundLoc1
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundTheta
,
Acts
::
eBoundTheta
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundPhi
,
Acts
::
eBoundPhi
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundQOverP
,
Acts
::
eBoundQOverP
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundTime
,
Acts
::
eBoundTime
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc0
,
Acts
::
eBoundLoc1
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc0
,
Acts
::
eBoundTheta
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc0
,
Acts
::
eBoundPhi
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc0
,
Acts
::
eBoundQOverP
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc0
,
Acts
::
eBoundTime
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc1
,
Acts
::
eBoundTheta
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc1
,
Acts
::
eBoundPhi
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc1
,
Acts
::
eBoundQOverP
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundLoc1
,
Acts
::
eBoundTime
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundTheta
,
Acts
::
eBoundPhi
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundTheta
,
Acts
::
eBoundQOverP
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundTheta
,
Acts
::
eBoundTime
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundPhi
,
Acts
::
eBoundQOverP
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundPhi
,
Acts
::
eBoundTime
)),
static_cast
<
float
>
(
covariance
(
Acts
::
eBoundQOverP
,
Acts
::
eBoundTime
))};
eic
::
TrackParameters
pars
{
0
,
// type: track head --> 0
{
parameter
[
Acts
::
eBoundLoc0
],
parameter
[
Acts
::
eBoundLoc1
]},
static_cast
<
float
>
(
parameter
[
Acts
::
eBoundTheta
]),
static_cast
<
float
>
(
parameter
[
Acts
::
eBoundPhi
]),
static_cast
<
float
>
(
parameter
[
Acts
::
eBoundQOverP
]),
static_cast
<
float
>
(
parameter
[
Acts
::
eBoundTime
]),
covMatrix
};
track_pars
->
push_back
(
pars
);
}
...
...
@@ -177,7 +191,7 @@ namespace Jug::Reco {
// set our IDs
for
(
size_t
i
=
0
;
i
<
rec_parts
->
size
();
++
i
)
{
(
*
rec_parts
)[
i
].
ID
({
static_cast
<
int32_t
>
(
i
),
algorithmID
()
});
(
*
rec_parts
)[
i
].
ID
({
static_cast
<
int32_t
>
(
i
),
0
});
}
return
StatusCode
::
SUCCESS
;
...
...
JugTrack/src/components/TrajectoryFromTrackFit.cpp
View file @
aae2c9f6
#include <algorithm>
// FIXME needs renaming (TrackProjector) and updating to fix and remove hardcoded numbers
// Gaudi
#include "GaudiAlg/GaudiAlgorithm.h"
#include "GaudiKernel/ToolHandle.h"
...
...
JugTrack/src/components/TruthTrackSeeding.cpp
View file @
aae2c9f6
...
...
@@ -67,7 +67,6 @@ namespace Jug::Reco {
const
dd4pod
::
Geant4ParticleCollection
*
mcparts
=
m_inputMCParticles
.
get
();
// Create output collections
auto
init_trk_params
=
m_outputTrackParameters
.
createAndPut
();
int
ID
=
0
;
for
(
const
auto
&
part
:
*
mcparts
)
{
...
...
@@ -86,13 +85,17 @@ namespace Jug::Reco {
continue
;
}
float
q_over_p
=
charge
/
p
;
// TrackParameters params(ID, loc, eic::FloatPair locError, eic::Direction direction, eic::Direction
// directionError, float qOverP, float qOverPError, float time, float timeError);
eic
::
TrackParameters
params
(
eic
::
Index
(
ID
++
),
{
float
(
0.0
),
float
(
0.0
)},
{
float
(
0.1
),
float
(
0.1
)},
{
float
(
part
.
ps
().
phi
()),
float
(
part
.
ps
().
theta
())},
{
float
(
0.1
),
float
(
0.1
)},
q_over_p
,
float
(
q_over_p
*
0.05
),
float
(
part
.
time
()),
float
(
1.0
),
float
(
charge
));
const
float
q_over_p
=
charge
/
p
;
std
::
array
<
float
,
21
>
covMatrix
;
covMatrix
.
fill
(
0.1
);
eic
::
TrackParameters
params
(
-
1
,
// type --> seed (-1)
{
0.0
f
,
0.0
f
},
// location on surface
part
.
ps
().
theta
(),
// theta (rad)
part
.
ps
().
phi
(),
// phi (rad)
q_over_p
*
.05
f
,
// Q/P (e/GeV)
part
.
time
(),
// Time (ns)
covMatrix
);
// 15 element diagonal covariance matrix
////// Construct a perigee surface as the target surface
//auto pSurface = Acts::Surface::makeShared<Acts::PerigeeSurface>(
...
...
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