struefit = ScaleFitter(
    name = 'strue_mc_NominalFitRange68',
##    name = 'strue_mc_FitRangePositive',
    title = 'strue-Fit, Powheg S4',
    labels = ['Powheg S4 Summer11 MC'],

    source = _chains['z'],
    xName = 's',
    xTitle = 's_{true} = E^{#gamma}_{reco}/E^{#gamma}_{gen} - 1',
    xExpression = '100 * (phoE/phoGenE - 1)',
    cuts = ['isFSR', 'phoGenE > 0'],
    xRange = (-50, 100),
    xUnit = '%',
    nBins = 150,
    pdf = 'gauss',
    graphicsExtensions = ['png'],
    massWindowScale = 1.5,
    massWindow = (87.2, 95.2),
    fitScale = 1.2,
    fitRange = (-50,50),

    doAutoBinning = True,
    binContentMax = 200,
    binContentMin = 35,
    canvasStyle = 'landscape',

    doAutoXRange = True,
    doAutoXRangeZoom = True,
    doAutoFitRange = True,

    xRangeSigmaLevel = 5,
    xRangeSigmaLevelZoom = 2,

    fitRangeMode = 'Fraction',
    fitRangeSigmaLevel = 2.0,
    fitRangeNumberOfEntries = 3000,
    fitRangeFraction = 0.68,
    paramLayout = (0.57, 0.92, 0.92),

    useCustomChi2Calculator = True,    
    )
Esempio n. 2
0
## Default fit of s = Ereco / Ekin - 1
srecofit = ScaleFitter(
    name = 'sreco_mc',
    title = 'sreco-Fit, Powheg S4',
    labels = ['Powheg S4'],
    cuts = [],
    source = _chains['z'],
    xName = 's',
    xTitle = 's_{reco} = E^{#gamma}_{reco}/E^{kin}_{reco} - 1',
    xExpression =  '100 * (1/kRatio - 1)',
    xRange = (-50, 100),
    xUnit = '%',
    nBins = 150,
    pdf = 'cbShape',
    graphicsExtensions = ['png'],
    massWindowScale = 1.5,
    massWindow = (87.2, 95.2),
    fitScale = 1.2,
    fitRange = (-50,100),
    doAutoBinning = True,
    binContentMax = 200,
    binContentMin = 35,
    canvasStyle = 'landscape',
    doAutoXRange = False,
    doAutoXRangeZoom = True,
    xRangeSigmaLevelZoom = 5,
    paramLayout = (.45, 0.75, 0.5),
    useCustomChi2Calculator = True,
    )

# srecofit.name += ('_FitRange%d' % int(sreco_fitrange))
srecofit = ScaleFitter(
    name = 'sreco_mc',
    title = 'sreco-Fit, Powheg S4',
    labels = ['Powheg S4'],
    cuts = [],
    source = _chains['z'],
    xName = 's',
    xTitle = 's_{reco} = E^{#gamma}_{reco}/E^{kin}_{reco} - 1',
    xExpression =  '100 * (1/kRatio - 1)',
    xRange = (-50, 100),
    xUnit = '%',
    nBins = 150,
    pdf = 'cbShape',
    graphicsExtensions = ['png'],
    massWindowScale = 1.5,
    massWindow = (87.2, 95.2),
    fitScale = 1.2,
    fitRange = (-50,100),
    doAutoBinning = True,
    binContentMax = 200,
    binContentMin = 35,
    canvasStyle = 'landscape',

    doAutoXRange = True,
    doAutoXRangeZoom = True,
    doAutoFitRange = True,

    xRangeFraction = 1,
    xRangeMode = 'Fraction',
    xRangeSigmaLevelZoom = 3,

    paramLayout = (.45, 0.75, 0.5),
    useCustomChi2Calculator = True,
    )
Esempio n. 4
0
## 715/pb for Vg Summer conferences
# _chains = esChains.getChains('v7')
## 2/fb of LP11 dataset
_chains = esChains.getChains("v11")

## Default fit of s = Ereco / Ekin - 1
srecofit = ScaleFitter(
    name="sreco_mc",
    title="sreco-Fit, Powheg S4",
    labels=["Powheg S4"],
    cuts=[],
    source=_chains["z"],
    xName="s",
    xTitle="s_{reco} = E^{#gamma}_{reco}/E^{kin}_{reco} - 1",
    xExpression="100 * (1/kRatio - 1)",
    xRange=(-50, 100),
    xUnit="%",
    nBins=150,
    #     fitRange = (-50, 100),
    pdf="gauss",
    graphicsExtensions=["png"],
    #     graphicsExtensions = [],
    massWindowScale=1.5,
    massWindow=(87.2, 95.2),
    fitScale=1.2,
)

## Default fit of strue = Ereco / Egen - 1
struefit = srecofit.clone(
    name="strue_mc",
    title="strue-Fit, Powheg S4",
    xTitle="s_{true} = E^{#gamma}_{reco}/E^{#gamma}_{gen} - 1",
Esempio n. 5
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():
Esempio n. 6
0
        return daughter
## 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()

    import user
Esempio n. 7
0
## Default fit of s = Ereco / Ekin - 1
srecofit = ScaleFitter(
    name="sreco_mc",
    title="sreco-Fit, Powheg S4",
    labels=["Powheg S4"],
    cuts=[],
    source=_chains["z"],
    xName="s",
    xTitle="s_{reco} = E^{#gamma}_{reco}/E^{kin}_{reco} - 1",
    xExpression="100 * (1/kRatio - 1)",
    xRange=(-50, 100),
    xUnit="%",
    nBins=150,
    pdf="cbShape",
    graphicsExtensions=["png"],
    massWindowScale=1.5,
    massWindow=(87.2, 95.2),
    fitScale=1.2,
    fitRange=(-50, 100),
    doAutoBinning=True,
    binContentMax=200,
    binContentMin=35,
    canvasStyle="landscape",
    doAutoXRange=False,
    doAutoXRangeZoom=True,
    xRangeSigmaLevelZoom=5,
    paramLayout=(0.45, 0.75, 0.5),
    useCustomChi2Calculator=True,
)

## Default fit of strue = Ereco / Egen - 1
Esempio n. 8
0
    def __str__(self):
        return self.__class__.__name__ + '(%g, %g)' % self.bin_range
## 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():
Esempio n. 9
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,
    )
Esempio n. 10
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()