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 @@ -221,7 +221,8 @@ public int waveformCFAprocessing(){
this.pulse.timeOverThreshold = -9999;

//Waveforms for which timing cannot be defined
if(this.pulse.wftype == -1 || this.pulse.wftype>=4) return 0;
//compute the values even if the type may seem bad
//if(this.pulse.wftype == -1 || this.pulse.wftype>=4) return 0;

//Set the CFA threshold
float threshold = this.amplitudeFractionCFA*this.pulse.adcMax;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,17 @@ public final void fetch_AHDCHits(DataEvent event, AlertDCDetector detector) {
// Apply time calibration
// We may need adc calibration too
// Remark: leadingEdgeTime already has the fine timestamp correction
double time = leadingEdgeTime - t0 - startTime;
double time = leadingEdgeTime - t0 - startTime;

if ((bankDGTZ.getShort("wfType", i) <= 1) || sim) {
// Apply raw hit cuts
//if (((adc >= adc_min) && (adc <= adc_max) && (time >= t_min) && (time <= t_max) && (timeOverThreshold >= tot_min) && (timeOverThreshold <= tot_max) && (adcOffset >= ped_min) && (adcOffset <= ped_max)) || sim) {
double doca = p0 + p1*Math.pow(time,1.0) + p2*Math.pow(time,2.0) + p3*Math.pow(time,3.0) + p4*Math.pow(time,4.0) + p5*Math.pow(time, 5.0);
if (sim) {
time += 5; // correction from mctime - systematic error of the decoding
doca = -0.0497 - 0.00667*Math.pow(time,1.0) + 0.389*Math.pow(time,1.0/2) - 0.189*Math.pow(time,1.0/3);
}
if (time < 0) doca = 0;
Hit h = new Hit(id, superlayer, layer, wire, doca, adc, time);
h.setWirePosition(detector);
hits.add(h);
Expand Down
Loading