예제 #1
0
import ROOT

import math

from matrixelement import toolFactory
from matrixelement import getDefaultIntegrator
from matrixelement import getAlternateIntegrator
from matrixelement import getVegasIntegrator
from matrixelement import getMiserIntegrator

# Configure default/backup/failsafe integrators
myMEIntegrators = { 'default'  : getVegasIntegrator( 0.025, 2.5e4, 7.5e4 ),
                    'backup'   : getVegasIntegrator( 0.050, 2.5e4, 5.0e5 ),
                    'failsafe' : getVegasIntegrator( 0.075, 2.5e4, 1.0e6 ) }

# Configure the ME calculators
myMECalculation = toolFactory( 'WW' )( integrator = myMEIntegrators['default'],
                                       args = [ ROOT.WW.kWMASS_4D, None ] ) 

mehndl = myMECalculation.mehndl

# Gets integration limits for transformed Q^{2} variable
def solveq( m, w, qlow, qhigh ):
    tlow  = math.atan( (pow(qlow,2) - pow(m,2)) / (m * w) )
    thigh = math.atan( (pow(qhigh,2) - pow(m,2)) / (m * w) )
    return (tlow, thigh)

mW = ROOT.hepstd.wMass
wW = ROOT.hepstd.wWidth

a,b = solveq( mW, wW, 0, 160 )
예제 #2
0
    selectHelicity = False
    iHel = -1

cuts = None

nGam = 10 # integration range around BW peaks in units of natural width

# SystemBoostTF/recoil.tf, SystemBoostAverageTF/recoilavg_h125.tf, SystemBoostHybrid/recoilhyb_h125.tf
recoilTF = getattr( ROOT, 'SystemBoostTF' )( 'recoil_ggf_ww_0j.tf' ) 

if (useSMKludge + useRSModel + useJHUModel) > 1:
    print 'ERROR incompatible options !'
    sys.exit( -1 )

# Configure default/backup/failsafe integrators
myMEIntegrators = { 'default'  : getVegasIntegrator( 0.025, 5.0e4, 1.5e5 ),
                    'backup'   : getVegasIntegrator( 0.050, 1.5e5, 5.0e5 ),
                    'failsafe' : getVegasIntegrator( 0.100, 5.0e5, 1.5e6 ) }

# Configure the ME calculators
myMECalculation = toolFactory( 'HWW' )( integrator = myMEIntegrators['default'],
                                        args = ( mH, ROOT.HWW.kWMASS_6D, recoilTF, useNarrowWidthApprox ) )

# Set integration limits (use TF to set dynamic limits for jets)
if not useNarrowWidthApprox:
    myMECalculation.mehndl.setWidth( wH )

mehndl = myMECalculation.mehndl

mehndl.setUseBoxPS( useBoxPhaseSpace )
mehndl.setUseSM( useSMKludge )
예제 #3
0
useJHUModel          = True   # flag to use JHU model
selectHelicity       = False  # flag to select particular helicity combination (has no effect if not implemented in ME)

iHel = -1
if os.environ.has_key( 'MYOPTS' ):
    opts = os.environ['MYOPTS']
    if 'iHel' in opts: # integrate only using this helicity combination (index starts @ 1)
        iHel = int( filter( lambda t: 'iHel' in t, opts.split( ':' ) )[0].replace( 'iHel=', '' ) )
        selectHelicity = True
        print 'INFO using helicity i =', iHel
else:
    selectHelicity = False
    iHel = -1

# Configure default/backup/failsafe integrators
myMEIntegrators = { 'default'  : getVegasIntegrator( 0.015, 1.00e4, 5.00e4 ),
                    'backup'   : getVegasIntegrator( 0.050, 5.00e4, 1.00e5 ),
                    'failsafe' : getVegasIntegrator( 0.075, 1.00e5, 5.00e5 ) }

# Configure the ME calculators
myMECalculation = toolFactory( 'HWW' )( integrator = myMEIntegrators['default'],
                                        args = ( mH, ROOT.HWW.kWMASS_4D, recoilTF, useNarrowWidthApprox ) )

