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
Merge requests
!2740
Resolve
#345
"Add loki mtdocachi2 functor to thor"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve
#345
"Add loki mtdocachi2 functor to thor"
345-add-loki-mtdocachi2-functor-to-thor
into
master
Overview
50
Commits
7
Pipelines
13
Changes
4
Merged
Emily Kaiyin Jiang
requested to merge
345-add-loki-mtdocachi2-functor-to-thor
into
master
3 years ago
Overview
50
Commits
7
Pipelines
13
Changes
4
Expand
Closes
#345 (closed)
. Requires
!2656 (closed)
Edited
2 years ago
by
Emily Kaiyin Jiang
0
0
Merge request reports
Compare
master
version 11
31457860
2 years ago
version 10
abbab744
2 years ago
version 9
20ef6b8c
2 years ago
version 8
3d2bf2ba
3 years ago
version 7
e5c20e46
3 years ago
version 6
5f0731cb
3 years ago
version 5
50f95519
3 years ago
version 4
f699243a
3 years ago
version 3
c14189f3
3 years ago
version 2
c81344b1
3 years ago
version 1
33787341
3 years ago
master (base)
and
latest version
latest version
0749ac28
7 commits,
2 years ago
version 11
31457860
6 commits,
2 years ago
version 10
abbab744
5 commits,
2 years ago
version 9
20ef6b8c
4 commits,
2 years ago
version 8
3d2bf2ba
9 commits,
3 years ago
version 7
e5c20e46
8 commits,
3 years ago
version 6
5f0731cb
6 commits,
3 years ago
version 5
50f95519
5 commits,
3 years ago
version 4
f699243a
4 commits,
3 years ago
version 3
c14189f3
3 commits,
3 years ago
version 2
c81344b1
1 commit,
3 years ago
version 1
33787341
1 commit,
3 years ago
4 files
+
110
−
58
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
Phys/FunctorCore/include/Functors/Composite.h
+
49
−
8
Options
/*****************************************************************************\
* (c) Copyright 2019-20 CERN for the benefit of the LHCb Collaboration *
* *
* This software is distributed under the terms of the GNU General Public *
* Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". *
* *
* In applying this licence, CERN does not waive the privileges and immunities *
* granted to it by virtue of its status as an Intergovernmental Organization *
* or submit itself to any jurisdiction. *
* (c) Copyright 2019-20 CERN for the benefit of the LHCb Collaboration *
* *
* This software is distributed under the terms of the GNU General Public *
* Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". *
* *
* In applying this licence, CERN does not waive the privileges and immunities *
* granted to it by virtue of its status as an Intergovernmental Organization *
* or submit itself to any jurisdiction. *
\*****************************************************************************/
#pragma once
#include
"Event/FlavourTag.h"
@@ -20,6 +20,10 @@
#include
"SelKernel/Utilities.h"
#include
"SelKernel/VertexRelation.h"
#include
"Event/Particle.h"
#include
"Event/Particle_v2.h"
#include
"Functors/TrackLike.h"
/** @file Composite.h
* @brief Definitions of functors for composite-particle-like objects.
*/
@@ -47,6 +51,43 @@ namespace Functors::detail {
}
// namespace Functors::detail
namespace
Functors
::
Composite
{
/**MTDOCACHI2**/
template
<
int
N
>
struct
MotherTrajectoryDistanceOfClosestApproachChi2
:
public
Function
{
static_assert
(
N
>=
1
,
"Indices start from 1 for LoKi compatibility."
);
MotherTrajectoryDistanceOfClosestApproachChi2
(
std
::
integral_constant
<
int
,
N
>
=
{}
)
{}
void
bind
(
TopLevelInfo
&
top_level
)
{
m_dist_calc
.
emplace
(
top_level
.
algorithm
()
);
}
template
<
typename
VContainer
,
typename
Particle
>
auto
operator
()(
VContainer
const
&
vertices
,
Particle
const
&
composite
)
const
{
auto
const
bestPV
=
Sel
::
getBestPV
(
composite
,
vertices
);
using
Sel
::
Utils
::
decayProducts
;
auto
const
&
children
=
decayProducts
(
composite
);
auto
const
&
pN
=
children
[
N
-
1
];
auto
const
&
pN_state
=
Sel
::
stateVectorFromComposite
(
pN
);
using
Sel
::
Utils
::
posCovMatrix
;
using
Sel
::
Utils
::
referencePoint
;
using
Sel
::
Utils
::
threeMomCovMatrix
;
using
Sel
::
Utils
::
threeMomentum
;
using
Sel
::
Utils
::
threeMomPosCovMatrix
;
auto
const
&
composite_state
=
Sel
::
stateVectorComputations
(
endVertexPos
(
bestPV
),
threeMomentum
(
composite
),
threeMomCovMatrix
(
composite
),
posCovMatrix
(
bestPV
),
threeMomPosCovMatrix
(
composite
)
);
const
auto
&
dist_calc
=
*
m_dist_calc
;
return
dist_calc
.
stateDOCAChi2
(
composite_state
,
pN_state
);
}
private
:
std
::
optional
<
Functors
::
detail
::
DefaultDistanceCalculator_t
>
m_dist_calc
;
};
/** @brief Flight distance chi2 to the given vertex.
*
* Note that if the given data object contains a vertex link then that will
Loading