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
6e641866
Commit
6e641866
authored
1 year ago
by
Dominik Smith
Committed by
Felix Weiglhofer
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
cbm::algo::tof::Clusterizer: More cleanup.
parent
70db782c
No related branches found
No related tags found
1 merge request
!1391
Online-capable TOF hitfinder.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
algo/detectors/tof/Clusterizer.cxx
+18
-26
18 additions, 26 deletions
algo/detectors/tof/Clusterizer.cxx
with
18 additions
and
26 deletions
algo/detectors/tof/Clusterizer.cxx
+
18
−
26
View file @
6e641866
...
...
@@ -229,12 +229,7 @@ namespace cbm::algo::tof
cluster
.
reset
();
}
}
else
{
// first fired strip in this RPC
cluster
.
reset
();
}
cluster
.
add
(
pos
,
time
,
totSum
,
totSum
,
storDigi
[
0
].
second
,
storDigi
[
1
].
second
);
storDigi
.
erase
(
storDigi
.
begin
());
storDigi
.
erase
(
storDigi
.
begin
());
...
...
@@ -264,60 +259,57 @@ namespace cbm::algo::tof
//D.Smith 25.8.23: Why are "C" digis (position "2") not considered here?
//const int32_t iDetId = CbmTofAddress::GetUniqueAddress(iSm, iRpc, 0, 0, iSmType);
size_t
numChan
=
fParams
.
fChanPar
.
size
();
int32_t
chan
=
lastChan
+
1
;
inputType
&
storDigi
=
input
[
chan
];
size_t
numChan
=
fParams
.
fChanPar
.
size
();
int32_t
chan
=
lastChan
+
1
;
while
(
fParams
.
fDeadStrips
&
(
1
<<
chan
))
{
chan
++
;
if
(
chan
>=
numChan
)
{
return
false
;
}
}
if
(
chan
==
numChan
)
{
return
false
;
}
if
(
0
==
storDigi
.
size
())
{
return
false
;
}
bool
addedHit
=
false
;
for
(
size_t
i1
=
0
;
i1
<
storDigi
.
size
()
-
1
;
i1
++
)
{
if
(
addedHit
)
{
break
;
}
inputType
&
storDigi
=
input
[
chan
];
if
(
0
==
storDigi
.
size
())
{
return
false
;
}
size_t
i2
=
i1
;
while
(
!
addedHit
&&
++
i2
<
storDigi
.
size
())
{
for
(
auto
i1
=
storDigi
.
begin
();
i1
<
storDigi
.
end
()
-
1
;
i1
++
)
{
const
CbmTofDigi
*
xDigiA
=
storDigi
[
i1
].
first
;
const
CbmTofDigi
*
xDigiB
=
storDigi
[
i2
].
first
;
auto
i2
=
i1
;
//D.Smith 7.9.23: Do we really need to loop through all remaining digis?
//Maybe break at i2 == i1 + 2 ?
while
(
++
i2
<
storDigi
.
end
())
{
const
CbmTofDigi
*
xDigiA
=
i1
->
first
;
const
CbmTofDigi
*
xDigiB
=
i2
->
first
;
if
(
xDigiA
->
GetSide
()
==
xDigiB
->
GetSide
())
{
continue
;
}
const
double
time
=
0.5
*
(
xDigiA
->
GetTime
()
+
xDigiB
->
GetTime
());
if
(
std
::
abs
(
time
-
cluster
.
weightedTime
/
cluster
.
weightsSum
)
>=
fParams
.
fdMaxTimeDist
)
{
continue
;
}
TofCell
*
cell
=
&
fParams
.
fChanPar
[
chan
].
cell
;
const
double
timeDif
=
xDigiA
->
GetTime
()
-
xDigiB
->
GetTime
();
double
posY
=
fParams
.
fSigVel
*
timeDif
*
0.5
;
if
(
1
!=
xDigiA
->
GetSide
())
{
posY
*=
-
1.
;
}
if
(
std
::
abs
(
posY
-
cluster
.
weightedPos
.
Y
()
/
cluster
.
weightsSum
)
>=
fParams
.
fdMaxSpaceDist
)
{
continue
;
}
// append digi pair to current cluster
const
double
posX
=
((
-
(
double
)
numChan
/
2.
+
chan
)
+
0.5
)
*
cell
->
sizeX
;
const
double
posX
=
((
-
(
double
)
numChan
/
2.
+
chan
)
+
0.5
)
*
fParams
.
fChanPar
[
chan
].
cell
.
sizeX
;
const
double
totSum
=
xDigiA
->
GetTot
()
+
xDigiB
->
GetTot
();
ROOT
::
Math
::
XYZVector
pos
(
posX
,
posY
,
0.
);
cluster
.
add
(
pos
,
time
,
totSum
,
totSum
,
storDigi
[
i1
].
second
,
storDigi
[
i2
].
second
);
cluster
.
add
(
pos
,
time
,
totSum
,
totSum
,
i1
->
second
,
i2
->
second
);
// remove selected digis from pool
storDigi
.
erase
(
storDigi
.
begin
()
+
i2
);
storDigi
.
erase
(
storDigi
.
begin
()
+
i1
);
storDigi
.
erase
(
i2
);
storDigi
.
erase
(
i1
);
if
(
AddNextChan
(
input
,
chan
,
cluster
,
clustersOut
))
{
return
true
;
// signal hit was already added
}
addedHit
=
true
;
i1
=
storDigi
.
end
();
// jump to end of outer loop
break
;
}
}
TofCell
cell
=
fParams
.
fChanPar
[
0
].
cell
;
//D.Smith 17.8.23: This is equivalent to using iDetId, see below
//D.Smith 10.8.23: Why pass iDetId here and not iChId?
cluster
.
normalize
(
fParams
.
fTimeRes
);
...
...
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