import yaml
file = open("yamlfile.yml","r")
ymload = yaml.load(file)
file.close()
for sections in ymload:
print sections
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (RooFit) Read Histogram from root file and fit using RooFit | |
import ROOT as r | |
from ROOT import RooErfExpPdf | |
fin = r.TFile.Open("root://cmseos.fnal.gov//store/user/rasharma/SecondStep/WWTree_2018_01_07_12h02/HaddedFiles/Hadds_for_BkgEstimation/WWTree_WJets.root") | |
treeIn = fin.Get("otree") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ROOT import * | |
myfile = TFile('/afs/cern.ch/user/r/rasharma/work/doubleHiggs/flashggFinalFitNew_2017/CMSSW_10_2_13/src/flashggFinalFit/Signal/SingleHiggsOutDir/ttHJetToGG_M125_13TeV_amcatnloFXFX_madspin_pythia8.root') | |
w = myfile.Get("tagsDumper/cms_hgg_13TeV") | |
# print the workspace | |
w.Print(); | |
# get a variable | |
#mass = w.var("CMS_hgg_mass") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void replaceSplit() { | |
TString string1 = "GluGluToHHTo2G4Q_node_cHHH1_13TeV_HHWWggTag_1_FNUFEBDown01sigma"; | |
TString ToReplace = "HHWWggTag_1"; | |
TString ReplaceWith = "HHWWggTag_FH_1"; | |
std::cout << "==>\t" << string1 << std::endl; | |
std::cout << "==>\t" << string1.ReplaceAll(ToReplace, ReplaceWith) << std::endl; | |
std::cout << "==>\t" << string1.Contains("noda") << std::endl; | |
std::cout << "==>\t" << string1.Contains("Tag_1") << std::endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# the argument to this script will be the file created by proxy command, i.e. | |
# voms-proxy-init --voms cms --valid 168:00 | |
# Created proxy in /tmp/x509up_u48539. | |
# then the first argument will be x509up_u48539 only. | |
proxy=${1} | |
cp /tmp/${proxy} ~/ | |
export X509_USER_PROXY=~/${proxy} |
OlderNewer