~vpec/maus/tof_calib_read

« back to all changes in this revision

Viewing changes to workers/CIS/ScanRMSvsScan.py

  • Committer: tunnell
  • Date: 2010-09-20 10:52:02 UTC
  • Revision ID: tunnell@itchy-20100920105202-ce4w9jm59zvgnsxq
moving stuff from tucs

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Author: Christopher Tunnell <tunnell@hep.uchicago.edu>
 
2
#
 
3
# March 24, 2009
 
4
#
 
5
 
 
6
from src.ReadGenericCalibration import *
 
7
from src.region import *
 
8
 
 
9
class ScanRMSvsScan(ReadGenericCalibration):
 
10
    "See the comparison between errors on CIS scans with error on mean verus rms"
 
11
 
 
12
    def ProcessRegion(self, region):
 
13
        for event in region.GetEvents():
 
14
            if event.runType == 'CIS':
 
15
                if event.data.has_key('scan') and event.data['scan'] and\
 
16
                       event.data.has_key('scan_rms') and event.data['scan_rms']:
 
17
                    gscan = event.data['scan']
 
18
                    gscan_rms = event.data['scan_rms']
 
19
 
 
20
                    for i in range(gscan.GetN()):
 
21
                        # sqrt(60) ~= 7.745
 
22
                        if not 7.74 < gscan_rms.GetErrorY(i)/gscan.GetErrorY(i) < 7.75:
 
23
                            print gscan_rms.GetErrorY(i), gscan.GetErrorY(i), gscan_rms.GetErrorY(i)/gscan.GetErrorY(i)
 
24
                        
 
25