Public Member Functions | |
def | __init__ (self, cfg_ana, cfg_comp, looperName) |
def | beginLoop (self, setup) |
def | declareHandles (self) |
def | process (self, event) |
def | write (self, setup) |
Public Attributes | |
allVertices | |
datafile | |
datahist | |
doHists | |
enable | |
if component is embed return (has no trigger obj) More... | |
mcfile | |
mchist | |
rawmcpileup | |
Computes pile-up weights for MC from the pile up histograms for MC and data. These histograms should be set on the components as puFileData, puFileMC attributes, as is done here: http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/CMG/CMGTools/H2TauTau/Colin/test_tauMu_2012_cfg.py?view=markup THESE HISTOGRAMS MUST BE CONSISTENT, SEE https://twiki.cern.ch/twiki/bin/view/CMS/CMGToolsPileUpReweighting#Generating_pile_up_distributions If the component is not MC, or if the puFileData and puFileMC are not set for the component, the reweighting is not done. The analyzer sets event.vertexWeight. This weight is multiplied to the global event weight, event.eventWeight. When using this analyzer, make sure that the VertexAnalyzer is disabled, as you would be reweighting the MC PU distribution twice! Additionally, this analyzer writes in the output an histogram containing the unweighting MC pile-up distribution, to be used in input of the weighting for a later pass. Example of use: puAna = cfg.Analyzer( "PileUpAnalyzer", # build unweighted pu distribution using number of pile up interactions if False # otherwise, use fill the distribution using number of true interactions true = True )
Definition at line 11 of file PileUpAnalyzer.py.
def core.PileUpAnalyzer.PileUpAnalyzer.__init__ | ( | self, | |
cfg_ana, | |||
cfg_comp, | |||
looperName | |||
) |
Definition at line 42 of file PileUpAnalyzer.py.
def core.PileUpAnalyzer.PileUpAnalyzer.beginLoop | ( | self, | |
setup | |||
) |
Definition at line 96 of file PileUpAnalyzer.py.
References Average.
def core.PileUpAnalyzer.PileUpAnalyzer.declareHandles | ( | self | ) |
Definition at line 83 of file PileUpAnalyzer.py.
References core.PileUpAnalyzer.PileUpAnalyzer.allVertices, core.Analyzer.Analyzer.handles, HTTP.RequestManager.handles, and core.Analyzer.Analyzer.mchandles.
def core.PileUpAnalyzer.PileUpAnalyzer.process | ( | self, | |
event | |||
) |
Definition at line 101 of file PileUpAnalyzer.py.
References PVValHelper.add(), analyzer.Analyzer.averages, core.PileUpAnalyzer.PileUpAnalyzer.doHists, core.PileUpAnalyzer.PileUpAnalyzer.enable, core.Analyzer.Analyzer.handles, HTTP.RequestManager.handles, genParticles_cff.map, core.Analyzer.Analyzer.mchandles, core.Analyzer.Analyzer.readCollections(), and ComparisonHelper.zip().
def core.PileUpAnalyzer.PileUpAnalyzer.write | ( | self, | |
setup | |||
) |
Definition at line 157 of file PileUpAnalyzer.py.
References core.PileUpAnalyzer.PileUpAnalyzer.doHists.
core.PileUpAnalyzer.PileUpAnalyzer.allVertices |
Definition at line 50 of file PileUpAnalyzer.py.
Referenced by objects.VertexAnalyzer.VertexAnalyzer.declareHandles(), and core.PileUpAnalyzer.PileUpAnalyzer.declareHandles().
core.PileUpAnalyzer.PileUpAnalyzer.datafile |
Definition at line 72 of file PileUpAnalyzer.py.
core.PileUpAnalyzer.PileUpAnalyzer.datahist |
Definition at line 73 of file PileUpAnalyzer.py.
core.PileUpAnalyzer.PileUpAnalyzer.doHists |
Definition at line 45 of file PileUpAnalyzer.py.
Referenced by core.PileUpAnalyzer.PileUpAnalyzer.process(), objects.VertexAnalyzer.VertexAnalyzer.process(), core.PileUpAnalyzer.PileUpAnalyzer.write(), and objects.VertexAnalyzer.VertexAnalyzer.write().
core.PileUpAnalyzer.PileUpAnalyzer.enable |
if component is embed return (has no trigger obj)
Definition at line 55 of file PileUpAnalyzer.py.
Referenced by o2olib.O2OTool.execute(), and core.PileUpAnalyzer.PileUpAnalyzer.process().
core.PileUpAnalyzer.PileUpAnalyzer.mcfile |
Definition at line 68 of file PileUpAnalyzer.py.
core.PileUpAnalyzer.PileUpAnalyzer.mchist |
Definition at line 69 of file PileUpAnalyzer.py.
core.PileUpAnalyzer.PileUpAnalyzer.rawmcpileup |
Definition at line 53 of file PileUpAnalyzer.py.