]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AlirootRun_MUONtestlong.sh
c109afc0f772b7c5203da795df07a7317ae16ee0
[u/mrichter/AliRoot.git] / MUON / AlirootRun_MUONtestlong.sh
1 #!/bin/sh
2 # $Id$
3
4 CURDIR=`pwd`
5 OUTDIR=testlong_out
6
7 rm -fr $OUTDIR
8 mkdir $OUTDIR
9 cp .rootrc rootlogon.C $OUTDIR
10 cd $OUTDIR
11
12 FULLPATH="$CURDIR/$OUTDIR"
13 # Minimum number of events to have enough stat. for invariant mass fit
14 # 10000 is ok, 20000 is really fine
15 NEVENTS=10000
16 SEED=1234567
17
18 CDBDIRECTORY="$ALICE_ROOT/MUON/CDB/Default";
19 CDB="local://$CDBDIRECTORY";
20
21 if [ ! -d $CDBDIRECTORY"/MUON" ]; then
22
23 echo "Generating Condition Database in directory $CDBDIRECTORY. This may take a while, so please be patient..."
24
25 aliroot -b >& testGenerateCalibrations.out << EOF
26 .L $ALICE_ROOT/MUON/MUONCDB.C++
27 gRandom->SetSeed($SEED);
28 generateCalibrations("$CDB",true);
29 .q
30 EOF
31
32 else
33
34 echo "Condition Database found in directory $CDBDIRECTORY. Will use it if needed."
35
36 fi
37
38 echo "Running simulation  ..."
39
40 aliroot -b >& testSim.out << EOF  
41 gRandom->SetSeed($SEED);
42 AliCDBManager::Instance()->SetDefaultStorage("$CDB");
43 AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C");
44 MuonSim.Run($NEVENTS) 
45 .q
46 EOF
47
48 echo "Running reconstruction  ..."
49
50 aliroot -b >& testReco.out << EOF 
51 gRandom->SetSeed($SEED);
52 AliCDBManager::Instance()->SetDefaultStorage("$CDB");
53 AliReconstruction MuonRec("galice.root") 
54 MuonRec.SetRunTracking("")
55 MuonRec.SetRunVertexFinder(kFALSE)
56 MuonRec.SetRunLocalReconstruction("MUON")
57 MuonRec.SetFillESD("MUON")
58 MuonRec.Run() 
59 .q
60 EOF
61
62 echo "Running Trigger efficiency  ..."
63
64 aliroot -b >& testTriggerResults.out << EOF
65 .L $ALICE_ROOT/MUON/MUONTriggerEfficiency.C++
66 MUONTriggerEfficiency();
67 .q
68 EOF
69
70 echo "Running efficiency  ..."
71
72 aliroot -b >& testEfficiency.out << EOF 
73 .L $ALICE_ROOT/MUON/MUONefficiency.C++
74 // no argument assumes Upsilon but MUONefficiency(443) handles Jpsi
75 MUONefficiency();
76 .q
77 EOF
78
79
80 aliroot -b >& testResults.out << EOF 
81 // no argument assumes Upsilon but MUONplotefficiency(443) handles Jpsi
82 .x $ALICE_ROOT/MUON/MUONplotefficiency.C
83 .q
84 EOF
85
86 more  testSim.out | grep 'RunSimulation: Execution time:'  > testTime.out
87 more  testSim.out | grep 'RunSDigitization: Execution time:'  >> testTime.out
88 more  testSim.out | grep 'RunDigitization: Execution time:'  >> testTime.out 
89
90 more  testReco.out | grep 'RunLocalReconstruction: Execution time for MUON'  >> testTime.out
91 more  testReco.out | grep 'Execution time for filling ESD ' >> testTime.out
92
93 rm gphysi.dat
94 rm *.root
95 rm testSim.out
96 rm testReco.out
97 rm *.eps
98
99 echo "Finished"  
100 echo "... see results in testlong_out"
101
102 cd $CURDIR