## Set jet min pT cut: override on Athena command line with e.g. "-c JETPTCUT=30"
JET_PT_CUT = 1
if 'JETPTCUT' in dir():
    JET_PT_CUT = JETPTCUT

## Add to commands
cmds += """
set /Herwig/Generators/LHCGenerator:EventHandler:BeamB /Herwig/Particles/pbar-
insert /Herwig/MatrixElements/SimpleQCD:MatrixElements[0] /Herwig/MatrixElements/MEQCD2to2
set /Herwig/Cuts/JetKtCut:MinKT %f*GeV
set /Herwig/Cuts/QCDCuts:MHatMin %f*GeV
set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0
""" % (JET_PT_CUT, 2 * JET_PT_CUT)

## Use weighted events with an enhanced pT spectrum
cmds += """
## Use preweighting rather than jet slices to cover wide pT range
create ThePEG::ReweightMinPT /Herwig/Generators/preweight ReweightMinPT.so
set /Herwig/Generators/preweight:Power 6
insert /Herwig/Generators/LHCGenerator:EventHandler:SubProcessHandlers[0]:Preweights[0] /Herwig/Generators/preweight
set /Herwig/Generators/LHCGenerator:EventHandler:Weighted On
"""

topAlg.Herwigpp.Commands = cmds.splitlines()

## Add Rivet UE analysis
from Rivet_i.Rivet_iConf import Rivet_i
rivet = Rivet_i()
rivet.Analyses = ['MC_JETS', 'D0_2004_S5992206']
topAlg += rivet
示例#2
0
evgenConfig.description = "Test of Pythia 8 + Photos++ in Z pT"
evgenConfig.keywords = ["QED", "Z"]

include("MC12JobOptions/Pythia8_AU2_CTEQ6L1_Common.py")
include("MC12JobOptions/PhotosPythia8_Fragment.py")

# Uncomment to turn exponentiation mode off
# Most physics channels should leave the default mode to on (i.e. leave this commented out)
#topAlg.Photospp.ExponentiationMode=False

topAlg.Pythia8.Commands += ["WeakSingleBoson:ffbar2gmZ=on"]
topAlg.Pythia8.Commands += ["23:onMode=off", "23:onIfAny=11"]

evgenConfig.minevents = 25000

from Rivet_i.Rivet_iConf import Rivet_i
rivet = Rivet_i("Rivet")
rivet.Analyses = ["ATLAS_2011_S9131140"]

topAlg += rivet

from AthenaCommon.AppMgr import ServiceMgr as svcMgr
from GaudiSvc.GaudiSvcConf import THistSvc
svcMgr += THistSvc()
svcMgr.THistSvc.Output = ["Rivet DATAFILE='Rivet.root' OPT='RECREATE'"]
if not hasattr(runArgs, "rivetAnas"):
    raise RuntimeError("No Rivet analysis provided")

## Announce start of Rivet setup
evgenLog.debug("****************** CONFIGURING Rivet *****************")

import AthenaPoolCnvSvc.ReadAthenaPool
svcMgr.EventSelector.FirstEvent = runArgs.firstEvent
theApp.EvtMax = -1
if hasattr(runArgs, "maxEvents"):
    theApp.EvtMax = runArgs.maxEvents

## Add Rivet_i to the job
from Rivet_i.Rivet_iConf import Rivet_i
anaSeq += Rivet_i()
anaSeq.Rivet_i.Analyses = runArgs.rivetAnas
anaSeq.Rivet_i.DoRootHistos = True

if not hasattr(runArgs, "inputEVNTFile"):
    raise RuntimeError("Must specify input EVNT file using inputEVNTFile")
else:
    svcMgr.EventSelector.InputCollections = runArgs.inputEVNTFile

from GaudiSvc.GaudiSvcConf import THistSvc
svcMgr += THistSvc()

rootFile = "Rivet.root"

if hasattr(runArgs, "outputYODAFile"):
    anaSeq.Rivet_i.HistoFile = runArgs.outputYODAFile
