CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 12 of file pileupReCalc_Lumis.py.

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

Variable Documentation

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

Definition at line 40 of file pileupReCalc_Lumis.py.

string pileupReCalc_Lumis.default = 'PileupRecalcJSON.txt'

Definition at line 51 of file pileupReCalc_Lumis.py.

string pileupReCalc_Lumis.help = 'output pileup JSON file'

Definition at line 52 of file pileupReCalc_Lumis.py.

tuple pileupReCalc_Lumis.inputPileupRange = parseInputFile(options.inputLumiJSON)

Definition at line 89 of file pileupReCalc_Lumis.py.

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

Definition at line 82 of file pileupReCalc_Lumis.py.

tuple pileupReCalc_Lumis.lastindex = len(OUTPUTLINE)

Definition at line 147 of file pileupReCalc_Lumis.py.

list pileupReCalc_Lumis.lslist = inputRange[run]

Definition at line 106 of file pileupReCalc_Lumis.py.

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

Definition at line 131 of file pileupReCalc_Lumis.py.

list pileupReCalc_Lumis.newInstLumi = scale*PUlumiInfo[2]

Definition at line 124 of file pileupReCalc_Lumis.py.

list pileupReCalc_Lumis.newIntLumi = scale*PUlumiInfo[0]

Definition at line 122 of file pileupReCalc_Lumis.py.

list pileupReCalc_Lumis.newRmsLumi = scale*PUlumiInfo[1]

Definition at line 123 of file pileupReCalc_Lumis.py.

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

Definition at line 174 of file pileupReCalc_Lumis.py.

pileupReCalc_Lumis.OUTPUTLINE = ""

Definition at line 94 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 36 of file pileupReCalc_Lumis.py.

list pileupReCalc_Lumis.PixlumiInfo = lslist[LSnumber]

Definition at line 111 of file pileupReCalc_Lumis.py.

list pileupReCalc_Lumis.PUlumiInfo = LSPUlist[LSnumber]

Definition at line 110 of file pileupReCalc_Lumis.py.

list pileupReCalc_Lumis.scale = 0

Definition at line 114 of file pileupReCalc_Lumis.py.

list pileupReCalc_Lumis.trunc = OUTPUTLINE[0:lastindex]

Definition at line 148 of file pileupReCalc_Lumis.py.

string pileupReCalc_Lumis.VERSION = '1.00'

Definition at line 3 of file pileupReCalc_Lumis.py.