ATLAS Offline Software
Functions | Variables
MCMCGeneratorHelper Namespace Reference

Functions

def MCMC_generator_map (generatorDict, tagger='GN2v01')
 
def MCMC_dsid_map (geometry, generatorDict={}, selfDefineGenerator=None, tagger='GN2v01')
 

Variables

dictionary DL1dv01_MC20_Generator_dict
 
dictionary DL1dv01_MC23_Generator_dict
 
dictionary GN2v01_MC20_Generator_dict
 
dictionary GN2v01_MC23_Generator_dict
 
dictionary dict_tagger_generator
 

Function Documentation

◆ MCMC_dsid_map()

def MCMCGeneratorHelper.MCMC_dsid_map (   geometry,
  generatorDict = {},
  selfDefineGenerator = None,
  tagger = 'GN2v01' 
)
use metadata(generatorDict) or self set generator (selfDefineGenerator)
   to get the generator setting for MCMC efficiency map

Definition at line 84 of file MCMCGeneratorHelper.py.

84 def MCMC_dsid_map(geometry, generatorDict={}, selfDefineGenerator=None, tagger='GN2v01'):
85  """use metadata(generatorDict) or self set generator (selfDefineGenerator)
86  to get the generator setting for MCMC efficiency map"""
87 
88  if (tagger, geometry) not in dict_tagger_generator:
89  raise ValueError("No CDI MCMC map available for " + tagger + " in " + str(geometry))
90  mc_dict = dict_tagger_generator[tagger, geometry]
91 
92  dsid = None
93  generator = None
94 
95  if selfDefineGenerator is not None and selfDefineGenerator != "autoconfig":
96  generator = selfDefineGenerator
97  else:
98  generator = MCMC_generator_map(generatorDict, tagger)
99  if generator in mc_dict:
100  dsid = mc_dict[generator]
101 
102  if dsid is None:
103  raise ValueError("No CDI MCMC map available for generator: " + generator + " with " + tagger + " in " + str(geometry))
104  else:
105  return dsid

◆ MCMC_generator_map()

def MCMCGeneratorHelper.MCMC_generator_map (   generatorDict,
  tagger = 'GN2v01' 
)

Definition at line 57 of file MCMCGeneratorHelper.py.

57 def MCMC_generator_map(generatorDict, tagger='GN2v01'):
58  generator = None
59  if tagger == 'DL1dv01':
60  if 'Powheg' in generatorDict and 'Pythia8' in generatorDict:
61  generator = 'Powheg+Pythia8'
62  elif ('aMcAtNlo' in generatorDict or 'MadGraph' in generatorDict) and 'Pythia8' in generatorDict:
63  generator = 'aMcAtNlo+Pythia8'
64  elif 'aMcAtNlo' in generatorDict and 'Herwig7' in generatorDict:
65  generator = 'aMcAtNlo+Herwig7'
66  elif 'Herwig7' in generatorDict:
67  generator = 'Herwig'+generatorDict['Herwig7'].replace('.', '')
68  else:
69  if 'Herwig7' in generatorDict:
70  generator = 'Herwig'+generatorDict['Herwig7'].replace('.', '')[:3]
71  elif 'Pythia8' in generatorDict:
72  generator = 'Pythia8'
73  if 'Sherpa' in generatorDict:
74  sherpa_versions = ['Sherpa2210', 'Sherpa2211', 'Sherpa2212', 'Sherpa2214', 'Sherpa2216']
75  generator = 'Sherpa'+generatorDict['Sherpa'].replace('.', '')
76  if any(generator.startswith(version) for version in sherpa_versions):
77  generator = generator[:10]
78  elif generator.startswith('Sherpa221'):
79  generator = 'Sherpa221'
80  if generator is None:
81  generator = str(generatorDict)
82  return generator
83 

Variable Documentation

◆ dict_tagger_generator

dictionary MCMCGeneratorHelper.dict_tagger_generator
Initial value:
1 = {
2  ('DL1dv01', LHCPeriod.Run2): DL1dv01_MC20_Generator_dict,
3  ('DL1dv01', LHCPeriod.Run3): DL1dv01_MC23_Generator_dict,
4  ('GN2v01', LHCPeriod.Run2): GN2v01_MC20_Generator_dict,
5  ('GN2v01', LHCPeriod.Run3): GN2v01_MC23_Generator_dict,
6  }

Definition at line 51 of file MCMCGeneratorHelper.py.

◆ DL1dv01_MC20_Generator_dict

dictionary MCMCGeneratorHelper.DL1dv01_MC20_Generator_dict
Initial value:
1 = {
2  "default": "default",
3  "Powheg+Pythia8": "default",
4  "aMcAtNlo+Pythia8": "410464",
5  "Herwig713": "411233",
6  "Herwig721": "600666",
7  "Herwig723": "600666",
8  "aMcAtNlo+Herwig7": "412116",
9  "Sherpa221": "410250",
10  "Sherpa2210": "700122",
11  "Sherpa2211": "700122",
12  "Sherpa2212": "700660",
13  "Sherpa2214": "700660",
14 }

Definition at line 4 of file MCMCGeneratorHelper.py.

◆ DL1dv01_MC23_Generator_dict

dictionary MCMCGeneratorHelper.DL1dv01_MC23_Generator_dict
Initial value:
1 = {
2  "default": "default",
3  "Powheg+Pythia8": "default",
4  "Herwig721": "601414",
5  "Herwig723": "601414",
6  "Sherpa2211": "700660",
7  "Sherpa2212": "700660",
8  "Sherpa2214": "700660",
9 }

Definition at line 19 of file MCMCGeneratorHelper.py.

◆ GN2v01_MC20_Generator_dict

dictionary MCMCGeneratorHelper.GN2v01_MC20_Generator_dict
Initial value:
1 = {
2  "default": "default",
3  "Pythia8": "default",
4  "Herwig713": "411233",
5  "Herwig721": "600666",
6  "Herwig723": "600666",
7  "Sherpa2210": "700660",
8  "Sherpa2211": "700660",
9  "Sherpa2212": "700660",
10  "Sherpa2214": "700660",
11  "Sherpa2216": "700660",
12 }

Definition at line 29 of file MCMCGeneratorHelper.py.

◆ GN2v01_MC23_Generator_dict

dictionary MCMCGeneratorHelper.GN2v01_MC23_Generator_dict
Initial value:
1 = {
2  "default": "default",
3  "Pythia8": "default",
4  "Herwig721": "601414",
5  "Herwig723": "601414",
6  "Sherpa2212": "700808",
7  "Sherpa2214": "700808",
8  "Sherpa2216": "700808",
9 }

Definition at line 42 of file MCMCGeneratorHelper.py.

replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:307
MCMCGeneratorHelper.MCMC_generator_map
def MCMC_generator_map(generatorDict, tagger='GN2v01')
Definition: MCMCGeneratorHelper.py:57
str
Definition: BTagTrackIpAccessor.cxx:11
MCMCGeneratorHelper.MCMC_dsid_map
def MCMC_dsid_map(geometry, generatorDict={}, selfDefineGenerator=None, tagger='GN2v01')
Definition: MCMCGeneratorHelper.py:84