CMS 3D CMS Logo

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

Functions

def file2map
 

Variables

tuple alpha = abs(mass2 - mass)
 
int beta = 1
 
tuple br = file2map(path+"YR-BR3.txt")
 
string cfmt = "%-"
 
tuple chmax = max([max(len(p),len(c)) for p,c,x in shapeLines])
 
tuple cmax = max([cmax]+[len(l) for l in obskeyline]+[len(x) for x in obsline])
 
tuple DC1 = parseCard(open(file1,"r"), options)
 
tuple DC2 = parseCard(open(file2,"r"), options)
 
tuple dm1 = abs(mass1 - mass)
 Make sure mass1 is always the closest (and pick the worse one in case of a tie) More...
 
tuple dm2 = abs(mass2 - mass)
 
list eff = rate/xsbr1[p]
 
list errline = systlines[name]
 
string file1 = options.ddir+"/%d/hww_%dj_shape.txt"
 
string file2 = options.ddir+"/%d/hww_%dj_shape.txt"
 
tuple ggXS = file2map(path+"YR-XS-ggH.txt")
 
tuple histo = ofile.Get("histo_%s" % p)
 
tuple hmax = max([10] + [len("%-12s %s %s" % (l,p,a)) for l,(p,a,e,nf) in systlines.items()])
 
list keyline = []
 
tuple mass = float(args[0])
 
tuple mass1 = max([m for m in refmasses if m <= mass])
 
tuple mass2 = min([m for m in refmasses if m >= mass])
 
list obsline = [str(x) for x in DC1.obs.values()]
 Basic consistency check. More...
 
tuple ofile = ROOT.TFile( "%s/%g/hww_%dj%s.input.root" % (options.ddir,mass,options.jets,options.postfix) , "UPDATE" )
 
dictionary paramSysts = {}
 
tuple parser = OptionParser(usage="usage: %prog [options] [mass1 mass2] mass3 > datacard3.txt \nrun with --help to get list of options")
 
list path = os.environ['CMSSW_BASE']
 
list pidline = []
 
tuple qqXS = file2map(path+"YR-XS-vbfH.txt")
 
list rate = DC1.exp[b]
 
list refmasses = [ int(line) for line in open(options.ddir+"/"+options.refmasses,"r") ]
 
list signals = []
 
tuple sysnamesSorted = systlines.keys()
 
list systline = []
 
tuple xfile = open(options.ddir+"/%d/hww_%dj_shape%s.txt" % (mass, options.jets,options.postfix), "w")
 
dictionary xsbr = { 'ggH':1.0, 'qqH':1.0 }
 
dictionary xsbr1 = { 'ggH':1.0, 'qqH':1.0 }
 
dictionary xsbr2 = { 'ggH':1.0, 'qqH':1.0 }
 

Function Documentation

def interpolateCardsSimple.file2map (   x)

Definition at line 53 of file interpolateCardsSimple.py.

References python.multivaluedict.dict.

53 
54  def file2map(x):
55  ret = {}; headers = []
56  for x in open(x,"r"):
57  cols = x.split()
58  if len(cols) < 2: continue
59  if "mH" in x:
60  headers = [i.strip() for i in cols[1:]]
61  else:
62  fields = [ float(i) for i in cols ]
63  ret[fields[0]] = dict(zip(headers,fields[1:]))
return ret

Variable Documentation

tuple interpolateCardsSimple.alpha = abs(mass2 - mass)

Definition at line 82 of file interpolateCardsSimple.py.

int interpolateCardsSimple.beta = 1

Definition at line 83 of file interpolateCardsSimple.py.

tuple interpolateCardsSimple.br = file2map(path+"YR-BR3.txt")

Definition at line 67 of file interpolateCardsSimple.py.

string interpolateCardsSimple.cfmt = "%-"

Definition at line 142 of file interpolateCardsSimple.py.

