Fork me on GitHub

Changeset 85ad2b9 in git for examples/validation.sh


Ignore:
Timestamp:
Sep 29, 2016, 2:50:28 PM (8 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
933e560
Parents:
5348ed9
Message:

added CaloGrid plots to val sequence and added Delphes version in plots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/validation.sh

    r5348ed9 r85ad2b9  
    1616#
    1717# Note that the more events you specify, the more accurate the controls plots will be ...
     18# This said, 500k events should be ok for most cases.
    1819#
    1920############################################################################################
     
    3132fi
    3233
    33 card=$(basename $1)
     34cardbase=$(basename $1)
     35carddir=$(dirname $1)
    3436nEvents=$2
    35 validationCard=cards/validation_$card
    36 output=validation_${card%.*}.root
    37 mainoutputdir=report_${card%.*}
    38 outputroot=report_${card%.*}/root
    39 cardlabel=${card%.*}
     37validationCard=$carddir/validation_$cardbase
     38output=validation_${cardbase%.*}.root
     39mainoutputdir=report_${cardbase%.*}
     40outputroot=report_${cardbase%.*}/root
     41cardlabel=${cardbase%.*}
     42version=$(cat VERSION)
     43outpdf=$mainoutputdir/${output%.*}.pdf
     44
    4045
    4146mkdir -p $outputroot
    4247mkdir -p $mainoutputdir/www/fig
    4348
    44 sed 's/delphes_card_CMS.tcl/'$card'/g' cards/validation_card.tcl  > $validationCard
     49sed 's/delphes_card_CMS.tcl/'$cardbase'/g' cards/validation_card.tcl  > $validationCard
    4550
    4651function runParticleGun {
     
    6570runParticleGun taujet 15
    6671
    67 ./Validation $outputroot/particleGun_pion_$cardlabel.root $outputroot/particleGun_electron_$cardlabel.root $outputroot/particleGun_muon_$cardlabel.root $outputroot/particleGun_photon_$cardlabel.root $outputroot/particleGun_neutron_$cardlabel.root $outputroot/particleGun_jet_$cardlabel.root $outputroot/particleGun_bjet_$cardlabel.root $outputroot/particleGun_cjet_$cardlabel.root $outputroot/particleGun_taujet_$cardlabel.root $mainoutputdir/$output
     72./Validation $outputroot/particleGun_pion_$cardlabel.root $outputroot/particleGun_electron_$cardlabel.root $outputroot/particleGun_muon_$cardlabel.root $outputroot/particleGun_photon_$cardlabel.root $outputroot/particleGun_neutron_$cardlabel.root $outputroot/particleGun_jet_$cardlabel.root $outputroot/particleGun_bjet_$cardlabel.root $outputroot/particleGun_cjet_$cardlabel.root $outputroot/particleGun_taujet_$cardlabel.root $mainoutputdir/$output $version
     73
     74echo $outpdf
     75if grep -q SimpleCalorimeter "$1"; then
     76  ./CaloGrid $1 ECal
     77  ./CaloGrid $1 HCal
     78  gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=tmp/tmp1.pdf $outpdf ECal.pdf 
     79  gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=$outpdf tmp/tmp1.pdf HCal.pdf
     80  mv ECal.pdf $mainoutputdir/www/fig/img_ecal.pdf
     81  mv ECal.png $mainoutputdir/www/fig/img_ecal.png
     82  mv HCal.pdf $mainoutputdir/www/fig/img_hcal.pdf
     83  mv HCal.png $mainoutputdir/www/fig/img_hcal.png
     84else
     85  ./CaloGrid $1 Calorimeter
     86  gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=tmp/tmp1.pdf $outpdf Calorimeter.pdf
     87  mv Calorimeter.pdf $mainoutputdir/www/fig/img_ecal.pdf
     88  mv Calorimeter.png $mainoutputdir/www/fig/img_ecal.png
     89fi
     90
     91
     92
     93
Note: See TracChangeset for help on using the changeset viewer.