示例#4
0
    # # "/nfs/atlas/nwarrack/user.dhirsch.AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV.evgen/AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV._00039.pool.root",
    # # "/nfs/atlas/nwarrack/user.dhirsch.AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV.evgen/AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV._00040.pool.root",
    # # "/nfs/atlas/nwarrack/user.dhirsch.AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV.evgen/AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV._00041.pool.root",
    # # "/nfs/atlas/nwarrack/user.dhirsch.AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV.evgen/AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV._00042.pool.root",
    # # "/nfs/atlas/nwarrack/user.dhirsch.AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV.evgen/AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV._00043.pool.root",
    # # "/nfs/atlas/nwarrack/user.dhirsch.AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV.evgen/AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV._00044.pool.root",
    # # "/nfs/atlas/nwarrack/user.dhirsch.AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV.evgen/AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV._00045.pool.root",
    # # "/nfs/atlas/nwarrack/user.dhirsch.AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV.evgen/AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV._00046.pool.root",
    # # "/nfs/atlas/nwarrack/user.dhirsch.AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV.evgen/AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV._00047.pool.root",
    # # "/nfs/atlas/nwarrack/user.dhirsch.AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV.evgen/AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV._00048.pool.root",
    # # "/nfs/atlas/nwarrack/user.dhirsch.AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV.evgen/AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV._00049.pool.root",
    # # "/nfs/atlas/nwarrack/user.dhirsch.AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV.evgen/AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV._00050.pool.root",
]

from AthenaCommon.AlgSequence import AlgSequence
job = AlgSequence()

from Rivet_i.Rivet_iConf import Rivet_i

rivet = Rivet_i()
rivet.AnalysisPath = os.environ['PWD']
#rivet.Analyses += [ 'ATLAS_2017_I1512776' ]
rivet.Analyses += ['RivetMC_tchan_particle']
rivet.RunName = ""
#rivet.HistoFile = "MG5_atNLO_Herwig"
rivet.HistoFile = "Acer"
#rivet.OutputLevel = DEBUG
#rivet.CrossSection = 26.587 #<- xSec from https://twiki.cern.ch/twiki/bin/view/AtlasProtected/TopMC12SingleTopSamples#Singletop_Samples
rivet.CrossSection = 28.4348  #<- with kFactor
job += rivet
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration

## Example job option script to run Rivet inside Athena
## using events read in from an EVGEN POOL/ROOT file.
##
## Author: James Monk <*****@*****.**>
## Author: Andy Buckley <*****@*****.**>

include("GeneratorUtils/StdAnalysisSetup.py")
theApp.EvtMax = 1000

## Specify input evgen files
import glob, AthenaPoolCnvSvc.ReadAthenaPool
svcMgr.EventSelector.InputCollections = ["/afs/cern.ch/atlas/offline/ProdData/16.6.X/16.6.7.6/minbias-pythia8-7000.evgen.pool.root"]

## Now set up Rivet
from Rivet_i.Rivet_iConf import Rivet_i
topAlg += Rivet_i("Rivet")
topAlg.Rivet.Analyses = ["EXAMPLE", "MC_GENERIC"]
topAlg.Rivet.Analyses += ["ATLAS_2012_I1082936"]

## Configure ROOT file output
from AthenaCommon.AppMgr import ServiceMgr as svcMgr
from GaudiSvc.GaudiSvcConf import THistSvc
svcMgr += THistSvc()
svcMgr.THistSvc.Output = ["Rivet DATAFILE='Rivet.root' OPT='RECREATE'"]
#svcMgr.MessageSvc.OutputLevel = ERROR
示例#6
0
from AthenaCommon.AppMgr import ServiceMgr as svcMgr
theApp.EvtMax = -1

import AthenaPoolCnvSvc.ReadAthenaPool
svcMgr.EventSelector.InputCollections = ["EVNT.05915947._001376.pool.root.1"]

from AthenaCommon.AlgSequence import AlgSequence
job = AlgSequence()

from Rivet_i.Rivet_iConf import Rivet_i
rivet = Rivet_i()
rivet.Analyses += [ 'MC_BOOSTEDVBB' ]
rivet.RunName = ""
rivet.HistoFile = "boostedvbb.yoda"
import os
rivet.AnalysisPath = os.environ['PWD']
rivet.CrossSection = 1 
job += rivet 