tuple interpolateCardsSimple.chmax = max([max(len(p),len(c)) for p,c,x in shapeLines])

Definition at line 141 of file interpolateCardsSimple.py.

tuple interpolateCardsSimple.cmax = max([cmax]+[len(l) for l in obskeyline]+[len(x) for x in obsline])

Definition at line 148 of file interpolateCardsSimple.py.

tuple interpolateCardsSimple.DC1 = parseCard(open(file1,"r"), options)

Definition at line 90 of file interpolateCardsSimple.py.

tuple interpolateCardsSimple.DC2 = parseCard(open(file2,"r"), options)

Definition at line 93 of file interpolateCardsSimple.py.

tuple interpolateCardsSimple.dm1 = abs(mass1 - mass)

Make sure mass1 is always the closest (and pick the worse one in case of a tie)

Definition at line 43 of file interpolateCardsSimple.py.

tuple interpolateCardsSimple.dm2 = abs(mass2 - mass)

Definition at line 44 of file interpolateCardsSimple.py.

list interpolateCardsSimple.eff = rate/xsbr1[p]

Definition at line 114 of file interpolateCardsSimple.py.

Referenced by HLTMonBitSummary.analyze(), HLTJetMETDQMSource.analyze(), HLTTauDQMSummaryPlotter.bookTriggerBitEfficiencyHistos(), calculateEffAndError(), DQMGenericTnPClient.calculateEfficiency(), HeavyFlavorHarvesting.calculateEfficiency1D(), HeavyFlavorHarvesting.calculateEfficiency2D(), HTrackVariables.computeEfficiency(), HEff1DHit.ComputeEfficiency(), HEff2DHit.ComputeEfficiency(), HEff4DHit.ComputeEfficiency(), GlobalMuonMatchAnalyzer.computeEfficiencyEta(), GlobalMuonMatchAnalyzer.computeEfficiencyPt(), SiPixelIsAliveCalibration.doFits(), SiPixelSCurveCalibrationAnalysis.doFits(), EWKSystUnc.endJob(), ZLONLOHistogrammer.endJob(), zPdfUnc.endJob(), ZMuPtScaleAnalyzer.endJob(), WMuNuValidator.endJob(), ZGlobalVsSAIsolationAnalyzer.endJob(), GenFilterEfficiencyAnalyzer.endJob(), MuonTrackAnalyzer.endJob(), L1GtTrigReport.endJob(), RPCRecHitValidClient.endRun(), EwkElecDQM.endRun(), edm::ExhumeProducer.endRun(), DTCertificationSummary.endRun(), RPCEfficiencyPerRingLayer.endRun(), RPCEfficiencySecond.endRun(), EgHLTOfflineClient.FillHLTvsOfflineHist(), EwkElecTauHistManager.finalizeHistograms(), EwkMuTauHistManager.finalizeHistograms(), CSCOfflineMonitor.histoEfficiency(), CSCValidation.histoEfficiency(), EgHLTOfflineClient.makeEffMonElem2Leg(), TopElectronHLTOfflineClient.makeEffMonElemFromPassAndAll(), EgHLTOfflineClient.makeEffMonElemFromPassAndAll(), EgHLTOfflineClient.makeEffMonElemFromPassAndFail(), EgHLTOfflineClient.makeEffMonElemFromPassAndFailAndTagTag(), jpt::Efficiency.outOfConeCorr(), CaloTowerConstituentsMapBuilder.parseTextMap(), EcalTrigTowerConstituentsMapBuilder.parseTextMap(), HLTTauDQMSummaryPlotter.plotEfficiencyHisto(), HLTTauDQMSummaryPlotter.plotIntegratedEffHisto(), HLTTauDQMSummaryPlotter.plotTriggerBitEfficiencyHistos(), muonisolation::IsolatorByNominalEfficiency.result(), RPCSimParam.simulate(), gen::ExhumeHadronizer.statistics(), SubjetFilterAlgorithm.summary(), EfficiencyHandler.WriteAll(), and CSCEfficiency.~CSCEfficiency().

