Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kcormi authored Aug 12, 2024
2 parents e608081 + 2a34f04 commit fc7121d
Show file tree
Hide file tree
Showing 62 changed files with 2,498 additions and 97 deletions.
158 changes: 139 additions & 19 deletions .github/workflows/cvmfs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,43 @@ on:
push:
branches:
- main

jobs:
test_workflow:
runs-on: ubuntu-latest
strategy:
matrix:
IMAGE: ["cmscloud/al9-cms"]
CMSSW_VERSION: ["CMSSW_14_1_0_pre4"] # ROOT v6.30/07
CMSSW_VERSION: ["CMSSW_14_1_0_pre4"]
SCRAM_ARCH: ["el9_amd64_gcc12"]
ROOT: ["ROOT v6.30"]
include:
- IMAGE: "cmscloud/cc7-cms"
CMSSW_VERSION: "CMSSW_11_3_4" # ROOT v6.22
CMSSW_VERSION: "CMSSW_11_3_4"
SCRAM_ARCH: "slc7_amd64_gcc900"
ROOT: "ROOT v6.22/08"
- IMAGE: "cmscloud/al9-cms"
CMSSW_VERSION: "CMSSW_14_0_0_pre1" # ROOT v6.26/11
CMSSW_VERSION: "CMSSW_14_0_0_pre1"
SCRAM_ARCH: "el9_amd64_gcc12"

