Example #1
0
sfit = ScaleFitter(
    name = 'strue_mc_modulep4',
    title = 'strue-Fit, Powheg S4',
    labels = ['Flat-pt #gamma gun',
              '#eta_{SC} #in [1.16,1.44]',
              '#eta/#phi cracks removed',],
    cuts = ['!isEBEtaGap & !isEBPhiGap',
            '1.16 < abs(scEta) & abs(scEta) < 1.44',
            'scE > 0',
            'genE > 0',],
    source = _chains['g93p01'],
    xName = 's',
    xTitle = 's_{true} = E^{SC}_{corr}/E^{#gamma}_{gen} - 1',
    xExpression =  '100 * (scE/genE - 1)',
    xRange = (-50, 50),
    xUnit = '%',
    nBins = 120,
    fitRange = (-49, 49),
    pdf = 'cruijff',
    graphicsExtensions = ['png'],
    paramLayout = (.2, 0.52, 0.92), # x1, x2, y1
    labelsLayout = (.55, 0.55), # x1, y1
    # In order to define chi2 well
    binContentMin = 10,
    binContentMax = 100,
    canvasStyle = 'extended',
    doAutoXRange = True,
    doAutoXRangeZoom = True,
    doAutoFitRange = True,
    xRangeSigmaLevel = 5,
    xRangeSigmaLevelZoom = 2,
    fitRangeSigmaLevel = 1.5,
    useCustomChi2Calculator = False,
    )
Example #2
0

## end of class BremBin

## Default fit of sraw = Eraw / Egen - 1
srawfit = ScaleFitter(
    name='sraw_mc',
    title='sraw-Fit, Powheg S4',
    labels=[
        'Flat-pt #gamma gun', '#eta_{SC} #in [1.16,1.44]',
        '#phi cracks removed', 'sech fit'
    ],
    cuts=['!isEBEtaGap & !isEBPhiGap & 1.16 < abs(scEta) & abs(scEta) < 1.44'],
    source=_chains['g93p01'],
    xName='s',
    xTitle='s_{true} = E^{SC}_{raw}/E^{#gamma}_{gen} - 1',
    xExpression='100 * (scRawE/genE - 1)',
    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():
Example #3
0
## end of SubdetFitters

if __name__ == '__main__':
    _chains = esChains.getChains('v10')

    test_fitter = ScaleFitter(
        name='s',
        title='s-Fit',
        source='_chains["z"]',
        expression='100 * (1/kRatio - 1)',
        cuts=['mmMass < 80'],  # 'phoR9 < 0.94', '30 < phoPt', 'phoPt < 9999'],
        labels=[  #'R_{9}^{#gamma} < 0.94',
            #'E_{T}^{#gamma} #in [X,Y] GeV',
            'Powheg S4',
            'Test Model'
        ],
        xRange=(-20, 40),
        nBins=120,
        fitRange=(-100, 100),
        pdf='lognormal',
        #         graphicsExtensions = ['png', 'eps'],
        graphicsExtensions=[],
        massWindowScale=1.5,
        fitScale=2.0)

    print test_fitter.pydump(), ','

    for fit in SubdetR9Fitters(test_fitter):
        print fit.pydump()