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
d0197b5f
Commit
d0197b5f
authored
1 year ago
by
Axel Puntke
Committed by
Florian Uhlig
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
TRD Incomplete cluster recognition
parent
681bc153
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1246
TRD Incomplete cluster recognition
Pipeline
#23891
passed
1 year ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
reco/detectors/trd/CbmTrdModuleRecR.cxx
+53
-1
53 additions, 1 deletion
reco/detectors/trd/CbmTrdModuleRecR.cxx
reco/detectors/trd/CbmTrdModuleRecR.h
+1
-0
1 addition, 0 deletions
reco/detectors/trd/CbmTrdModuleRecR.h
with
54 additions
and
1 deletion
reco/detectors/trd/CbmTrdModuleRecR.cxx
+
53
−
1
View file @
d0197b5f
...
...
@@ -440,7 +440,7 @@ void CbmTrdModuleRecR::addClusters(std::deque<std::pair<Int_t, const CbmTrdDigi*
Bool_t
CbmTrdModuleRecR
::
MakeHits
()
{
return
kTRUE
;
}
//_______________________________________________________________________________
CbmTrdHit
*
CbmTrdModuleRecR
::
MakeHit
(
Int_t
clusterId
,
const
CbmTrdCluster
*
/*
cluster
*/
,
CbmTrdHit
*
CbmTrdModuleRecR
::
MakeHit
(
Int_t
clusterId
,
const
CbmTrdCluster
*
cluster
,
std
::
vector
<
const
CbmTrdDigi
*>*
digis
)
{
...
...
@@ -541,6 +541,9 @@ CbmTrdHit* CbmTrdModuleRecR::MakeHit(Int_t clusterId, const CbmTrdCluster* /*clu
cluster_pad_dposV
[
1
]
=
sqrt
(
fDigiPar
->
GetPadSizeY
(
1
));
}
// Set charge of incomplete clusters (missing NTs) to -1 (not deleting them because they are still relevant for tracking)
if
(
!
IsClusterComplete
(
cluster
))
totalCharge
=
-
1.0
;
Int_t
nofHits
=
fHits
->
GetEntriesFast
();
// return new ((*fHits)[nofHits]) CbmTrdHit(fModAddress, global,
...
...
@@ -579,4 +582,53 @@ Double_t CbmTrdModuleRecR::GetSpaceResolution(Double_t val)
return
selval
;
}
bool
CbmTrdModuleRecR
::
IsClusterComplete
(
const
CbmTrdCluster
*
cluster
)
{
uint32_t
colMin
=
fDigiPar
->
GetNofColumns
();
uint32_t
rowMin
=
fDigiPar
->
GetNofRows
();
for
(
int
i
=
0
;
i
<
cluster
->
GetNofDigis
();
++
i
)
{
const
CbmTrdDigi
*
digi
=
CbmDigiManager
::
Instance
()
->
Get
<
CbmTrdDigi
>
(
cluster
->
GetDigi
(
i
));
int
digiCol
=
fDigiPar
->
GetPadColumn
(
digi
->
GetAddressChannel
());
int
digiRow
=
fDigiPar
->
GetPadRow
(
digi
->
GetAddressChannel
());
if
(
digiCol
<
colMin
)
colMin
=
digiCol
;
if
(
digiRow
<
rowMin
)
rowMin
=
digiRow
;
}
const
UShort_t
nCols
=
cluster
->
GetNCols
();
const
UShort_t
nRows
=
cluster
->
GetNRows
();
CbmTrdDigi
*
digiMap
[
nRows
][
nCols
];
//create array on stack for optimal performance
memset
(
digiMap
,
0
,
sizeof
(
CbmTrdDigi
*
)
*
nCols
*
nRows
);
//init with nullpointers
for
(
int
i
=
0
;
i
<
cluster
->
GetNofDigis
();
++
i
)
{
const
CbmTrdDigi
*
digi
=
CbmDigiManager
::
Instance
()
->
Get
<
CbmTrdDigi
>
(
cluster
->
GetDigi
(
i
));
int
digiCol
=
fDigiPar
->
GetPadColumn
(
digi
->
GetAddressChannel
());
int
digiRow
=
fDigiPar
->
GetPadRow
(
digi
->
GetAddressChannel
());
if
(
digiMap
[
digiRow
-
rowMin
][
digiCol
-
colMin
])
return
false
;
// To be investigated why this sometimes happens (Redmin Issue 2914)
digiMap
[
digiRow
-
rowMin
][
digiCol
-
colMin
]
=
const_cast
<
CbmTrdDigi
*>
(
digi
);
}
// check if each row of the cluster starts and ends with a kNeighbor digi
for
(
int
iRow
=
0
;
iRow
<
nRows
;
++
iRow
)
{
int
colStart
=
0
;
while
(
digiMap
[
iRow
][
colStart
]
==
nullptr
)
++
colStart
;
if
(
digiMap
[
iRow
][
colStart
]
->
GetTriggerType
()
!=
static_cast
<
Int_t
>
(
CbmTrdDigi
::
eTriggerType
::
kNeighbor
))
return
false
;
int
colStop
=
nCols
-
1
;
while
(
digiMap
[
iRow
][
colStop
]
==
nullptr
)
--
colStop
;
if
(
digiMap
[
iRow
][
colStop
]
->
GetTriggerType
()
!=
static_cast
<
Int_t
>
(
CbmTrdDigi
::
eTriggerType
::
kNeighbor
))
return
false
;
}
return
true
;
}
ClassImp
(
CbmTrdModuleRecR
)
This diff is collapsed.
Click to expand it.
reco/detectors/trd/CbmTrdModuleRecR.h
+
1
−
0
View file @
d0197b5f
...
...
@@ -41,6 +41,7 @@ public:
Int_t
GetOverThreshold
()
const
{
return
fDigiCounter
;
}
Double_t
GetSpaceResolution
(
Double_t
val
=
3.0
);
bool
IsClusterComplete
(
const
CbmTrdCluster
*
cluster
);
/**
* \brief Steering routine for building hits
**/
...
...
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