Skip to content

Commit 592c68c

Browse files
committed
Improvements to RICH examples
1 parent 9b73f2d commit 592c68c

File tree

2 files changed

+22
-17
lines changed

2 files changed

+22
-17
lines changed

examples/scripts/rich.sh

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,31 @@
11
#! /usr/bin/env bash
22

3-
NJOBS=5 # number of max parallel runs
4-
NRUNS=5 # number of runs
5-
NEVENTS=10000 # number of events in a run
3+
NJOBS=5 # number of max parallel runs
4+
NRUNS=5 # number of runs
5+
NEVENTS=10000 # number of events in a run
66

7-
BFIELD=5. # magnetic field [kG]
8-
RICHRAD=100. # RICH radius [cm]
9-
RICHLEN=200. # RICH half length [cm]
10-
RICHETA=1.443 # RICH max pseudorapidity
7+
LUTTAG="werner" # LUT tag name
8+
PY8CFG="pythia8_ccbar" # pythia8 configuration
9+
BFIELD=5. # magnetic field [kG]
10+
RICHRAD=100. # RICH radius [cm]
11+
RICHLEN=200. # RICH half length [cm]
12+
RICHETA=1.443 # RICH max pseudorapidity
1113

1214
### calculate max eta from geometry
1315
RICHETA=`awk -v a=$RICHRAD -v b=$RICHLEN 'BEGIN {th=atan2(a,b)*0.5; sth=sin(th); cth=cos(th); print -log(sth/cth)}'`
1416
echo "maxEta = $RICHETA"
1517

1618
### copy relevant files in the working directory
1719
cp $DELPHESO2_ROOT/examples/cards/propagate.2kG.tcl propagate.tcl
20+
cp $DELPHESO2_ROOT/examples/pythia8/$PY8CFG.cfg pythia8.cfg
1821
cp $DELPHESO2_ROOT/examples/smearing/rich.C .
19-
cp $DELPHESO2_ROOT/examples/pythia8/pythia8_inel.cfg pythia8.cfg
2022

2123
### adjust pythia8 configuration
24+
echo "" >> pythia8.cfg
25+
echo "### run time configuration" >> pythia8.cfg
2226
echo "Main:numberOfEvents $NEVENTS" >> pythia8.cfg
23-
#echo "Beams:allowVertexSpread on " >> pythia8.cfg
24-
#echo "Beams:sigmaTime 60." >> pythia8.cfg
27+
echo "Beams:allowVertexSpread off " >> pythia8.cfg
28+
echo "Beams:sigmaTime 60." >> pythia8.cfg
2529

2630
### set magnetic field
2731
sed -i -e "s/set barrel_Bz .*$/set barrel_Bz ${BFIELD}e\-1/" propagate.tcl
@@ -36,7 +40,7 @@ sed -i -e "s/set barrel_Acceptance .*$/set barrel_Acceptance \{ 0.0 + 1.0 * fabs
3640

3741
### create LUTs
3842
BFIELDT=`awk -v a=$BFIELD 'BEGIN {print a*0.1}'`
39-
$DELPHESO2_ROOT/examples/scripts/create_luts.sh werner $BFIELDT $TOFRAD
43+
$DELPHESO2_ROOT/examples/scripts/create_luts.sh $LUTTAG $BFIELDT $TOFRAD
4044

4145
### loop over runs
4246
rm -f .running.* delphes.*.root
@@ -54,8 +58,9 @@ for I in $(seq 1 $NRUNS); do
5458

5559
### copy pythia8 configuration and adjust it
5660
cp pythia8.cfg pythia8.$I.cfg
61+
echo "Random:setSeed on" >> pythia8.$I.cfg
5762
echo "Random:seed = $I" >> pythia8.$I.cfg
58-
63+
5964
### run Delphes and analysis
6065
DelphesPythia8 propagate.tcl pythia8.$I.cfg delphes.$I.root &> delphes.$I.log &&
6166
root -b -q -l "rich.C(\"delphes.$I.root\", \"rich.$I.root\")" &> rich.$I.log &&

examples/smearing/rich.C

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ rich(const char *inputFile = "delphes.root",
3939
smearer.loadTable(2212, "lutCovm.pr.dat");
4040

4141
// logx binning
42-
const Int_t nbins = 80;
42+
const Int_t nbins = 200;
4343
double xmin = 1.e-2;
4444
double xmax = 1.e2;
4545
double logxmin = std::log10(xmin);
@@ -72,11 +72,11 @@ rich(const char *inputFile = "delphes.root",
7272
hRecP[i] = new TH1F(Form("hRecP_%s", pname[i]), ";#it{p} (GeV/#it{c})", nbins, xbins);
7373
hRecPt[i] = new TH1F(Form("hRecPt_%s", pname[i]), ";#it{p} (GeV/#it{c})", nbins, xbins);
7474
hAngleP_true[i] = new TH2F(Form("hAngleP_true_%s", pname[i]), ";#it{p} (GeV/#it{c});#theta (rad)", nbins, xbins, 250, 0., 0.25);
75-
hNsigmaP[i] = new TH2F(Form("hNsigmaP_%s", pname[i]), Form(";#it{p} (GeV/#it{c});n#sigma_{%s}", plabel[i]), nbins, xbins, 200, -10., 10.);
76-
hNsigmaPt[i] = new TH2F(Form("hNsigmaPt_%s", pname[i]), Form(";#it{p_{T}} (GeV/#it{c});n#sigma_{%s}", plabel[i]), nbins, xbins, 200, -10., 10.);
75+
hNsigmaP[i] = new TH2F(Form("hNsigmaP_%s", pname[i]), Form(";#it{p} (GeV/#it{c});n#sigma_{%s}", plabel[i]), nbins, xbins, 500, -25., 25.);
76+
hNsigmaPt[i] = new TH2F(Form("hNsigmaPt_%s", pname[i]), Form(";#it{p_{T}} (GeV/#it{c});n#sigma_{%s}", plabel[i]), nbins, xbins, 500, -25., 25.);
7777
for (int j = 0; j < 5; ++j) {
78-
hNsigmaP_true[i][j] = new TH2F(Form("hNsigmaP_%s_true_%s", pname[i], pname[j]), Form(";#it{p} (GeV/#it{c});n#sigma_{%s}", plabel[i]), nbins, xbins, 200, -10., 10.);
79-
hNsigmaPt_true[i][j] = new TH2F(Form("hNsigmaPt_%s_true_%s", pname[i], pname[j]), Form(";#it{p_{T}} (GeV/#it{c});n#sigma_{%s}", plabel[i]), nbins, xbins, 200, -10., 10.);
78+
hNsigmaP_true[i][j] = new TH2F(Form("hNsigmaP_%s_true_%s", pname[i], pname[j]), Form(";#it{p} (GeV/#it{c});n#sigma_{%s}", plabel[i]), nbins, xbins, 500, -25., 25.);
79+
hNsigmaPt_true[i][j] = new TH2F(Form("hNsigmaPt_%s_true_%s", pname[i], pname[j]), Form(";#it{p_{T}} (GeV/#it{c});n#sigma_{%s}", plabel[i]), nbins, xbins, 500, -25., 25.);
8080
}
8181
}
8282

0 commit comments

Comments
 (0)