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
6ca2daac
Commit
6ca2daac
authored
9 years ago
by
Vardan Tadevosyan
Committed by
Stephen A. Wood
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Correct THcShowerArray pedestal calculations.
parent
bb34f8ec
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/THcShowerArray.cxx
+23
-10
23 additions, 10 deletions
src/THcShowerArray.cxx
src/THcShowerArray.h
+0
-1
0 additions, 1 deletion
src/THcShowerArray.h
with
23 additions
and
11 deletions
src/THcShowerArray.cxx
+
23
−
10
View file @
6ca2daac
...
@@ -101,7 +101,6 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date )
...
@@ -101,7 +101,6 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date )
// Here read the 2-D arrays of pedestals, gains, etc.
// Here read the 2-D arrays of pedestals, gains, etc.
// Pedestal limits per channel.
// Pedestal limits per channel.
fPedLimit
=
new
Int_t
[
fNelem
];
fPedLimit
=
new
Int_t
[
fNelem
];
THcShower
*
fParent
;
THcShower
*
fParent
;
...
@@ -136,6 +135,15 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date )
...
@@ -136,6 +135,15 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date )
cout
<<
" Layer #"
<<
fLayerNum
<<
", number of elements "
<<
fNelem
cout
<<
" Layer #"
<<
fLayerNum
<<
", number of elements "
<<
fNelem
<<
endl
;
<<
endl
;
cout
<<
" Columns "
<<
fNColumns
<<
", Rows "
<<
fNRows
<<
endl
;
cout
<<
" Using FADC "
<<
fUsingFADC
<<
endl
;
if
(
fUsingFADC
)
{
cout
<<
" FADC pedestal sample low = "
<<
fPedSampLow
<<
", high = "
<<
fPedSampHigh
<<
endl
;
cout
<<
" FADC data sample low = "
<<
fDataSampLow
<<
", high = "
<<
fDataSampHigh
<<
endl
;
}
// cout << " Origin of Layer at X = " << fOrigin.X()
// cout << " Origin of Layer at X = " << fOrigin.X()
// << " Y = " << fOrigin.Y() << " Z = " << fOrigin.Z() << endl;
// << " Y = " << fOrigin.Y() << " Z = " << fOrigin.Z() << endl;
...
@@ -322,12 +330,17 @@ Int_t THcShowerArray::AccumulatePedestals(TClonesArray* rawhits, Int_t nexthit)
...
@@ -322,12 +330,17 @@ Int_t THcShowerArray::AccumulatePedestals(TClonesArray* rawhits, Int_t nexthit)
THcRawShowerHit
*
hit
=
(
THcRawShowerHit
*
)
rawhits
->
At
(
ihit
);
THcRawShowerHit
*
hit
=
(
THcRawShowerHit
*
)
rawhits
->
At
(
ihit
);
// OK for hit list sorted by layer.
// OK for hit list sorted by layer.
if
(
hit
->
fPlane
>
fLayerNum
)
{
//
if(hit->fPlane > fLayerNum) {
break
;
//
break;
}
//
}
Int_t
element
=
hit
->
fCounter
-
1
;
// Should check if in range
Int_t
element
=
hit
->
fCounter
-
1
;
// Should check if in range
Int_t
adc
=
hit
->
GetData
(
0
);
Int_t
adc
=
fUsingFADC
?
hit
->
GetData
(
0
,
fPedSampLow
,
fPedSampHigh
,
fDataSampLow
,
fDataSampHigh
)
:
hit
->
GetData
(
0
);
if
(
adc
<=
fPedLimit
[
element
])
{
if
(
adc
<=
fPedLimit
[
element
])
{
fPedSum
[
element
]
+=
adc
;
fPedSum
[
element
]
+=
adc
;
...
@@ -355,15 +368,15 @@ Int_t THcShowerArray::AccumulatePedestals(TClonesArray* rawhits, Int_t nexthit)
...
@@ -355,15 +368,15 @@ Int_t THcShowerArray::AccumulatePedestals(TClonesArray* rawhits, Int_t nexthit)
THcRawShowerHit
*
hit
=
(
THcRawShowerHit
*
)
rawhits
->
At
(
ih
);
THcRawShowerHit
*
hit
=
(
THcRawShowerHit
*
)
rawhits
->
At
(
ih
);
// OK for hit list sorted by layer.
Int_t
adc
=
fUsingFADC
?
if
(
hit
->
fPlane
>
fLayerNum
)
{
hit
->
GetData
(
0
,
fPedSampLow
,
fPedSampHigh
,
fDataSampLow
,
fDataSampHigh
)
break
;
:
}
hit
->
GetData
(
0
);
cout
<<
" hit "
<<
ih
<<
":"
cout
<<
" hit "
<<
ih
<<
":"
<<
" plane = "
<<
hit
->
fPlane
<<
" plane = "
<<
hit
->
fPlane
<<
" counter = "
<<
hit
->
fCounter
<<
" counter = "
<<
hit
->
fCounter
<<
" ADC = "
<<
hit
->
GetData
(
0
)
<<
" ADC = "
<<
adc
<<
endl
;
<<
endl
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/THcShowerArray.h
+
0
−
1
View file @
6ca2daac
...
@@ -97,7 +97,6 @@ protected:
...
@@ -97,7 +97,6 @@ protected:
virtual
Int_t
ReadDatabase
(
const
TDatime
&
date
);
virtual
Int_t
ReadDatabase
(
const
TDatime
&
date
);
virtual
Int_t
DefineVariables
(
EMode
mode
=
kDefine
);
virtual
Int_t
DefineVariables
(
EMode
mode
=
kDefine
);
//virtual void InitializePedestals( );
ClassDef
(
THcShowerArray
,
0
);
// Fly;s Eye calorimeter array
ClassDef
(
THcShowerArray
,
0
);
// Fly;s Eye calorimeter array
};
};
#endif
#endif
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