Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Falk Zorn
cbmroot
Commits
89cba562
Commit
89cba562
authored
3 years ago
by
Nikolay Karpushkin
Committed by
Volker Friese
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
cleanup
parent
7217a509
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sim/detectors/psd/CbmPsdSimpleDigitizer.cxx
+6
-12
6 additions, 12 deletions
sim/detectors/psd/CbmPsdSimpleDigitizer.cxx
with
6 additions
and
12 deletions
sim/detectors/psd/CbmPsdSimpleDigitizer.cxx
+
6
−
12
View file @
89cba562
...
...
@@ -118,7 +118,7 @@ void CbmPsdSimpleDigitizer::Exec(Option_t*)
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
);
if
(
pTime
<
it
->
second
.
GetTime
())
it
->
second
.
SetTime
(
pTime
);
}
else
{
//this key is new
...
...
@@ -127,15 +127,9 @@ 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
:
PsdDigiVector
)
{
Double_t
eDep
=
entry
.
GetEdep
();
for
(
auto
entry
:
fired_digis_map
)
{
Double_t
eDep
=
entry
.
second
.
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
;
...
...
@@ -143,11 +137,11 @@ void CbmPsdSimpleDigitizer::Exec(Option_t*)
Double_t
eNoise
=
gRandom
->
Gaus
(
0
,
15
)
/
50.
*
0.005
;
eLossSmeared
+=
eNoise
;
// 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
);
CbmPsdDigi
*
digi
=
new
CbmPsdDigi
(
entry
.
second
.
GetAddress
(),
entry
.
second
.
GetTime
()
+
fCurrentEventTime
,
eLossSmeared
);
SendData
(
digi
);
nDigis
++
;
LOG
(
debug
)
<<
fName
<<
": Digi "
<<
nDigis
<<
" Time "
<<
entry
.
GetTime
()
+
fCurrentEventTime
<<
" Section "
<<
entry
.
GetSectionID
()
<<
" Module "
<<
entry
.
GetModuleID
()
<<
" energy "
<<
eLossSmeared
;
LOG
(
debug
1
)
<<
fName
<<
": Digi "
<<
nDigis
<<
" Time "
<<
entry
.
second
.
GetTime
()
+
fCurrentEventTime
<<
" 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