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

Commit

Permalink
Merge pull request #71 from PChatagnon/patch-3
Browse files Browse the repository at this point in the history
Update HitReader.java
  • Loading branch information
fxgirod authored Feb 7, 2018
2 parents 9609d0d + 3fe22f2 commit c9d41ac
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 c9d41ac

Please sign in to comment.