# Set integration limits (use TF to set dynamic limits for jets)
myMECalculation.mehndl.setWidth( wH )

mehndl = myMECalculation.mehndl

# Gets integration limits for transformed Q^{2} variable
def solveq( m, w, qlow, qhigh ):
    tlow  = math.atan( (pow(qlow,2) - pow(m,2)) / (m * w) )
예제 #4
0
spin = 0  # specify spin of resonance in pp -> X -> WW(lv,lv) !! JHU only !!

cuts = None

nGam = 10  # integration range around BW peaks in units of natural width

# SystemBoostTF/recoil.tf, SystemBoostAverageTF/recoilavg_h125.tf, SystemBoostHybrid/recoilhyb_h125.tf
recoilTF = getattr(ROOT, 'SystemBoostTF')('recoil_ggf_nj.tf')

if (useSMKludge + useRSModel + useJHUModel) > 1:
    print 'ERROR incompatible options !'
    sys.exit(-1)

# Configure default/backup/failsafe integrators
myMEIntegrators = {
    'default': getVegasIntegrator(0.015, 1.0e5, 2.5e5),
    'backup': getVegasIntegrator(0.050, 2.5e5, 5.0e5),
    'failsafe': getVegasIntegrator(0.100, 5.0e5, 1.0e6)
}

# Configure the ME calculators
myMECalculation = toolFactory('HWW')(integrator=myMEIntegrators['default'],
                                     args=(mH, ROOT.HWW.kWMASS_6D, recoilTF,
                                           useNarrowWidthApprox))

# Set integration limits (use TF to set dynamic limits for jets)
if not useNarrowWidthApprox:
    myMECalculation.mehndl.setWidth(wH)

mehndl = myMECalculation.mehndl
useRSModel           = False # flag to use RS graviton model (spin 2)
useJHUModel          = True  # flag to use JHU s=0/2 ME 
selectHelicity       = False # flag to select particular helicity combination (has no effect if not implemented in ME)

iHel = 0  # integrate only using this helicity combination (index starts @ 1) 
spin = 0  # specify spin of resonance in pp -> X -> WW(lv,lv) !! JHU only !!

cuts = None

nGam = 10 # integration range around BW peaks in units of natural width

# SystemBoostTF/recoil.tf, SystemBoostAverageTF/recoilavg_h125.tf, SystemBoostHybrid/recoilhyb_h125.tf
recoilTF = getattr( ROOT, 'SystemBoostAverageTF' )( 'recoilavg_h125.tf' ) 

# Configure default/backup/failsafe integrators
myMEIntegrators = { 'default'  : getVegasIntegrator( 0.015, 7.5e4, 1.5e5 ),
                    'backup'   : getVegasIntegrator( 0.025, 1.5e5, 3.0e5 ),
                    'failsafe' : getVegasIntegrator( 0.050, 3.0e5, 6.0e5 ) }

# Configure the ME calculators
myMECalculation = toolFactory( 'HWW' )( integrator = myMEIntegrators['default'],
                                        args = ( mH, ROOT.HWW.kWMASS_6D, recoilTF, useNarrowWidthApprox ) )

# Set integration limits (use TF to set dynamic limits for jets)
if not useNarrowWidthApprox:
    myMECalculation.mehndl.setWidth( wH )

mehndl = myMECalculation.mehndl

mehndl.setUseBoxPS( useBoxPhaseSpace )
mehndl.setUseSM( useSMKludge )
예제 #6
0
iHel = -1
if os.environ.has_key('MYOPTS'):
    opts = os.environ['MYOPTS']
    if 'iHel' in opts:  # integrate only using this helicity combination (index starts @ 1)
        iHel = int(
            filter(lambda t: 'iHel' in t,
                   opts.split(':'))[0].replace('iHel=', ''))
        selectHelicity = True
        print 'INFO using helicity i =', iHel
else:
    selectHelicity = False
    iHel = -1

