File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
evio/src/main/java/org/hps/evio
recon/src/main/java/org/hps/recon/skims Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ private double fitPulse(FADCGenericHit hit) {
128128 double pedVal [] = {-999 , -999 };
129129
130130 // Look for bins containing the peaks (2-3 peaks)
131- for (int ii = 4 ; ii < adcSamples .length ; ii ++) {
131+ for (int ii = 4 ; ii < adcSamples .length - 1 ; ii ++) {
132132 // After 2 peaks, stop looking for more
133133 if (iz == 2 ) {
134134 break ;
@@ -143,8 +143,16 @@ private double fitPulse(FADCGenericHit hit) {
143143 }
144144
145145 int jj = 0 ;
146+ int ik = 1 ;
146147 // Choose peak closest to center of window (second peak, ik=1)
147- final int ik = 1 ;
148+ if ( iz >=2 ) {
149+ ik = 1 ;
150+ }else if ( iz == 1 ){
151+ ik = 0 ; // Only one peak found.
152+ }else {
153+ return 0 ;
154+ }
155+
148156 pedVal [ik ] = (adcSamples [peakBin [ik ] - 6 ] + adcSamples [peakBin [ik ] - 7 ] + adcSamples [peakBin [ik ] - 8 ] + adcSamples [peakBin [ik ] - 9 ]) / 4.0 ;
149157 fitThresh [ik ] = (adcSamples [peakBin [ik ]] + pedVal [ik ]) / 3.0 ;
150158
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public class FEESkimmer extends Skimmer {
1717
1818 @ Override
1919 public boolean passSelection (EventHeader event ){
20- System .out .println (this .getClass ().getName ()+":: in pass selection" );
20+ // System.out.println(this.getClass().getName()+":: in pass selection");
2121 boolean pass =true ;
2222
2323
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public class ThreeBodySkimmer extends Skimmer {
1717
1818 @ Override
1919 public boolean passSelection (EventHeader event ){
20- System .out .println (this .getClass ().getName ()+":: in pass selection" );
20+ // System.out.println(this.getClass().getName()+":: in pass selection");
2121 boolean pass =true ;
2222
2323
You can’t perform that action at this time.
0 commit comments