Skip to content

Instantly share code, notes, and snippets.

View nsahoo's full-sized avatar
🇮🇳

Niladri Sahoo nsahoo

🇮🇳
View GitHub Profile
# Get the Monaco font for linux
wget http://www.gringod.com/wp-upload/software/Fonts/Monaco_Linux.ttf
# If wget is NOT installed, install it by
sudo apt-get install wget
# Install the font
sudo mkdir /usr/share/fonts/truetype
sudo cp Monaco_Linux.ttf /usr/share/fonts/truetype/
cd /usr/share/fonts/truetype
@nsahoo
nsahoo / crab_job_commands
Last active February 11, 2016 05:24
crab2 job
# crab environment set-up
source /afs/cern.ch/cms/LCG/LCG-2/UI/cms_ui_env.sh
source /afs/cern.ch/cms/ccs/wm/scripts/Crab/crab.sh
# create the proxy
voms-proxy-init -voms cms -valid 192:00
# check the proxy
voms-proxy-info -all
@nsahoo
nsahoo / HLT_path_name
Last active August 29, 2015 13:56
HLT path names for 2011 and 2012
# HLT path names for 2011 data taking
[1] HLT_Dimuon6p5_LowMass_Displaced_v*
[2] HLT_Dimuon7_LowMass_Displaced_v*
[3] HLT_DoubleMu4_LowMass_Displaced_v*
[4] HLT_DoubleMu4p5_LowMass_Displaced_v*
[5] HLT_DoubleMu5_LowMass_Displaced_v*
@nsahoo
nsahoo / python_script
Last active August 29, 2015 13:56
python script for 2011 MC
import FWCore.ParameterSet.Config as cms
from btokstarmumu_cfi import process
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(500) )
#process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring(
#'file:/afs/cern.ch/user/x/xshi/work/cms/afb/dat/aod/mc/BuToKstarMuMu_7TeV_PYTHIA6.root',
# 'file:/afs/cern.ch/user/x/xshi/work/cms/afb/dat/aod/mc/BuToKstarMuMu_7TeV_PYTHIA6_1_1_96m.root',
@nsahoo
nsahoo / dataset_names
Last active October 21, 2016 09:13
2011 and 2012 datasets
*************
run 2011
*************
dataset = '/MuOnia/Run2011A-May10ReReco-v1/AOD'
dataset = '/MuOnia/Run2011A-PromptReco-v4/AOD'
dataset = '/MuOnia/Run2011A-PromptReco-v5/AOD'
dataset = '/MuOnia/Run2011A-PromptReco-v6/AOD'
@nsahoo
nsahoo / git_commands
Last active October 5, 2018 05:31
git commands
#####################################################
# how to commit changes done in the existing files
#####################################################
git commit -a -m "xxxxxxxx"
git status
git push
=====>> Very Important <<=====
############################################################
# how to create a branch and delete it locally and remotely
@nsahoo
nsahoo / how_to_get_gen_fragment
Last active August 29, 2015 13:56
gen fragment for MC sample
# create a directory in your /src area
mkdir -p Configuration/GenProduction/
# clone the package containing 7TeV and 8TeV gen fragments
git clone [email protected]:cms-sw/genproductions.git Configuration/GenProduction/
cd Configuration/GenProduction/python/
# inside the python directory, there are sub-directories like SevenTeV and EightTeV where the gen fragments can be found.
@nsahoo
nsahoo / evtgen_dec_file
Created February 20, 2014 12:28
evtgen .DEC file
# add the package to get the .DEC files
git cms-addpkg GeneratorInterface/ExternalDecays/data/
@nsahoo
nsahoo / MC_simulation
Last active October 4, 2016 12:29
MC simulation
################
# Instructions #
################
1. copy the gen fragment to Configuration/GenProduction/python/SevenTeV or EightTeV directory
2. if dec file is not present in repository, copy it to GeneratorInterface/ExternalDecays/data/
3. do scramv1 b
# produce just GEN-MC
cmsDriver.py Configuration/GenProduction/python/SevenTeV/PYTHIA6_BuToKstarMuMu_EtaPtFilter_TuneZ2_7TeV_cff.py -s GEN --no_output --conditions START42_V14B::All --datatier GEN-SIM-RAW --eventcontent RAWSIM --customise=Configuration/GenProduction/customise_SilentMessageLogger.py -n 100000 --no_exec
@nsahoo
nsahoo / grid_cert_install
Created February 26, 2014 08:40
grid certificate installation
mkdir $HOME/.globus
openssl pkcs12 -in YourCert.p12 -clcerts -nokeys -out $HOME/.globus/usercert.pem
openssl pkcs12 -in YourCert.p12 -nocerts -out $HOME/.globus/userkey.pem
chmod 400 $HOME/.globus/userkey.pem
chmod 600 $HOME/.globus/usercert.pem
chmod go-rx $HOME/.globus
fs setacl -dir $HOME/.globus -acl system:anyuser l