Changeset fa068d3 in git for examples/validation.sh
- Timestamp:
- Sep 6, 2016, 11:21:11 AM (8 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- e9971a7
- Parents:
- b9ae4c3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/validation.sh
rb9ae4c3 rfa068d3 1 ############################################################################################## 2 # 3 # This code produces at set of validation plots for a given detector card. 4 # 5 # In order to run this you need to compile Delphes with Pythia8 first, see: 6 # 7 # https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook/Pythia8 8 # 9 # After you (re-)compiled Delphes with Pythia8 you are ready to go, execute from Delphes main dir: 10 # 11 # ./examples/validation.sh [detector_card] [number_of_events] 12 # 13 # e.g. 14 # 15 # ./examples/validation.sh delphes_card_CMS.tcl 100000 16 # 17 # Note that the more events you specify, the more accurate the controls plots will be ... 18 # 19 ############################################################################################ 20 1 21 #! /bin/sh 22 23 EXPECTED_ARGS=2 24 E_BADARGS=65 25 26 if [ $# -ne $EXPECTED_ARGS ] 27 then 28 echo "Usage: ./examples/validation.sh [detector_card] [number_of_events]" 29 echo "for instance: ./examples/validation.sh delphes_card_CMS.tcl 10000" 30 exit $E_BADARGS 31 fi 32 33 card=$1 34 nEvents=$2 35 validationCard=cards/validation_$card 36 output=validation_${card%.*}.root 37 38 sed 's/delphes_card_CMS.tcl/'$card'/g' cards/validation_card.tcl > $validationCard 39 2 40 function runParticleGun { 3 41 name=$1 … … 5 43 cmnd="examples/Pythia8/configParticleGun_$name.cmnd" 6 44 sed '/Main:spareMode1/s/=[[:space:]]*[0-9]*/= '$pid'/' examples/Pythia8/configParticleGun.cmnd > $cmnd 7 ./DelphesPythia8 cards/validation_card.tcl $cmnd delphes_ParticleGun_$name.root 45 sed '/Main:numberOfEvents/s/=[[:space:]]*[0-9]*/= '$nEvents'/' examples/Pythia8/configParticleGun.cmnd > $cmnd 46 ./DelphesPythia8 $validationCard $cmnd delphes_ParticleGun_$name.root 8 47 } 9 48 … … 15 54 runParticleGun taujet 15 16 55 17 ./Validation delphes_ParticleGun_electron.root delphes_ParticleGun_muon.root delphes_ParticleGun_photon.root delphes_ParticleGun_jet.root delphes_ParticleGun_bjet.root delphes_ParticleGun_taujet.root delphes_validation.root56 ./Validation delphes_ParticleGun_electron.root delphes_ParticleGun_muon.root delphes_ParticleGun_photon.root delphes_ParticleGun_jet.root delphes_ParticleGun_bjet.root delphes_ParticleGun_taujet.root $output
Note:
See TracChangeset
for help on using the changeset viewer.