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
0263dc72
Unverified
Commit
0263dc72
authored
6 years ago
by
Mark K Jones
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update (#432)
parent
2df665ae
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/THcCherenkov.cxx
+23
-11
23 additions, 11 deletions
src/THcCherenkov.cxx
src/THcCherenkov.h
+2
-0
2 additions, 0 deletions
src/THcCherenkov.h
with
25 additions
and
11 deletions
src/THcCherenkov.cxx
+
23
−
11
View file @
0263dc72
...
...
@@ -215,6 +215,8 @@ Int_t THcCherenkov::ReadDatabase( const TDatime& date )
// Region parameters
fRegionsValueMax
=
fNRegions
*
8
;
fRegionValue
=
new
Double_t
[
fRegionsValueMax
];
fAdcGoodElem
=
new
Int_t
[
fNelem
];
fAdcPulseAmpTest
=
new
Double_t
[
fNelem
];
DBRequest
list
[]
=
{
{
"_ped_limit"
,
fPedLimit
,
kInt
,
(
UInt_t
)
fNelem
,
optional
},
...
...
@@ -440,28 +442,38 @@ Int_t THcCherenkov::CoarseProcess( TClonesArray& )
{
Double_t
StartTime
=
0.0
;
if
(
fglHod
)
StartTime
=
fglHod
->
GetStartTime
();
// Loop over the elements in the TClonesArray
for
(
Int_t
ipmt
=
0
;
ipmt
<
fNelem
;
ipmt
++
)
{
fAdcPulseAmpTest
[
ipmt
]
=
-
1000.
;
fAdcGoodElem
[
ipmt
]
=-
1
;
}
//
for
(
Int_t
ielem
=
0
;
ielem
<
frAdcPulseInt
->
GetEntries
();
ielem
++
)
{
Int_t
npmt
=
((
THcSignalHit
*
)
frAdcPulseInt
->
ConstructedAt
(
ielem
))
->
GetPaddleNumber
()
-
1
;
Double_t
pulsePed
=
((
THcSignalHit
*
)
frAdcPed
->
ConstructedAt
(
ielem
))
->
GetData
();
Double_t
pulseInt
=
((
THcSignalHit
*
)
frAdcPulseInt
->
ConstructedAt
(
ielem
))
->
GetData
();
Double_t
pulseIntRaw
=
((
THcSignalHit
*
)
frAdcPulseIntRaw
->
ConstructedAt
(
ielem
))
->
GetData
();
Double_t
pulseAmp
=
((
THcSignalHit
*
)
frAdcPulseAmp
->
ConstructedAt
(
ielem
))
->
GetData
();
Double_t
pulseTime
=
((
THcSignalHit
*
)
frAdcPulseTime
->
ConstructedAt
(
ielem
))
->
GetData
();
Double_t
pulseAmp
=
((
THcSignalHit
*
)
frAdcPulseAmp
->
ConstructedAt
(
ielem
))
->
GetData
();
Double_t
adctdcdiffTime
=
StartTime
-
pulseTime
;
Bool_t
errorFlag
=
((
THcSignalHit
*
)
fAdcErrorFlag
->
ConstructedAt
(
ielem
))
->
GetData
();
Bool_t
pulseTimeCut
=
adctdcdiffTime
>
fAdcTimeWindowMin
[
npmt
]
&&
adctdcdiffTime
<
fAdcTimeWindowMax
[
npmt
];
if
(
!
errorFlag
)
{
fGoodAdcMult
.
at
(
npmt
)
+=
1
;
}
if
(
!
errorFlag
&&
pulseTimeCut
&&
pulseAmp
>
fAdcPulseAmpTest
[
npmt
])
{
fAdcGoodElem
[
npmt
]
=
ielem
;
fAdcPulseAmpTest
[
npmt
]
=
pulseAmp
;
}
}
// Loop over the npmt
for
(
Int_t
npmt
=
0
;
npmt
<
fNelem
;
npmt
++
)
{
Int_t
ielem
=
fAdcGoodElem
[
npmt
];
if
(
ielem
!=
-
1
)
{
Double_t
pulsePed
=
((
THcSignalHit
*
)
frAdcPed
->
ConstructedAt
(
ielem
))
->
GetData
();
Double_t
pulseInt
=
((
THcSignalHit
*
)
frAdcPulseInt
->
ConstructedAt
(
ielem
))
->
GetData
();
Double_t
pulseIntRaw
=
((
THcSignalHit
*
)
frAdcPulseIntRaw
->
ConstructedAt
(
ielem
))
->
GetData
();
Double_t
pulseAmp
=
((
THcSignalHit
*
)
frAdcPulseAmp
->
ConstructedAt
(
ielem
))
->
GetData
();
Double_t
pulseTime
=
((
THcSignalHit
*
)
frAdcPulseTime
->
ConstructedAt
(
ielem
))
->
GetData
();
Double_t
adctdcdiffTime
=
StartTime
-
pulseTime
;
// By default, the last hit within the timing cut will be considered "good"
if
(
!
errorFlag
&&
pulseTimeCut
)
{
fGoodAdcPed
.
at
(
npmt
)
=
pulsePed
;
fGoodAdcHitUsed
.
at
(
npmt
)
=
ielem
+
1
;
fGoodAdcPulseInt
.
at
(
npmt
)
=
pulseInt
;
...
...
This diff is collapsed.
Click to expand it.
src/THcCherenkov.h
+
2
−
0
View file @
0263dc72
...
...
@@ -104,6 +104,8 @@ class THcCherenkov : public THaNonTrackingDetector, public THcHitList {
Double_t
*
fPedMean
;
/* Can be supplied in parameters and then */
Double_t
*
fPed
;
Double_t
*
fThresh
;
Double_t
*
fAdcPulseAmpTest
;
Int_t
*
fAdcGoodElem
;
// 12 Gev FADC variables
TClonesArray
*
frAdcPedRaw
;
...
...
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