Skip to content

Instantly share code, notes, and snippets.

View nsahoo's full-sized avatar
🇮🇳

Niladri Sahoo nsahoo

🇮🇳
View GitHub Profile
Job (
outputsandbox = [] ,
comment = ,
id = 61,
status = failed,
name = Bs2PhiEE CL18_LPTMU_R18S34,
inputdir = /afs/cern.ch/work/n/nsahoo/gangadir_RPhi/workspace/nsahoo/LocalXML/61/input/,
outputdir = /afs/cern.ch/work/n/nsahoo/gangadir_RPhi/workspace/nsahoo/LocalXML/61/output/,
do_auto_resubmit = True,
parallel_submit = True,
@nsahoo
nsahoo / error_while_running
Last active February 3, 2020 15:04
output_error
[nsahoo@lxplus778 workspace]$ python python/submitTupleProcess.py --yaml yaml/tuples/config-TupleProcess-PID.yaml
Error in <TUnixSystem::FindDynamicLibrary>: /afs/cern.ch/work/n/nsahoo/LHCb_ANA/ANA-RX/ewp-rx/analysis/build/x86_64-centos7-gcc8-opt/libvelo[.so | .dll | .dylib | .sl | .dl | .a] does not exist in /afs/cern.ch/work/n/nsahoo/LHCb_ANA/ANA-RX/ewp-rx/analysis/build/x86_64-centos7-gcc8-opt/toys:/afs/cern.ch/work/n/nsahoo/LHCb_ANA/ANA-RX/ewp-rx/analysis/build/x86_64-centos7-gcc8-opt/fitter:/afs/cern.ch/work/n/nsahoo/LHCb_ANA/ANA-RX/ewp-rx/analysis/build/x86_64-centos7-gcc8-opt/efficiencies:/afs/cern.ch/work/n/nsahoo/LHCb_ANA/ANA-RX/ewp-rx/analysis/build/x86_64-centos7-gcc8-opt/optimization:/afs/cern.ch/work/n/nsahoo/LHCb_ANA/ANA-RX/ewp-rx/analysis/build/x86_64-centos7-gcc8-opt/tuples:/afs/cern.ch/work/n/nsahoo/LHCb_ANA/ANA-RX/ewp-rx/analysis/build/x86_64-centos7-gcc8-opt/kernel:/afs/cern.ch/work/n/nsahoo/LHCb_ANA/ANA-RX/ewp-rx/analysis/build/x86_64-centos7-gcc8-opt/velo:/afs/cern.ch/work/n/nsahoo/LHCb_A
@nsahoo
nsahoo / insert a string to each line of a text file
Last active January 17, 2020 13:50
insert_a_string_to_a_file_at_each_line
# insert a string at end of each line in a file, for example:
perl -i -pe 's/$/ STRING1 /' test.list
# insert a string at beginning of each line in a file, for example:
perl -i -pe 's/^/ STRING2 /' test.list
# doing both at a time
perl -i -pe 's/^/ STRING1 /; s/$/ STRING2 /' test.list
@nsahoo
nsahoo / ganga_job_script
Last active October 23, 2019 14:49
first_ganga_job
j = Job(name='First Ganga job')
myApp = GaudiExec()
myApp.directory = "./DaVinciDev_v45r1"
j.application = myApp
j.application.options = ['ntuple_options.py']
j.application.platform = 'x86_64-centos7-gcc8-opt'
bkPath = '/MC/2016/Beam6500GeV-2016-MagDown-Nu1.6-25ns-Pythia8/Sim09c/Trig0x6138160F/Reco16/Turbo03/Stripping28r1NoPrescalingFlagged/27163002/ALLSTREAMS.DST'
data = BKQuery(bkPath, dqflag=['OK']).getDataset()
j.inputdata = data[0:2]
j.backend = Dirac()
@nsahoo
nsahoo / search_files_which_uses_a_particular_file
Last active July 26, 2019 09:04
search a file used in other files
find . -type f -exec grep "RapidMomentumSmearHisto.h" '{}' \; -print
@nsahoo
nsahoo / combine_setup_74x
Last active October 5, 2018 07:18
VBFHbb setup
** SET UP COMBINE TOOL **
export SCRAM_ARCH=slc6_amd64_gcc491
cmsrel CMSSW_7_4_7
cd CMSSW_7_4_7/src
cmsenv
git clone git@github.com:cms-analysis/HiggsAnalysis-CombinedLimit.git HiggsAnalysis/CombinedLimit
cd HiggsAnalysis/CombinedLimit
cd $CMSSW_BASE/src/HiggsAnalysis/CombinedLimit
git fetch origin
@nsahoo
nsahoo / dump_L1_menu_from_MC
Created January 30, 2018 09:05
dump L1 menu from a mc sample
$ conddb list 90X_upgrade2017_realistic_v6_C1 | grep L1TUtmTriggerMenuRcd
[2017-03-01 12:08:04,589] INFO: Connecting to pro [frontier://PromptProd/CMS_CONDITIONS]
L1TUtmTriggerMenuRcd - L1Menu_Collisions2016_v9_m2_xml
$ conddb list L1Menu_Collisions2016_v9_m2_xml
[2017-03-01 12:09:52,157] INFO: Connecting to pro [frontier://PromptProd/CMS_CONDITIONS]
[2017-03-01 12:09:52,634] INFO: Listing with a limit of 500 IOVs, starting from the highest since. If you need to see more, please increase the limit of returned results.
Since: Run Insertion Time Payload Object Type
----------- ------------------- ---------------------------------------- -----------------
1 2016-10-06 19:36:53 7d91b8ddc45380e6930ef03e211de3bc608f7a6b L1TUtmTriggerMenu
awk /NZS/ deletion_ppd_sept_2017.txt > outfile.txt
awk '/NZS/ && /90X_upgrade2017_realistic_v6_C1/' deletion_ppd_sept_2017.txt > outfile2.txt
awk '/NZS/ && (/81X_upgrade2017_realistic_v26/ || /90X_upgrade2017_realistic_v6_C1/)' deletion_ppd_sept_2017.txt > outfile3.txt
@nsahoo
nsahoo / lumi_brilcalc
Created April 22, 2017 05:05
lumi calculation by brilcalc
brilcalc lumi -b "STABLE BEAMS" --normtag /afs/cern.ch/user/l/lumipro/public/Normtags/normtag_PHYSICS.json -i processedLumis.json -u /fb
@nsahoo
nsahoo / dasgoclient
Last active October 23, 2018 10:09
dasgoclient in DAS
###################################################
how to print out the #events in the given dataset
###################################################
./dasgoclient_linux --query="summary dataset=/WWJJToLNuQQ_LL_13TeV-madgraph-pythia8/RunIISpring16MiniAODv2-premix_withHLT_80X_mcRun2_asymptotic_v14-v1/MINIAODSIM"
cbf: https://hypernews.cern.ch/HyperNews/CMS/get/crabFeedback/8361.html
dasgoclient --query 'site dataset=/BsToMuMu_BMuonFilter_SoftQCDnonD_TuneCUEP8M1_13TeV-pythia8-evtgen/RunIISpring16DR80-premix_withHLT_80X_mcRun2_asymptotic_v14-v1/AODSIM'