<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Dear Rivet, YODA authors,<br>
<br>
I am using Rivet and YODA. I create many histograms (on the order of 400) and creating the .pdf plots for the .dat aabout 10 minutes. As I fine tune the YMin and YMax ranges, I want to be able to test it easily. In short, I want to be able to plot only one
 or a few histograms instead of them all. I find two potential solutions, but I have questions for both.<br>
<br>
1. <br>
rivet-mkhtml ${RIVET_OUTPUT_FILE} -c ${RIVET_ANALYSIS}.plot -m counter*<br>
I see in rivet-mkhtml that -m and -M allow for a regular expression of the histogram. However, this does not work for me. The documentation says<br>
  -m PATHPATTERNS, --match=PATHPATTERNS<br>
                        only write out histograms from analyses whose name<br>
                        matches any of these regexes<br>
  -M PATHUNPATTERNS, --unmatch=PATHUNPATTERNS<br>
                        Exclude histograms whose $path/$name string matches<br>
                        these regexes<br>
There is an inconsistency between the two options, one says name, the other says $path/$name<br>
I tried all options but could not find one that works.<br>
My plots get saved in plots/RivetHbbBJets and there .dot files such as <br>
counter_El.dat                      <br>
h1D_3_ResponsePtCalMuNuMu.dat<br>
I would like to keep only those with "counter_" in the name for example, or remove those with "counter_" in the name.<br>
<br>
2. I found in a Rivet tutorial online by Andy Buckley (which I found very useful, by the way) that I can replace the rivet-mkhtml command with two commands:<br>
# here make all the .dat files (it works)<br>
rivet-cmphistos ${RIVET_OUTPUT_FILE} -o plots --hier-out <br>
# here create only the histograms that I want (it works, so regular expressions work here)<br>
make-plots ./plots/RivetHbbBJets/*counter*.dat --pdfpng<br>
# but then we want one more step, that of making the index.html that has all the plots in one webpage. How is that done in a new command as well? I tried this again, but it did not work.<br>
rivet-mkhtml ${RIVET_OUTPUT_FILE} -c ${RIVET_ANALYSIS}.plot -m counter*<br>
It only creates an index.html in plots, but not in plots/RivetHbbBJets<br>
<br>
I create a similar script myself in bash, but it would be useful if it would provided in a simple form (presumably in python for consistency) by Rivet/Yoda.<br>
#!/bin/bash<br>
<br>
if [ $# -ne 1 ]; then<br>
cat <<EOF<br>
Usage: $0 Folder<br>
Usage: $0 afs/phas.gla.ac.uk/user/a/abuzatu/public_ppe/RivetHbbBJets<br>
EOF<br>
exit 1<br>
fi <br>
<br>
FOLDER=$1<br>
INDEX_FILE="index.html"<br>
<br>
# go to the folder that has the files <br>
pushd ${FOLDER}<br>
<br>
rm -f ${INDEX_FILE}<br>
<br>
for FILE in `ls -1 *.pdf`<br>
do<br>
    STEM=${FILE%.*}<br>
    echo "<br> ${STEM} <br>" >> ${INDEX_FILE}<br>
    echo "<br> <a href=\"./${STEM}.pdf\"> <img src=\"./${STEM}.png\" alt=\"Mountain View\"> </a> <br>" >> ${INDEX_FILE}<br>
done<br>
<br>
# return to folde r when we run from<br>
popd<br>
<br>
exit<br>
<br>
The way to run everything in step 2:<br>
#RIVET_INPUT_FILE="${RIVET_INPUT_FILE_PATH}/ZHvvbb_1000000.hepmc"<br>
#RIVET_INPUT_FILE="${RIVET_INPUT_FILE_PATH}/ZHvvbb_3000000.nobias.hepmc"<br>
RIVET_INPUT_FILE="${RIVET_INPUT_FILE_PATH}/ZHvvbb_3000000.ptbias.hepmc"<br>
RIVET_OUTPUT_FILE="./yoda/ZHvvbb.yoda"<br>
RIVET_ANALYSIS="RivetHbbBJets"<br>
RIVET_PLOTS_FOLDER="/afs/phas.gla.ac.uk/user/a/abuzatu/public_html/${RIVET_ANALYSIS}"<br>
<br>
RIVET_RUN="rivet --pwd -a ${RIVET_ANALYSIS} ${RIVET_INPUT_FILE} -H ${RIVET_OUTPUT_FILE} -n 100 --histo-interval=10000 " #-l Rivet.Analysis=DEBUG -v "<br>
RIVET_MKHTML="rivet-mkhtml ${RIVET_OUTPUT_FILE} -c ${RIVET_ANALYSIS}.plot --mc-errs -M \"./plots/RivetHbbBJets/counter_lepton.dat\"' " # -n 8 -v<br>
RIVET_CMPHISTOS="rivet-cmphistos ${RIVET_OUTPUT_FILE} -o plots --hier-out"<br>
MAKE_PLOTS="make-plots ./plots/${RIVET_ANALYSIS}/counter*.dat --pdfpng -n 4"<br>
MAKE_HTML="./make_html.sh ${RIVET_PLOTS_FOLDER}"<br>
<br>
`echo ${RIVET_CMPHISTOS}`<br>
`echo ${MAKE_PLOTS}`<br>
rm -rf ${RIVET_PLOTS_FOLDER}<br>
mkdir -p ${RIVET_PLOTS_FOLDER}<br>
mv ./plots/${RIVET_ANALYSIS}/*.png ${RIVET_PLOTS_FOLDER}/.<br>
mv ./plots/${RIVET_ANALYSIS}/*.pdf ${RIVET_PLOTS_FOLDER}/.<br>
`echo ${MAKE_HTML}`<br>
<br>
Thank you,<br>
Adrian<br>
<br>
</div>
</body>
</html>