Difference between revisions of "Dead time calculation"

From Hall A Wiki
Jump to: navigation, search
 
Line 2: Line 2:
  
 
and in the ~a-onl/scaler/dtime
 
and in the ~a-onl/scaler/dtime
 +
scdtime.c for online dead time calculation
 +
 +
I put this formula in the deadtime calculation
 +
# Dead time calculation
 +
# Correlation between trigger ( April 6 2007 ) A. Camsonne
 +
#T1 =S1S2
 +
#T2 =S1 or S2  all T1 are are in T2
 +
#T3 =S1S2
 +
#T4 =S1C or S2C
 +
#T5 = T1T3  all T5 are T1 and T3
 +
#T6 = T3T2  all T6 are T3 and T2
 +
#T7 = T1T4  all T7 are T1 and T4
 +
 +
#evert T7 is s T1
 +
 +
#Expected number of triggers =  (T1-T5-T7)/ps1+(T2-2T1-T6)/ps2+(T3-T5-T6)/ps3+(T4-T7)/ps4+T5/ps5+T6/ps6+T7/ps7+T8/ps8
 +
 +
foreach t $scalerinfo(triglist) {
 +
 +
            set tcorr 0
 +
    set nt($t,$h)  $map(trigger-$t,$h)
 +
            if { $t == 1 } {
 +
              set tcorr $t5corr+$t7corr
 +
    }
 +
            if { $t == 2 } {
 +
              set tcorr $t6corr+2*$t1corr
 +
    }
 +
            if { $t == 3 } {
 +
      set tcorr [ expr $t5corr + $t6corr ]
 +
    }
 +
    if { $t == 4 } {
 +
set tcorr [ expr  $t7corr ]
 +
    }

Revision as of 19:09, 6 April 2007

The dead time is computed in end of run script

and in the ~a-onl/scaler/dtime scdtime.c for online dead time calculation

I put this formula in the deadtime calculation

  1. Dead time calculation
  2. Correlation between trigger ( April 6 2007 ) A. Camsonne
  3. T1 =S1S2
  4. T2 =S1 or S2 all T1 are are in T2
  5. T3 =S1S2
  6. T4 =S1C or S2C
  7. T5 = T1T3 all T5 are T1 and T3
  8. T6 = T3T2 all T6 are T3 and T2
  9. T7 = T1T4 all T7 are T1 and T4
  1. evert T7 is s T1
  1. Expected number of triggers = (T1-T5-T7)/ps1+(T2-2T1-T6)/ps2+(T3-T5-T6)/ps3+(T4-T7)/ps4+T5/ps5+T6/ps6+T7/ps7+T8/ps8

foreach t $scalerinfo(triglist) {

           set tcorr 0

set nt($t,$h) $map(trigger-$t,$h)

           if { $t == 1 } {
              set tcorr $t5corr+$t7corr

}

           if { $t == 2 } {
              set tcorr $t6corr+2*$t1corr

}

           if { $t == 3 } {

set tcorr [ expr $t5corr + $t6corr ] } if { $t == 4 } { set tcorr [ expr $t7corr ] }