Instantly share code, notes, and snippets.

View digitizePixelStuckTBM.py
##############################################################################
# run it on the output of:
# cmsDriver.py ZMM_13TeV_TuneCUETP8M1_cfi --conditions auto:phase1_2017_realistic -n 10 --era Run2_2017 --eventcontent FEVTDEBUG --relval 18000,100 -s GEN,SIM --datatier GEN-SIM --beamspot Realistic25ns13TeVEarly2017Collision --geometry DB:Extended
#
import FWCore.ParameterSet.Config as cms
process = cms.Process("Test")
process.load("FWCore.MessageLogger.MessageLogger_cfi")
# process.load("Configuration.StandardSequences.Geometry_cff")
View computeCertifiedLumi.py
###############################
# Disclaimer: you must have set up your cookies according to this recipe firt:
# openssl pkcs12 -clcerts -nokeys -in myCert.p12 -out ~/private/myCert.pem
# openssl pkcs12 -nocerts -in myCert.p12 -out ~/private/myCert.tmp.key
# openssl rsa -in ~/private/myCert.tmp.key -out ~/private/myCert.key
# rm ~/private/myCert.tmp.key
# chmod 644 ~/private/myCert.pem
# chmod 400 ~/private/myCert.key
# cern-get-sso-cookie --cert ~/private/myCert.pem --key ~/private/myCert.key -r -u https://lumis.web.cern.ch/ -o ~/private/ssocookie.txt
#
View TrackerDQM_v2_prompt
4,5c4,5
< | 'SiStrip_HLT' | 'HLT_ZeroBias_v*', 'HLT_ZeroBias_Alignment_v*', 'HLT_ZeroBias_part*', 'HLT_HIZeroBias_v*', 'HLT_BptxAnd_*', 'HLT_L1SingleMuOpen_v*', 'HLT_PAL1MinimumBiasHF_OR_SinglePixelTrack_*', 'HLT_HICentralityVeto*', 'HLT_HIMinimumBias*' |
< | 'SiStrip_IB_HLT' | 'HLT_ZeroBias_FirstCollisionAfterAbortGap_*', 'HLT_ZeroBias_IsolatedBunches_v*', 'HLT_HIZeroBias_FirstCollisionAfterAbortGap_v*' |
---
> | 'SiStrip_HLT' | 'HLT_ZeroBias_v*', 'HLT_ZeroBias_Alignment_v*', 'HLT_ZeroBias_part*', 'HLT_HIZeroBias_v*', 'HLT_BptxAnd_*', 'HLT_L1SingleMuOpen_v*', 'HLT_PAL1MinimumBiasHF_OR_SinglePixelTrack_*', 'HLT_HICentralityVeto*', 'HLT_HIMinBias*' |
> | 'SiStrip_IB_HLT' | 'HLT_ZeroBias_FirstCollisionAfterAbortGap_*', 'HLT_ZeroBias_IsolatedBunches_v*' |
7c7
< | 'Tracking_HLT' | 'HLT_ZeroBias_v*', 'HLT_ZeroBias_Alignment_v*', 'HLT_ZeroBias_part*', 'HLT_HIZeroBias_v*', 'HLT_PAL1MinimumBiasHF_OR_SinglePixelTrack_*', 'HLT_HICentralityVeto*', 'HLT_HIMinimumBias*' |
---
> | 'Tracking_HLT' | 'HLT_ZeroBias_v*', 'HLT_Z
View TrackerDQM_v2_express
,5c4,5
< | 'SiStrip_HLT' | 'HLT_ZeroBias_v*', 'HLT_HIZeroBias_v*', 'HLT_BptxAnd_*', 'HLT_L1SingleMuOpen_v*', 'HLT_PAL1MinimumBiasHF_OR_SinglePixelTrack_*', 'HLT_HICentralityVeto*', 'HLT_HIMinimumBias*' |
< | 'SiStrip_IB_HLT' | 'HLT_ZeroBias_FirstCollisionAfterAbortGap_*', 'HLT_ZeroBias_IsolatedBunches_v*', 'HLT_HIZeroBias_FirstCollisionAfterAbortGap_v*' |
---
> | 'SiStrip_HLT' | 'HLT_ZeroBias_v*', 'HLT_HIZeroBias_v*', 'HLT_BptxAnd_*', 'HLT_L1SingleMuOpen_v*', 'HLT_PAL1MinimumBiasHF_OR_SinglePixelTrack_*', 'HLT_HICentralityVeto*', 'HLT_HIMinBias*' |
> | 'SiStrip_IB_HLT' | 'HLT_ZeroBias_FirstCollisionAfterAbortGap_*', 'HLT_ZeroBias_IsolatedBunches_v*' |
7c7
< | 'Tracking_HLT' | 'HLT_ZeroBias_v*', 'HLT_HIZeroBias_v*', 'HLT_BptxAnd_*', 'HLT_L1SingleMuOpen_v*', 'HLT_PAL1MinimumBiasHF_OR_SinglePixelTrack_*', 'HLT_HICentralityVeto*', 'HLT_HIMinimumBias*' |
---
> | 'Tracking_HLT' | 'HLT_ZeroBias_v*', 'HLT_HIZeroBias_v*', 'HLT_BptxAnd_*', 'HLT_L1SingleMuOpen_v*', 'HLT_PAL1MinimumBiasHF_OR_SinglePixelTrack_*', 'HLT_HIC
View countTBs.py
import os,sys
import getopt
import commands
import time
import ROOT
import urllib
import string
from optparse import OptionParser
totalsize=0
View splitter.py
from collections import defaultdict
f = open('input_list2.txt')
line = f.readline()
APVs=[]
while line:
line = f.readline()
if not line.startswith("FED"):
APVs.append(line.rstrip('\n'))
f.close()
View blocks.py
import os,sys
import getopt
import commands
import time
import ROOT
import urllib
import string
from optparse import OptionParser
filesToKeep=[]
View skimmer_cfg.py
import FWCore.ParameterSet.Config as cms
import FWCore.ParameterSet.VarParsing as VarParsing
options = VarParsing.VarParsing()
###################################################################
# Setup 'standard' options
###################################################################
options.register('myGT',
"103X_upgrade2018_realistic_HI_v2", # default value
VarParsing.VarParsing.multiplicity.singleton, # singleton or list
View G2GainsValidator.py
import ConfigParser
import glob
import os
import numpy
import re
import ROOT
import subprocess
import string
import subprocess
import sys
View badChannelMergeData.py
import FWCore.ParameterSet.Config as cms
import FWCore.ParameterSet.VarParsing as VarParsing
process = cms.Process("BadChannelMerge")
#prepare options
options = VarParsing.VarParsing("analysis")