Package madgraph :: Package various :: Module banner :: Class Banner
[hide private]
[frames] | no frames]

Class Banner

source code

object --+    
         |    
      dict --+
             |
            Banner

Instance Methods [hide private]
new empty dictionary

__init__(self, banner_path=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
read_banner(self, input_path)
read a banner
source code
 
__getattribute__(self, attr)
allow auto-build for the run_card/param_card/...
source code
 
change_lhe_version(self, version)
change the lhe version associate to the banner
source code
 
get_cross(self, witherror=False)
return the cross-section of the file
source code
 
scale_init_cross(self, ratio)
modify the init information with the associate scale
source code
 
get_pdg_beam(self)
return the pdg of each beam
source code
 
load_basic(self, medir)
Load the proc_card /param_card and run_card
source code
 
change_seed(self, seed)
Change the seed value in the banner
source code
 
add_generation_info(self, cross, nb_event)
add info on MGGeneration
source code
 
split(self, me_dir, proc_card=True)
write the banner in the Cards directory.
source code
 
check_pid(self, pid2label)
special routine removing width/mass of particles not present in the model This is usefull in case of loop model card, when we want to use the non loop model.
source code
 
get_lha_strategy(self)
get the lha_strategy: how the weight have to be handle by the shower
source code
 
set_lha_strategy(self, value)
set the lha_strategy: how the weight have to be handle by the shower
source code
 
modify_init_cross(self, cross)
modify the init information with the associate cross-section
source code
 
write(self, output_path, close_tag=True, exclude=[])
write the banner
source code
 
add(self, path, tag=None)
Add the content of the file to the banner
source code
 
add_text(self, tag, text)
Add the content of the file to the banner
source code
 
charge_card(self, tag)
Build the python object associated to the card
source code
D[k] if k in D, else d
get_detail(self, tag, *arg, **opt)
return a specific
source code
D[k] if k in D, else d
get(self, tag, *arg, **opt)
return a specific
source code
 
set(self, card, *args)
modify one of the cards
source code
 
add_to_file(*args, **opt)
Add the banner to a file and change the associate seed in the banner
source code

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getitem__, __gt__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, __sizeof__, clear, copy, fromkeys, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values, viewitems, viewkeys, viewvalues

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Class Variables [hide private]
  ordered_items = ['mgversion', 'mg5proccard', 'mgproccard', 'mg...
  capitalized_items = {'ma5card_hadron': 'MA5Card_hadron', 'ma5c...
  forbid_cdata = ['initrwgt']
  pat_begin = re.compile(r'<(?P<name>\w*)>')
  pat_end = re.compile(r'</(?P<name>\w*)>')
  tag_to_file = {'init': '', 'initrwgt': '', 'ma5card_hadron': '...

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, banner_path=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Returns:
new empty dictionary

Overrides: object.__init__

__getattribute__(self, attr)

source code 

allow auto-build for the run_card/param_card/...

Overrides: object.__getattribute__

split(self, me_dir, proc_card=True)

source code 

write the banner in the Cards directory. proc_card argument is present to avoid the overwrite of proc_card information

get(self, tag, *arg, **opt)

source code 

return a specific

Returns: D[k] if k in D, else d
Overrides: dict.get

add_to_file(*args, **opt)

source code 

Add the banner to a file and change the associate seed in the banner

Decorators:
  • @misc.multiple_try()

Class Variable Details [hide private]

ordered_items

Value:
['mgversion',
 'mg5proccard',
 'mgproccard',
 'mgruncard',
 'slha',
 'initrwgt',
 'mggenerationinfo',
 'mgpythiacard',
...

capitalized_items

Value:
{'ma5card_hadron': 'MA5Card_hadron',
 'ma5card_parton': 'MA5Card_parton',
 'mg5proccard': 'MG5ProcCard',
 'mgdelphescard': 'MGDelphesCard',
 'mgdelphestrigger': 'MGDelphesTrigger',
 'mggenerationinfo': 'MGGenerationInfo',
 'mgpgscard': 'MGPGSCard',
 'mgproccard': 'MGProcCard',
...

tag_to_file

Value:
{'init': '',
 'initrwgt': '',
 'ma5card_hadron': 'madanalysis5_hadron_card.dat',
 'ma5card_parton': 'madanalysis5_parton_card.dat',
 'madspin': 'madspin_card.dat',
 'mg5proccard': 'proc_card_mg5.dat',
 'mgdelphescard': 'delphes_card.dat',
 'mgdelphestrigger': 'delphes_trigger.dat',
...