Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Computing
cbmroot
Commits
b9a9f2a0
Commit
b9a9f2a0
authored
1 year ago
by
Dominik Smith
Browse files
Options
Downloads
Patches
Plain Diff
Small improvements to cbm::algo::tof::Clusterizer.
parent
1184b1f3
No related branches found
No related tags found
1 merge request
!1496
Small improvements to cbm::algo::tof::Clusterizer.
Pipeline
#25634
passed
1 year ago
Stage: build
Stage: package
Stage: verify
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
algo/detectors/tof/Clusterizer.cxx
+9
-10
9 additions, 10 deletions
algo/detectors/tof/Clusterizer.cxx
with
9 additions
and
10 deletions
algo/detectors/tof/Clusterizer.cxx
+
9
−
10
View file @
b9a9f2a0
...
...
@@ -54,10 +54,7 @@ namespace cbm::algo::tof
// Output variables
resultType
result
;
std
::
vector
<
Hit
>&
clustersOut
=
std
::
get
<
0
>
(
result
);
// Hits
std
::
vector
<
size_t
>&
chanSizes
=
std
::
get
<
1
>
(
result
);
// nClusters per channel
std
::
vector
<
u32
>&
chanAddresses
=
std
::
get
<
2
>
(
result
);
// channel addresses
std
::
vector
<
int32_t
>&
digiIndRef
=
std
::
get
<
3
>
(
result
);
// digi indices of clusters
auto
&
[
clustersOut
,
chanSizes
,
chanAddresses
,
digiIndRef
]
=
result
;
// Reference cell of a cluster
TofCell
*
cell
=
nullptr
;
...
...
@@ -81,8 +78,11 @@ namespace cbm::algo::tof
chanSizes
.
push_back
(
clustersOut
.
size
());
chanAddresses
.
push_back
(
fParams
.
fChanPar
[
chan
].
address
);
if
(
fParams
.
fDeadStrips
&
(
1
<<
chan
))
{
continue
;
}
// skip over dead channels
// skip over dead channels
if
(
fParams
.
fDeadStrips
&
(
1
<<
chan
))
{
chanSizes
.
back
()
=
0
;
continue
;
}
inputType
&
storDigi
=
input
[
chan
];
auto
digiIt
=
storDigi
.
begin
();
...
...
@@ -102,7 +102,7 @@ namespace cbm::algo::tof
// use local coordinates, (0,0,0) is in the center of counter ?
ROOT
::
Math
::
XYZVector
pos
(((
-
(
double
)
numChan
/
2.
+
(
double
)
chan
)
+
0.5
)
*
cell
->
sizeX
,
0.
,
0.
);
double
timeDif
=
xDigiA
->
GetTime
()
-
xDigiB
->
GetTime
();
const
double
timeDif
=
xDigiA
->
GetTime
()
-
xDigiB
->
GetTime
();
pos
.
SetY
(
fParams
.
fSigVel
*
timeDif
*
0.5
);
// A is the top side, B is the bottom side
if
(
xDigiA
->
GetSide
()
!=
1.
)
{
pos
.
SetY
(
-
pos
.
Y
());
}
// B is the bottom side, A is the top side
...
...
@@ -132,10 +132,10 @@ namespace cbm::algo::tof
continue
;
}
// The "Strip" time is the mean time between each end
double
time
=
0.5
*
(
xDigiA
->
GetTime
()
+
xDigiB
->
GetTime
());
const
double
time
=
0.5
*
(
xDigiA
->
GetTime
()
+
xDigiB
->
GetTime
());
// Weight is the total charge => sum of both ends ToT
double
totSum
=
xDigiA
->
GetTot
()
+
xDigiB
->
GetTot
();
const
double
totSum
=
xDigiA
->
GetTot
()
+
xDigiB
->
GetTot
();
// Now check if a hit/cluster is already started
if
(
0
<
cluster
.
numChan
())
{
...
...
@@ -154,7 +154,6 @@ namespace cbm::algo::tof
cluster
.
add
(
pos
,
time
,
totSum
,
totSum
);
digiIndRef
.
push_back
(
digiIt
->
second
);
digiIndRef
.
push_back
(
std
::
next
(
digiIt
)
->
second
);
digiIt
+=
2
;
lastChan
=
chan
;
...
...
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