@author: Anastasia and Cameron Bravo ([email protected])
         Brian Dorney ([email protected])

"""
import numpy as np
import os
from array import array

from gempython.gemplotting.utils.anaoptions import parser
from gempython.gemplotting.utils.anautilities import make3x8Canvas
from gempython.utils.nesteddict import nesteddict as ndict

parser.add_option("-f",
                  "--fit",
                  action="store_true",
                  dest="performFit",
                  help="Fit the latency distributions",
                  metavar="performFit")
parser.add_option(
    "--latSigRange",
    type="string",
    dest="latSigRange",
    default=None,
    help=
    "Comma separated pair of values defining expected signal range, e.g. lat #epsilon [41,43] is signal",
    metavar="latSigRange")
parser.add_option(
    "--latSigMaskRange",
    type="string",
    dest="latSigMaskRange",
    default=None,
#!/bin/env python
import os
import sys
from optparse import OptionParser
from gempython.utils.nesteddict import nesteddict as ndict

from gempython.gemplotting.utils.anaoptions import parser

parser.add_option("--maxNoiseRate", type="float", dest="maxNoiseRate", default=0,
                  help="Max Noise Rate allowed in Hz", metavar="maxNoiseRate")
parser.set_defaults(outfilename="SBitRatePlots.root")

(options, args) = parser.parse_args()
filename = options.filename[:-5]
os.system("mkdir " + filename)

print filename
outfilename = options.outfilename

import ROOT as r
r.TH1.SetDefaultSumw2(False)
r.gROOT.SetBatch(True)
inF = r.TFile(filename+'.root')
outF = r.TFile(filename+'/'+outfilename, 'recreate')

VT1_MAX = 256

print 'Initializing Histograms'
vRate = ndict()
vRate2D = ndict()
for vfat in range(0,24):
Exemple #3
0
#!/bin/env python
import os
import sys
from optparse import OptionParser
from array import array

from gempython.gemplotting.mapping.channelMaps import *
from gempython.gemplotting.mapping.PanChannelMaps import *
from gempython.utils.nesteddict import nesteddict as ndict

from gempython.gemplotting.utils.anaoptions import parser

parser.add_option("--fileScurveFitTree",
                  type="string",
                  dest="fileScurveFitTree",
                  default="SCurveFitData.root",
                  help="TFile containing scurveFitTree",
                  metavar="fileScurveFitTree")
parser.add_option("--zscore",
                  type="float",
                  dest="zscore",
                  default=3.5,
                  help="Z-Score for Outlier Identification in MAD Algo",
                  metavar="zscore")
parser.add_option("--pervfat",
                  action="store_true",
                  dest="pervfat",
                  help="Analysis for a per-VFAT scan (default is per-channel)",
                  metavar="pervfat")

parser.set_defaults(outfilename="ThresholdPlots.root")
    pass
  return 0

if __name__ == '__main__':
  import sys,os,signal
  import subprocess
  import itertools
  from multiprocessing import Pool, freeze_support

  from gempython.gemplotting.mapping.chamberInfo import chamber_config, GEBtype
  from gempython.gemplotting.utils.anaInfo import ana_config
  from gempython.utils.wrappers import envCheck

  from gempython.gemplotting.utils.anaoptions import parser

  parser.add_option("--anaType", type="string", dest="anaType",
                    help="Analysis type to be executed, from list: "+str(ana_config.keys()), metavar="anaType")
  parser.add_option("--latFit", action="store_true", dest="performLatFit",
                    help="Fit the latency distributions", metavar="performLatFit")
  parser.add_option("--latSigRange", type="string", dest="latSigRange", default=None,
                    help="Comma separated pair of values defining expected signal range, e.g. lat #epsilon [41,43] is signal", metavar="latSigRange")
  parser.add_option("--latSigMaskRange", type="string", dest="latSigMaskRange", default=None,
                    help="Comma separated pair of values defining the region to be masked when trying to fit the noise, e.g. lat #notepsilon [40,44] is noise (lat < 40 || lat > 44)",
                    metavar="latSigMaskRange")
  parser.add_option("--series", action="store_true", dest="series",
                    help="Run tests in series (default is false)", metavar="series")

  (options, args) = parser.parse_args()

  envCheck('BUILD_HOME')
  envCheck('DATA_PATH')
  envCheck('ELOG_PATH')
    import os
    import numpy as np
    import ROOT as r

    from array import array
    from gempython.gemplotting.utils.anautilities import getEmptyPerVFATList, getMapping, isOutlierMADOneSided, parseCalFile, saveSummary, saveSummaryByiEta
    from gempython.gemplotting.utils.anaInfo import mappingNames, MaskReason
    from gempython.gemplotting.fitting.fitScanData import ScanDataFitter
    from gempython.utils.nesteddict import nesteddict as ndict
    from gempython.utils.wrappers import envCheck
    from gempython.gemplotting.mapping.chamberInfo import chamber_iEta2VFATPos, chamber_vfatPos2iEta

    from gempython.gemplotting.utils.anaoptions import parser
    parser.add_option("-b",
                      "--drawbad",
                      action="store_true",
                      dest="drawbad",
                      help="Draw fit overlays for Chi2 > 10000",
                      metavar="drawbad")
    parser.add_option(
        "--calFile",
        type="string",
        dest="calFile",
        default=None,
        help="File specifying CAL_DAC/VCAL to fC equations per VFAT",
        metavar="calFile")
    parser.add_option(
        "--extChanMapping",
        type="string",
        dest="extChanMapping",
        default=None,
        help=