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
b2a0e4a7
Commit
b2a0e4a7
authored
2 years ago
by
Pierre-Alain Loizeau
Browse files
Options
Downloads
Patches
Plain Diff
[Evt Builder] In AlgoBuildRawEvent, add STS support in layers nb cut
parent
92c7fd98
No related branches found
No related tags found
1 merge request
!816
Changes to AlgoBuildRawEvent from mCBM march 2022 runs
Pipeline
#17289
passed
2 years ago
Stage: build
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
reco/eventbuilder/digis/CbmAlgoBuildRawEvents.cxx
+44
-5
44 additions, 5 deletions
reco/eventbuilder/digis/CbmAlgoBuildRawEvents.cxx
with
44 additions
and
5 deletions
reco/eventbuilder/digis/CbmAlgoBuildRawEvents.cxx
+
44
−
5
View file @
b2a0e4a7
...
...
@@ -617,9 +617,49 @@ Bool_t CbmAlgoBuildRawEvents::CheckTriggerConditions(CbmEvent* event, RawEventBu
if
(
0
<
det
.
fuTriggerMinLayers
)
{
switch
(
det
.
detId
)
{
case
ECbmModuleId
::
kSts
:
{
LOG
(
fatal
)
<<
"CbmAlgoBuildRawEvents::CheckDataAvailable => Fired layers check not implemented yet for "
<<
det
.
sName
;
return
kFALSE
;
/// check for requested number of different stations
/// loop over sts digis and check for
std
::
set
<
uint32_t
>
setStations
;
// Use set instead of vector as search by value later
std
::
map
<
uint32_t
,
int
>
mModules
;
for
(
int
idigi
=
0
;
idigi
<
iNbDigis
;
++
idigi
)
{
uint
idx
=
event
->
GetIndex
(
det
.
dataType
,
idigi
);
const
CbmStsDigi
*
pDigi
=
GetDigi
<
CbmStsDigi
>
(
idx
);
if
(
nullptr
==
pDigi
)
continue
;
int
iAddr
=
pDigi
->
GetAddress
();
/// Module full address
int
iModuleAddr
=
CbmStsAddress
::
GetMotherAddress
(
iAddr
,
EStsElementLevel
::
kStsModule
);
/// Station index: station = unit in the mCBM addresses ?!?
int
iStationAddr
=
CbmStsAddress
::
GetElementId
(
iAddr
,
EStsElementLevel
::
kStsUnit
);
//int iStationAddr = CbmStsAddress::GetElementId(iAddr, EStsElementLevel::kStsUnit) / 2;
std
::
map
<
uint32_t
,
int
>::
iterator
itModule
=
mModules
.
find
(
iModuleAddr
);
if
(
itModule
==
mModules
.
end
())
{
// LOG(info) << Form("Found new module 0x%08x, side %u", iModuleAddr,
// static_cast<uint32_t>(pDigi->GetChannel() / 1024));
mModules
[
iModuleAddr
]
=
static_cast
<
int32_t
>
(
pDigi
->
GetChannel
()
/
1024
);
// extend map
}
else
{
// LOG(info) << Form("Check side %u of module 0x%08x: %d ?",
// static_cast<int32_t>(pDigi->GetChannel() / 1024),
// iModuleAddr, itModule->second);
if
(
static_cast
<
int32_t
>
(
pDigi
->
GetChannel
()
/
1024
)
==
(
1
-
itModule
->
second
))
{
/// Found other side => non-zero cluster chance, insert into stations set
auto
itStation
=
setStations
.
find
(
iStationAddr
);
if
(
itStation
==
setStations
.
end
())
{
// LOG(info) << Form("Add station 0x%08x ", iStationAddr);
setStations
.
insert
(
iStationAddr
);
}
}
}
}
// LOG(info) << "Found " << setStations.size() << " Sts stations, " << " in " << iNbDigis << " Sts digis";
if
(
setStations
.
size
()
<
det
.
fuTriggerMinLayers
)
{
LOG
(
debug2
)
<<
"Event does not have enough layers fired: "
<<
setStations
.
size
()
<<
" vs "
<<
det
.
fuTriggerMinLayers
<<
" for "
<<
det
.
sName
;
return
kFALSE
;
}
break
;
}
case
ECbmModuleId
::
kMuch
:
{
...
...
@@ -640,7 +680,6 @@ Bool_t CbmAlgoBuildRawEvents::CheckTriggerConditions(CbmEvent* event, RawEventBu
/// loop over tof digis and count different RPCs
std
::
set
<
uint32_t
>
setRpcs
;
// Use set instead of vector as search by value later
std
::
map
<
uint32_t
,
int
>
mStrips
;
std
::
map
<
uint32_t
,
int
>::
iterator
it
;
for
(
int
idigi
=
0
;
idigi
<
iNbDigis
;
++
idigi
)
{
uint
idx
=
event
->
GetIndex
(
det
.
dataType
,
idigi
);
...
...
@@ -659,7 +698,7 @@ Bool_t CbmAlgoBuildRawEvents::CheckTriggerConditions(CbmEvent* event, RawEventBu
else
{
// LOG(info) << Form("Check side %u of strip 0x%08x: %d ?", pDigi->GetSide(), iStripAddr, itStrip->second);
if
((
int
)
pDigi
->
GetSide
()
==
(
1
-
itStrip
->
second
))
{
/// Found other end => full strip, insert into counter
vector
/// Found other end => full strip, insert into counter
set
auto
itRpc
=
setRpcs
.
find
(
iRpcAddr
);
if
(
itRpc
==
setRpcs
.
end
())
{
// LOG(info) << Form("Add counter 0x%08x ", iRpcAddr);
...
...
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