ImprovedOutputFile
Timing
dual_readout
llp
Last change
on this file since 92237ca was db8be5f, checked in by Michele Selvaggi <michele.selvaggi@…>, 8 years ago |
associate to particlegun rootfiles name of the card
|
-
Property mode
set to
100755
|
File size:
2.0 KB
|
Line | |
---|
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 cards/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 |
|
---|
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 cards/delphes_card_CMS.tcl 10000"
|
---|
30 | exit $E_BADARGS
|
---|
31 | fi
|
---|
32 |
|
---|
33 | card=$(basename $1)
|
---|
34 | nEvents=$2
|
---|
35 | validationCard=cards/validation_$card
|
---|
36 | output=validation_${card%.*}.root
|
---|
37 | cardlabel=${card%.*}
|
---|
38 |
|
---|
39 | sed 's/delphes_card_CMS.tcl/'$card'/g' cards/validation_card.tcl > $validationCard
|
---|
40 |
|
---|
41 | function runParticleGun {
|
---|
42 | name=$1
|
---|
43 | pid=$2
|
---|
44 | cmnd="examples/Pythia8/configParticleGun_$name.cmnd"
|
---|
45 | rootfile="particleGun_${name}_${cardlabel}.root"
|
---|
46 | sed '/Main:spareMode1/s/=[[:space:]]*[0-9]*/= '$pid'/' examples/Pythia8/configParticleGun.cmnd > examples/Pythia8/tmp.cmnd
|
---|
47 | sed '/Main:numberOfEvents/s/=[[:space:]]*[0-9]*/= '$nEvents'/' examples/Pythia8/tmp.cmnd > $cmnd
|
---|
48 | ./DelphesPythia8 $validationCard $cmnd $rootfile
|
---|
49 |
|
---|
50 | }
|
---|
51 |
|
---|
52 | runParticleGun electron 11
|
---|
53 | runParticleGun muon 13
|
---|
54 | runParticleGun photon 22
|
---|
55 | runParticleGun jet 1
|
---|
56 | runParticleGun bjet 5
|
---|
57 | runParticleGun taujet 15
|
---|
58 |
|
---|
59 | ./Validation particleGun_electron_$cardlabel.root particleGun_muon_$cardlabel.root particleGun_photon_$cardlabel.root particleGun_jet_$cardlabel.root particleGun_bjet_$cardlabel.root particleGun_taujet_$cardlabel.root $output
|
---|
Note:
See
TracBrowser
for help on using the repository browser.