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
892e0811
Commit
892e0811
authored
9 years ago
by
Stephen A. Wood
Browse files
Options
Downloads
Patches
Plain Diff
Add FADC option for THcShowerPlane
parent
8b4a94cc
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/THcShowerPlane.cxx
+40
-11
40 additions, 11 deletions
src/THcShowerPlane.cxx
src/THcShowerPlane.h
+7
-0
7 additions, 0 deletions
src/THcShowerPlane.h
with
47 additions
and
11 deletions
src/THcShowerPlane.cxx
+
40
−
11
View file @
892e0811
...
...
@@ -88,7 +88,29 @@ THaAnalysisObject::EStatus THcShowerPlane::Init( const TDatime& date )
//_____________________________________________________________________________
Int_t
THcShowerPlane
::
ReadDatabase
(
const
TDatime
&
date
)
{
// Retrieve parameters we need from parent class
// Retrieve FADC parameters. In principle may want different dynamic
// pedestal and integration range for preshower and shower, but for now
// use same parameters
char
prefix
[
2
];
prefix
[
0
]
=
tolower
(
GetParent
()
->
GetPrefix
()[
0
]);
prefix
[
1
]
=
'\0'
;
fUsingFADC
=
0
;
fPedSampLow
=
0
;
fPedSampHigh
=
9
;
fDataSampLow
=
23
;
fDataSampHigh
=
49
;
DBRequest
list
[]
=
{
{
"cal_using_fadc"
,
&
fUsingFADC
,
kInt
,
0
,
1
},
{
"cal_ped_sample_low"
,
&
fPedSampLow
,
kInt
,
0
,
1
},
{
"cal_ped_sample_high"
,
&
fPedSampHigh
,
kInt
,
0
,
1
},
{
"cal_data_sample_low"
,
&
fDataSampLow
,
kInt
,
0
,
1
},
{
"cal_data_sample_high"
,
&
fDataSampHigh
,
kInt
,
0
,
1
},
{
0
}
};
gHcParms
->
LoadParmValues
((
DBRequest
*
)
&
list
,
prefix
);
// Retrieve more parameters we need from parent class
//
THcShower
*
fParent
;
...
...
@@ -301,20 +323,27 @@ Int_t THcShowerPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
}
// Should probably check that counter # is in range
fA_Pos
[
hit
->
fCounter
-
1
]
=
hit
->
GetData
(
0
);
fA_Neg
[
hit
->
fCounter
-
1
]
=
hit
->
GetData
(
1
);
if
(
fUsingFADC
)
{
fA_Pos
[
hit
->
fCounter
-
1
]
=
hit
->
GetData
(
0
,
fPedSampLow
,
fPedSampHigh
,
fDataSampLow
,
fDataSampHigh
);
fA_Neg
[
hit
->
fCounter
-
1
]
=
hit
->
GetData
(
1
,
fPedSampLow
,
fPedSampHigh
,
fDataSampLow
,
fDataSampHigh
);
}
else
{
fA_Pos
[
hit
->
fCounter
-
1
]
=
hit
->
GetData
(
0
);
fA_Neg
[
hit
->
fCounter
-
1
]
=
hit
->
GetData
(
1
);
}
// Sparsify positive side hits, fill the hit list, compute the
// energy depostion from positive side for the counter.
Double_t
thresh_pos
=
fPosThresh
[
hit
->
fCounter
-
1
];
if
(
hit
->
GetData
(
0
)
>
thresh_pos
)
{
if
(
fA_Pos
[
hit
->
fCounter
-
1
]
>
thresh_pos
)
{
THcSignalHit
*
sighit
=
(
THcSignalHit
*
)
fPosADCHits
->
ConstructedAt
(
nPosADCHits
++
);
sighit
->
Set
(
hit
->
fCounter
,
hit
->
GetData
(
0
)
);
sighit
->
Set
(
hit
->
fCounter
,
fA_Pos
[
hit
->
fCounter
-
1
]
);
fA_Pos_p
[
hit
->
fCounter
-
1
]
=
hit
->
GetData
(
0
)
-
fPosPed
[
hit
->
fCounter
-
1
];
fA_Pos_p
[
hit
->
fCounter
-
1
]
=
fA_Pos
[
hit
->
fCounter
-
1
]
-
fPosPed
[
hit
->
fCounter
-
1
];
fEpos
[
hit
->
fCounter
-
1
]
+=
fA_Pos_p
[
hit
->
fCounter
-
1
]
*
fParent
->
GetGain
(
hit
->
fCounter
-
1
,
fLayerNum
-
1
,
0
);
...
...
@@ -324,13 +353,13 @@ Int_t THcShowerPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
// energy depostion from negative side for the counter.
Double_t
thresh_neg
=
fNegThresh
[
hit
->
fCounter
-
1
];
if
(
hit
->
GetData
(
1
)
>
thresh_neg
)
{
if
(
fA_Neg
[
hit
->
fCounter
-
1
]
>
thresh_neg
)
{
THcSignalHit
*
sighit
=
(
THcSignalHit
*
)
fNegADCHits
->
ConstructedAt
(
nNegADCHits
++
);
sighit
->
Set
(
hit
->
fCounter
,
hit
->
GetData
(
1
)
);
sighit
->
Set
(
hit
->
fCounter
,
fA_Neg
[
hit
->
fCounter
-
1
]
);
fA_Neg_p
[
hit
->
fCounter
-
1
]
=
hit
->
GetData
(
1
)
-
fNegPed
[
hit
->
fCounter
-
1
];
fA_Neg_p
[
hit
->
fCounter
-
1
]
=
fA_Neg
[
hit
->
fCounter
-
1
]
-
fNegPed
[
hit
->
fCounter
-
1
];
fEneg
[
hit
->
fCounter
-
1
]
+=
fA_Neg_p
[
hit
->
fCounter
-
1
]
*
fParent
->
GetGain
(
hit
->
fCounter
-
1
,
fLayerNum
-
1
,
1
);
...
...
@@ -369,8 +398,8 @@ Int_t THcShowerPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
break
;
}
if
(
hit
->
GetData
(
0
)
>
fPosThresh
[
hit
->
fCounter
-
1
]
||
hit
->
GetData
(
1
)
>
fNegThresh
[
hit
->
fCounter
-
1
])
{
if
(
fA_Pos
[
hit
->
fCounter
-
1
]
>
fPosThresh
[
hit
->
fCounter
-
1
]
||
fA_Neg
[
hit
->
fCounter
-
1
]
>
fNegThresh
[
hit
->
fCounter
-
1
])
{
cout
<<
" plane = "
<<
hit
->
fPlane
<<
" counter = "
<<
hit
->
fCounter
<<
" Emean = "
<<
fEmean
[
hit
->
fCounter
-
1
]
...
...
This diff is collapsed.
Click to expand it.
src/THcShowerPlane.h
+
7
−
0
View file @
892e0811
...
...
@@ -108,6 +108,13 @@ public:
protected
:
// Flash ADC parameters
Int_t
fUsingFADC
;
// != 0 if using FADC in sample mode
Int_t
fPedSampLow
;
// Sample range for
Int_t
fPedSampHigh
;
// dynamic pedestal
Int_t
fDataSampLow
;
// Sample range for
Int_t
fDataSampHigh
;
// sample integration
Double_t
*
fA_Pos
;
// [fNelem] ADC amplitudes of blocks
Double_t
*
fA_Neg
;
// [fNelem] ADC amplitudes of blocks
Double_t
*
fA_Pos_p
;
// [fNelem] pedestal subtracted ADC amplitudes
...
...
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