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
72d18f6d
Commit
72d18f6d
authored
3 years ago
by
Nikolay Karpushkin
Committed by
Volker Friese
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
proper clang
parent
08a173db
No related branches found
No related tags found
1 merge request
!492
Psd digitizer time issue fix
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sim/detectors/psd/CbmPsdSimpleDigitizer.cxx
+12
-13
12 additions, 13 deletions
sim/detectors/psd/CbmPsdSimpleDigitizer.cxx
with
12 additions
and
13 deletions
sim/detectors/psd/CbmPsdSimpleDigitizer.cxx
+
12
−
13
View file @
72d18f6d
...
...
@@ -101,7 +101,7 @@ void CbmPsdSimpleDigitizer::Exec(Option_t*)
Int_t
modID
=
-
1
;
// module ID
Int_t
scinID
=
-
1
;
// #sciillator
Int_t
sec
;
std
::
map
<
UInt_t
,
CbmPsdDigi
>
fired_digis_map
;
// map<UInt_t uAddress, CbmPsdDigi>
std
::
map
<
UInt_t
,
CbmPsdDigi
>
fired_digis_map
;
// map<UInt_t uAddress, CbmPsdDigi>
for
(
Int_t
iPoint
=
0
;
iPoint
<
nPoints
;
iPoint
++
)
{
point
=
(
CbmPsdPoint
*
)
fPointArray
->
At
(
iPoint
);
...
...
@@ -110,22 +110,21 @@ void CbmPsdSimpleDigitizer::Exec(Option_t*)
modID
=
point
->
GetModuleID
();
//marina 1-44 (45)
scinID
=
point
->
GetDetectorID
();
//1-60
Double_t
eLoss
=
point
->
GetEnergyLoss
();
Double_t
pTime
=
point
->
GetTime
();
Double_t
pTime
=
point
->
GetTime
();
sec
=
(
Int_t
)((
scinID
-
1
)
/
6
)
+
1
;
//marina 1-10
UInt_t
uAddress
=
CbmPsdAddress
::
GetAddress
(
modID
,
sec
);
UInt_t
uAddress
=
CbmPsdAddress
::
GetAddress
(
modID
,
sec
);
auto
it
=
fired_digis_map
.
find
(
uAddress
);
if
(
it
!=
fired_digis_map
.
end
())
{
//this key exists
it
->
second
.
SetEdep
(
it
->
second
.
GetEdep
()
+
eLoss
);
if
(
it
->
second
.
GetTime
()
>
pTime
)
it
->
second
.
SetTime
(
pTime
);
//this key exists
it
->
second
.
SetEdep
(
it
->
second
.
GetEdep
()
+
eLoss
);
if
(
it
->
second
.
GetTime
()
>
pTime
)
it
->
second
.
SetTime
(
pTime
);
}
else
{
//this key is new
CbmPsdDigi
digi
=
CbmPsdDigi
(
uAddress
,
pTime
,
eLoss
);
fired_digis_map
.
insert
(
std
::
make_pair
(
uAddress
,
digi
));
}
//this key is new
CbmPsdDigi
digi
=
CbmPsdDigi
(
uAddress
,
pTime
,
eLoss
);
fired_digis_map
.
insert
(
std
::
make_pair
(
uAddress
,
digi
));
}
}
// Loop over MCPoints
...
...
@@ -142,8 +141,8 @@ void CbmPsdSimpleDigitizer::Exec(Option_t*)
CbmPsdDigi
*
digi
=
new
CbmPsdDigi
(
entry
.
first
,
entry
.
second
.
GetTime
(),
eLossSmeared
);
SendData
(
digi
);
nDigis
++
;
LOG
(
debug1
)
<<
fName
<<
": Digi "
<<
nDigis
<<
" Section "
<<
entry
.
second
.
GetSectionID
()
<<
" Module "
<<
entry
.
second
.
GetModuleID
()
<<
" energy "
<<
eLossSmeared
;
LOG
(
debug1
)
<<
fName
<<
": Digi "
<<
nDigis
<<
" Section "
<<
entry
.
second
.
GetSectionID
()
<<
" Module "
<<
entry
.
second
.
GetModuleID
()
<<
" energy "
<<
eLossSmeared
;
}
// --- Event log
...
...
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