list interpolateCardsSimple.errline = systlines[name]

Definition at line 124 of file interpolateCardsSimple.py.

string interpolateCardsSimple.file1 = options.ddir+"/%d/hww_%dj_shape.txt"

Definition at line 87 of file interpolateCardsSimple.py.

Referenced by SurveyInputCSCfromPins.analyze(), CaloTPGTranscoderULUTs.produce(), and PFRootEventManager.readOptions().

string interpolateCardsSimple.file2 = options.ddir+"/%d/hww_%dj_shape.txt"

Definition at line 88 of file interpolateCardsSimple.py.

Referenced by CaloTPGTranscoderULUTs.produce(), and PFRootEventManager.readOptions().

tuple interpolateCardsSimple.ggXS = file2map(path+"YR-XS-ggH.txt")

Definition at line 65 of file interpolateCardsSimple.py.

tuple interpolateCardsSimple.histo = ofile.Get("histo_%s" % p)

Definition at line 117 of file interpolateCardsSimple.py.

Referenced by SiStripCalibLorentzAngle.algoBeginJob(), ESSummaryClient.analyze(), RivetHarvesting.analyze(), DTTriggerCheck.analyze(), DTTTrigWriter.analyze(), EBTrendClient.analyze(), EETrendClient.analyze(), DTSegment4DQuality.analyze(), GlobalTrackerMuonAlignment.analyzeTrackTrack(), GlobalTrackerMuonAlignment.analyzeTrackTrajectory(), anlzrname.anlzrname(), ESDataCertificationTask.beginJob(), RPCMonitorRaw.beginJob(), ESDaqInfoTask.beginJob(), ESDcsInfoTask.beginJob(), ESSummaryClient.beginJob(), L1TEventInfoClient.beginJob(), HLTEventInfoClient.beginJob(), BeamMonitor.beginJob(), DTEfficiencyTask.beginLuminosityBlock(), DTResolutionAnalysisTask.beginLuminosityBlock(), DTChamberEfficiencyTask.beginLuminosityBlock(), DTDigiForNoiseTask.beginLuminosityBlock(), DTLocalTriggerTask.beginLuminosityBlock(), SiStripDQMProfileToTkMapConverter.beginRun(), JPTJetAnalyzer.book2DHistogram(), JPTJetAnalyzer.bookHistogram(), JPTJetAnalyzer.bookProfile(), CaloTowersAnalyzer.CaloTowersAnalyzer(), CaloTowersValidation.CaloTowersValidation(), HCovarianceVSParts.Clear(), HMassResolutionVSPart.Clear(), MuScleFitBase.clearHistoMap(), Digi2Raw2Digi.Digi2Raw2Digi(), DTOccupancyClusterBuilder.drawClusters(), DTTriggerCheck.DTTriggerCheck(), EcalBarrelDigisValidation.EcalBarrelDigisValidation(), EcalBarrelRecHitsValidation.EcalBarrelRecHitsValidation(), EcalBarrelSimHitsValidation.EcalBarrelSimHitsValidation(), EcalDigisValidation.EcalDigisValidation(), EcalEndcapDigisValidation.EcalEndcapDigisValidation(), EcalEndcapRecHitsValidation.EcalEndcapRecHitsValidation(), EcalEndcapSimHitsValidation.EcalEndcapSimHitsValidation(), EcalMixingModuleValidation.EcalMixingModuleValidation(), EcalPreshowerDigisValidation.EcalPreshowerDigisValidation(), EcalPreshowerNoiseDistrib.EcalPreshowerNoiseDistrib(), EcalPreshowerRecHitsValidation.EcalPreshowerRecHitsValidation(), EcalPreshowerSimHitsValidation.EcalPreshowerSimHitsValidation(), EcalRecHitsValidation.EcalRecHitsValidation(), EcalSimHitsValidation.EcalSimHitsValidation(), DTNoiseComputation.endJob(), DTCreateSummaryHistos.endJob(), ESSummaryClient.endLumiAnalyze(), AlcaBeamMonitor.endLuminosityBlock(), DTOccupancyTest.endLuminosityBlock(), DTNoiseAnalysisTest.endLuminosityBlock(), DTResolutionTest.endLuminosityBlock(), DTtTrigCalibrationTest.endLuminosityBlock(), DTEfficiencyTest.endLuminosityBlock(), MuonAlignmentSummary.endRun(), MuonTrackResidualsTest.endRun(), ESOccupancyTask.ESOccupancyTask(), ESTimingTask.ESTimingTask(), CommissioningHistograms.extractHistograms(), L1TOccupancyClient.getAvrg(), UtilsClient.getBinStatistics(), SiPixelActionExecutor.getData(), DTVDriftSegment.getHisto(), DTTTrigT0SegCorrection.getHisto(), DTTTrigResidualCorrection.getHisto(), DTOccupancyCluster.getHisto(), getHisto(), getHisto2(), getHistoTH3F(), getHistoTProfile(), getHistoTProfile2D(), HcalNoiseRates.HcalNoiseRates(), HcalRecHitsAnalyzer.HcalRecHitsAnalyzer(), HcalRecHitsValidation.HcalRecHitsValidation(), HcalSimHitsValidation.HcalSimHitsValidation(), HcalSubdetDigiMonitor.HcalSubdetDigiMonitor(), CommissioningTask::HistoSet.histo(), SummaryGenerator.histo1D(), SummaryGenerator.histo2DScatter(), SummaryGenerator.histo2DSum(), LikelihoodPdf.initFromDB(), DQMGenericClient.limitedFit(), SiStripHistoPlotter.makeCondDBPlots(), SiPixelHistoPlotter.makePlot(), SiStripHistoPlotter.makePlot(), makePlots(), NoiseRates.NoiseRates(), RivetAnalyzer.normalizeTree(), DTSegmentAnalysisTest.performClientDiagnostic(), FlavourHistograms< T >.plot(), cond::PayLoadInspector< DataT >.plot(), HLTTauDQMSummaryPlotter.plotIntegratedEffHisto(), PixelVertexProducerMedian.produce(), HIPixelMedianVtxProducer.produce(), SummaryGenerator.profile1D(), SiStripNoisesDQMService.readNoises(), SiStripPedestalsDQMService.readPedestals(), DTResolutionAnalysisTest.resetMEs(), L1TOccupancyClientHistogramService.setMaskedBins(), HcalBaseMonitor.setMinMaxHists1D(), HcalBaseMonitor.setMinMaxHists2D(), DTLocalTriggerTask.setQLabels(), DTLocalTriggerBaseTask.setQLabels(), ESRawDataTask.setup(), ESFEDIntegrityTask.setup(), ESTrendTask.setup(), ESIntegrityTask.setup(), ESIntegrityClient.setup(), EEClusterTaskExtras.setup(), EBClusterTaskExtras.setup(), EBTrendClient.setup(), EETrendClient.setup(), SiPixelRecHitsValid.SiPixelRecHitsValid(), SiStripDigiValid.SiStripDigiValid(), SiStripRecHitsValid.SiStripRecHitsValid(), SiStripTrackingRecHitsValid.SiStripTrackingRecHitsValid(), TauValidation.spinEffectsZH(), PedestalsTask.update(), PedsOnlyTask.update(), NoiseTask.update(), PedsFullNoiseTask.update(), MuonMillepedeAlgorithm.updateInfo(), HCovarianceVSParts.Write(), HMassResolutionVSPart.Write(), MuScleFitBase.writeHistoMap(), MuScleFitPlotter.writeHistoMap(), ResolutionAnalyzer.writeHistoMap(), HCovarianceVSParts.~HCovarianceVSParts(), and HMassResolutionVSPart.~HMassResolutionVSPart().

