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
08fdc0a3
Commit
08fdc0a3
authored
12 years ago
by
Gabriel Niculescu
Browse files
Options
Downloads
Patches
Plain Diff
Implementing min/max TDC cuts and pedestal subtraction.
parent
a93f0976
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/THcScintillatorPlane.cxx
+61
-1
61 additions, 1 deletion
src/THcScintillatorPlane.cxx
src/THcScintillatorPlane.h
+1
-0
1 addition, 0 deletions
src/THcScintillatorPlane.h
with
62 additions
and
1 deletion
src/THcScintillatorPlane.cxx
+
61
−
1
View file @
08fdc0a3
...
@@ -168,7 +168,6 @@ Int_t THcScintillatorPlane::ReadDatabase( const TDatime& date )
...
@@ -168,7 +168,6 @@ Int_t THcScintillatorPlane::ReadDatabase( const TDatime& date )
cout
<<
"PosOffset = "
<<
fPosOffset
<<
endl
;
cout
<<
"PosOffset = "
<<
fPosOffset
<<
endl
;
cout
<<
"PosCenter[0] = "
<<
fPosCenter
[
0
]
<<
endl
;
cout
<<
"PosCenter[0] = "
<<
fPosCenter
[
0
]
<<
endl
;
/* for(Int_t i=0;i<fNPlanes;i++) {
/* for(Int_t i=0;i<fNPlanes;i++) {
fCenter[i] = new Double_t[fNPaddle[i]];
fCenter[i] = new Double_t[fNPaddle[i]];
DBRequest list[]={
DBRequest list[]={
...
@@ -250,6 +249,9 @@ Int_t THcScintillatorPlane::Decode( const THaEvData& evdata )
...
@@ -250,6 +249,9 @@ Int_t THcScintillatorPlane::Decode( const THaEvData& evdata )
Int_t
THcScintillatorPlane
::
CoarseProcess
(
TClonesArray
&
tracks
)
Int_t
THcScintillatorPlane
::
CoarseProcess
(
TClonesArray
&
tracks
)
{
{
cout
<<
"*******************************
\n
"
;
cout
<<
"NOW IN THcScintilatorPlane::CoarseProcess!!!!
\n
"
;
cout
<<
"*******************************
\n
"
;
// HitCount();
// HitCount();
return
0
;
return
0
;
...
@@ -318,6 +320,64 @@ Int_t THcScintillatorPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
...
@@ -318,6 +320,64 @@ Int_t THcScintillatorPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
return
(
ihit
);
return
(
ihit
);
}
}
//_____________________________________________________________________________
Int_t
THcScintillatorPlane
::
ProcessHits
(
TClonesArray
*
rawhits
,
Double_t
mintdc
,
Double_t
maxtdc
,
Int_t
nexthit
)
{
// Extract the data for this plane from hit list
// Assumes that the hit list is sorted by plane, so we stop when the
// plane doesn't agree and return the index for the next hit.
// GN: Select only events that have at least one of their TDC signals in the
// right range.
// NOTE: 01/24/2013: Not quite subtracting pedestals for now! Also subtract the pedestals from the adc signal
Int_t
nPosTDCHits
=
0
;
Int_t
nNegTDCHits
=
0
;
Int_t
nPosADCHits
=
0
;
Int_t
nNegADCHits
=
0
;
fPosTDCHits
->
Clear
();
fNegTDCHits
->
Clear
();
fPosADCHits
->
Clear
();
fNegADCHits
->
Clear
();
Int_t
nrawhits
=
rawhits
->
GetLast
()
+
1
;
// cout << "THcScintillatorPlane::ProcessHits " << fPlaneNum << " " << nexthit << "/" << nrawhits << endl;
Int_t
ihit
=
nexthit
;
while
(
ihit
<
nrawhits
)
{
THcHodoscopeHit
*
hit
=
(
THcHodoscopeHit
*
)
rawhits
->
At
(
ihit
);
if
(
hit
->
fPlane
>
fPlaneNum
)
{
break
;
}
// check TDC values
if
(((
hit
->
fTDC_pos
>=
mintdc
)
&&
(
hit
->
fTDC_pos
<=
maxtdc
))
||
((
hit
->
fTDC_neg
>=
mintdc
)
&&
(
hit
->
fTDC_neg
<=
maxtdc
)))
{
//TDC positive hit
THcSignalHit
*
sighit
=
(
THcSignalHit
*
)
fPosTDCHits
->
ConstructedAt
(
nPosTDCHits
++
);
sighit
->
Set
(
hit
->
fCounter
,
hit
->
fTDC_pos
);
// TDC negative hit
THcSignalHit
*
sighit2
=
(
THcSignalHit
*
)
fNegTDCHits
->
ConstructedAt
(
nNegTDCHits
++
);
sighit2
->
Set
(
hit
->
fCounter
,
hit
->
fTDC_neg
);
// ADC positive hit
if
(
hit
->
fADC_pos
>
0
)
{
THcSignalHit
*
sighit
=
(
THcSignalHit
*
)
fPosADCHits
->
ConstructedAt
(
nPosADCHits
++
);
sighit
->
Set
(
hit
->
fCounter
,
hit
->
fADC_pos
);
}
// ADC negative hit
if
(
hit
->
fADC_neg
>
0
)
{
// cout <<"adc neg hit!!\n";
THcSignalHit
*
sighit
=
(
THcSignalHit
*
)
fNegADCHits
->
ConstructedAt
(
nNegADCHits
++
);
sighit
->
Set
(
hit
->
fCounter
,
hit
->
fADC_neg
);
}
else
{
cout
<<
"skipping BAD tdc event
\n
"
;
}
}
ihit
++
;
}
return
(
ihit
);
}
//_____________________________________________________________________________
//_____________________________________________________________________________
Int_t
THcScintillatorPlane
::
AccumulatePedestals
(
TClonesArray
*
rawhits
,
Int_t
nexthit
)
Int_t
THcScintillatorPlane
::
AccumulatePedestals
(
TClonesArray
*
rawhits
,
Int_t
nexthit
)
{
{
...
...
This diff is collapsed.
Click to expand it.
src/THcScintillatorPlane.h
+
1
−
0
View file @
08fdc0a3
...
@@ -37,6 +37,7 @@ class THcScintillatorPlane : public THaSubDetector {
...
@@ -37,6 +37,7 @@ class THcScintillatorPlane : public THaSubDetector {
virtual
Bool_t
IsPid
()
{
return
kFALSE
;
}
virtual
Bool_t
IsPid
()
{
return
kFALSE
;
}
virtual
Int_t
ProcessHits
(
TClonesArray
*
rawhits
,
Int_t
nexthit
);
virtual
Int_t
ProcessHits
(
TClonesArray
*
rawhits
,
Int_t
nexthit
);
virtual
Int_t
ProcessHits
(
TClonesArray
*
rawhits
,
Double_t
mintdc
,
Double_t
maxtdc
,
Int_t
nexthit
);
virtual
Int_t
AccumulatePedestals
(
TClonesArray
*
rawhits
,
Int_t
nexthit
);
virtual
Int_t
AccumulatePedestals
(
TClonesArray
*
rawhits
,
Int_t
nexthit
);
virtual
void
CalculatePedestals
(
);
virtual
void
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