Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LHCb
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
LHCb
Commits
3dfcb094
Commit
3dfcb094
authored
1 year ago
by
Christopher Rob Jones
Committed by
Christopher Rob Jones
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
RichSmartIDMCUtils: Use boost small vector
parent
863f2f4c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!4371
DecodedDataFromMCRichHits: Improvements to hit time handling
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Rich/RichFutureMCUtils/include/RichFutureMCUtils/RichSmartIDMCUtils.h
+16
-7
16 additions, 7 deletions
...ureMCUtils/include/RichFutureMCUtils/RichSmartIDMCUtils.h
Rich/RichFutureMCUtils/src/lib/RichSmartIDMCUtils.cpp
+3
-4
3 additions, 4 deletions
Rich/RichFutureMCUtils/src/lib/RichSmartIDMCUtils.cpp
with
19 additions
and
11 deletions
Rich/RichFutureMCUtils/include/RichFutureMCUtils/RichSmartIDMCUtils.h
+
16
−
7
View file @
3dfcb094
...
...
@@ -11,9 +11,6 @@
#pragma once
// STL
#include
<vector>
// Kernel
#include
"Kernel/RichSmartID.h"
...
...
@@ -28,11 +25,23 @@
#include
"RichUtils/RichMap.h"
#include
"RichUtils/RichPixelCluster.h"
// boost
#include
<boost/container/small_vector.hpp>
// STL
#include
<vector>
namespace
Rich
::
Future
::
MC
::
Relations
{
/// Helper class for RichSmartID MC Histories
class
SmartIDUtils
{
public:
// types
/// Container of history codes
using
HistoryCodes
=
boost
::
container
::
small_vector
<
LHCb
::
MCRichDigitHistoryCode
,
5
>
;
public:
/// Constructor from a summaries object
SmartIDUtils
(
const
LHCb
::
MCRichDigitSummarys
&
histories
,
const
bool
EnableDetDescMCDD4HepFix
=
true
);
...
...
@@ -45,15 +54,15 @@ namespace Rich::Future::MC::Relations {
LHCb
::
MCParticle
::
ConstVector
mcParticles
(
const
LHCb
::
RichSmartID
id
)
const
;
/// Returns a vector of MCRichDigitHistoryCodes associated to a given cluster
std
::
vector
<
LHCb
::
MCRichDigit
HistoryCode
>
mcDigitHistoryCodes
(
const
Rich
::
PDPixelCluster
&
cluster
)
const
;
HistoryCode
s
mcDigitHistoryCodes
(
const
Rich
::
PDPixelCluster
&
cluster
)
const
;
/// Returns a vector of MCRichDigitHistoryCodes associated to a given RichSmartID
std
::
vector
<
LHCb
::
MCRichDigit
HistoryCode
>
mcDigitHistoryCodes
(
const
LHCb
::
RichSmartID
id
)
const
;
HistoryCode
s
mcDigitHistoryCodes
(
const
LHCb
::
RichSmartID
id
)
const
;
/// Is the RichSmartID due to true MC Cherenkov radiation from given radiator medium ?
const
LHCb
::
MCParticle
*
trueCherenkovRadiation
(
const
LHCb
::
RichSmartID
id
,
const
Rich
::
RadiatorType
rad
)
const
;
/** Is any of the RichSmartIDs in
n
the cluster due to true MC Cherenkov radiation
/** Is any of the RichSmartIDs in the cluster due to true MC Cherenkov radiation
* from given radiator medium */
const
LHCb
::
MCParticle
*
trueCherenkovRadiation
(
const
Rich
::
PDPixelCluster
&
cluster
,
const
Rich
::
RadiatorType
rad
)
const
;
...
...
@@ -75,7 +84,7 @@ namespace Rich::Future::MC::Relations {
private
:
/// Type for vector of pointers to MCRichDigitSummaries
using
DigitSummaries
=
std
::
vector
<
const
LHCb
::
MCRichDigitSummary
*>
;
using
DigitSummaries
=
boost
::
container
::
small_
vector
<
const
LHCb
::
MCRichDigitSummary
*
,
5
>
;
/// Type for map between RichSmartIDs and MCRichDigitSummary objects
using
SummaryMap
=
Rich
::
Map
<
const
LHCb
::
RichSmartID
,
DigitSummaries
>
;
...
...
This diff is collapsed.
Click to expand it.
Rich/RichFutureMCUtils/src/lib/RichSmartIDMCUtils.cpp
+
3
−
4
View file @
3dfcb094
...
...
@@ -42,8 +42,7 @@ SmartIDUtils::SmartIDUtils( const LHCb::MCRichDigitSummarys& histories, const bo
}
}
std
::
vector
<
LHCb
::
MCRichDigitHistoryCode
>
SmartIDUtils
::
mcDigitHistoryCodes
(
const
Rich
::
PDPixelCluster
&
cluster
)
const
{
SmartIDUtils
::
HistoryCodes
SmartIDUtils
::
mcDigitHistoryCodes
(
const
Rich
::
PDPixelCluster
&
cluster
)
const
{
// primary ID
auto
codes
=
mcDigitHistoryCodes
(
cluster
.
primaryID
()
);
// now secondary IDs
...
...
@@ -57,8 +56,8 @@ SmartIDUtils::mcDigitHistoryCodes( const Rich::PDPixelCluster& cluster ) const {
return
codes
;
}
std
::
vector
<
LHCb
::
MCRichDigit
HistoryCode
>
SmartIDUtils
::
mcDigitHistoryCodes
(
const
LHCb
::
RichSmartID
id
)
const
{
std
::
vector
<
LHCb
::
MCRichDigit
HistoryCode
>
codes
;
SmartIDUtils
::
HistoryCode
s
SmartIDUtils
::
mcDigitHistoryCodes
(
const
LHCb
::
RichSmartID
id
)
const
{
HistoryCode
s
codes
;
// Does this hit have an entry in the pixel summary map
const
auto
iEn
=
m_sumMap
.
find
(
id
.
channelDataOnly
()
);
if
(
iEn
!=
m_sumMap
.
end
()
)
{
...
...
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