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
45e8d194
Commit
45e8d194
authored
1 year ago
by
Hangyi Wu
Browse files
Options
Downloads
Patches
Plain Diff
fixes MChits shift by one strip issue
parent
70e43eb7
No related branches found
No related tags found
No related merge requests found
Pipeline
#5998764
passed
1 year ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Detector/UT/include/Detector/UT/DeUTSensor.h
+10
-4
10 additions, 4 deletions
Detector/UT/include/Detector/UT/DeUTSensor.h
Detector/UT/src/DeUT.cpp
+5
-2
5 additions, 2 deletions
Detector/UT/src/DeUT.cpp
with
15 additions
and
6 deletions
Detector/UT/include/Detector/UT/DeUTSensor.h
+
10
−
4
View file @
45e8d194
...
...
@@ -34,6 +34,7 @@ namespace LHCb::Detector::UT {
unsigned
int
m_firstStrip
=
0u
;
unsigned
int
m_version
=
2
;
ChannelID
m_channelID
;
char
m_sensorType
;
float
m_uMaxLocal
=
0.0
;
float
m_uMinLocal
=
0.0
;
...
...
@@ -70,6 +71,7 @@ namespace LHCb::Detector::UT {
unsigned
int
id
()
const
{
return
this
->
access
()
->
m_id
;
};
void
setID
(
const
unsigned
int
id
)
{
this
->
access
()
->
m_id
=
id
;
}
float
pitch
()
const
{
return
this
->
access
()
->
m_pitch
;
}
char
sensorType
()
const
{
return
this
->
access
()
->
m_sensorType
;
}
unsigned
int
nStrip
()
const
{
return
this
->
access
()
->
m_nStrip
;
}
float
uMaxLocal
()
const
{
return
this
->
access
()
->
m_uMaxLocal
;
}
float
uMinLocal
()
const
{
return
this
->
access
()
->
m_uMinLocal
;
}
...
...
@@ -91,7 +93,9 @@ namespace LHCb::Detector::UT {
bool
contains
(
const
ChannelID
aChannel
)
const
{
return
(
aChannel
==
channelID
()
);
}
bool
isStrip
(
const
unsigned
int
strip
)
const
{
return
strip
<
nStrip
();
}
bool
isStrip
(
const
unsigned
int
strip
)
const
{
return
(
strip
>=
firstStrip
()
)
&&
strip
<
nStrip
()
+
firstStrip
();
}
LineTraj
<
double
>
trajectory
(
unsigned
int
strip
,
double
offset
)
const
{
const
double
arclen
=
(
(
xInverted
()
&&
getStripflip
()
)
?
(
nStrip
()
-
offset
-
strip
-
(
firstStrip
()
+
1
)
%
2
)
...
...
@@ -110,7 +114,7 @@ namespace LHCb::Detector::UT {
}
double
localU
(
const
unsigned
int
strip
,
const
double
offset
=
0.0
)
const
{
// strip to local
double
tStrip
=
strip
+
offset
;
double
tStrip
=
strip
+
offset
+
(
firstStrip
()
+
1
)
%
2
;
if
(
!
getStripflip
()
&&
xInverted
()
)
{
return
uMaxLocal
()
+
pitch
()
*
(
0.5
-
tStrip
);
}
else
{
...
...
@@ -120,8 +124,10 @@ namespace LHCb::Detector::UT {
unsigned
int
localUToStrip
(
const
double
u
)
const
{
// convert local u to a strip
unsigned
int
strip
=
(
(
!
getStripflip
()
&&
xInverted
()
)
?
static_cast
<
unsigned
int
>
(
floor
(
(
(
uMaxLocal
()
-
u
)
/
pitch
()
)
+
0.5
)
)
:
static_cast
<
unsigned
int
>
(
floor
(
(
(
u
-
uMinLocal
()
)
/
pitch
()
)
+
0.5
)
)
);
?
static_cast
<
unsigned
int
>
(
floor
(
(
(
uMaxLocal
()
-
u
)
/
pitch
()
)
+
0.5
)
)
-
(
firstStrip
()
+
1
)
%
2
:
static_cast
<
unsigned
int
>
(
floor
(
(
(
u
-
uMinLocal
()
)
/
pitch
()
)
+
0.5
)
)
)
-
(
firstStrip
()
+
1
)
%
2
;
return
isStrip
(
strip
)
?
strip
:
0u
;
}
bool
localInBondGap
(
float
v
,
float
tol
)
const
{
...
...
This diff is collapsed.
Click to expand it.
Detector/UT/src/DeUT.cpp
+
5
−
2
View file @
45e8d194
...
...
@@ -329,11 +329,14 @@ LHCb::Detector::UT::detail::DeUTSensorObject::DeUTSensorObject( const dd4hep::De
// get pitch size
auto
nameString
=
de
.
placement
().
volume
().
name
();
std
::
string
m_type
(
nameString
+
8
,
nameString
+
std
::
strlen
(
nameString
)
);
if
(
m_type
==
"Norm"
)
{
m_pitch
=
dd4hep
::
_toDouble
(
"UTSensorAPitch"
);
m_pitch
=
dd4hep
::
_toDouble
(
"UTSensorAPitch"
);
m_sensorType
=
'A'
;
}
else
{
m_pitch
=
dd4hep
::
_toDouble
(
"UTSensorBCDPitch"
);
if
(
m_type
==
"Dual"
)
m_sensorType
=
'B'
;
if
(
m_type
==
"Quad"
)
m_sensorType
=
'C'
;
if
(
m_type
==
"Hole"
)
m_sensorType
=
'D'
;
}
m_uMaxLocal
=
0.5
f
*
(
m_pitch
*
m_nStrip
);
...
...
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