name: Test with ${{ matrix.CMSSW_VERSION }}
ROOT: "ROOT v6.26/11"
env:
docker_opt_rw: -v /cvmfs:/cvmfs:shared -v ${{ github.workspace }}:/work/CombinedLimit --mount source=cmsusr,destination=/home/cmsusr -w /home/cmsusr -e CMSSW_VERSION=${{ matrix.CMSSW_VERSION }} -e SCRAM_ARCH=${{ matrix.SCRAM_ARCH }}
docker_opt_ro: -v /cvmfs:/cvmfs:shared -v cmsusr:/home/cmsusr/cmssw/:ro -w /home/cmsusr/ -e CMSSW_VERSION=${{ matrix.CMSSW_VERSION }} -e SCRAM_ARCH=${{ matrix.SCRAM_ARCH }}
name: Test with ${{ matrix.CMSSW_VERSION }} and ${{ matrix.ROOT }}
steps:
# checkout the files of this repository
- uses: actions/checkout@v4
- uses: cvmfs-contrib/github-action-cvmfs@v4
with:
cvmfs_repositories: 'cms.cern.ch'
- uses: rhaschke/docker-run-action@v5
name: Build Combine
with:
image: ${{ matrix.IMAGE }}
shell: bash
options: -v /cvmfs:/cvmfs:shared -v ${{ github.workspace }}:/work/CombinedLimit -w /home/cmsusr -e CMSSW_VERSION=${{ matrix.CMSSW_VERSION }} -e SCRAM_ARCH=${{ matrix.SCRAM_ARCH }}
options: ${{env.docker_opt_rw}}
run: |
ls /work/CombinedLimit
ls /cvmfs/cms.cern.ch | grep common
cd /home/cmsusr/
source /cvmfs/cms.cern.ch/cmsset_default.sh
scram project ${CMSSW_VERSION}
source /cvmfs/cms.cern.ch/cmsset_default.sh
cd ${CMSSW_VERSION}/src
cmsenv
mkdir -p HiggsAnalysis
Expand All @@ -49,17 +51,135 @@ jobs:
echo ${PATH}
root --version
combine --help
combine HiggsAnalysis/CombinedLimit/data/tutorials/CAT23001/datacard-2-template-analysis.txt -M HybridNew --LHCmode LHC-limits --rMax 2.0 --clsAcc 0.01
combine HiggsAnalysis/CombinedLimit/data/tutorials/CAT23001/datacard-3-parametric-analysis.txt -M HybridNew --LHCmode LHC-significance -T 100 --mass 125
combine HiggsAnalysis/CombinedLimit/data/tutorials/CAT23001/datacard-3-parametric-analysis.txt -M Significance --mass 125
combine HiggsAnalysis/CombinedLimit/data/tutorials/CAT23001/datacard-1-counting-experiment.txt -M MarkovChainMC --tries 100
text2workspace.py HiggsAnalysis/CombinedLimit/data/tutorials/CAT23001/datacard-5-multi-signal.txt -P HiggsAnalysis.CombinedLimit.PhysicsModel:floatingXSHiggs --PO modes=ggH,qqH -o datacard-5-multi-signal.root --mass 125
combine datacard-5-multi-signal.root -M MultiDimFit --algo singles --mass 125
combine HiggsAnalysis/CombinedLimit/data/tutorials/CAT23001/datacard-5-multi-signal.txt -M ChannelCompatibilityCheck --mass 125
- uses: rhaschke/docker-run-action@v5
name: Counting datacard
with:
image: ${{ matrix.IMAGE }}
shell: bash
options: ${{env.docker_opt_ro}}
run: |
cp -r cmssw/${CMSSW_VERSION} .
cd /home/cmsusr/${CMSSW_VERSION}/src
source /cvmfs/cms.cern.ch/cmsset_default.sh
cmsenv
text2workspace.py HiggsAnalysis/CombinedLimit/data/tutorials/multiDim/toy-hgg-125.txt -m 125 -P HiggsAnalysis.CombinedLimit.PhysicsModel:floatingXSHiggs --PO modes=ggH,qqH
combine -M MultiDimFit HiggsAnalysis/CombinedLimit/data/tutorials/multiDim/toy-hgg-125.root --setParameterRanges r=-1,1
- uses: rhaschke/docker-run-action@v5
name: Countind datacard Fixed Point from csv
with:
image: ${{ matrix.IMAGE }}
shell: bash
options: ${{env.docker_opt_ro}}
run: |
cp -r cmssw/${CMSSW_VERSION} .
cd /home/cmsusr/${CMSSW_VERSION}/src
source /cvmfs/cms.cern.ch/cmsset_default.sh
cmsenv
text2workspace.py HiggsAnalysis/CombinedLimit/data/tutorials/multiDim/toy-hgg-125.txt -m 125 -P HiggsAnalysis.CombinedLimit.PhysicsModel:floatingXSHiggs --PO modes=ggH,qqH
combine -M MultiDimFit HiggsAnalysis/CombinedLimit/data/tutorials/multiDim/toy-hgg-125.root
combineTool.py -M MultiDimFit HiggsAnalysis/CombinedLimit/data/tutorials/multiDim/toy-hgg-125.root --fromfile HiggsAnalysis/CombinedLimit/data/tutorials/multiDim/fixed.csv
- uses: rhaschke/docker-run-action@v5
name: Parametric analysis
with:
image: ${{ matrix.IMAGE }}
shell: bash
options: ${{env.docker_opt_ro}}
run: |
cp -r cmssw/${CMSSW_VERSION} .
cd /home/cmsusr/${CMSSW_VERSION}/src
source /cvmfs/cms.cern.ch/cmsset_default.sh
cmsenv
text2workspace.py HiggsAnalysis/CombinedLimit/data/tutorials/CAT23001/datacard-3-parametric-analysis.txt -o ws_parametric-analysis.root --mass 125
combine -M MultiDimFit ws_parametric-analysis.root --algo singles --setParameterRanges r=-2,1
- uses: rhaschke/docker-run-action@v5
name: Template analysis
with:
image: ${{ matrix.IMAGE }}
shell: bash
options: ${{env.docker_opt_ro}}
run: |
cp -r cmssw/${CMSSW_VERSION} .
cd /home/cmsusr/${CMSSW_VERSION}/src
source /cvmfs/cms.cern.ch/cmsset_default.sh
cmsenv
text2workspace.py HiggsAnalysis/CombinedLimit/data/ci/template-analysis_shapeInterp.txt -o ws_template-analysis.root --mass 200
combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-1,1
combine -M FitDiagnostics ws_template-analysis.root -t -1 --setParameters r=1 --plots --setParameterRanges r=-1,1
- uses: rhaschke/docker-run-action@v5
name: Template analysis CMSHistSum
with:
image: ${{ matrix.IMAGE }}
shell: bash
options: ${{env.docker_opt_ro}}
run: |
cp -r cmssw/${CMSSW_VERSION} .
cd /home/cmsusr/${CMSSW_VERSION}/src
source /cvmfs/cms.cern.ch/cmsset_default.sh
cmsenv
text2workspace.py HiggsAnalysis/CombinedLimit/data/ci/template-analysis_shapeInterp.txt -o ws_template-analysis.root --mass 200 --for-fits --no-wrappers --use-histsum
combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-1,1 --X-rtd FAST_VERTICAL_MORPH
- uses: rhaschke/docker-run-action@v5
name: Template analysis CMSHistSum with shapeN
with:
image: ${{ matrix.IMAGE }}
shell: bash
options: ${{env.docker_opt_ro}}
run: |
cp -r cmssw/${CMSSW_VERSION} .
cd /home/cmsusr/${CMSSW_VERSION}/src
source /cvmfs/cms.cern.ch/cmsset_default.sh
cmsenv
text2workspace.py HiggsAnalysis/CombinedLimit/data/ci/template-analysis_shapeNInterp.txt -o ws_template-analysis.root --mass 200 --for-fits --no-wrappers --use-histsum
combine -M MultiDimFit ws_template-analysis.root --algo singles --setParameterRanges r=-1,1 --X-rtd FAST_VERTICAL_MORPH
- uses: rhaschke/docker-run-action@v5
name: RooMultiPdf
if: ${{ startsWith(matrix.CMSSW_VERSION, 'CMSSW_14') }}
with:
image: ${{ matrix.IMAGE }}
shell: bash
options: ${{env.docker_opt_ro}}
run: |
cp -r cmssw/${CMSSW_VERSION} .
cd /home/cmsusr/${CMSSW_VERSION}/src
source /cvmfs/cms.cern.ch/cmsset_default.sh
cmsenv
ulimit -s unlimited
text2workspace.py HiggsAnalysis/CombinedLimit/data/ci/datacard_RooMultiPdf.txt.gz -o ws_RooMultiPdf.root
combine -M MultiDimFit -m 125.38 --setParameters pdf_index_ggh=2 --freezeParameters MH --cminDefaultMinimizerStrategy 0 --X-rtd FAST_VERTICAL_MORPH --X-rtd MINIMIZER_freezeDisassociatedParams --X-rtd MINIMIZER_multiMin_maskChannels=2 --algo singles ws_RooMultiPdf.root
- uses: rhaschke/docker-run-action@v5
name: RooParametricHist
with:
image: ${{ matrix.IMAGE }}
shell: bash
options: ${{env.docker_opt_ro}}
run: |
cp -r cmssw/${CMSSW_VERSION} .
cd /home/cmsusr/${CMSSW_VERSION}/src
source /cvmfs/cms.cern.ch/cmsset_default.sh
cmsenv
ulimit -s unlimited
text2workspace.py -P HiggsAnalysis.CombinedLimit.PhysicsModel:multiSignalModel --PO verbose --PO 'map=.*/*hcc*:r[1,-500,500]' --PO 'map=.*/zcc:z[1,-5,5]' HiggsAnalysis/CombinedLimit/data/ci/datacard_RooParametricHist.txt -o ws_RooParametricHist.root
combine -M MultiDimFit ws_RooParametricHist.root --algo singles
- uses: rhaschke/docker-run-action@v5
name: RooHistPdf
if: ${{ startsWith(matrix.CMSSW_VERSION, 'CMSSW_14') }}
with:
image: ${{ matrix.IMAGE }}
shell: bash
options: ${{env.docker_opt_ro}}
run: |
cp -r cmssw/${CMSSW_VERSION} .
cd /home/cmsusr/${CMSSW_VERSION}/src
source /cvmfs/cms.cern.ch/cmsset_default.sh
cmsenv
ulimit -s unlimited
text2workspace.py HiggsAnalysis/CombinedLimit/data/ci/datacard_RooHistPdf.txt.gz -o ws_RooHistPdf.root
combine -M MultiDimFit ws_RooHistPdf.root --algo singles -v -2 --setParameterRanges r=-1,2.
4 changes: 1 addition & 3 deletions bin/PerfTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ int main(int argc, char *argv[]) {
}

RooWorkspace *w = (RooWorkspace*)gDirectory->Get(argv[2]);
// w->Print();
auto allfuncs = w->allFunctions();
auto it =allfuncs.fwdIterator();
for (RooAbsArg *a = it.next(); a != 0; a = it.next()) {
for (auto *a: allfuncs){
auto rrv = dynamic_cast<RooAbsReal*>(a);
if (rrv) {
rrv->getVal();
Expand Down
2 changes: 1 addition & 1 deletion bin/combine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
using namespace std;

// Update whenever we have a new Tag
std::string combineTagString = "v10.0.1";
std::string combineTagString = "v10.0.2";
//

int main(int argc, char **argv) {
Expand Down
2 changes: 1 addition & 1 deletion conda_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ dependencies:
- gsl
- tbb
- vdt
- boost
- boost-cpp
- pcre
- eigen
Binary file added data/ci/datacard_RooHistPdf.txt.gz
Binary file not shown.
Binary file added data/ci/datacard_RooMultiPdf.txt.gz
Binary file not shown.
Loading

0 comments on commit fc7121d

Please sign in to comment.