from GaudiSvc.GaudiSvcConf import THistSvc

svcMgr += THistSvc() 
svcMgr.THistSvc.Output = ["Rivet DATAFILE='boostedvbb.root' OPT='RECREATE'"] 

job += rivet
示例#7
0
include("GeneratorUtils/StdAnalysisSetup.py")
theApp.EvtMax = 5000000

import os
import AthenaPoolCnvSvc.ReadAthenaPool
svcMgr.EventSelector.InputCollections = [
    "/nfs/atlas/nwarrack/user.dhirsch.AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV.evgen/AcerMC39.110069.singletop_tchan_lept_scale_115_CTEQ6L1_8TeV._00050.pool.root",
]

from AthenaCommon.AlgSequence import AlgSequence
job = AlgSequence()

from Rivet_i.Rivet_iConf import Rivet_i

rivet = Rivet_i()
rivet.AnalysisPath = os.environ['PWD']
#rivet.Analyses += [ 'ATLAS_2017_I1512776' ]
rivet.Analyses += ['MC_tchan_particle']
rivet.RunName = ""
#rivet.HistoFile = "MG5_atNLO_Herwig"
rivet.HistoFile = "Acer"
#rivet.OutputLevel = DEBUG
#rivet.CrossSection = 26.587 #<- xSec from https://twiki.cern.ch/twiki/bin/view/AtlasProtected/TopMC12SingleTopSamples#Singletop_Samples
rivet.CrossSection = 28.4332127  #<- (Acer - 110069) with kFactor
#rivet.CrossSection = 27.337 #<- (Acer - 110069) without kFactor
job += rivet
theApp.EvtMax = 500000
示例#8
0
#svcMgr.EventSelector.InputCollections = FILES.split(',')
# /unix/bsmxsec2/zgrout/Samples/mc15_13TeV.364250.Sherpa_222_NNPDF30NNLO_llll.evgen.EVNT.e5894/
#svcMgr.EventSelector.InputCollections = glob.glob("/unix/bsmxsec2/zgrout/Samples/mc16_13TeV.345706.Sherpa_222_NNPDF30NNLO_ggllll_130M4l.merge.EVNT.e6213_e5984/EVNT.12842743._000027.pool.root.1")

# svcMgr.EventSelector.InputCollections = glob.glob("/home/goblirsc/Datasets/H4l/EVNT/mc15_13TeV.361603.PowhegPy8EG_CT10nloME_AZNLOCTEQ6L1_ZZllll_mll4.evgen.EVNT.e4475/*")[0:2]

from AthenaCommon.AlgSequence import AlgSequence
job = AlgSequence()

from GaudiSvc.GaudiSvcConf import THistSvc
ServiceMgr += THistSvc()
ServiceMgr.THistSvc.Output = ["Rivet DATAFILE='Rivet.root' OPT='RECREATE'"]

from Rivet_i.Rivet_iConf import Rivet_i

rivet = Rivet_i()
rivet.AnalysisPath = os.environ['PWD']
#rivet.Analyses += [ 'ATLAS_2019_VBS' ]
rivet.Analyses += ['ATLAS_2019_I00001']
#rivet.Analyses += [ 'ATLAS_2019_I1720442' ]
rivet.Analyses += ['MC_XS']
rivet.RunName = ""

#rivet.WeightName=" nnlops-nominal "
#rivet.WeightName= ' nominal '
#rivet.WeightName = ' PDF set = 90420 '

rivet.HistoFile = "myanalysis"
rivet.DoRootHistos = True
#rivet.CrossSection = 9.1185E+03
job += rivet
示例#9
0
    #sys.exit()

from AthenaCommon.AppMgr import ServiceMgr as svcMgr
from AthenaCommon.AlgSequence import AlgSequence
job = AlgSequence()

#OutputRoot="Rivet_"+fitt+".root"
from GaudiSvc.GaudiSvcConf import THistSvc
ServiceMgr += THistSvc()
ServiceMgr.THistSvc.Output = ["Rivet DATAFILE='Rivet.root' OPT='RECREATE'"]
ServiceMgr.MessageSvc.OutputLevel = 4 #INFO #DEBUG 

