Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Project Juggler
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
Container registry
Model registry
Operate
Environments
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
EIC
Project Juggler
Commits
28f1c47e
Commit
28f1c47e
authored
3 years ago
by
Wouter Deconinck
Committed by
Sylvester Joosten
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "Proper digitization for homogenous forward endcap"
parent
5fff288e
No related branches found
No related tags found
1 merge request
!297
Resolve "Proper digitization for homogenous forward endcap"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
JugDigi/src/components/CalorimeterHitDigi.cpp
+20
-9
20 additions, 9 deletions
JugDigi/src/components/CalorimeterHitDigi.cpp
with
20 additions
and
9 deletions
JugDigi/src/components/CalorimeterHitDigi.cpp
+
20
−
9
View file @
28f1c47e
...
@@ -55,6 +55,12 @@ namespace Jug::Digi {
...
@@ -55,6 +55,12 @@ namespace Jug::Digi {
Gaudi
::
Property
<
double
>
m_pedSigmaADC
{
this
,
"pedestalSigma"
,
3.2
};
Gaudi
::
Property
<
double
>
m_pedSigmaADC
{
this
,
"pedestalSigma"
,
3.2
};
Gaudi
::
Property
<
double
>
m_resolutionTDC
{
this
,
"resolutionTDC"
,
10
*
ps
};
Gaudi
::
Property
<
double
>
m_resolutionTDC
{
this
,
"resolutionTDC"
,
10
*
ps
};
Gaudi
::
Property
<
double
>
m_corrMeanScale
{
this
,
"scaleResponse"
,
1.0
};
// These are better variable names for the "energyResolutions" array which is a bit
// magic @FIXME
//Gaudi::Property<double> m_corrSigmaCoeffE{this, "responseCorrectionSigmaCoeffE", 0.0};
//Gaudi::Property<double> m_corrSigmaCoeffSqrtE{this, "responseCorrectionSigmaCoeffSqrtE", 0.0};
// signal sums
// signal sums
// @TODO: implement signal sums with timing
// @TODO: implement signal sums with timing
// field names to generate id mask, the hits will be grouped by masking the field
// field names to generate id mask, the hits will be grouped by masking the field
...
@@ -165,16 +171,21 @@ namespace Jug::Digi {
...
@@ -165,16 +171,21 @@ namespace Jug::Digi {
int
nhits
=
0
;
int
nhits
=
0
;
for
(
const
auto
&
ahit
:
*
simhits
)
{
for
(
const
auto
&
ahit
:
*
simhits
)
{
// Note: juggler internal unit of energy is GeV
// Note: juggler internal unit of energy is GeV
double
eResRel
=
0.
;
// --> optional energy correction to allow for modifying the response for
if
(
ahit
.
energyDeposit
()
>
1e-6
)
{
// effective impelentations, e.g. a homogenous implementation of a fiber
eResRel
=
m_normDist
()
*
eRes
[
0
]
/
std
::
sqrt
(
ahit
.
energyDeposit
())
+
// calorimeter.
m_normDist
()
*
eRes
[
1
]
+
const
double
eDep
=
ahit
.
energyDeposit
()
*
m_corrMeanScale
;
m_normDist
()
*
eRes
[
2
]
/
ahit
.
energyDeposit
();
}
// apply additional calorimeter noise to corrected energy deposit
const
double
eResRel
=
(
eDep
>
1e-6
)
?
m_normDist
()
*
std
::
sqrt
(
std
::
pow
(
eRes
[
0
]
/
std
::
sqrt
(
eDep
),
2
)
+
std
::
pow
(
eRes
[
1
],
2
)
+
std
::
pow
(
eRes
[
2
]
/
(
eDep
),
2
))
:
0
;
const
double
ped
=
m_pedMeanADC
+
m_normDist
()
*
m_pedSigmaADC
;
const
long
long
adc
=
std
::
llround
(
ped
+
eDep
*
(
1.
+
eResRel
)
/
dyRangeADC
*
m_capADC
);
const
long
long
tdc
=
std
::
llround
((
ahit
.
truth
().
time
+
m_normDist
()
*
tRes
)
*
stepTDC
);
double
ped
=
m_pedMeanADC
+
m_normDist
()
*
m_pedSigmaADC
;
long
long
adc
=
std
::
llround
(
ped
+
ahit
.
energyDeposit
()
*
(
1.
+
eResRel
)
/
dyRangeADC
*
m_capADC
);
long
long
tdc
=
std
::
llround
((
ahit
.
truth
().
time
+
m_normDist
()
*
tRes
)
*
stepTDC
);
eic
::
RawCalorimeterHit
rawhit
(
eic
::
RawCalorimeterHit
rawhit
(
{
nhits
++
,
algorithmID
()},
{
nhits
++
,
algorithmID
()},
(
long
long
)
ahit
.
cellID
(),
(
long
long
)
ahit
.
cellID
(),
...
...
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