Changeset 03d2c3f in git
- Timestamp:
- Apr 13, 2017, 1:30:01 PM (8 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 54ba29e
- Parents:
- 65dc4e7
- Location:
- validation
- Files:
-
- 1 added
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
validation/validation.sh
r65dc4e7 r03d2c3f 1 1 #!/bin/sh 2 ################################################################################ ##############2 ################################################################################ 3 3 # 4 4 # This code produces at set of validation plots for a given detector card. … … 19 19 # This said, 500k events should be ok for most cases. 20 20 # 21 ################################################################################ ############21 ################################################################################ 22 22 23 23 EXPECTED_ARGS=2 … … 32 32 33 33 cardbase=$(basename $1) 34 carddir=$(dirname $1)35 34 nEvents=$2 36 validationCard=$carddir/validation_$cardbase37 35 output=validation_${cardbase%.*}.root 38 36 mainoutputdir=report_${cardbase%.*} 39 outputroot =report_${cardbase%.*}/root37 outputrootdir=report_${cardbase%.*}/root 40 38 cardlabel=${cardbase%.*} 41 39 version=$(cat VERSION) 42 40 outpdf=$mainoutputdir/${output%.*}.pdf 43 qcdPgLocation="/home/fynu/mselvaggi/storage/DelphesValidationSamples" 41 cardsdir=validation/cards 42 samplesdir=validation/samples 43 validationcard=$cardsdir/validation_$cardbase 44 44 45 mkdir -p $outputroot 45 mkdir -p $cardsdir 46 mkdir -p $samplesdir 47 mkdir -p $outputrootdir 46 48 mkdir -p $mainoutputdir/www/fig 47 49 48 sed 's/delphes_card_CMS.tcl/'$cardbase'/g' cards/validation_card.tcl > $validationCard49 sed -i "1i set MaxEvents $ {nEvents}" "$validationCard"50 sed "s/delphes_card_CMS.tcl/$cardbase/g" cards/validation_card.tcl > $validationcard 51 sed -i "1i set MaxEvents $nEvents" $validationcard 50 52 51 53 function runParticleGun { 52 54 name=$1 53 55 pid=$2 54 cmnd="examples/Pythia8/configParticleGun_$name.cmnd" 55 rootfile="particleGun_${name}_${cardlabel}.root" 56 sed '/Main:spareMode1/s/=[[:space:]]*[0-9]*/= '$pid'/' examples/Pythia8/configParticleGun.cmnd > examples/Pythia8/tmp.cmnd 57 sed '/Main:numberOfEvents/s/=[[:space:]]*[0-9]*/= '$nEvents'/' examples/Pythia8/tmp.cmnd > $cmnd 58 ./DelphesPythia8 $validationCard $cmnd $outputroot/$rootfile 59 56 cmnd=$cardsdir/configParticleGun_$name.cmnd 57 outputroot=particleGun_${name}_${cardlabel}.root 58 sed "/Main:spareMode1/s/=[[:space:]]*[0-9]*/= $pid/; /Main:numberOfEvents/s/=[[:space:]]*[0-9]*/= $nEvents/" examples/Pythia8/configParticleGun.cmnd > $cmnd 59 ./DelphesPythia8 $validationcard $cmnd $outputrootdir/$outputroot 60 60 } 61 61 … … 64 64 name=$1 65 65 pid=$2 66 inputroot="${qcdPgLocation}/${pid}.root" 67 rootfile="particleGun_${name}_${cardlabel}.root" 68 ./DelphesROOT $validationCard $outputroot/$rootfile $inputroot 69 echo "./DelphesROOT $validationCard $outputroot/$rootfile $inputroot" 66 cmnd=$cardsdir/configLHE_$pid.cmnd 67 inputroot=$samplesdir/$pid.root 68 outputroot=particleGun_${name}_${cardlabel}.root 69 70 if [ ! -f $inputroot ] 71 then 72 python FlatGunLHEventProducer.py --pdg $pid --ptmin 1 --ptmax 50000 --etamin -6 --etamax 6 --size $nEvents --seed 1 --output $samplesdir/events_$pid.lhe --log --ecm 100000 73 74 cp examples/Pythia8/configLHE.cmnd $cmnd 75 echo "Beams:LHEF = $samplesdir/events_$pid.lhe" >> $cmnd 76 echo "Main:numberOfEvents = $nEvents" >> $cmnd 77 78 ./DelphesPythia8 cards/gen_card.tcl $cmnd $inputroot 79 fi 80 81 ./DelphesROOT $validationcard $outputrootdir/$outputroot $inputroot 70 82 } 71 83 … … 85 97 86 98 87 ./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 $version99 ./Validation $outputrootdir/particleGun_pion_$cardlabel.root $outputrootdir/particleGun_electron_$cardlabel.root $outputrootdir/particleGun_muon_$cardlabel.root $outputrootdir/particleGun_photon_$cardlabel.root $outputrootdir/particleGun_neutron_$cardlabel.root $outputrootdir/particleGun_jet_$cardlabel.root $outputrootdir/particleGun_bjet_$cardlabel.root $outputrootdir/particleGun_cjet_$cardlabel.root $outputrootdir/particleGun_taujet_$cardlabel.root $mainoutputdir/$output $version 88 100 89 101 … … 98 110 mv HCal.png $mainoutputdir/www/fig/img_hcal.png 99 111 100 101 102
Note:
See TracChangeset
for help on using the changeset viewer.