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
5b910f8c
Commit
5b910f8c
authored
3 years ago
by
Nikolay Karpushkin
Committed by
Volker Friese
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
time relative to run start
parent
72d18f6d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
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
+10
-6
10 additions, 6 deletions
sim/detectors/psd/CbmPsdSimpleDigitizer.cxx
with
10 additions
and
6 deletions
sim/detectors/psd/CbmPsdSimpleDigitizer.cxx
+
10
−
6
View file @
5b910f8c
...
...
@@ -127,22 +127,26 @@ void CbmPsdSimpleDigitizer::Exec(Option_t*)
}
}
// Loop over MCPoints
std
::
vector
<
CbmPsdDigi
>
PsdDigiVector
;
std
::
transform
(
fired_digis_map
.
begin
(),
fired_digis_map
.
end
(),
std
::
back_inserter
(
PsdDigiVector
),
[](
const
std
::
pair
<
UInt_t
,
CbmPsdDigi
>
&
my_pair
){
return
my_pair
.
second
;}
);
// std::sort(PsdDigiVector.begin(), PsdDigiVector.end(),
// [](const CbmPsdDigi& a, const CbmPsdDigi& b) -> bool { return a.GetTime() < b.GetTime(); });
Int_t
nDigis
=
0
;
for
(
auto
entry
:
fired_digis_map
)
{
Double_t
eDep
=
entry
.
second
.
GetEdep
();
for
(
auto
entry
:
PsdDigiVector
)
{
Double_t
eDep
=
entry
.
GetEdep
();
Double_t
eLossMIP
=
eDep
/
0.005
;
// 5MeV per MIP
Double_t
pixPerMIP
=
15.
;
// 15 pix per MIP
Double_t
eLossMIPSmeared
=
gRandom
->
Gaus
(
eLossMIP
*
pixPerMIP
,
sqrt
(
eLossMIP
*
pixPerMIP
))
/
pixPerMIP
;
Double_t
eLossSmeared
=
eLossMIPSmeared
*
0.005
;
Double_t
eNoise
=
gRandom
->
Gaus
(
0
,
15
)
/
50.
*
0.005
;
eLossSmeared
+=
eNoise
;
// The digi time is set to MC point time
CbmPsdDigi
*
digi
=
new
CbmPsdDigi
(
entry
.
first
,
entry
.
second
.
GetTime
()
,
eLossSmeared
);
// The digi time is set to MC point time
[relative to event start] + Event Start time
CbmPsdDigi
*
digi
=
new
CbmPsdDigi
(
entry
.
GetAddress
(),
entry
.
GetTime
()
+
fCurrentEventTime
,
eLossSmeared
);
SendData
(
digi
);
nDigis
++
;
LOG
(
debug
1
)
<<
fName
<<
": Digi "
<<
nDigis
<<
" Section "
<<
entry
.
second
.
GetSectionID
()
<<
" Module "
<<
entry
.
second
.
GetModuleID
()
<<
" energy "
<<
eLossSmeared
;
LOG
(
debug
)
<<
fName
<<
": Digi "
<<
nDigis
<<
"
Time "
<<
entry
.
GetTime
()
+
fCurrentEventTime
<<
"
Section "
<<
entry
.
GetSectionID
()
<<
" Module "
<<
entry
.
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