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
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
jlab
hallc
analyzer_software
hcana
Commits
bf31b67e
Commit
bf31b67e
authored
9 years ago
by
Vardan Tadevosyan
Committed by
Stephen A. Wood
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fill in ShowerArray::AccumulatePedestals method.
parent
14115d29
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
src/THcShowerArray.cxx
+44
-0
44 additions, 0 deletions
src/THcShowerArray.cxx
with
44 additions
and
0 deletions
src/THcShowerArray.cxx
+
44
−
0
View file @
bf31b67e
...
...
@@ -317,18 +317,62 @@ Int_t THcShowerArray::AccumulatePedestals(TClonesArray* rawhits, Int_t nexthit)
Int_t
ihit
=
nexthit
;
while
(
ihit
<
nrawhits
)
{
THcRawShowerHit
*
hit
=
(
THcRawShowerHit
*
)
rawhits
->
At
(
ihit
);
// OK for hit list sorted by layer.
if
(
hit
->
fPlane
>
fLayerNum
)
{
break
;
}
Int_t
element
=
hit
->
fCounter
-
1
;
// Should check if in range
Int_t
adc
=
hit
->
GetData
(
0
);
if
(
adc
<=
fPedLimit
[
element
])
{
fPedSum
[
element
]
+=
adc
;
fPedSum2
[
element
]
+=
adc
*
adc
;
fPedCount
[
element
]
++
;
if
(
fPedCount
[
element
]
==
fMinPeds
/
5
)
{
fPedLimit
[
element
]
=
100
+
fPedSum
[
element
]
/
fPedCount
[
element
];
}
}
ihit
++
;
}
fNPedestalEvents
++
;
// Debug output.
if
(
((
THcShower
*
)
GetParent
())
->
fdbg_raw_cal
)
{
cout
<<
"---------------------------------------------------------------
\n
"
;
cout
<<
"Debug output from THcShowerArray::AcculatePedestals for "
<<
GetParent
()
->
GetPrefix
()
<<
":"
<<
endl
;
cout
<<
"Processed hit list for plane "
<<
GetName
()
<<
":
\n
"
;
for
(
Int_t
ih
=
nexthit
;
ih
<
nrawhits
;
ih
++
)
{
THcRawShowerHit
*
hit
=
(
THcRawShowerHit
*
)
rawhits
->
At
(
ih
);
// OK for hit list sorted by layer.
if
(
hit
->
fPlane
>
fLayerNum
)
{
break
;
}
cout
<<
" hit "
<<
ih
<<
":"
<<
" plane = "
<<
hit
->
fPlane
<<
" counter = "
<<
hit
->
fCounter
<<
" ADC = "
<<
hit
->
GetData
(
0
)
<<
endl
;
}
cout
<<
"---------------------------------------------------------------
\n
"
;
}
return
(
ihit
);
}
//_____________________________________________________________________________
void
THcShowerArray
::
CalculatePedestals
(
)
{
...
...
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