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
aa5fc793
Commit
aa5fc793
authored
3 months ago
by
Miroslav Saur
Browse files
Options
Downloads
Plain Diff
Merge branch 'cherry-pick-
14c6805a
' into 'v36r12p3-patches'
Merge branch 'decianm-AdditionalMuonHitsForMatching' into 'v36r12p3-patches' See merge request
!4208
parents
b2152fad
490b80ae
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!4208
Merge branch 'decianm-AdditionalMuonHitsForMatching' into 'v36r12p3-patches'
Pipeline
#9751003
passed
3 months ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Phys/RelatedInfoTools/src/MuonProbeToLongMatcher.cpp
+36
-5
36 additions, 5 deletions
Phys/RelatedInfoTools/src/MuonProbeToLongMatcher.cpp
with
36 additions
and
5 deletions
Phys/RelatedInfoTools/src/MuonProbeToLongMatcher.cpp
+
36
−
5
View file @
aa5fc793
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
\*****************************************************************************/
\*****************************************************************************/
#include
"Event/Particle.h"
#include
"Event/Particle.h"
#include
"Event/PrHits.h"
#include
"Kernel/HashIDs.h"
#include
"Kernel/HashIDs.h"
#include
"Kernel/LHCbID.h"
#include
"Kernel/LHCbID.h"
#include
"LHCbAlgs/Transformer.h"
#include
"LHCbAlgs/Transformer.h"
...
@@ -25,15 +26,18 @@
...
@@ -25,15 +26,18 @@
class
MuonProbeToLongMatcher
class
MuonProbeToLongMatcher
:
public
LHCb
::
Algorithm
::
MultiTransformerFilter
<
std
::
tuple
<
LHCb
::
Particle
::
Selection
,
LHCb
::
Particle
::
Selection
>
(
:
public
LHCb
::
Algorithm
::
MultiTransformerFilter
<
std
::
tuple
<
LHCb
::
Particle
::
Selection
,
LHCb
::
Particle
::
Selection
>
(
LHCb
::
Particle
::
Range
const
&
,
LHCb
::
Particle
::
Range
const
&
)
>
{
LHCb
::
Particle
::
Range
const
&
,
LHCb
::
Particle
::
Range
const
&
,
MuonHitContainer
const
&
)
>
{
public:
public:
MuonProbeToLongMatcher
(
const
std
::
string
&
name
,
ISvcLocator
*
pSvcLocator
);
MuonProbeToLongMatcher
(
const
std
::
string
&
name
,
ISvcLocator
*
pSvcLocator
);
std
::
tuple
<
bool
,
LHCb
::
Particle
::
Selection
,
LHCb
::
Particle
::
Selection
>
std
::
tuple
<
bool
,
LHCb
::
Particle
::
Selection
,
LHCb
::
Particle
::
Selection
>
operator
()(
LHCb
::
Particle
::
Range
const
&
composites
,
LHCb
::
Particle
::
Range
const
&
longparts
)
const
override
;
operator
()(
LHCb
::
Particle
::
Range
const
&
composites
,
LHCb
::
Particle
::
Range
const
&
longparts
,
MuonHitContainer
const
&
)
const
override
;
private:
private:
void
addNeighbouringMuonIDs
(
std
::
vector
<
LHCb
::
LHCbID
>&
muonIDs
,
const
MuonHitContainer
&
muonHits
)
const
;
// properties are members of the class
// properties are members of the class
// need to specify owner, name, default value, doc
// need to specify owner, name, default value, doc
Gaudi
::
Property
<
double
>
m_thresMuon
{
this
,
"MinMuonFrac"
,
0.4
};
// overlap threshold of Muon stations
Gaudi
::
Property
<
double
>
m_thresMuon
{
this
,
"MinMuonFrac"
,
0.4
};
// overlap threshold of Muon stations
...
@@ -46,6 +50,8 @@ private:
...
@@ -46,6 +50,8 @@ private:
Gaudi
::
Property
<
bool
>
p_checkUT
{
this
,
"checkUT"
,
false
};
Gaudi
::
Property
<
bool
>
p_checkUT
{
this
,
"checkUT"
,
false
};
Gaudi
::
Property
<
bool
>
p_checkFT
{
this
,
"checkFT"
,
false
};
Gaudi
::
Property
<
bool
>
p_checkFT
{
this
,
"checkFT"
,
false
};
Gaudi
::
Property
<
bool
>
p_addNeighbouringMuonHits
{
this
,
"addNeighbouringMuonHits"
,
false
};
mutable
Gaudi
::
Accumulators
::
StatCounter
<
unsigned
int
>
m_all
{
this
,
"#Input composites"
};
// Number of JPsi candidates
mutable
Gaudi
::
Accumulators
::
StatCounter
<
unsigned
int
>
m_all
{
this
,
"#Input composites"
};
// Number of JPsi candidates
mutable
Gaudi
::
Accumulators
::
StatCounter
<
unsigned
int
>
m_matched
{
mutable
Gaudi
::
Accumulators
::
StatCounter
<
unsigned
int
>
m_matched
{
this
,
"#Matched composites"
};
// Number of JPsi candidates with a matched probe track
this
,
"#Matched composites"
};
// Number of JPsi candidates with a matched probe track
...
@@ -59,12 +65,36 @@ DECLARE_COMPONENT( MuonProbeToLongMatcher )
...
@@ -59,12 +65,36 @@ DECLARE_COMPONENT( MuonProbeToLongMatcher )
// Implementation
// Implementation
MuonProbeToLongMatcher
::
MuonProbeToLongMatcher
(
const
std
::
string
&
name
,
ISvcLocator
*
pSvcLocator
)
MuonProbeToLongMatcher
::
MuonProbeToLongMatcher
(
const
std
::
string
&
name
,
ISvcLocator
*
pSvcLocator
)
:
MultiTransformerFilter
(
name
,
pSvcLocator
,
{
KeyValue
{
"TwoBodyComposites"
,
""
},
KeyValue
{
"LongTracks"
,
""
}},
:
MultiTransformerFilter
(
{
KeyValue
{
"MatchedComposites"
,
""
},
KeyValue
{
"MatchedLongTracks"
,
""
}}
)
{}
name
,
pSvcLocator
,
{
KeyValue
{
"TwoBodyComposites"
,
""
},
KeyValue
{
"LongTracks"
,
""
},
KeyValue
{
"MuonHitContainer"
,
""
}},
{
KeyValue
{
"MatchedComposites"
,
""
},
KeyValue
{
"MatchedLongTracks"
,
""
}}
)
{}
void
MuonProbeToLongMatcher
::
addNeighbouringMuonIDs
(
std
::
vector
<
LHCb
::
LHCbID
>&
muonIDs
,
const
MuonHitContainer
&
muonHits
)
const
{
const
auto
muonIDsToLoop
=
muonIDs
;
for
(
auto
id
:
muonIDsToLoop
)
{
auto
tileID
=
id
.
muonID
();
const
auto
station
=
tileID
.
station
();
auto
hits
=
muonHits
.
hits
(
station
);
for
(
auto
const
&
hit
:
hits
)
{
// -- Add hits which are identical in X but neighbouring in Y, or vide versa
if
(
(
(
int
)
hit
.
tile
().
nX
()
==
(
int
)
tileID
.
nX
()
&&
std
::
abs
(
(
int
)
hit
.
tile
().
nY
()
-
(
int
)
tileID
.
nY
()
)
==
1
)
||
(
(
int
)
hit
.
tile
().
nY
()
==
(
int
)
tileID
.
nY
()
&&
std
::
abs
(
(
int
)
hit
.
tile
().
nX
()
-
(
int
)
tileID
.
nX
()
)
==
1
)
)
{
muonIDs
.
push_back
(
LHCb
::
LHCbID
(
hit
.
tile
()
)
);
}
}
}
std
::
sort
(
muonIDs
.
begin
(),
muonIDs
.
end
()
);
}
std
::
tuple
<
bool
,
LHCb
::
Particle
::
Selection
,
LHCb
::
Particle
::
Selection
>
MuonProbeToLongMatcher
::
std
::
tuple
<
bool
,
LHCb
::
Particle
::
Selection
,
LHCb
::
Particle
::
Selection
>
MuonProbeToLongMatcher
::
operator
()
// we use a mulitransformer to define multiple outputs
operator
()
// we use a mulitransformer to define multiple outputs
(
LHCb
::
Particle
::
Range
const
&
composites
,
LHCb
::
Particle
::
Range
const
&
longparts
)
const
{
(
LHCb
::
Particle
::
Range
const
&
composites
,
LHCb
::
Particle
::
Range
const
&
longparts
,
MuonHitContainer
const
&
muonhits
)
const
{
// initialize counter
// initialize counter
m_all
+=
composites
.
size
();
m_all
+=
composites
.
size
();
...
@@ -121,6 +151,7 @@ std::tuple<bool, LHCb::Particle::Selection, LHCb::Particle::Selection> MuonProbe
...
@@ -121,6 +151,7 @@ std::tuple<bool, LHCb::Particle::Selection, LHCb::Particle::Selection> MuonProbe
std
::
vector
<
LHCb
::
LHCbID
>
longmuonids
;
std
::
vector
<
LHCb
::
LHCbID
>
longmuonids
;
longmuonids
.
reserve
(
10
);
longmuonids
.
reserve
(
10
);
LHCb
::
HashIDs
::
lhcbIDs
(
longmuonpid
,
longmuonids
);
LHCb
::
HashIDs
::
lhcbIDs
(
longmuonpid
,
longmuonids
);
if
(
p_addNeighbouringMuonHits
)
addNeighbouringMuonIDs
(
longmuonids
,
muonhits
);
// evaluate the overlap
// evaluate the overlap
std
::
pair
<
double
,
double
>
fracVP
(
0.
,
0.
),
fracUT
(
0.
,
0.
),
fracFT
(
0.
,
0.
),
fracMuon
(
0.
,
0.
);
std
::
pair
<
double
,
double
>
fracVP
(
0.
,
0.
),
fracUT
(
0.
,
0.
),
fracFT
(
0.
,
0.
),
fracMuon
(
0.
,
0.
);
...
...
This diff is collapsed.
Click to expand it.
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