Пример #1
0
from JPsi.MuMu.common.binedges import BinEdges

#-------------------------------------------------------------------------------
## EB, R9 > 0.94
baselinecuts = [
    'phoIsEB',
    'phoR9 > 0.94',
    'mmMass + mmgMass < 190',
    'isFSR',
    'phoGenE > 0',
]

mm.stargets = [-25 + 2.5 * i for i in range(21)][10:11]
mm.rtargets = [2.] * len(mm.stargets)

for lo, hi in list(BinEdges([10, 12, 15, 20, 25, 30, 100]))[:1]:
    mm.cuts = baselinecuts + ['%d <= phoPt & phoPt < %d' % (lo, hi)]
    filenamemask = 'massmorph_scalescan_EB_highR9_phoPt%d-%d.root'
    mm.outputfilename = filenamemask % (lo, hi)
    mm.main()

#-------------------------------------------------------------------------------
## EB, R9 < 0.94
baselinecuts = [
    'phoIsEB',
    'phoR9 < 0.94',
    'mmMass + mmgMass < 190',
    'isFSR',
    'phoGenE > 0',
]
Пример #2
0
    xRange=(-10, 5),
    xUnit='%',
    nBins=120,
    fitRange=(-10, 5),
    pdf='sech',
    #     graphicsExtensions = ['png'],
    graphicsExtensions=[],
    paramLayout=(.25, 0.55, 0.92),  # x1, x2, y1
    labelsLayout=(.25, 0.6),  # x1, y1
)

## ----------------------------------------------------------------------------
## Customize below
_fits = []
for geant in 'g93p01 g94p02 g94cms'.split():
    for lo, hi in BinEdges([0.8, 1.2, 1.5, 2, 2.5, 3, 3.5, 4, 5, 10]):
        fit = srawfit.clone(source=_chains[geant])
        fit.name = '_'.join([fit.name, geant])
        fit.title = ', '.join([fit.title, geant])
        fit.labels.append(geant)
        fit.applyDefinitions([BremBin(lo, hi)])
        _fits.append(fit)

maxIterations = 10
fSigma = 2.0
pullEpsilon = 0.01
mwindows = {}

## Loop over plots
for fitter in _fits[:4]:
    ## Log the current fit configuration
Пример #3
0
from JPsi.MuMu.scaleFitter import subdet_r9_categories

gStyle.SetPadTopMargin(0.1)
canvases.wwidth = 400
canvases.wheight = 400
canvases.yperiod = 10

filename = '/raid2/veverka/esFitResults/mc_sreco_strue_Baseline_V1.root'
filename = '/Users/veverka/Work/Talks/11-11-04/mc_sreco_strue_Baseline_V1.root'
filename1 = '/Users/veverka/Work/Talks/11-11-09/Baseline_mod1/mc_sreco_strue_Baseline_mod1.root'
filename2 = 'mc_sreco_strue_Baseline_mod2.root'

plotters = []

## Configuration for plots vs Pt
binedges = list(BinEdges([10, 12, 15, 20, 25, 30, 100]))
bincenters = [0.5*(lo + hi)
              for lo, hi in BinEdges([10, 12, 15, 20, 25, 30, 50])]
binhalfwidths = [0.5*(hi - lo)
                 for lo, hi in BinEdges([10, 12, 15, 20, 25, 30, 50])]
n = len(binedges)
# binhalfwidths = [0] * n

def var_vs_pt(name):
    """Returns functions that take a workspaces ws and return
    x, y, ex, ey where y and ey correspond to workspace
    variable of a given name and x and ex are pt bins."""
    return (
        lambda ws, i = iter(bincenters): i.next(),    # x
        lambda ws: ws.var(name).getVal(),             # y
        lambda ws, i = iter(binhalfwidths): i.next(), # ex
Пример #4
0
from JPsi.MuMu.scaleFitter import subdet_r9_categories

gStyle.SetPadTopMargin(0.1)
canvases.wwidth = 400
canvases.wheight = 400
canvases.yperiod = 10

path = '/Users/veverka/Work/CMSSW_4_2_3_FWLITE/src/JPsi/MuMu/test/escale/11-11-09'
path = '/Users/veverka/Work/Talks/11-11-09'

plotters = []
hists = []
graphs = []

## Configuration for plots vs Pt
binedges = list(BinEdges([10, 12, 15, 20, 25, 30, 100]))
bincenters = [
    0.5 * (lo + hi) for lo, hi in BinEdges([10, 12, 15, 20, 25, 30, 50])
]
binhalfwidths = [
    0.5 * (hi - lo) for lo, hi in BinEdges([10, 12, 15, 20, 25, 30, 50])
]
n = len(binedges)

cats = list(subdet_r9_categories)


def var_vs_pt(name):
    """Returns functions that take a workspaces ws and return
    x, y, ex, ey where y and ey correspond to workspace
    variable of a given name and x and ex are pt bins."""
Пример #5
0
ROOT.gStyle.SetPadTopMargin(0.1)
ROOT.gStyle.SetTitleYOffset(1.25)

canvases.wwidth = 600
canvases.wheight = 600
canvases.yperiod = 10

frps = []
ptitle = {
    'EB_highR9': 'Barrel, R_{9} > 0.94',
    'EB_lowR9' : 'Barrel, R_{9} < 0.94',
    'EE_highR9': 'Endcaps, R_{9} > 0.95',
    'EE_lowR9' : 'Endcaps, R_{9} < 0.95',
    }[subdetr9]
ptbinedges = list(BinEdges([10, 12, 15, 20, 25, 30, 100]))[:]


axistitles = {
    'phoScale'  : 'photon energy scale (%)',
    'phoRes'    : 'photon energy resolution (%)',
    'massScale' : 'm_{#mu#mu#gamma} scale (%)',
    'massRes'   : 'm_{#mu#mu#gamma} width (%)',
    'massWidth' : 'm_{#mu#mu#gamma} width (GeV)',
    }

##------------------------------------------------------------------------------
def sources(filename, wsname):
    maxpoints = 999
    rootfile = ROOT.TFile(filename)
    ws = rootfile.Get(wsname)