How to get Gated Beam scalers for selected runs

Last update:
Tue Apr 27 09:32:54 CDT 1999

During the run scalers data were logged in fn781a:$CALIBRATION_DIR/scalers and were transformed into HBOOK files like run_scalers_ntu.run_set_number which have ntuple #101 to keep all scalers data per spill and #102 - per run. Look "*ocs2paw" in scalers for details (trigger version type, filter version type). If you have large set of runs and you need gbeam number per run only (no selections, but beware of scalers overflow), you may want read about fill_table in scalers.

"Per run" data for all runs are integrated in the
$CALIBRATION_DIR/scaler/run_scalers.ntu
To have a hint what scalers entries (names) mean you may look into some scaler page file, e.g.

/usr/products/trigger/scaler/*.pg 
It is seen there that beam=S_log_8 (output #8 of S_logic) and gbeam=T0srs_8 (gated beam was output #8 of SRS control logic). Names S_log_8 and T0srs_8 are scalers names, same as ntuple entries. We used in the trigger definition
 
Beam  = S_log_8 = s1*s2*s3*~v1*~v2*~v3
gbeam = T0srs_8 = s1*s2*s3*~v1*~v2*~v3 * ~BUSY
Try the following procedure:
 
PAW++ [10] cuts $1 10876<=run<=11313		  * -- select runs range
PAW++ [11] cuts $2 mod(int(type),10)==1		  * -- trigger type "Interaction"
PAW++ [12] cuts $3 type>1000			  * -- Filter ON 
PAW++ [13] nt/pl 102.t0srs_8%run $1.and.$2.and.$3 * -- plot gated beam for conditions
						  *    above

PAW++ [14] h/pri 1000000 s

 =====> ID = 1000000   T0SRS_8 
         ENTRIES    =      173          ALL CHANN = 173.0000    
         MEAN VALUE =0.3525434E+09      R . M . S =0.2526585E+09
Total gbeam = 0.352543*173=60.989939e+9 = 6.10e10

Check the shape of the distribution, sometimes scalers get overflow and it's need make cut like

       nt/pl 101.t0srs_8 $1.and.1e6<t0srs_8<1e7  * -- spill scalers may have overflow
Keep in mind that this is number of events taken, hope this is the same number as the amount of data processed.
aik@fnal.gov