# Configure default/backup/failsafe integrators
myMEIntegrators = {
    'default': getVegasIntegrator(0.015, 1.00e4, 5.00e4),
    'backup': getVegasIntegrator(0.050, 5.00e4, 1.00e5),
    'failsafe': getVegasIntegrator(0.075, 1.00e5, 5.00e5)
}

# Configure the ME calculators
myMECalculation = toolFactory('HWW')(integrator=myMEIntegrators['default'],
                                     args=(mH, ROOT.HWW.kWMASS_4D, recoilTF,
                                           useNarrowWidthApprox))

# Set integration limits (use TF to set dynamic limits for jets)
myMECalculation.mehndl.setWidth(wH)

mehndl = myMECalculation.mehndl

예제 #7
0
if os.path.exists('bjetresolution.tf'):
    jetEnergyTF = getattr(ROOT, 'JetEnergyResolutionTF')('bjetresolution.tf')
else:
    print 'ERROR [bjetresolution.tf] file not found'
    raise RuntimeError

jetEfficiencyTF = None
if os.path.exists('bjetefficiency.tf'):
    jetEfficiencyTF = getattr(ROOT, 'JetEfficiencyTF')('bjetefficiency.tf')
else:
    print 'ERROR [bjetefficiency.tf] file not found'
    raise RuntimeError

# Configure default/backup/failsafe integrators
myMEIntegrators = {
    'default': getVegasIntegrator(0.100, 1.0e5, 2.5e5),
    'backup': getVegasIntegrator(0.150, 5.0e5, 1.0e6),
    'failsafe': getVegasIntegrator(0.200, 1.0e6, 2.0e6)
}

# Configure the ME calculator
myMECalculation = toolFactory('TT1j')(integrator=myMEIntegrators['default'],
                                      args=[ROOT.TT1j.kJET_4D])

hndl = myMECalculation.mehndl

hndl.setObservedJetTF(jetEnergyTF)
hndl.setInvisibleJetTF(jetEfficiencyTF)

# Set integration limits (use TF to set dynamic limits for jets)
hndl.setIntegrationLimits(hndl.getIPTB(), 15, 80)
예제 #8
0
import math

from matrixelement import toolFactory
from matrixelement import getDefaultIntegrator
from matrixelement import getAlternateIntegrator
from matrixelement import getVegasIntegrator
from matrixelement import getHiggsWidth

# Set the Higgs mass & width for H->WW matrix elements
mH = ??
wH = getHiggsWidth( mH ) ## + math.pow( getHiggsWidth( mH ) , 1/6.0  ) / 2.0

recoilTF = None ## = getattr( ROOT, 'SystemBoostAverageTF' )( 'recoilavg_ggh125.tf' ) 

# Configure default/backup/failsafe integrators
myMEIntegrators = { 'default'  : getVegasIntegrator( 0.010, 2.0e5, 5.0e6 ),
                    'backup'   : getVegasIntegrator( 0.025, 2.0e5, 1.0e7 ),
                    'failsafe' : getVegasIntegrator( 0.100, 2.0e5, 5.0e7 ) }

# Configure the ME calculators
myMECalculators = { 'HWW' : toolFactory( 'HWW' )( myMEIntegrators['default'],
                                                  args = [ mH, ROOT.HWW.kWMASS_4D, recoilTF ] ) }

myMECalculators['HWW'].matrixElement.setUseBoostGammaXY( False )

# Set integration limits (use TF to set dynamic limits for jets)
myMECalculators['HWW'].matrixElement.setWidth( wH )

# Gets integration limits for transformed Q^{2} variable
def solveq( m, w, qlow, qhigh ):
    tlow  = math.atan( (pow(qlow,2) - pow(m,2)) / (m * w) )
예제 #9
0
from matrixelement import getVegasIntegrator
from matrixelement import getAlternateIntegrator
from matrixelement import getLineIntegrator
from matrixelement import getHiggsWidth

strategy = ROOT.WFake.k2D

myMEIntegrators = None

