Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LHCb
Rec
Commits
b4f8327c
Commit
b4f8327c
authored
2 years ago
by
Christopher Rob Jones
Committed by
Christopher Rob Jones
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add MinP and MinPT properties to PrMatchNN
parent
cee96a19
No related branches found
No related tags found
1 merge request
!3409
Add MinP property to PrMatchNN
Pipeline
#5596171
passed
2 years ago
Stage: test
Stage: .post
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Pr/PrAlgorithms/src/PrMatchNN.cpp
+44
-19
44 additions, 19 deletions
Pr/PrAlgorithms/src/PrMatchNN.cpp
with
44 additions
and
19 deletions
Pr/PrAlgorithms/src/PrMatchNN.cpp
+
44
−
19
View file @
b4f8327c
...
@@ -128,6 +128,8 @@ namespace LHCb::Pr::MatchNN {
...
@@ -128,6 +128,8 @@ namespace LHCb::Pr::MatchNN {
Gaudi
::
Property
<
float
>
m_maxDistY
{
this
,
"MaxDistY"
,
250
*
Gaudi
::
Units
::
mm
};
Gaudi
::
Property
<
float
>
m_maxDistY
{
this
,
"MaxDistY"
,
250
*
Gaudi
::
Units
::
mm
};
Gaudi
::
Property
<
float
>
m_maxDSlope
{
this
,
"MaxDSlope"
,
1.5
};
Gaudi
::
Property
<
float
>
m_maxDSlope
{
this
,
"MaxDSlope"
,
1.5
};
Gaudi
::
Property
<
float
>
m_maxDSlopeY
{
this
,
"MaxDSlopeY"
,
0.15
};
Gaudi
::
Property
<
float
>
m_maxDSlopeY
{
this
,
"MaxDSlopeY"
,
0.15
};
Gaudi
::
Property
<
float
>
m_minP
{
this
,
"MinP"
,
0.0
*
Gaudi
::
Units
::
MeV
};
Gaudi
::
Property
<
float
>
m_minPt
{
this
,
"MinPt"
,
0.0
*
Gaudi
::
Units
::
MeV
};
// -- Counters
// -- Counters
mutable
Gaudi
::
Accumulators
::
MsgCounter
<
MSG
::
WARNING
>
m_momentum_failed
{
this
,
"momentum determination failed!"
};
mutable
Gaudi
::
Accumulators
::
MsgCounter
<
MSG
::
WARNING
>
m_momentum_failed
{
this
,
"momentum determination failed!"
};
...
@@ -360,30 +362,17 @@ namespace LHCb::Pr::MatchNN {
...
@@ -360,30 +362,17 @@ namespace LHCb::Pr::MatchNN {
auto
const
seediter
=
seeds
.
simd
();
auto
const
seediter
=
seeds
.
simd
();
auto
const
veloiter
=
velos
.
simd
();
auto
const
veloiter
=
velos
.
simd
();
const
bool
apply_min_p_cut
=
m_minP
.
value
()
>
0
;
const
simd
::
float_v
maxQOvP
=
(
apply_min_p_cut
?
1.0
/
m_minP
.
value
()
:
std
::
numeric_limits
<
simd
::
float_v
>::
max
()
);
const
bool
apply_min_pt_cut
=
m_minPt
.
value
()
>
0
;
for
(
auto
const
&
match
:
matches
.
simd
()
)
{
for
(
auto
const
&
match
:
matches
.
simd
()
)
{
auto
loopMask
=
match
.
loop_mask
();
auto
const
oTrack
=
result
.
compress_back
<
SIMDWrapper
::
InstructionSet
::
Best
>
(
loopMask
);
oTrack
.
field
<
TracksTag
::
trackVP
>
().
set
(
match
.
get
<
Tag
::
veloIndex
>
()
);
auto
loopMask
=
match
.
loop_mask
();
oTrack
.
field
<
TracksTag
::
trackUT
>
().
set
(
-
1
);
oTrack
.
field
<
TracksTag
::
trackSeed
>
().
set
(
match
.
get
<
Tag
::
seedIndex
>
()
);
auto
const
seed_track
=
seediter
.
gather
(
match
.
get
<
Tag
::
seedIndex
>
(),
loopMask
);
auto
const
seed_track
=
seediter
.
gather
(
match
.
get
<
Tag
::
seedIndex
>
(),
loopMask
);
auto
const
velo_track
=
veloiter
.
gather
(
match
.
get
<
Tag
::
veloIndex
>
(),
loopMask
);
auto
const
velo_track
=
veloiter
.
gather
(
match
.
get
<
Tag
::
veloIndex
>
(),
loopMask
);
auto
const
n_fthits
=
seed_track
.
nHits
();
auto
const
n_vphits
=
velo_track
.
nHits
();
oTrack
.
field
<
TracksTag
::
VPHits
>
().
resize
(
n_vphits
);
oTrack
.
field
<
TracksTag
::
UTHits
>
().
resize
(
0
);
oTrack
.
field
<
TracksTag
::
FTHits
>
().
resize
(
n_fthits
);
for
(
auto
idx
{
0
};
idx
<
n_vphits
.
hmax
(
loopMask
);
++
idx
)
{
oTrack
.
field
<
TracksTag
::
VPHits
>
()[
idx
].
template
field
<
TracksTag
::
Index
>().
set
(
velo_track
.
vp_index
(
idx
)
);
oTrack
.
field
<
TracksTag
::
VPHits
>
()[
idx
].
template
field
<
TracksTag
::
LHCbID
>().
set
(
velo_track
.
vp_lhcbID
(
idx
)
);
}
for
(
auto
idx
{
0
};
idx
<
n_fthits
.
hmax
(
loopMask
);
++
idx
)
{
oTrack
.
field
<
TracksTag
::
FTHits
>
()[
idx
].
template
field
<
TracksTag
::
Index
>().
set
(
seed_track
.
ft_index
(
idx
)
);
oTrack
.
field
<
TracksTag
::
FTHits
>
()[
idx
].
template
field
<
TracksTag
::
LHCbID
>().
set
(
seed_track
.
ft_lhcbID
(
idx
)
);
}
//== get Velo and T states at the usual pattern reco positions
//== get Velo and T states at the usual pattern reco positions
auto
state_endvelo
=
velo_track
.
get
<
VeloTag
::
States
>
(
1
);
auto
state_endvelo
=
velo_track
.
get
<
VeloTag
::
States
>
(
1
);
...
@@ -401,6 +390,42 @@ namespace LHCb::Pr::MatchNN {
...
@@ -401,6 +390,42 @@ namespace LHCb::Pr::MatchNN {
}
)
}
)
.
ignore
();
.
ignore
();
// If enabled filter on min track P, Pt
if
(
apply_min_p_cut
)
{
auto
pMask
=
abs
(
qOverP
)
<
maxQOvP
;
loopMask
=
loopMask
&
pMask
;
}
if
(
apply_min_pt_cut
)
{
const
auto
momentum
=
abs
(
1.0
/
qOverP
);
const
auto
tx2
=
state_beam
.
tx
()
*
state_beam
.
tx
();
const
auto
ty2
=
state_beam
.
ty
()
*
state_beam
.
ty
();
const
auto
sinTrack
=
sqrt
(
1.0
-
(
1.0
/
(
1.0
+
tx2
+
ty2
)
)
);
const
auto
pt
=
sinTrack
*
momentum
;
auto
ptMask
=
m_minPt
.
value
()
<
pt
;
loopMask
=
loopMask
&
ptMask
;
}
auto
const
oTrack
=
result
.
compress_back
<
SIMDWrapper
::
InstructionSet
::
Best
>
(
loopMask
);
oTrack
.
field
<
TracksTag
::
trackVP
>
().
set
(
match
.
get
<
Tag
::
veloIndex
>
()
);
oTrack
.
field
<
TracksTag
::
trackUT
>
().
set
(
-
1
);
oTrack
.
field
<
TracksTag
::
trackSeed
>
().
set
(
match
.
get
<
Tag
::
seedIndex
>
()
);
auto
const
n_fthits
=
seed_track
.
nHits
();
auto
const
n_vphits
=
velo_track
.
nHits
();
oTrack
.
field
<
TracksTag
::
VPHits
>
().
resize
(
n_vphits
);
oTrack
.
field
<
TracksTag
::
UTHits
>
().
resize
(
0
);
oTrack
.
field
<
TracksTag
::
FTHits
>
().
resize
(
n_fthits
);
for
(
auto
idx
{
0
};
idx
<
n_vphits
.
hmax
(
loopMask
);
++
idx
)
{
oTrack
.
field
<
TracksTag
::
VPHits
>
()[
idx
].
template
field
<
TracksTag
::
Index
>().
set
(
velo_track
.
vp_index
(
idx
)
);
oTrack
.
field
<
TracksTag
::
VPHits
>
()[
idx
].
template
field
<
TracksTag
::
LHCbID
>().
set
(
velo_track
.
vp_lhcbID
(
idx
)
);
}
for
(
auto
idx
{
0
};
idx
<
n_fthits
.
hmax
(
loopMask
);
++
idx
)
{
oTrack
.
field
<
TracksTag
::
FTHits
>
()[
idx
].
template
field
<
TracksTag
::
Index
>().
set
(
seed_track
.
ft_index
(
idx
)
);
oTrack
.
field
<
TracksTag
::
FTHits
>
()[
idx
].
template
field
<
TracksTag
::
LHCbID
>().
set
(
seed_track
.
ft_lhcbID
(
idx
)
);
}
// store end of VELO state
// store end of VELO state
oTrack
.
field
<
TracksTag
::
States
>
(
0
).
setPosition
(
state_endvelo
.
x
(),
state_endvelo
.
y
(),
state_endvelo
.
z
()
);
oTrack
.
field
<
TracksTag
::
States
>
(
0
).
setPosition
(
state_endvelo
.
x
(),
state_endvelo
.
y
(),
state_endvelo
.
z
()
);
oTrack
.
field
<
TracksTag
::
States
>
(
0
).
setDirection
(
state_endvelo
.
tx
(),
state_endvelo
.
ty
()
);
oTrack
.
field
<
TracksTag
::
States
>
(
0
).
setDirection
(
state_endvelo
.
tx
(),
state_endvelo
.
ty
()
);
...
...
This diff is collapsed.
Click to expand it.
Andre Gunther
@gunther
mentioned in merge request
!3443 (merged)
·
2 years ago
mentioned in merge request
!3443 (merged)
mentioned in merge request !3443
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment