Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Detector
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Detector
Commits
8967f430
Commit
8967f430
authored
1 year ago
by
Louis Henry
Browse files
Options
Downloads
Patches
Plain Diff
Enforce centre-to-edge convention on the global indices of mat and sipm
parent
5a9f58e0
No related branches found
No related tags found
1 merge request
!423
Enforce centre-to-edge convention on the global indices of FT mat and sipm
Pipeline
#5985184
passed
1 year ago
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Detector/FT/include/Detector/FT/FTChannelID.h
+8
-3
8 additions, 3 deletions
Detector/FT/include/Detector/FT/FTChannelID.h
with
8 additions
and
3 deletions
Detector/FT/include/Detector/FT/FTChannelID.h
+
8
−
3
View file @
8967f430
...
...
@@ -300,11 +300,14 @@ namespace LHCb::Detector {
/// Retrieve global mat index [0..1023]
[[
nodiscard
]]
constexpr
unsigned
int
globalMatIdx
()
const
{
return
FTConstants
::
nMats
*
globalModuleIdx
()
+
to_unsigned
(
mat
()
);
return
FTConstants
::
nMats
*
globalModuleIdx
()
+
localMatIdx
(
);
}
/// Retrieve global sipm index [4095]
[[
nodiscard
]]
constexpr
unsigned
int
globalSipmIdx
()
const
{
return
FTConstants
::
nSiPM
*
globalMatIdx
()
+
sipm
();
}
/// Center-to-edge convention
[[
nodiscard
]]
constexpr
unsigned
int
globalSipmIdx
()
const
{
return
FTConstants
::
nSiPM
*
globalMatIdx
()
+
localSiPMIdx
();
}
/// Local idx functions. Starting at 0, centre-to-edge, contiguous
/// Returns the local index of the module ordered from left to right
...
...
@@ -317,15 +320,17 @@ namespace LHCb::Detector {
return
nModulesInQuarter
()
*
(
FTConstants
::
nQuarters
*
to_unsigned
(
layer
()
)
+
to_unsigned
(
quarter
()
)
)
+
localModuleIdx
();
}
// Center-to-edge convention
[[
nodiscard
]]
constexpr
unsigned
int
localChannelIdx
()
const
{
return
(
readoutFromCtoE
()
)
?
channel
()
:
FTConstants
::
nChannels
-
1
-
channel
();
}
// Center-to-edge convention
[[
nodiscard
]]
constexpr
unsigned
int
localSiPMIdx
()
const
{
return
(
readoutFromCtoE
()
)
?
sipm
()
:
FTConstants
::
nSiPM
-
1
-
sipm
();
}
// Center-to-edge convention
[[
nodiscard
]]
constexpr
unsigned
int
localMatIdx
()
const
{
return
(
readoutFromCtoE
()
)
?
to_unsigned
(
mat
()
)
:
FTConstants
::
nMats
-
1
-
to_unsigned
(
mat
()
);
}
...
...
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