# Configure default/backup/failsafe integrators
if strategy == ROOT.WFake.k1D:
    myMEIntegrators = { 'default'  : getLineIntegrator( 0.001, 1.0e3, 1.0e06 ),
                        'backup'   : getLineIntegrator( 0.010, 1.0e3, 5.0e06 ),
                        'failsafe' : getLineIntegrator( 0.020, 1.0e3, 1.0e07 ) }
else:
    myMEIntegrators = { 'default'  : getVegasIntegrator( 0.010, 5.0e3, 1.0e04 ),
                        'backup'   : getVegasIntegrator( 0.025, 1.0e4, 5.0e04 ),
                        'failsafe' : getVegasIntegrator( 0.050, 5.0e4, 1.0e06 ) }

convTF = ROOT.PhotonConversionTF( "conversion.tf" )

# Configure the ME calculators
myMECalculation = toolFactory( 'WFake' )( integrator = myMEIntegrators['default'],
                                          args = [ strategy, convTF ] )

# Set the jet multiplicity bin (determines which ME calculations are setup)

# Gets integration limits for transformed Q^{2} variable
def solveq( m, w, qlow, qhigh ):
    tlow  = math.atan( (pow(qlow,2) - pow(m,2)) / (m * w) )
    thigh = math.atan( (pow(qhigh,2) - pow(m,2)) / (m * w) )
예제 #10
0
# Set the Higgs mass & width for H->WW matrix elements
mH = 125
wH = getHiggsWidth( mH )

jetEnergyTF = None
if os.path.exists( 'gluonjetresolution.tf' ):
    jetEnergyTF = getattr( ROOT, 'JetEnergyResolutionTF' )( 'gluonjetresolution.tf' ) 
else:
    print 'ERROR [gluonjetresolution.tf] file not found'
    raise RuntimeError

useNarrowWidth = True

# Configure default/backup/failsafe integrators
myMEIntegrators = { 'default'  : getVegasIntegrator( 0.015, 2.5e5, 5.0e5 ),
                    'backup'   : getVegasIntegrator( 0.025, 5.0e5, 1.0e6 ),
                    'failsafe' : getVegasIntegrator( 0.050, 1.0e6, 2.0e6 ) }

# Configure the ME calculators

myMECalculator = toolFactory( 'HWW1j' )( myMEIntegrators['default'],
                                         args = [ mH, ROOT.HWW1j.kWMASS_5D, jetEnergyTF, useNarrowWidth ] ) 

mehndl = myMECalculator.mehndl

# Gets integration limits for transformed Q^{2} variable
def solveq( m, w, qlow, qhigh ):
    print 'INFO calculating integration limits [%0.2f,%0.2f] for particle with m,w = (%0.1f, %0.1f)'%( qlow, qhigh, m, w )
    tlow  = math.atan( (pow(qlow,2) - pow(m,2)) / (m * w) )
    thigh = math.atan( (pow(qhigh,2) - pow(m,2)) / (m * w) )
예제 #11
0
from matrixelement import getVegasIntegrator

useTauDecay = True
maxRapidity = 5

#################################################################################

strategy = ROOT.DY.kJET_1D

# Configure default/backup/failsafe integrators

myMEIntegrators = { 'default'  : getLineIntegrator( 0.001, 1.0e3, 5.0e05 ),                
                    'backup'   : getLineIntegrator( 0.010, 1.0e3, 1.0e06 ),
                    'failsafe' : getLineIntegrator( 0.020, 1.0e3, 5.0e06 ) }

if useTauDecay:
    myMEIntegrators = { 'default'  : getVegasIntegrator( 0.01, 5.0e3, 2.5e04 ),
                        'backup'   : getVegasIntegrator( 0.05, 2.5e4, 1.0e05 ),
                        'failsafe' : getVegasIntegrator( 0.10, 1.0e5, 5.0e05 ) }
    
    strategy = ROOT.DY.kJET_TT_3D

# Configure the ME calculator
myMECalculation = toolFactory( 'DY' )( integrator = myMEIntegrators['default'], args = [ strategy ] )

