Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Commit

Permalink
Update HitReader.java
Browse files Browse the repository at this point in the history
Fix a bug on adc/tdc matching
  • Loading branch information
PChatagnon authored Feb 1, 2018
1 parent 017911c commit 3fe22f2
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static ArrayList<HalfHit> getCndHalfHits(DataEvent event) {
int layer = bankADC.getByte("layer",i);
int order = bankADC.getByte("order",i);
int component = order + 1; // get the component 1 is left 2 is right
int indextdc =0;
int indextdc = -1;

adc = bankADC.getInt("ADC",i);
boolean ignorePaddle = false; // whether to ignore or not the processing paddle (as there is already a half it in the paddle)
Expand All @@ -58,8 +58,8 @@ public static ArrayList<HalfHit> getCndHalfHits(DataEvent event) {
if(ignorePaddle==false){
for(int j=0; j<ntdc; j++){
int s = bankTDC.getByte("sector", j);
int l = bankTDC.getByte("layer", j);
int o = bankTDC.getByte("order", j);
int l = bankTDC.getByte("layer", j);
int o = bankTDC.getByte("order", j);

if(s==sector && l == layer && o == order+2 ){
//System.out.println("s "+ s+" sector "+sector+" l "+l+" layer "+layer+" o "+o+" order "+order);
Expand All @@ -74,7 +74,7 @@ public static ArrayList<HalfHit> getCndHalfHits(DataEvent event) {
HalfHit newhit = null;

// First, carry out checks on the quality of the signals:
if (adc == 0 || tdc == 0 || tdc == Parameters.NullTDC) continue; // require good ADC and TDC values
if (adc == 0 || tdc == 0 || tdc == Parameters.NullTDC || indextdc==-1) continue; // require good ADC and TDC values

newhit = new HalfHit(sector, layer, component, adc, tdc, i,indextdc);

Expand All @@ -86,4 +86,4 @@ public static ArrayList<HalfHit> getCndHalfHits(DataEvent event) {

}

}
}

0 comments on commit 3fe22f2

Please sign in to comment.