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
bead70c8
Commit
bead70c8
authored
8 years ago
by
Stephen A. Wood
Browse files
Options
Downloads
Patches
Plain Diff
Fix errors introduced into THcScintillatorPlane by the multihit TDC work.
parent
040b9527
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/THcScintillatorPlane.cxx
+16
-15
16 additions, 15 deletions
src/THcScintillatorPlane.cxx
with
16 additions
and
15 deletions
src/THcScintillatorPlane.cxx
+
16
−
15
View file @
bead70c8
...
...
@@ -349,39 +349,40 @@ Int_t THcScintillatorPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
if
((
hit
->
GetADCNeg
()
-
fNegPed
[
index
])
>=
50
)
((
THcSignalHit
*
)
frNegADCHits
->
ConstructedAt
(
nrNegADCHits
++
))
->
Set
(
padnum
,
hit
->
GetADCNeg
()
-
fNegPed
[
index
]);
Bool_t
tdcraw_pos
=
kFALSE
;
Bool_t
tdcraw_neg
=
kFALSE
;
Int_t
tdcpos
,
tdcneg
;
// Find first in range hit from multihit tdcs
Bool_t
btdcraw_pos
=
kFALSE
;
Bool_t
btdcraw_neg
=
kFALSE
;
Int_t
tdc_pos
=-
1
;
Int_t
tdc_neg
=-
1
;
// Find first in range hit from multihit tdc
for
(
UInt_t
thit
=
0
;
thit
<
hit
->
fNRawHits
[
2
];
thit
++
)
{
tdcpos
=
hit
->
GetTDCPos
(
thit
);
if
(
tdcpos
>=
fScinTdcMin
&&
tdcpos
<=
fScinTdcMax
)
{
tdcraw_pos
=
kTRUE
;
tdc
_
pos
=
hit
->
GetTDCPos
(
thit
)
+
fTdcOffset
;
if
(
tdc
_
pos
>=
fScinTdcMin
&&
tdc
_
pos
<=
fScinTdcMax
)
{
b
tdcraw_pos
=
kTRUE
;
break
;
}
}
for
(
UInt_t
thit
=
0
;
thit
<
hit
->
fNRawHits
[
3
];
thit
++
)
{
tdcneg
=
hit
->
GetTDCNeg
(
thit
);
if
(
tdcneg
>=
fScinTdcMin
&&
tdcneg
<=
fScinTdcMax
)
{
tdcraw_neg
=
kTRUE
;
tdc
_
neg
=
hit
->
GetTDCNeg
(
thit
)
+
fTdcOffset
;
if
(
tdc
_
neg
>=
fScinTdcMin
&&
tdc
_
neg
<=
fScinTdcMax
)
{
b
tdcraw_neg
=
kTRUE
;
break
;
}
}
// Proceed if there is a valid TDC on e
ach
end of the bar
if
(
tdcraw_pos
&&
tdcraw_neg
)
{
// Proceed if there is a valid TDC on e
ither
end of the bar
if
(
b
tdcraw_pos
||
b
tdcraw_neg
)
{
Double_t
adc_pos
=
hit
->
GetADCPos
()
-
fPosPed
[
index
];
Double_t
adc_neg
=
hit
->
GetADCNeg
()
-
fNegPed
[
index
];
new
(
(
*
fHodoHits
)[
fNScinHits
])
THcHodoHit
(
tdc
raw
_pos
,
tdc
raw
_neg
,
new
(
(
*
fHodoHits
)[
fNScinHits
])
THcHodoHit
(
tdc_pos
,
tdc_neg
,
adc_pos
,
adc_neg
,
hit
->
fCounter
,
this
);
// Do the pulse height correction to the time. (Position dependent corrections later)
Double_t
timec_pos
=
tdc
raw
_pos
*
fScinTdcToTime
-
fHodoPosPhcCoeff
[
index
]
*
Double_t
timec_pos
=
tdc_pos
*
fScinTdcToTime
-
fHodoPosPhcCoeff
[
index
]
*
TMath
::
Sqrt
(
TMath
::
Max
(
0.0
,
(
adc_pos
)
/
fHodoPosMinPh
[
index
]
-
1.0
))
-
fHodoPosTimeOffset
[
index
];
Double_t
timec_neg
=
tdc
raw
_neg
*
fScinTdcToTime
-
fHodoNegPhcCoeff
[
index
]
*
Double_t
timec_neg
=
tdc_neg
*
fScinTdcToTime
-
fHodoNegPhcCoeff
[
index
]
*
TMath
::
Sqrt
(
TMath
::
Max
(
0.0
,
(
adc_neg
)
/
fHodoNegMinPh
[
index
]
-
1.0
))
-
fHodoNegTimeOffset
[
index
];
...
...
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