from Rivet_i.Rivet_iConf import Rivet_i

import os
rivet = Rivet_i()
rivet.AnalysisPath = os.environ['PWD']

#rivet.Analyses +=['ttw_ttH']
rivet.Analyses +=['ttwqq']
rivet.RunName = ""
# https://twiki.cern.ch/twiki/bin/view/AtlasProtected/RivetForAtlas#Use_with_Multiple_LHE_Weights
#rivet.WeightName="MUR0.5_MUF0.5_PDF261000"
#rivet.WeightName="MUR2_MUF2_PDF261000"
#rivet.HistoFile = "ttw_ttH"
rivet.HistoFile = "ttw_qq"
rivet.DoRootHistos=True
rivet.CrossSection = xs # xs to be read from athena or pathena commandline
print "CrossSection",xs
job += rivet
示例#10
0
#svcMgr.EventSelector.InputCollections = ["/afs/cern.ch/user/n/ngubbi/work/AnalysisFiles-aQGC-WWZ/NewObservables-samples/DownloadedSamples/user.ngubbi.aQGC-M5-bestlimits-65-10pow12.10k-3lepevents.v1_EXT0/user.ngubbi.16196066.EXT0._000001.EVNT-aQGC-01.pool-M5-bestlimits-65-10pow12.10k-3lepevents.v1.root"]
#M4--Best Limits
#svcMgr.EventSelector.InputCollections = ["/afs/cern.ch/user/n/ngubbi/work/AnalysisFiles-aQGC-WWZ/NewObservables-samples/DownloadedSamples/user.ngubbi.aQGC-M4-bestlimits-40-10pow12.10k-3lepevents.v1_EXT0/user.ngubbi.16195971.EXT0._000001.EVNT-aQGC-01.pool-M4-bestlimits-40-10pow12.10k-3lepevents.v1.root"]
#M2-Best Limits                                                                                                                                                                                
#svcMgr.EventSelector.InputCollections = ["/afs/cern.ch/user/n/ngubbi/work/AnalysisFiles-aQGC-WWZ/NewObservables-samples/DownloadedSamples/user.ngubbi.aQGC-M2-bestlimits-26-10pow12.10k-3lepevents.v1_EXT0/user.ngubbi.16192461.EXT0._000001.EVNT-aQGC-01.pool-M2-bestlimits-26-10pow12.10k-3lepevents.v1.root"]
#M3 Best Limits
#svcMgr.EventSelector.InputCollections = ["/afs/cern.ch/user/n/ngubbi/work/AnalysisFiles-aQGC-WWZ/NewObservables-samples/DownloadedSamples/user.ngubbi.aQGC-M3-bestlimits-43.5-10pow12.10k-3lepevents.v1_EXT0/user.ngubbi.16193004.EXT0._000001.EVNT-aQGC-01.pool-M3-bestlimits-43.5-10pow12.10k-3lepevents.v1.root"]
#T5 Best Limits
svcMgr.EventSelector.InputCollections = ["/afs/cern.ch/user/n/ngubbi/work/AnalysisFiles-aQGC-WWZ/NewObservables-samples/DownloadedSamples/user.ngubbi.aQGC-T5-bestlimits-3.8-10pow12.10k-3lepevents.v1_EXT0/user.ngubbi.16179036.EXT0._000001.EVNT-aQGC-01.pool-T5-bestlimits-3.8-10pow12.10k-3lepevents.v1.root"]

from AthenaCommon.AlgSequence import AlgSequence
job = AlgSequence()

from Rivet_i.Rivet_iConf import Rivet_i

rivet = Rivet_i()
rivet.AnalysisPath = os.environ['PWD']
rivet.Analyses += [ 'WWZ' ]#The name of analysis here must be the same as the name of the class in thr rivet routine, else it will not know which analysis to run and also the respective rivet routine needs to be available in the same folder as this JO so that you can give PWD in the previous line for the analysis path. Else specify the path where rivet routine is located. 
rivet.RunName = ""
#rivet.HistoFile = "aQGC_rivetAnalysis-addnlObservables.yoda"
#rivet.HistoFile = OutputYoda
rivet.HistoFile = "WWZ"
#OutputYoda =  'WWZ-v2'
#OutputRoot  = 'WWZ-v2'