tuple interpolateCardsSimple.hmax = max([10] + [len("%-12s %s %s" % (l,p,a)) for l,(p,a,e,nf) in systlines.items()])

Definition at line 164 of file interpolateCardsSimple.py.

list interpolateCardsSimple.keyline = []

Definition at line 103 of file interpolateCardsSimple.py.

tuple interpolateCardsSimple.mass = float(args[0])

Definition at line 32 of file interpolateCardsSimple.py.

tuple interpolateCardsSimple.mass1 = max([m for m in refmasses if m <= mass])

Definition at line 33 of file interpolateCardsSimple.py.

Referenced by HemisphereAlgo.reconstruct(), and TtFullHadSignalSel.TtFullHadSignalSel().

tuple interpolateCardsSimple.mass2 = min([m for m in refmasses if m >= mass])

Definition at line 34 of file interpolateCardsSimple.py.

Referenced by lhef::LHEEvent.findSignalVertex(), HemisphereAlgo.reconstruct(), and TtFullHadSignalSel.TtFullHadSignalSel().

list interpolateCardsSimple.obsline = [str(x) for x in DC1.obs.values()]

Basic consistency check.

Definition at line 102 of file interpolateCardsSimple.py.

tuple interpolateCardsSimple.ofile = ROOT.TFile( "%s/%g/hww_%dj%s.input.root" % (options.ddir,mass,options.jets,options.postfix) , "UPDATE" )

