Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public class ModeAHDC extends HipoExtractor {
//wfType 2 ⇒ bad trailingEdgeTime
//wfType 1 ⇒ saturing
//wfType 0 ⇒ OK
// warnings: The ToT does not make sense for type 1 and 2
// We shoudl not apply a ToT cut on them

private static class AHDCPulse extends Pulse {
private long time_ZS;
Expand Down Expand Up @@ -305,8 +307,8 @@ public int waveformCFAprocessing(AHDCPulse p){
}

p.timeOverThreshold = p.trailingEdgeTime - p.leadingEdgeTime;
//if ((this.pulse.timeOverThreshold < 300) || (this.pulse.timeOverThreshold > 750)) this.assignValidType(4); // bad tot
if (p.timeOverThreshold < 300) this.assignValidType(4, p); // tot too small
// if binFall == -99, the ToT does not make sense
if (p.timeOverThreshold < 300 && binFall > 0) this.assignValidType(4, p); // tot too small
}
else { // there are necessary type 1, so we use the slope_max
if (p.wftype == 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,20 @@ private void fetch_AHDCHits(DataEvent event, AlertDCDetector detector, IndexedTa
double ped_min = rawHitCutsTable.getDoubleValueByHash("ped_min", hash);
double ped_max = rawHitCutsTable.getDoubleValueByHash("ped_max", hash);

boolean passCuts =
(wfType <= 2) &&
(adcRaw >= adc_min) && (adcRaw <= adc_max) &&
(time >= t_min) && (time <= t_max) &&
(timeOverThreshold >= tot_min) && (timeOverThreshold <= tot_max) &&
(adcOffset >= ped_min) && (adcOffset <= ped_max);
boolean passCuts = false;
if (wfType == 0) {
passCuts =
(adcRaw >= adc_min) && (adcRaw <= adc_max) &&
(time >= t_min) && (time <= t_max) &&
(timeOverThreshold >= tot_min) && (timeOverThreshold <= tot_max) &&
(adcOffset >= ped_min) && (adcOffset <= ped_max);
}
else if (wfType == 1 || wfType == 2) {
passCuts =
(adcRaw >= adc_min) && (adcRaw <= adc_max) &&
(time >= t_min) && (time <= t_max) &&
(adcOffset >= ped_min) && (adcOffset <= ped_max);
}

if (!passCuts) continue;
}
Expand Down
Loading