from AthenaCommon.AppMgr import ServiceMgr as svcMgr
from GaudiSvc.GaudiSvcConf import THistSvc
svcMgr += THistSvc()
svcMgr.THistSvc.Output = ["Rivet DATAFILE='"+OutputRoot+"' OPT='RECREATE'"]
 
job += rivet
                                         loc+head+'4332_00/EVNT.01404332._002820.pool.root.1',
                                         loc+head+'4328_00/EVNT.01404328._002641.pool.root.1',
                                         loc+head+'4328_00/EVNT.01404328._002604.pool.root.1',
                                         loc+head+'4327_00/EVNT.01404327._002576.pool.root.1',
                                         loc+head+'4325_00/EVNT.01404325._002476.pool.root.1',
                                         loc+head+'4325_00/EVNT.01404325._002461.pool.root.2',
                                         loc+head+'4325_00/EVNT.01404325._002459.pool.root.1',
                                         loc+head+'4324_00/EVNT.01404324._002427.pool.root.1',
                                         loc+head+'4324_00/EVNT.01404324._002419.pool.root.1',
                                         loc+head+'4225_00/EVNT.01404225._001488.pool.root.1',
                                         loc+head+'4225_00/EVNT.01404225._001474.pool.root.1',
                                         loc+head+'4218_00/EVNT.01404218._001111.pool.root.1',
                                         loc+head+'4202_00/EVNT.01404202._000337.pool.root.1',
                                         loc+head+'4197_00/EVNT.01404197._000082.pool.root.1',
                                         loc+head+'4197_00/EVNT.01404197._000080.pool.root.1']


from AthenaCommon.AlgSequence import AlgSequence
job = AlgSequence()
from Rivet_i.Rivet_iConf import Rivet_i
rivet = Rivet_i()

# Choose which Rivet analyses to run (just the name of the analysis)
rivet.Analyses += ['ANALYSIS_NAME'] # You can add to this list, ['analysis1','analysis2'] as necessary

# You need to include the path of your own analysis (location of RivetANALYSIS_NAME.so) here so Rivet will find it:
rivet.AnalysisPath = '/path/to/analysis' # just use '.' for thise directory or maybe '..' or '../some/other/directory' etc
rivet.HistoFile = 'Rivet.yoda'

job += rivet
示例#12
0
theApp.EvtMax = -1

import AthenaPoolCnvSvc.ReadAthenaPool
svcMgr.EventSelector.InputCollections = [
    'Samples/MoreSamples/mc15_13TeV.312484.Sh_227_NN30NNLO_Znunu_PTV100_140_MJJ0_500_KtMerging.evgen.EVNT.e7728/EVNT.18992357._000007.pool.root.1'
]

from AthenaCommon.AlgSequence import AlgSequence
job = AlgSequence()

from Rivet_i.Rivet_iConf import Rivet_i
rivet = Rivet_i()
import os
rivet.AnalysisPath = os.environ['PWD']

rivet.Analyses += ['Re_Vjj_vbf_nn_asym']
rivet.RunName = ''
rivet.HistoFile = 'File312484v2.yoda.gz'
rivet.CrossSection = 105.869824
#rivet.IgnoreBeamCheck = True
#rivet.SkipWeights=True
job += rivet
示例#13
0
theApp.EvtMax = -1

import AthenaPoolCnvSvc.ReadAthenaPool

from AthenaCommon.AlgSequence import AlgSequence

job = AlgSequence()

from Rivet_i.Rivet_iConf import Rivet_i

rivet = Rivet_i()
import os

rivet.AnalysisPath = os.environ['PWD']

rivet.Analyses += ['Re_Vjj_vbf_nn_asym']
rivet.RunName = ''
rivet.HistoFile = '364222.yoda.gz'
rivet.CrossSection = 0.29612032
#rivet.IgnoreBeamCheck = True
#rivet.SkipWeights = True
job += rivet