Skip to content
Snippets Groups Projects
Commit 2adb2afa authored by Johannes Junggeburth's avatar Johannes Junggeburth :dog2:
Browse files

Merge branch 'master' of ssh://gitlab.cern.ch:7999/jojungge/athena into large_d0_muons

parents eb6d8151 f58c75cf
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!36175Add muons built from large d0 tracking.
Showing
with 446 additions and 3 deletions
if not hasattr(filtSeq, "ParticleFilter"):
from GeneratorFilters.GeneratorFiltersConf import ParticleFilter
filtSeq += ParticleFilter("ParticleFilter")
# Example usage of this filter
#ParticleFilter = filtSeq.ParticleFilter
#ParticleFilter.Ptcut = 0.0
#ParticleFilter.Etacut = 10.0
#ParticleFilter.PDG = 1000022
#ParticleFilter.MinParts = 2
#ParticleFilter.StatusReq = 11
## Default truth jet filter setup
## The specified truth jet container must exist
def AddJetFilter(filtSeq,ecmEnergy):
from GeneratorFilters.GeneratorFiltersConf import QCDTruthJetFilter
if "QCDTruthJetFilter" not in filtSeq:
from AthenaCommon.SystemOfUnits import GeV
filtSeq += QCDTruthJetFilter()
filtSeq.QCDTruthJetFilter.MaxPt = float(ecmEnergy)*GeV
## Example configuration for QCDTruthJetFilter setting up defaults
include("GeneratorFilters/AntiKt4TruthJets_pileup.py")
include("GeneratorFilters/AntiKt6TruthJets_pileup.py")
include("GeneratorFilters/JetFilter_Fragment.py")
## Example configuration for QCDTruthMultiJetFilter setting up defaults
include("GeneratorFilters/AntiKt4TruthJets_pileup.py")
include("GeneratorFilters/AntiKt6TruthJets_pileup.py")
include("GeneratorFilters/JetFilter_Fragment.py")
if not hasattr( filtSeq, "QCDTruthMultiJetFilter" ):
from GeneratorFilters.GeneratorFiltersConf import QCDTruthMultiJetFilter
filtSeq += QCDTruthMultiJetFilter()
pass
"""
QCDTruthMultiJetFilter = filtSeq.QCDTruthMultiJetFilter
QCDTruthMultiJetFilter.Njet = -1
QCDTruthMultiJetFilter.NjetMinPt = 0. *Gaudi::Units::GeV
QCDTruthMultiJetFilter.MinLeadJetPt = 0. *Gaudi::Units::GeV
QCDTruthMultiJetFilter.MaxLeadJetPt = 7000. *Gaudi::Units::GeV # , LHC kinematic limit...
QCDTruthMultiJetFilter.MaxEta = 10.0
QCDTruthMultiJetFilter.TruthJetContainer = "AntiKt4TruthJets"
QCDTruthMultiJetFilter.DoShape = True
"""
## Instantiate the TTbarWToLeptonFilter, including adding it to the stream requirement
if not hasattr(filtSeq, "TTbarLJetsVptFilter"):
from GeneratorFilters.GeneratorFiltersConf import TTbarLJetsVptFilter
filtSeq += TTbarLJetsVptFilter()
filtSeq.TTbarLJetsVptFilter.NumLeptons = 1
filtSeq.TTbarLJetsVptFilter.Ptcut = 22000.
filtSeq.TTbarLJetsVptFilter.Etacut= 3.0
filtSeq.TTbarLJetsVptFilter.VptMin= 100000
#filtSeq.TTbarLJetsVptFilter.VptMax= 300000
filtSeq.TTbarLJetsVptFilter.FollowTaus=True
## Instantiate the TTbarWToLeptonFilter, including adding it to the stream requirement
## Filter passed if top, antitop and t->W->e/mu/tau in truth chain
## Configuration of the filter cuts is left to the specific JO
## christoph.wasicki@cern.ch
if not hasattr(filtSeq, "TTbarWToLeptonFilter"):
from GeneratorFilters.GeneratorFiltersConf import TTbarWToLeptonFilter
filtSeq += TTbarWToLeptonFilter()
## Add this filter to the algs required to be successful for streaming
#if "TTbarWToLeptonFilter" not in StreamEVGEN.RequireAlgs:
# StreamEVGEN.RequireAlgs += ["TTbarWToLeptonFilter"]
## Default cut params
filtSeq.TTbarWToLeptonFilter.Ptcut = 1.
## Instantiate the TTbarWithJpsimumuFilter, including adding it to the stream requirement
## Filter passed if top, antitop and t->b->J/psi->mumu in truth chain
## Configuration of the filter cuts is left to the specific JO
if not hasattr(filtSeq, "TTbarWithJpsimumuFilter"):
from GeneratorFilters.GeneratorFiltersConf import TTbarWithJpsimumuFilter
filtSeq += TTbarWithJpsimumuFilter()
## Default cut params
filtSeq.TTbarWithJpsimumuFilter.JpsipTMinCut = 5000.
\ No newline at end of file
## Example configuration for TransverseMassVVFilter setting up defaults
if not hasattr( filtSeq, "TransverseMassVVFilter" ):
from GeneratorFilters.GeneratorFiltersConf import TransverseMassVVFilter
filtSeq += TransverseMassVVFilter()
pass
"""
TransverseMassVVFilter = filtSeq.TransverseMassVVFilter
TransverseMassVVFilter.MinMass = 4000.
TransverseMassVVFilter.MaxMass = 10000.
"""
## Example configuration for VBFForwardJetsFilter setting up defaults
#include("GeneratorFilters/AntiKt4TruthJets_pileup.py")
#include("GeneratorFilters/AntiKt6TruthJets_pileup.py")
#include("GeneratorFilters/JetFilter_Fragment.py")
include ("GeneratorFilters/FindJets.py")
CreateJets(prefiltSeq, 0.6)
AddJetsFilter(filtSeq,runArgs.ecmEnergy, 0.6)
if not hasattr( filtSeq, "VBFForwardJetsFilter" ):
from GeneratorFilters.GeneratorFiltersConf import VBFForwardJetsFilter
filtSeq += VBFForwardJetsFilter()
pass
"""
VBFForwardJetsFilter = filtSeq.VBFForwardJetsFilter
VBFForwardJetsFilter.JetMinPt = 10.*Gaudi::Units::GeV
VBFForwardJetsFilter.JetMaxEta = 5.
VBFForwardJetsFilter.NJets = 2
VBFForwardJetsFilter.Jet1MinPt = 20.*Gaudi::Units::GeV
VBFForwardJetsFilter.Jet1MaxEta = 5.
VBFForwardJetsFilter.Jet2MinPt = 10.*Gaudi::Units::GeV
VBFForwardJetsFilter.Jet2MaxEta = 5.
VBFForwardJetsFilter.UseOppositeSignEtaJet1Jet2 = False
VBFForwardJetsFilter.MassJJ = 300.*Gaudi::Units::GeV
VBFForwardJetsFilter.DeltaEtaJJ = 2.0
VBFForwardJetsFilter.UseLeadingJJ = False
VBFForwardJetsFilter.TruthJetContainer = "AntiKt4TruthJets"
VBFForwardJetsFilter.LGMinPt = 10.*Gaudi::Units::GeV
VBFForwardJetsFilter.LGMaxEta = 2.5
VBFForwardJetsFilter.DeltaRJLG = 0.05
VBFForwardJetsFilter.RatioPtJLG = 0.3
"""
## Base config for Sherpa
from Sherpa_i.Sherpa_iConf import Sherpa_i
genSeq += Sherpa_i()
evgenConfig.generators = ["Sherpa"]
genSeq.Sherpa_i.PluginCode = ""
## Tell Sherpa to read its run card sections from the jO
## TODO: write out Run.dat from genSeq.Sherpa_i.RunCard and read from it
## instead of the JO
genSeq.Sherpa_i.Parameters += [ 'RUNDATA=%s' % runArgs.jobConfig[0] ]
## Tell Sherpa to write logs into a separate file
## (need for production, looping job detection, Wolfgang Ehrenfeld)
genSeq.Sherpa_i.Parameters += [ 'LOG_FILE=sherpa.log' ]
## General ATLAS parameters
genSeq.Sherpa_i.Parameters += [
"BEAM_1=2212",
"BEAM_2=2212",
"MAX_PROPER_LIFETIME=10.0",
"HEPMC_TREE_LIKE=1",
"PRETTY_PRINT=Off",
]
## Cap event weights at |w|<10 in unweighted evgen; set H-event shower mode
## in the soft region to avoid instable weights
genSeq.Sherpa_i.Parameters += [
"OVERWEIGHT_THRESHOLD=10",
"PP_HPSMODE=0"
]
## Enable scale variations by default
genSeq.Sherpa_i.Parameters += [
"HEPMC_USE_NAMED_WEIGHTS=1",
"CSS_REWEIGHT=1",
"REWEIGHT_SPLITTING_PDF_SCALES=1",
"REWEIGHT_SPLITTING_ALPHAS_SCALES=1",
"CSS_REWEIGHT_SCALE_CUTOFF=5.0",
"HEPMC_INCLUDE_ME_ONLY_VARIATIONS=1",
"SCALE_VARIATIONS=0.25,0.25 0.25,1. 1.,0.25 1.,1. 1.,4. 4.,1. 4.,4.",
]
## Switch to EW_SCHEME=0 to be able to set PDG value of thetaW
genSeq.Sherpa_i.Parameters += [ "EW_SCHEME=0" ]
try:
USE_PDG_VALUES
except NameError:
USE_PDG_VALUES = False
## if USE_PDG_VALUES = True, load PDG value
## of sin2thetaW and particle masses/widths
## from parameter dictionary located in
## EvgenProdTools/python/offline_dict.py
## ToDo: Include partial widths for H/W/Z?
recorded = []
if USE_PDG_VALUES:
from EvgenProdTools.offline_dict import parameters
for k,v in parameters.items():
if k == 'particles':
for key,value in v.items():
if 5 < int(key) and int(key) < 26:
## This includes now the top quark,
## the leptons and the bosons
genSeq.Sherpa_i.Parameters += [
'MASS['+key+']='+ value['mass'],
'WIDTH['+key+']='+ value['width'],
]
recorded.append(key)
elif k == 'EW_parameters':
for key,value in v.items():
if key[0] == 'SIN2THETAW':
genSeq.Sherpa_i.Parameters += [
str(key[0])+'='+str(value),
]
recorded.append(str(key[0]))
break
# Fall-back to the MC15 default values if need be
defaults = {
'6' : [ "MASS[6]=172.5", "WIDTH[6]=1.32" ],
'15' : [ "MASS[15]=1.777", "WIDTH[15]=2.26735e-12" ],
'23' : [ "MASS[23]=91.1876", "WIDTH[23]=2.4952" ],
'24' : [ "MASS[24]=80.399", "WIDTH[24]=2.085" ],
'SIN2THETAW' : [ "SIN2THETAW=0.23113" ],
}
for key, value in defaults.items():
if key not in recorded:
genSeq.Sherpa_i.Parameters += value
## set/add partial widths for H, W, Z to PDG values
## cf. https://sherpa.hepforge.org/doc/SHERPA-MC-2.2.4.html#HDH_005fWIDTH
genSeq.Sherpa_i.Parameters += [
"HDH_WIDTH[6,24,5]=1.32", #updated to comply latest updated top results
"HDH_WIDTH[-6,-24,-5]=1.32", #updated to comply latest updated top results
"HDH_WIDTH[25,5,-5]=2.35e-3",
"HDH_WIDTH[25,15,-15]=2.57e-4",
"HDH_WIDTH[25,13,-13]=8.91e-7",
"HDH_WIDTH[25,4,-4]=1.18e-4",
"HDH_WIDTH[25,3,-3]=1.00e-6",
"HDH_WIDTH[25,21,21]=3.49e-4",
"HDH_WIDTH[25,22,22]=9.28e-6",
"HDH_WIDTH[24,2,-1]=0.7041",
"HDH_WIDTH[24,4,-3]=0.7041",
"HDH_WIDTH[24,12,-11]=0.2256",
"HDH_WIDTH[24,14,-13]=0.2256",
"HDH_WIDTH[24,16,-15]=0.2256",
"HDH_WIDTH[-24,-2,1]=0.7041",
"HDH_WIDTH[-24,-4,3]=0.7041",
"HDH_WIDTH[-24,-12,11]=0.2256",
"HDH_WIDTH[-24,-14,13]=0.2256",
"HDH_WIDTH[-24,-16,15]=0.2256",
"HDH_WIDTH[23,1,-1]=0.3828",
"HDH_WIDTH[23,2,-2]=0.2980",
"HDH_WIDTH[23,3,-3]=0.3828",
"HDH_WIDTH[23,4,-4]=0.2980",
"HDH_WIDTH[23,5,-5]=0.3828",
"HDH_WIDTH[23,11,-11]=0.0840",
"HDH_WIDTH[23,12,-12]=0.1663",
"HDH_WIDTH[23,13,-13]=0.0840",
"HDH_WIDTH[23,14,-14]=0.1663",
"HDH_WIDTH[23,15,-15]=0.0840",
"HDH_WIDTH[23,16,-16]=0.1663",
]
## OpenLoops parameters
genSeq.Sherpa_i.Parameters += [
"OL_PREFIX=/cvmfs/sft.cern.ch/lcg/releases/LCG_88/MCGenerators/openloops/2.0.0/x86_64-slc6-gcc62-opt",
"OL_PARAMETERS=preset=2 write_parameters=1",
]
# Use EW scheme which allows specifying sinThetaW and mZ simultaneously at the expense of mW.
# Three sub-options for specifying the QED coupling are introduced:
#
# EW_SCHEME=20 for alpha(0), mZ, sinThetaW
# EW_SCHEME=21 for Gmu, mZ, sinThetaW
# EW_SCHEME=22 for alpha(mZ), mZ, sinThetaW
genSeq.Sherpa_i.Parameters += [ "EW_SCHEME=22" ]
try:
USE_PDG_VALUES
except NameError:
USE_PDG_VALUES = False
## if USE_PDG_VALUES = True, load PDG value of
## sin2thetaW from parameter dictionary located
## in EvgenProdTools/python/offline_dict.py
if USE_PDG_VALUES:
from EvgenProdTools.offline_dict import parameters
for k,v in parameters.items():
if k == 'EW_parameters':
for key,value in v.items():
if key[0] == 'SIN2THETAW':
genSeq.Sherpa_i.Parameters += [
str(key[0])+'='+str(value),
]
break
break
if 'SIN2THETAW' not in genSeq.Sherpa_i.Parameters[-1]:
genSeq.Sherpa_i.Parameters += [ "SIN2THETAW=0.23113" ]
## Overwrite OL_PREFIX to not use it from cvmfs (which doesn't have this scheme implemented yet)
## Also adding OL_IGNORE_MODEL (default to SM) since the scheme names aren't synchronised yet
genSeq.Sherpa_i.Parameters += [
"OL_PREFIX=./Process/OpenLoops",
"OL_PARAMETERS=ew_renorm_scheme 22 write_parameters 1",
"OL_IGNORE_MODEL=1",
]
# CAUTION: when including this, you have to set the following process-dependent setting in your JO:
# If two strong couplings are involved at Born level, `FUSING_DIRECT_FACTOR=1` (e.g. Zbb).
# If there are four such couplings, `FUSING_DIRECT_FACTOR=2` (e.g. ttbb).
# taken from Sherpa examples: Examples/V_plus_Bs/LHC_Fusing/
genSeq.Sherpa_i.Parameters += [ "SHERPA_LDADD=SherpaFusing",
"USERHOOK=Fusing_Direct",
"CSS_SCALE_SCHEME=20",
"CSS_EVOLUTION_SCHEME=30", ]
# taken from Sherpa examples: Examples/V_plus_Bs/LHC_Fusing/
genSeq.Sherpa_i.Parameters += [ "SHERPA_LDADD=SherpaFusing",
"USERHOOK=Fusing_Fragmentation",
"CSS_SCALE_SCHEME=20",
"CSS_EVOLUTION_SCHEME=30",
"FUSING_FRAGMENTATION_STORE_AS_WEIGHT=1",
]
genSeq.Sherpa_i.Parameters += [
"FRAGMENTATION=Lund",
"DECAYMODEL=Lund",
"PARJ(21)=0.36",
"PARJ(41)=0.3",
"PARJ(42)=0.6"
]
evgenConfig.tune = "NNPDF3.0 NNLO"
genSeq.Sherpa_i.Parameters += [
"PDF_LIBRARY=LHAPDFSherpa",
"USE_PDF_ALPHAS=1",
"PDF_SET=NNPDF30_nnlo_as_0118_hessian",
"PDF_VARIATIONS=NNPDF30_nnlo_as_0118_hessian[all] NNPDF30_nnlo_as_0117 NNPDF30_nnlo_as_0119 MMHT2014nnlo68cl CT14nnlo PDF4LHC15_nnlo_30_pdfas[all] NNPDF31_nnlo_as_0118_hessian",
]
evgenConfig.tune = "NNPDF3.0 NNLO"
genSeq.Sherpa_i.Parameters += [
"PDF_LIBRARY=LHAPDFSherpa",
"USE_PDF_ALPHAS=1",
"PDF_SET=NNPDF30_nnlo_as_0118_nf_4",
"PDF_VARIATIONS=NNPDF30_nnlo_as_0118_nf_4[all] NNPDF30_nnlo_as_0117_nf_4 NNPDF30_nnlo_as_0119_nf_4 MMHT2014nnlo68cl_nf4 CT14nnlo_NF4 PDF4LHC15_nlo_nf4_30[all]",
]
include("MC15JobOptions/Sherpa_NNPDF30NNLO_Common.py")
include("Sherpa_i/Base_Fragment.py")
include("Sherpa_i/NNPDF30NNLO.py")
evgenConfig.description = "Sherpa 2.2.x example JO, Z+0,1-jet production."
evgenConfig.keywords = [ "Example", "DrellYan" ]
evgenConfig.keywords = [ "2lepton" ]
evgenConfig.contact = [ "atlas-generators-sherpa@cern.ch", "frank.siegert@cern.ch"]
evgenConfig.nEventsPerJob = 10000
sherpaRunCard="""
genSeq.Sherpa_i.RunCard="""
(processes){
Process 93 93 -> 11 -11 93{1}
Order (*,2)
......@@ -16,3 +18,10 @@ sherpaRunCard="""
Mass 11 -11 40 E_CMS
}(selector)
"""
genSeq.Sherpa_i.Parameters += []
genSeq.Sherpa_i.OpenLoopsLibs = []
genSeq.Sherpa_i.ExtraFiles = []
genSeq.Sherpa_i.NCores = 1
genSeq.Sherpa_i.CleanupGeneratedFiles = 1
Please refer to
https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/SherpaForAtlas#MC12
https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/SherpaForAtlas
for information and instructions on how to use Sherpa JOs.
for more information about Sherpa JOs.
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "HepMC/GenEvent.h"
namespace Rivet {
/// @brief Analysis for testing trivial reweighting
class SherpaTest : public Analysis {
public:
/// @name Constructors etc.
//@{
/// Constructor
SherpaTest()
: Analysis("SherpaTest")
{ }
//@}
public:
/// @name Analysis methods
//@{
/// Book histograms before the run
void init() {
_h_enW = bookHisto1D("NomEqualsTrivWeightVariationMUR1_MUF1_PDF261000", 2, -0.5, 1.5);
_h_enW2 = bookHisto1D("LessThan1e-14RelativeDiffNomTrivWeightVariationMUR1_MUF1_PDF261000", 2, -0.5, 1.5);
_h_enW3 = bookHisto1D("LessThan1e-12RelativeDiffNomTrivWeightVariationMUR1_MUF1_PDF261000", 2, -0.5, 1.5);
}
/// Perform the per-event analysis
void analyze(const Event& event) {
double trivWeight = event.genEvent()->weights()["MUR1_MUF1_PDF261000"];
double Weight = event.weight();//= event.genEvent()->weights()["Weight"];
_h_enW ->fill((trivWeight==Weight ? 1. : 0.), 1.);
double presicion = 1e-14;
double presicion3 = 1e-12;
_h_enW2 ->fill((abs(trivWeight/Weight-1) < presicion ? 1. : 0.), 1.);
_h_enW3 ->fill((abs(trivWeight/Weight-1) < presicion3 ? 1. : 0.), 1.);
/*if (abs(trivWeight/Weight-1) > 1e-16) {
std::cout << "Weight: " << Weight <<std::endl;
std::cout << "trivWeight: " << trivWeight <<std::endl;
std::cout << "trivWeight-Weight: " << trivWeight-Weight <<std::endl;
std::cout << "trivWeight/Weight-1: " << trivWeight/Weight-1 <<std::endl;
std::cout << "abs(trivWeight/Weight-1): " << abs(trivWeight/Weight-1) <<std::endl;
}*/
}
/// Normalise histograms etc., after the run
void finalize() {
}
//@}
private:
/// @name Histograms
Histo1DPtr _h_enW;
Histo1DPtr _h_enW2;
Histo1DPtr _h_enW3;
};
// The hook for the plugin system
DECLARE_RIVET_PLUGIN(SherpaTest);
}
......@@ -520,7 +520,7 @@ def createLowPtLargeD0TrackingFlags():
def createLowPtTrackingFlags():
icf = createTrackingFlags()
icf.extension = "LowPt"
icf.maxPT = lambda pcf: (1e6 if pcf.InDet.doMinBias else pcf.InDet.Tracking.minPt + 0.3) * Units.GeV
icf.maxPT = lambda pcf: (1e6 if pcf.InDet.doMinBias else pcf.InDet.Tracking.minPT + 0.3) * Units.GeV
icf.minPT = 0.050 * Units.GeV
icf.minClusters = 5
icf.minSiNotShared = 4
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment