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
d0e3377a
Commit
d0e3377a
authored
6 years ago
by
Fernando Araiza Gonzalez
Committed by
Mark K Jones
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
PreShower pos/neg
parent
96fa894d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/THcShower.cxx
+12
-6
12 additions, 6 deletions
src/THcShower.cxx
src/THcShower.h
+14
-6
14 additions, 6 deletions
src/THcShower.h
src/THcShowerPlane.cxx
+6
-4
6 additions, 4 deletions
src/THcShowerPlane.cxx
with
32 additions
and
16 deletions
src/THcShower.cxx
+
12
−
6
View file @
d0e3377a
...
@@ -372,8 +372,10 @@ Int_t THcShower::ReadDatabase( const TDatime& date )
...
@@ -372,8 +372,10 @@ Int_t THcShower::ReadDatabase( const TDatime& date )
Double_t
hcal_neg_cal_const
[
fNTotBlocks
];
Double_t
hcal_neg_cal_const
[
fNTotBlocks
];
Double_t
hcal_neg_gain_cor
[
fNTotBlocks
];
Double_t
hcal_neg_gain_cor
[
fNTotBlocks
];
fAdcTimeWindowMin
=
new
Double_t
[
fNTotBlocks
];
fPosAdcTimeWindowMin
=
new
Double_t
[
fNTotBlocks
];
fAdcTimeWindowMax
=
new
Double_t
[
fNTotBlocks
];
fNegAdcTimeWindowMin
=
new
Double_t
[
fNTotBlocks
];
fPosAdcTimeWindowMax
=
new
Double_t
[
fNTotBlocks
];
fNegAdcTimeWindowMax
=
new
Double_t
[
fNTotBlocks
];
DBRequest
list
[]
=
{
DBRequest
list
[]
=
{
{
"cal_pos_cal_const"
,
hcal_pos_cal_const
,
kDouble
,
fNTotBlocks
},
{
"cal_pos_cal_const"
,
hcal_pos_cal_const
,
kDouble
,
fNTotBlocks
},
...
@@ -382,16 +384,20 @@ Int_t THcShower::ReadDatabase( const TDatime& date )
...
@@ -382,16 +384,20 @@ Int_t THcShower::ReadDatabase( const TDatime& date )
{
"cal_neg_cal_const"
,
hcal_neg_cal_const
,
kDouble
,
fNTotBlocks
},
{
"cal_neg_cal_const"
,
hcal_neg_cal_const
,
kDouble
,
fNTotBlocks
},
{
"cal_neg_ped_limit"
,
fShNegPedLimit
,
kInt
,
fNTotBlocks
,
1
},
{
"cal_neg_ped_limit"
,
fShNegPedLimit
,
kInt
,
fNTotBlocks
,
1
},
{
"cal_neg_gain_cor"
,
hcal_neg_gain_cor
,
kDouble
,
fNTotBlocks
},
{
"cal_neg_gain_cor"
,
hcal_neg_gain_cor
,
kDouble
,
fNTotBlocks
},
{
"cal_AdcTimeWindowMin"
,
fAdcTimeWindowMin
,
kDouble
,
static_cast
<
UInt_t
>
(
fNTotBlocks
),
1
},
{
"cal_pos_AdcTimeWindowMin"
,
fPosAdcTimeWindowMin
,
kDouble
,
static_cast
<
UInt_t
>
(
fNTotBlocks
),
1
},
{
"cal_AdcTimeWindowMax"
,
fAdcTimeWindowMax
,
kDouble
,
static_cast
<
UInt_t
>
(
fNTotBlocks
),
1
},
{
"cal_neg_AdcTimeWindowMin"
,
fNegAdcTimeWindowMin
,
kDouble
,
static_cast
<
UInt_t
>
(
fNTotBlocks
),
1
},
{
"cal_pos_AdcTimeWindowMax"
,
fPosAdcTimeWindowMax
,
kDouble
,
static_cast
<
UInt_t
>
(
fNTotBlocks
),
1
},
{
"cal_neg_AdcTimeWindowMax"
,
fNegAdcTimeWindowMax
,
kDouble
,
static_cast
<
UInt_t
>
(
fNTotBlocks
),
1
},
{
"cal_min_peds"
,
&
fShMinPeds
,
kInt
,
0
,
1
},
{
"cal_min_peds"
,
&
fShMinPeds
,
kInt
,
0
,
1
},
{
0
}
{
0
}
};
};
fShMinPeds
=
0.
;
fShMinPeds
=
0.
;
for
(
UInt_t
ip
=
0
;
ip
<
fNTotBlocks
;
ip
++
)
{
for
(
UInt_t
ip
=
0
;
ip
<
fNTotBlocks
;
ip
++
)
{
fAdcTimeWindowMin
[
ip
]
=
-
1000.
;
fPosAdcTimeWindowMin
[
ip
]
=
-
1000.
;
fAdcTimeWindowMax
[
ip
]
=
1000.
;
fNegAdcTimeWindowMin
[
ip
]
=
-
1000.
;
fPosAdcTimeWindowMax
[
ip
]
=
1000.
;
fNegAdcTimeWindowMax
[
ip
]
=
1000.
;
}
}
gHcParms
->
LoadParmValues
((
DBRequest
*
)
&
list
,
prefix
);
gHcParms
->
LoadParmValues
((
DBRequest
*
)
&
list
,
prefix
);
...
...
This diff is collapsed.
Click to expand it.
src/THcShower.h
+
14
−
6
View file @
d0e3377a
...
@@ -74,11 +74,17 @@ public:
...
@@ -74,11 +74,17 @@ public:
Int_t
GetADCMode
()
{
Int_t
GetADCMode
()
{
return
fADCMode
;
return
fADCMode
;
}
}
Double_t
*
GetAdcTimeWindowMin
()
{
Double_t
*
Get
Pos
AdcTimeWindowMin
()
{
return
fAdcTimeWindowMin
;
return
f
Pos
AdcTimeWindowMin
;
}
}
Double_t
*
GetAdcTimeWindowMax
()
{
Double_t
*
GetNegAdcTimeWindowMin
()
{
return
fAdcTimeWindowMax
;
return
fNegAdcTimeWindowMin
;
}
Double_t
*
GetPosAdcTimeWindowMax
()
{
return
fPosAdcTimeWindowMax
;
}
Double_t
*
GetNegAdcTimeWindowMax
()
{
return
fNegAdcTimeWindowMax
;
}
}
Double_t
GetAdcTdcOffset
()
{
Double_t
GetAdcTdcOffset
()
{
return
fAdcTdcOffset
;
return
fAdcTdcOffset
;
...
@@ -155,8 +161,10 @@ protected:
...
@@ -155,8 +161,10 @@ protected:
static
const
Int_t
kADCDynamicPedestal
=
1
;
static
const
Int_t
kADCDynamicPedestal
=
1
;
static
const
Int_t
kADCSampleIntegral
=
2
;
static
const
Int_t
kADCSampleIntegral
=
2
;
static
const
Int_t
kADCSampIntDynPed
=
3
;
static
const
Int_t
kADCSampIntDynPed
=
3
;
Double_t
*
fAdcTimeWindowMin
;
Double_t
*
fPosAdcTimeWindowMin
;
Double_t
*
fAdcTimeWindowMax
;
Double_t
*
fNegAdcTimeWindowMin
;
Double_t
*
fPosAdcTimeWindowMax
;
Double_t
*
fNegAdcTimeWindowMax
;
Double_t
fAdcTdcOffset
;
Double_t
fAdcTdcOffset
;
Int_t
fAnalyzePedestals
;
// Flag for pedestal analysis.
Int_t
fAnalyzePedestals
;
// Flag for pedestal analysis.
...
...
This diff is collapsed.
Click to expand it.
src/THcShowerPlane.cxx
+
6
−
4
View file @
d0e3377a
...
@@ -738,8 +738,10 @@ void THcShowerPlane::FillADC_DynamicPedestal()
...
@@ -738,8 +738,10 @@ void THcShowerPlane::FillADC_DynamicPedestal()
{
{
Double_t
StartTime
=
0.0
;
Double_t
StartTime
=
0.0
;
if
(
fglHod
)
StartTime
=
fglHod
->
GetStartTime
();
if
(
fglHod
)
StartTime
=
fglHod
->
GetStartTime
();
Double_t
*
AdcTimeWindowMin
=
static_cast
<
THcShower
*>
(
fParent
)
->
GetAdcTimeWindowMin
();
Double_t
*
PosAdcTimeWindowMin
=
static_cast
<
THcShower
*>
(
fParent
)
->
GetPosAdcTimeWindowMin
();
Double_t
*
AdcTimeWindowMax
=
static_cast
<
THcShower
*>
(
fParent
)
->
GetAdcTimeWindowMax
();
Double_t
*
NegAdcTimeWindowMin
=
static_cast
<
THcShower
*>
(
fParent
)
->
GetNegAdcTimeWindowMin
();
Double_t
*
PosAdcTimeWindowMax
=
static_cast
<
THcShower
*>
(
fParent
)
->
GetPosAdcTimeWindowMax
();
Double_t
*
NegAdcTimeWindowMax
=
static_cast
<
THcShower
*>
(
fParent
)
->
GetNegAdcTimeWindowMax
();
for
(
Int_t
ielem
=
0
;
ielem
<
frNegAdcPulseInt
->
GetEntries
();
ielem
++
)
{
for
(
Int_t
ielem
=
0
;
ielem
<
frNegAdcPulseInt
->
GetEntries
();
ielem
++
)
{
Int_t
npad
=
((
THcSignalHit
*
)
frNegAdcPulseInt
->
ConstructedAt
(
ielem
))
->
GetPaddleNumber
()
-
1
;
Int_t
npad
=
((
THcSignalHit
*
)
frNegAdcPulseInt
->
ConstructedAt
(
ielem
))
->
GetPaddleNumber
()
-
1
;
Double_t
pulseInt
=
((
THcSignalHit
*
)
frNegAdcPulseInt
->
ConstructedAt
(
ielem
))
->
GetData
();
Double_t
pulseInt
=
((
THcSignalHit
*
)
frNegAdcPulseInt
->
ConstructedAt
(
ielem
))
->
GetData
();
...
@@ -750,7 +752,7 @@ void THcShowerPlane::FillADC_DynamicPedestal()
...
@@ -750,7 +752,7 @@ void THcShowerPlane::FillADC_DynamicPedestal()
Double_t
adctdcdiffTime
=
StartTime
-
pulseTime
;
Double_t
adctdcdiffTime
=
StartTime
-
pulseTime
;
Double_t
threshold
=
((
THcSignalHit
*
)
frNegAdcThreshold
->
ConstructedAt
(
ielem
))
->
GetData
();
Double_t
threshold
=
((
THcSignalHit
*
)
frNegAdcThreshold
->
ConstructedAt
(
ielem
))
->
GetData
();
Bool_t
errorflag
=
((
THcSignalHit
*
)
frNegAdcErrorFlag
->
ConstructedAt
(
ielem
))
->
GetData
();
Bool_t
errorflag
=
((
THcSignalHit
*
)
frNegAdcErrorFlag
->
ConstructedAt
(
ielem
))
->
GetData
();
Bool_t
pulseTimeCut
=
(
adctdcdiffTime
>
AdcTimeWindowMin
[
npad
])
&&
(
adctdcdiffTime
<
AdcTimeWindowMax
[
npad
]);
Bool_t
pulseTimeCut
=
(
adctdcdiffTime
>
Neg
AdcTimeWindowMin
[
npad
])
&&
(
adctdcdiffTime
<
Neg
AdcTimeWindowMax
[
npad
]);
if
(
!
errorflag
&&
pulseTimeCut
)
{
if
(
!
errorflag
&&
pulseTimeCut
)
{
fGoodNegAdcPulseIntRaw
.
at
(
npad
)
=
pulseIntRaw
;
fGoodNegAdcPulseIntRaw
.
at
(
npad
)
=
pulseIntRaw
;
...
@@ -784,7 +786,7 @@ void THcShowerPlane::FillADC_DynamicPedestal()
...
@@ -784,7 +786,7 @@ void THcShowerPlane::FillADC_DynamicPedestal()
Double_t
pulseTime
=
((
THcSignalHit
*
)
frPosAdcPulseTime
->
ConstructedAt
(
ielem
))
->
GetData
();
Double_t
pulseTime
=
((
THcSignalHit
*
)
frPosAdcPulseTime
->
ConstructedAt
(
ielem
))
->
GetData
();
Double_t
adctdcdiffTime
=
StartTime
-
pulseTime
;
Double_t
adctdcdiffTime
=
StartTime
-
pulseTime
;
Bool_t
errorflag
=
((
THcSignalHit
*
)
frPosAdcErrorFlag
->
ConstructedAt
(
ielem
))
->
GetData
();
Bool_t
errorflag
=
((
THcSignalHit
*
)
frPosAdcErrorFlag
->
ConstructedAt
(
ielem
))
->
GetData
();
Bool_t
pulseTimeCut
=
(
adctdcdiffTime
>
AdcTimeWindowMin
[
npad
])
&&
(
adctdcdiffTime
<
AdcTimeWindowMax
[
npad
]);
Bool_t
pulseTimeCut
=
(
adctdcdiffTime
>
Pos
AdcTimeWindowMin
[
npad
])
&&
(
adctdcdiffTime
<
Pos
AdcTimeWindowMax
[
npad
]);
if
(
!
errorflag
&&
pulseTimeCut
)
{
if
(
!
errorflag
&&
pulseTimeCut
)
{
fGoodPosAdcPulseIntRaw
.
at
(
npad
)
=
pulseIntRaw
;
fGoodPosAdcPulseIntRaw
.
at
(
npad
)
=
pulseIntRaw
;
...
...
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