test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
pileupReCalc_Lumis Namespace Reference

Functions

def parseInputFile
 

Variables

list CalculationModeChoices = ['truth', 'observed']
 
string default = 'PileupRecalcJSON.txt'
 
string help = 'output pileup JSON file'
 
tuple inputPileupRange = parseInputFile(options.inputLumiJSON)
 
tuple inputRange = csvLumibyLSParser.csvLumibyLSParser(options.inputfile)
 
tuple lastindex = len(OUTPUTLINE)
 
list lslist = inputRange[run]
 
string LumiString = "[%d,%2.4e,%2.4e,%2.4e],"
 
list newInstLumi = scale*PUlumiInfo[2]
 
list newIntLumi = scale*PUlumiInfo[0]
 
list newRmsLumi = scale*PUlumiInfo[1]
 
tuple outputfile = open(options.outputfile,'w')
 
string OUTPUTLINE = ""
 
tuple parser
 

## Main Program

More...
 
list PixlumiInfo = lslist[LSnumber]
 
list PUlumiInfo = LSPUlist[LSnumber]
 
int scale = 0
 
list trunc = OUTPUTLINE[0:lastindex]
 
string VERSION = '1.00'
 

Function Documentation

def pileupReCalc_Lumis.parseInputFile (   inputfilename)
output ({run:[ls:[inlumi, meanint]]})

Definition at line 11 of file pileupReCalc_Lumis.py.

11 
12 def parseInputFile(inputfilename):
13  '''
14  output ({run:[ls:[inlumi, meanint]]})
15  '''
16  selectf=open(inputfilename,'r')
17  inputfilecontent=selectf.read()
18  p=pileupParser.pileupParser(inputfilecontent)
19 
20 # p=inputFilesetParser.inputFilesetParser(inputfilename)
21  runlsbyfile=p.runsandls()
22  return runlsbyfile
23 
24 

Variable Documentation

list pileupReCalc_Lumis.CalculationModeChoices = ['truth', 'observed']

Definition at line 39 of file pileupReCalc_Lumis.py.

string pileupReCalc_Lumis.default = 'PileupRecalcJSON.txt'

Definition at line 50 of file pileupReCalc_Lumis.py.

string pileupReCalc_Lumis.help = 'output pileup JSON file'

Definition at line 51 of file pileupReCalc_Lumis.py.

tuple pileupReCalc_Lumis.inputPileupRange = parseInputFile(options.inputLumiJSON)

Definition at line 88 of file pileupReCalc_Lumis.py.

tuple pileupReCalc_Lumis.inputRange = csvLumibyLSParser.csvLumibyLSParser(options.inputfile)

Definition at line 81 of file pileupReCalc_Lumis.py.

tuple pileupReCalc_Lumis.lastindex = len(OUTPUTLINE)

Definition at line 146 of file pileupReCalc_Lumis.py.

list pileupReCalc_Lumis.lslist = inputRange[run]

Definition at line 105 of file pileupReCalc_Lumis.py.

string pileupReCalc_Lumis.LumiString = "[%d,%2.4e,%2.4e,%2.4e],"

Definition at line 130 of file pileupReCalc_Lumis.py.

list pileupReCalc_Lumis.newInstLumi = scale*PUlumiInfo[2]

Definition at line 123 of file pileupReCalc_Lumis.py.

list pileupReCalc_Lumis.newIntLumi = scale*PUlumiInfo[0]

Definition at line 121 of file pileupReCalc_Lumis.py.

list pileupReCalc_Lumis.newRmsLumi = scale*PUlumiInfo[1]

Definition at line 122 of file pileupReCalc_Lumis.py.

tuple pileupReCalc_Lumis.outputfile = open(options.outputfile,'w')

Definition at line 173 of file pileupReCalc_Lumis.py.

pileupReCalc_Lumis.OUTPUTLINE = ""

Definition at line 93 of file pileupReCalc_Lumis.py.

tuple pileupReCalc_Lumis.parser
Initial value:
1 = optparse.OptionParser("Usage: %prog [--options]",
2  description = "Script to rescale pileup distributions using inputs derived by calculating luminosity for a given set of external corrections (Pixel luminosity, for example). Input format must be -lumibyls-")

## Main Program

Definition at line 35 of file pileupReCalc_Lumis.py.

list pileupReCalc_Lumis.PixlumiInfo = lslist[LSnumber]

Definition at line 110 of file pileupReCalc_Lumis.py.

list pileupReCalc_Lumis.PUlumiInfo = LSPUlist[LSnumber]

Definition at line 109 of file pileupReCalc_Lumis.py.

list pileupReCalc_Lumis.scale = 0

Definition at line 113 of file pileupReCalc_Lumis.py.

list pileupReCalc_Lumis.trunc = OUTPUTLINE[0:lastindex]

Definition at line 147 of file pileupReCalc_Lumis.py.

string pileupReCalc_Lumis.VERSION = '1.00'

Definition at line 2 of file pileupReCalc_Lumis.py.