# Set integration limits (use TF to set dynamic limits for jets)
myMECalculation.mehndl.setIntegrationLimits( 0, -maxRapidity, maxRapidity )

myMECalculation.mehndl.setPDF( 'ct10' )

useJHUModel = True  # flag to use JHU s=0/2 ME
selectHelicity = False  # flag to select particular helicity combination (has no effect if not implemented in ME)

iHel = 0  # integrate only using this helicity combination (index starts @ 1)
spin = 0  # specify spin of resonance in pp -> X -> WW(lv,lv) !! JHU only !!

cuts = None

nGam = 10  # integration range around BW peaks in units of natural width

# SystemBoostTF/recoil.tf, SystemBoostAverageTF/recoilavg_h125.tf, SystemBoostHybrid/recoilhyb_h125.tf
recoilTF = getattr(ROOT, 'SystemBoostAverageTF')('recoilavg_h125.tf')

# Configure default/backup/failsafe integrators
myMEIntegrators = {
    'default': getVegasIntegrator(0.015, 7.5e4, 1.5e5),
    'backup': getVegasIntegrator(0.025, 1.5e5, 3.0e5),
    'failsafe': getVegasIntegrator(0.050, 3.0e5, 6.0e5)
}

# Configure the ME calculators
myMECalculation = toolFactory('HWW')(integrator=myMEIntegrators['default'],
                                     args=(mH, ROOT.HWW.kWMASS_6D, recoilTF,
                                           useNarrowWidthApprox))

# Set integration limits (use TF to set dynamic limits for jets)
if not useNarrowWidthApprox:
    myMECalculation.mehndl.setWidth(wH)

mehndl = myMECalculation.mehndl
예제 #13
0
from matrixelement import getHiggsWidth

strategy = ROOT.WFake.k1D

myMEIntegrators = None

# Configure default/backup/failsafe integrators
if strategy == ROOT.WFake.k1D:
    myMEIntegrators = {
        'default': getLineIntegrator(0.01, 1.0e3, 5.0e03),
        'backup': getLineIntegrator(0.01, 5.0e3, 1.0e04),
        'failsafe': getLineIntegrator(0.01, 1.0e4, 5.0e04)
    }
else:
    myMEIntegrators = {
        'default': getVegasIntegrator(0.010, 1.0e3, 2.5e03),
        'backup': getVegasIntegrator(0.025, 2.0e4, 1.0e05),
        'failsafe': getVegasIntegrator(0.050, 1.0e5, 5.0e05)
    }

fakeTF = None

if strategy == ROOT.WFake.k2D:
    fakeTF = ROOT.JetEnergyResolutionTF("fakeresolution.tf")

# Configure the ME calculators
myMECalculation = toolFactory('WFake')(integrator=myMEIntegrators['default'],
                                       args=[strategy, fakeTF])

# Set the jet multiplicity bin (determines which ME calculations are setup)
예제 #14
0
from matrixelement import getMiserIntegrator
from matrixelement import getHiggsWidth

# Set the Higgs mass & width for H->WW matrix elements
mH = 125
wH = getHiggsWidth(mH)

recoilTF = None

allowNull = True  # allow PH == 0, otherwise assume non-convergence and try with finer grid
useNarrowWidthApprox = True  # remove integration over mH
useSMKludge = True  # flag to use the SM kludge

# Configure default/backup/failsafe integrators
myMEIntegrators = {
    'default': getVegasIntegrator(0.010, 2.5e5, 1.0e6),
    'backup': getVegasIntegrator(0.025, 5.0e5, 1.5e6),
    'failsafe': getVegasIntegrator(0.050, 7.5e5, 5.0e6)
}

# Configure the ME calculators
myMECalculation = toolFactory('HWW')(integrator=myMEIntegrators['default'],
                                     args=(mH, ROOT.HWW.kWMASS_4D, recoilTF,
                                           useNarrowWidthApprox))

# Set integration limits (use TF to set dynamic limits for jets)
myMECalculation.mehndl.setWidth(wH)

mehndl = myMECalculation.mehndl

예제 #15
0
import ROOT

