Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hcana
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
Container 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
Whitney Armstrong
hcana
Commits
05b7a901
Commit
05b7a901
authored
9 years ago
by
Vardan Tadevosyan
Browse files
Options
Downloads
Patches
Plain Diff
Correct per block energy calculation in THcShowerArray::ProcessHits.
parent
2c54f769
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/THcShowerArray.cxx
+7
-7
7 additions, 7 deletions
src/THcShowerArray.cxx
src/THcShowerArray.h
+1
-1
1 addition, 1 deletion
src/THcShowerArray.h
with
8 additions
and
8 deletions
src/THcShowerArray.cxx
+
7
−
7
View file @
05b7a901
...
...
@@ -249,6 +249,7 @@ Int_t THcShowerArray::DefineVariables( EMode mode )
{
"p"
,
"Dynamic ADC Pedestal"
,
"fP"
},
{
"a_p"
,
"Sparsified, ped-subtracted ADC Amplitudes"
,
"fA_p"
},
{
"e"
,
"Energy Depositions per block"
,
"fE"
},
{
"earray"
,
"Energy Deposition in array"
,
"fEarray"
},
{
0
}
};
...
...
@@ -305,7 +306,7 @@ Int_t THcShowerArray::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
fE
[
i
]
=
0
;
}
fE
Tot
=
0
;
fE
array
=
0
;
// Process raw hits. Get ADC hits for the plane, assign variables for each
// channel.
...
...
@@ -322,7 +323,7 @@ Int_t THcShowerArray::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
if
(
hit
->
fPlane
!=
fLayerNum
)
{
break
;
}
// Should probably check that counter # is in range
if
(
fUsingFADC
)
{
fA
[
hit
->
fCounter
-
1
]
=
hit
->
GetData
(
0
,
fPedSampLow
,
fPedSampHigh
,
...
...
@@ -338,8 +339,7 @@ Int_t THcShowerArray::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
// Sparsify hits, fill the hit list, compute the energy depostion.
Double_t
thresh
=
fThresh
[
hit
->
fCounter
-
1
];
if
(
fA
[
hit
->
fCounter
-
1
]
>
thresh
)
{
if
(
fA
[
hit
->
fCounter
-
1
]
>
fThresh
[
hit
->
fCounter
-
1
])
{
// THcSignalHit *sighit =
// (THcSignalHit*) fPosADCHits->ConstructedAt(nPosADCHits++);
...
...
@@ -347,14 +347,14 @@ Int_t THcShowerArray::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
fUsingFADC
?
fA_p
[
hit
->
fCounter
-
1
]
=
fA
[
hit
->
fCounter
-
1
]
:
fA_p
[
hit
->
fCounter
-
1
]
=
fA
[
hit
->
fCounter
-
1
]
-
fP
[
hit
->
fCounter
-
1
];
fA_p
[
hit
->
fCounter
-
1
]
=
fA
[
hit
->
fCounter
-
1
]
-
fP
ed
[
hit
->
fCounter
-
1
];
fE
[
hit
->
fCounter
-
1
]
+=
fA_p
[
hit
->
fCounter
-
1
]
*
fGain
[
hit
->
fCounter
-
1
];
}
// Accumulate energies in the plane.
fE
Tot
+=
fE
[
hit
->
fCounter
-
1
];
fE
array
+=
fE
[
hit
->
fCounter
-
1
];
ihit
++
;
}
...
...
@@ -445,7 +445,7 @@ Int_t THcShowerArray::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
if
(
nspar
==
0
)
cout
<<
" No hits
\n
"
;
cout
<<
" E
total
= "
<<
fE
Tot
<<
endl
;
cout
<<
" E
array
= "
<<
fE
array
<<
endl
;
cout
<<
"---------------------------------------------------------------
\n
"
;
}
...
...
This diff is collapsed.
Click to expand it.
src/THcShowerArray.h
+
1
−
1
View file @
05b7a901
...
...
@@ -102,7 +102,7 @@ protected:
//Energy depositions.
Double_t
*
fE
;
// [fNelem] energy depositions in the blocks.
Double_t
fE
Tot
;
// Total Energy deposition in the array.
Double_t
fE
array
;
// Total Energy deposition in the array.
virtual
Int_t
ReadDatabase
(
const
TDatime
&
date
);
virtual
Int_t
DefineVariables
(
EMode
mode
=
kDefine
);
...
...
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