Definition at line 85 of file interpolateCardsSimple.py.

Referenced by CalibrationHistosUsingDb.create(), ExclusionBandPlot.dumpToFile(), LEPBandPlot.dumpToFile(), and FileBlob.write().

dictionary interpolateCardsSimple.paramSysts = {}

Definition at line 105 of file interpolateCardsSimple.py.

tuple interpolateCardsSimple.parser = OptionParser(usage="usage: %prog [options] [mass1 mass2] mass3 > datacard3.txt \nrun with --help to get list of options")

Definition at line 12 of file interpolateCardsSimple.py.

list interpolateCardsSimple.path = os.environ['CMSSW_BASE']

Definition at line 64 of file interpolateCardsSimple.py.

list interpolateCardsSimple.pidline = []

Definition at line 155 of file interpolateCardsSimple.py.

tuple interpolateCardsSimple.qqXS = file2map(path+"YR-XS-vbfH.txt")

Definition at line 66 of file interpolateCardsSimple.py.

list interpolateCardsSimple.rate = DC1.exp[b]

Definition at line 112 of file interpolateCardsSimple.py.

list interpolateCardsSimple.refmasses = [ int(line) for line in open(options.ddir+"/"+options.refmasses,"r") ]

Definition at line 29 of file interpolateCardsSimple.py.

list interpolateCardsSimple.signals = []

Definition at line 104 of file interpolateCardsSimple.py.

tuple interpolateCardsSimple.sysnamesSorted = systlines.keys()

Definition at line 171 of file interpolateCardsSimple.py.

list interpolateCardsSimple.systline = []

Definition at line 175 of file interpolateCardsSimple.py.

tuple interpolateCardsSimple.xfile = open(options.ddir+"/%d/hww_%dj_shape%s.txt" % (mass, options.jets,options.postfix), "w")

Definition at line 135 of file interpolateCardsSimple.py.

dictionary interpolateCardsSimple.xsbr = { 'ggH':1.0, 'qqH':1.0 }

Definition at line 51 of file interpolateCardsSimple.py.

dictionary interpolateCardsSimple.xsbr1 = { 'ggH':1.0, 'qqH':1.0 }

Definition at line 49 of file interpolateCardsSimple.py.

dictionary interpolateCardsSimple.xsbr2 = { 'ggH':1.0, 'qqH':1.0 }

Definition at line 50 of file interpolateCardsSimple.py.