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
0d93390f
Commit
0d93390f
authored
3 years ago
by
Alexandru Bercuci
Committed by
Florian Uhlig
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
rename ModuleRecT to ModuleRec2D and fix hit counter for EbyE and TB
parent
22d7b90a
No related branches found
No related tags found
1 merge request
!728
Add Trd2d to the data reconstruction
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
reco/detectors/trd/CbmTrdHitProducer.cxx
+22
-16
22 additions, 16 deletions
reco/detectors/trd/CbmTrdHitProducer.cxx
reco/detectors/trd/CbmTrdHitProducer.h
+8
-5
8 additions, 5 deletions
reco/detectors/trd/CbmTrdHitProducer.h
with
30 additions
and
21 deletions
reco/detectors/trd/CbmTrdHitProducer.cxx
+
22
−
16
View file @
0d93390f
...
...
@@ -12,8 +12,8 @@
#include
"CbmTrdGeoHandler.h"
#include
"CbmTrdHit.h"
#include
"CbmTrdModuleRec.h"
#include
"CbmTrdModuleRec2D.h"
#include
"CbmTrdModuleRecR.h"
#include
"CbmTrdModuleRecT.h"
#include
"CbmTrdParAsic.h"
#include
"CbmTrdParModDigi.h"
#include
"CbmTrdParModGain.h"
...
...
@@ -56,25 +56,31 @@ CbmTrdHitProducer::~CbmTrdHitProducer()
}
//____________________________________________________________________________________
void
CbmTrdHitProducer
::
addModuleHits
(
CbmTrdModuleRec
*
mod
,
Int_t
*
hitCounter
,
CbmEvent
*
event
)
UInt_t
CbmTrdHitProducer
::
addModuleHits
(
CbmTrdModuleRec
*
mod
,
CbmEvent
*
event
)
{
/** Absorb the TClonesArrays of the individual modules into the global
TClonesArray.
*/
if
(
!
mod
)
return
;
if
(
!
mod
)
return
0
;
auto
hits
=
mod
->
GetHits
();
if
(
!
hits
)
return
;
if
(
!
hits
)
return
0
;
while
(
!
hits
->
IsEmpty
())
{
fHits
->
AbsorbObjects
(
hits
,
0
,
0
);
if
(
event
)
event
->
AddData
(
ECbmDataType
::
kTrdHit
,
*
hitCounter
);
(
*
hitCounter
)
++
;
fNrHits
++
;
std
::
uint32_t
numModuleHits
=
hits
->
GetEntriesFast
();
if
(
!
numModuleHits
)
return
0
;
if
(
event
)
{
uint32_t
nHitsTs
=
fNrHitsCall
;
int32_t
nHitsEv
=
event
->
GetNofData
(
ECbmDataType
::
kTrdHit
);
if
(
nHitsEv
>
0
)
nHitsTs
+=
nHitsEv
;
for
(
std
::
uint32_t
iHit
=
0
;
iHit
<
numModuleHits
;
++
iHit
)
event
->
AddData
(
ECbmDataType
::
kTrdHit
,
nHitsTs
+
iHit
);
}
fHits
->
AbsorbObjects
(
hits
);
fNrHits
+=
numModuleHits
;
return
numModuleHits
;
}
//____________________________________________________________________________________
...
...
@@ -91,8 +97,8 @@ CbmTrdModuleRec* CbmTrdHitProducer::AddModule(Int_t address, TGeoPhysicalNode* n
LOG
(
debug
)
<<
GetName
()
<<
"::AddModule("
<<
node
->
GetName
()
<<
" "
<<
(
moduleType
<
9
?
'R'
:
'T'
)
<<
"] mod["
<<
moduleAddress
<<
"] ly["
<<
lyId
<<
"] det["
<<
moduleAddress
<<
"]"
;
CbmTrdModuleRec
*
module
(
NULL
);
if
(
moduleType
>=
9
)
{
module
=
fModules
[
address
]
=
new
CbmTrdModuleRec
T
(
address
);
}
CbmTrdModuleRec
*
module
(
nullptr
);
if
(
moduleType
>=
9
)
{
module
=
fModules
[
address
]
=
new
CbmTrdModuleRec
2D
(
address
);
}
else
{
module
=
fModules
[
address
]
=
new
CbmTrdModuleRecR
(
address
);
}
...
...
@@ -218,7 +224,7 @@ Int_t CbmTrdHitProducer::addHits(CbmEvent* event)
mod
->
PreProcessHits
();
mod
->
PostProcessHits
();
addModuleHits
(
mod
,
&
hitCounter
,
event
);
hitCounter
+=
addModuleHits
(
mod
,
event
);
}
// AbsorberObjects takes care of cleaning up.
...
...
@@ -287,15 +293,15 @@ void CbmTrdHitProducer::Exec(Option_t*)
timerTs
.
Start
();
Long64_t
nClusters
=
fClusters
->
GetEntriesFast
();
UInt_t
hitCounterTs
=
0
;
UInt_t
nEvents
=
0
;
fNrHitsCall
=
0
;
if
(
CbmTrdClusterFinder
::
UseOnlyEventDigis
())
{
for
(
auto
eventobj
:
*
fEvents
)
{
timer
.
Start
();
auto
event
=
static_cast
<
CbmEvent
*>
(
eventobj
);
if
(
!
event
)
continue
;
hitCounterTs
+=
processClusters
(
event
);
fNrHitsCall
+=
processClusters
(
event
);
fNrEvents
++
;
nEvents
++
;
timer
.
Stop
();
...
...
@@ -310,7 +316,7 @@ void CbmTrdHitProducer::Exec(Option_t*)
if
(
!
CbmTrdClusterFinder
::
UseOnlyEventDigis
())
{
timer
.
Start
();
hitCounterTs
=
processClusters
();
fNrHitsCall
=
processClusters
();
fNrEvents
++
;
timer
.
Stop
();
if
(
CbmTrdClusterFinder
::
DoDebugPrintouts
())
{
...
...
@@ -333,7 +339,7 @@ void CbmTrdHitProducer::Exec(Option_t*)
logOut
<<
fixed
<<
setw
(
8
)
<<
setprecision
(
1
)
<<
right
<<
timerTs
.
RealTime
()
*
1000.
<<
" ms] "
;
logOut
<<
"TS "
<<
fNrTs
;
if
(
CbmTrdClusterFinder
::
UseOnlyEventDigis
())
logOut
<<
", events "
<<
nEvents
;
logOut
<<
", clusters "
<<
nClusters
<<
", hits "
<<
hitCounterTs
;
logOut
<<
", clusters "
<<
nClusters
<<
", hits "
<<
fNrHitsCall
;
LOG
(
info
)
<<
logOut
.
str
();
fNrTs
++
;
}
...
...
This diff is collapsed.
Click to expand it.
reco/detectors/trd/CbmTrdHitProducer.h
+
8
−
5
View file @
0d93390f
...
...
@@ -90,13 +90,13 @@ private:
void
processCluster
(
const
Int_t
clusterIdx
);
/**
* @brief Pass all hits produced by the given module to the TrdHit branch
* @brief Pass all hits produced by the given module to the TrdHit branch.
* In case of event not nullptr only the hits conditioned by event are returned.
*
* @param mod
* @param hitCounter
* @param event
* @param mod : Trd module being processed
* @param event : not nullptr for event based reconstruction
*/
void
addModuleHits
(
CbmTrdModuleRec
*
mod
,
Int_t
*
hitCounter
,
CbmEvent
*
event
);
UInt_t
addModuleHits
(
CbmTrdModuleRec
*
mod
,
CbmEvent
*
event
);
/**
* @brief Loop over all modules in the given geometry and call addModuleHits(imodule)
...
...
@@ -133,6 +133,9 @@ private:
/** @brief Number of produced hits. */
UInt_t
fNrHits
=
0
;
/** @brief Number of produced hits per call of Exec, i.e. Event(EbyE) or TimeSlice(TB). */
UInt_t
fNrHitsCall
=
0
;
/** @brief Total processing time [RealTime]. */
Float_t
fProcessTime
=
0
;
...
...
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