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
#setup cmssw | |
mkdir bparkingGeneration | |
cd bparkingGeneration | |
source /cvmfs/cms.cern.ch/cmsset_default.sh | |
cmsrel CMSSW_10_2_22 | |
cd CMSSW_10_2_22/src | |
git clone [email protected]:mieskolainen/nanotron.git nanotron | |
#use singularity for slc6 |
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/bash | |
TOOLS=( | |
pythia8 \ | |
evtgen \ | |
tauolapp \ | |
) | |
TOOLFILE_LIST="" | |
for TOOL in ${TOOLS[@]}; do | |
TOOLFILE_LIST="$TOOLFILE_LIST $TOOL-toolfile" |
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
process.hltEcalUncalibRecHit = cms.EDProducer( "EcalUncalibRecHitProducer", | |
EEdigiCollection = cms.InputTag( 'hltEcalDigis','eeDigis' ), | |
EBdigiCollection = cms.InputTag( 'hltEcalDigis','ebDigis' ), | |
EEhitCollection = cms.string( "EcalUncalibRecHitsEE" ), | |
EBhitCollection = cms.string( "EcalUncalibRecHitsEB" ), | |
algo = cms.string( "EcalUncalibRecHitWorkerMultiFit" ), | |
algoPSet = cms.PSet( | |
ebSpikeThreshold = cms.double( 1.042 ), | |
EBtimeFitLimits_Upper = cms.double( 1.4 ), | |
EEtimeFitLimits_Lower = cms.double( 0.2 ), |
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
double reallySimplified(std::string modelName="signal",std::string outname="ht400Output"){ | |
RooArgList xlist_; | |
RooArgList muA_; | |
RooCategory sampleType("bin_number","Bin Number"); | |
RooRealVar observation("observed","Observed Events bin",1); | |
double bkg[1] = {9.0}; | |
double sig[1] = {3.0}; | |
int nbins = 1;// | |
for (int b=1;b<=nbins;b++){ |
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
import ROOT as r | |
class Transpose(): | |
def transposeHist(self,inHist): | |
outName = inHist.GetName() | |
binWidthX = 2*(inHist.GetXaxis().GetBinCenter(1)-inHist.GetXaxis().GetBinLowEdge(1)) | |
binWidthY = 2*(inHist.GetYaxis().GetBinCenter(1)-inHist.GetYaxis().GetBinLowEdge(1)) | |
xMass = [inHist.GetXaxis().GetBinCenter(x) for x in range(1,inHist.GetXaxis().GetNbins()+1)] | |
yMass = [inHist.GetYaxis().GetBinCenter(y) for y in range(1,inHist.GetYaxis().GetNbins()+1)] | |
xLow = [inHist.GetXaxis().GetBinLowEdge(x) for x in range(1,inHist.GetXaxis().GetNbins()+1)] |
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
double testRooHistPdf(){ | |
TFile * inputFile = TFile::Open("./testShapes.root"); | |
TH1F * dataHist = (TH1F *)inputFile->Get("Signal/data_obs"); | |
TH1F * zinv = (TH1F *)inputFile->Get("Signal/Zinv"); | |
TH1F * ttw = (TH1F *)inputFile->Get("Signal/Ttw"); | |
TH1F * qcd = (TH1F *)inputFile->Get("Signal/Qcd"); | |
TH1F * sigHist = (TH1F *)inputFile->Get("Signal/sig"); | |
TH1F * totalHist = (TH1F *)zinv->Clone("total"); |
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
#!/usr/bin/python | |
import optparse | |
import os | |
import string | |
from collections import OrderedDict as odict | |
import glob | |
import sys,stat,shlex,subprocess | |
import random | |
def parse_args(): |
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
#!/usr/bin/python | |
import pickle | |
from collections import defaultdict | |
from collections import OrderedDict | |
import sys | |
def checkDict(inputData): | |
return (type(inputData) == dict or type(inputData) == defaultdict\ | |
or type(inputData) == OrderedDict) |