import math

from matrixelement import toolFactory
from matrixelement import getVegasIntegrator

jetEnergyTF = None
if os.path.exists( 'gluonjetresolution.tf' ):
    jetEnergyTF = getattr( ROOT, 'JetEnergyResolutionTF' )( 'gluonjetresolution.tf' ) 
else:
    print 'ERROR [gluonjetresolution.tf] file not found'
    raise RuntimeError

# Configure default/backup/failsafe integrators
myMEIntegrators = { 'default'  : getVegasIntegrator( 0.025, 5.0e4, 1.0e05 ),
                    'backup'   : getVegasIntegrator( 0.050, 1.0e5, 5.0e05 ),
                    'failsafe' : getVegasIntegrator( 0.100, 5.0e5, 1.0e06 ) }

# Configure the ME calculators

myMECalculation = toolFactory( 'WW1j' )( integrator = myMEIntegrators['default'],
                                         args = [ ROOT.WW1j.kWMASS_4D, jetEnergyTF ] ) 

mehndl = myMECalculation.mehndl

# Gets integration limits for transformed Q^{2} variable
def solveq( m, w, qlow, qhigh ):
    print 'INFO calculating integration limits [%0.2f,%0.2f] for particle with m,w = (%0.1f, %0.1f)'%( qlow, qhigh, m, w )
    tlow  = math.atan( (pow(qlow,2) - pow(m,2)) / (m * w) )
    thigh = math.atan( (pow(qhigh,2) - pow(m,2)) / (m * w) )
예제 #16
0
import ROOT

import math

from matrixelement import toolFactory
from matrixelement import getLineIntegrator
from matrixelement import getVegasIntegrator

#################################################################################

strategy = ROOT.DY2j.k4D

myMEIntegrators = {
    'default': getVegasIntegrator(0.025, 1.0e3, 5.0e3),
    'backup': getVegasIntegrator(0.050, 5.0e3, 1.0e4),
    'failsafe': getVegasIntegrator(0.100, 1.0e4, 1.0e5)
}

# Configure the ME calculator
myMECalculation = toolFactory('DY2j')(integrator=myMEIntegrators['default'],
                                      args=[strategy])

jetEnergyTF = None
if os.path.exists('gluonjetresolution.tf'):
    jetEnergyTF = getattr(ROOT,
                          'JetEnergyResolutionTF')('gluonjetresolution.tf')
else:
    print 'ERROR [gluonjetresolution.tf] file not found'
    raise RuntimeError

myMECalculation.mehndl.setJetTF(jetEnergyTF)
예제 #17
0
from matrixelement import getVegasIntegrator
from matrixelement import getAlternateIntegrator
from matrixelement import getLineIntegrator
from matrixelement import getHiggsWidth

strategy = ROOT.WFake.k1D

myMEIntegrators = None

# Configure default/backup/failsafe integrators
if strategy == ROOT.WFake.k1D:
    myMEIntegrators = { 'default'  : getLineIntegrator( 0.01, 1.0e3, 5.0e03 ),
                        'backup'   : getLineIntegrator( 0.01, 5.0e3, 1.0e04 ),
                        'failsafe' : getLineIntegrator( 0.01, 1.0e4, 5.0e04 ) }
else:
    myMEIntegrators = { 'default'  : getVegasIntegrator( 0.010, 1.0e3, 2.5e03 ),
                        'backup'   : getVegasIntegrator( 0.025, 2.0e4, 1.0e05 ),
                        'failsafe' : getVegasIntegrator( 0.050, 1.0e5, 5.0e05 ) }

fakeTF = None

if strategy == ROOT.WFake.k2D:
    fakeTF = ROOT.JetEnergyResolutionTF( "fakeresolution.tf" )

# Configure the ME calculators
myMECalculation = toolFactory( 'WFake' )( integrator = myMEIntegrators['default'],
                                          args = [ strategy, fakeTF ] ) 

# Set the jet multiplicity bin (determines which ME calculations are setup)

# Gets integration limits for transformed Q^{2} variable