Skip to content

Instantly share code, notes, and snippets.

View mmusich's full-sized avatar

Marco Musich mmusich

View GitHub Profile
#!/usr/bin/env python
#G.Benelli and Arun Mittal
#Oct 3 2015
#Quick script to split a large sqlite file (holding all of our Noise payloads (Run1+Run2) into a set of smaller ones.
#Trying to keep the size below 100MB to avoid dropbox issues, we decided after a few test to go for 5 IOVs, the reason being that
#!/usr/bin/env python
from os import listdir
from os.path import isfile, join
def writeMetaData(iovs):
script="""{{
"destinationDatabase": "oracle://cms_orcon_prod/CMS_CONDITIONS",
"destinationTags": {{
"SiPixelQuality_v07_offline": {{}}
}},
shift_030umX = cms.PSet(
dXlocal = cms.double(0.3), phiXlocal = cms.double(0.0),
dYlocal = cms.double(0.0), phiYlocal = cms.double(0.0),
dZlocal = cms.double(0.0), phiZlocal = cms.double(0.0)
)
shift_minus030umX = cms.PSet(
dXlocal = cms.double(-0.3), phiXlocal = cms.double(0.0),
dYlocal = cms.double(0.0), phiYlocal = cms.double(0.0),
dZlocal = cms.double(0.0), phiZlocal = cms.double(0.0)
# Auto generated configuration file
# using:
# Revision: 1.19
# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v
# with command line options: SingleNuE10_cfi.py -s GEN,SIM,DIGI,L1,DIGI2RAW,RAW2DIGI,RECO --pileup=Run3_Flat55To75_PoissonOOTPU --conditions 106X_upgrade2018_realistic_v11_L1v1 --eventcontent=RECOSIM --datatier GEN-SIM-RECO -n 100 --no_exec --era Run2_2018 --python_filename=test_highPU.py --pileup_input das:/RelValMinBias_13/CMSSW_10_6_4_patch1-106X_upgrade2018_realistic_v9_HS-v1/GEN-SIM
import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Era_Run2_2018_cff import Run2_2018
process = cms.Process('RECO',Run2_2018)
import FWCore.ParameterSet.Config as cms
process = cms.Process("AlcarecoAnalysis")
###################################################################
def customiseAlignmentAndAPE(process):
###################################################################
if not hasattr(process.GlobalTag,'toGet'):
process.GlobalTag.toGet=cms.VPSet()
process.GlobalTag.toGet.extend( cms.VPSet(cms.PSet(record = cms.string("TrackerAlignmentRcd"),
tag = cms.string("Alignments"),
# Auto generated configuration file
# using:
# Revision: 1.19
# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v
# with command line options: milleStep --data --conditions 106X_dataRun3_Express_v2 --triggerResultsProcess RECO --scenario pp --datatier ALCARECO --eventcontent ALCARECO --era Run2_2018 -s ALCA:PromptCalibProdSiPixelAli --dasquery=file dataset=/StreamExpress/Run2018B-TkAlMinBias-Express-v1/ALCARECO run=317320 -n -1 --no_exec
import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Era_Run2_2018_cff import Run2_2018
process = cms.Process('ReALCA',Run2_2018)
import csv # imports the csv module
import sys # imports the sys module
# poulate runs.csv with:
# brilcalc lumi -b 'STABLE BEAMS' -i /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions16/13TeV/ReReco/Final/Cert_271036-284044_13TeV_23Sep2016ReReco_Collisions16_JSON_MuonPhys.txt -u /pb --normtag /afs/cern.ch/user/l/lumipro/public/Normtags/normtag_DATACERT.json -o runs.csv
IOVs=[273150,278800,284045]
d = {}
d['run:fill'] = []
import glob
import FWCore.ParameterSet.Config as cms
import FWCore.ParameterSet.VarParsing as VarParsing
options = VarParsing.VarParsing()
###################################################################
# Setup 'standard' options
###################################################################
options.register('OutFileName',
diff --git a/CondCore/SiPixelPlugins/interface/SiPixelGainCalibHelper.h b/CondCore/SiPixelPlugins/interface/SiPixelGainCalibHelper.h
index f0629b807eb..a7fd4473885 100644
--- a/CondCore/SiPixelPlugins/interface/SiPixelGainCalibHelper.h
+++ b/CondCore/SiPixelPlugins/interface/SiPixelGainCalibHelper.h
@@ -203,11 +203,11 @@ namespace gainCalibHelper {
1d histogram of SiPixelGainCalibration for Gains of 1 IOV
********************************************************************/
template <gainCalibPI::type myType, class PayloadType>
- class SiPixelGainCalibrationValues : public cond::payloadInspector::PlotImage<PayloadType> {
+ class SiPixelGainCalibrationValues : public cond::payloadInspector::PlotImage<PayloadType, cond::payloadInspector::SINGLE_IOV> {
#include "TArrow.h"
#include "TAxis.h"
#include "TCanvas.h"
#include "TF1.h"
#include "TFile.h"
#include "TGaxis.h"
#include "TGraph.h"
#include "TGraphAsymmErrors.h"
#include "TGraphErrors.h"
#include "TH1F.h"