]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AlirootRun_MUONtestlong.sh
Minor fixes in the event tag to take into account the new way of storing the trigger...
[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 // Uncoment following lines to run simulation with local residual mis-alignment
42 // (generated via MUONGenerateGeometryData.C macro)
43 // AliCDBManager* man = AliCDBManager::Instance();
44 // man->SetDefaultStorage("local://$ALICE_ROOT");
45 // man->SetSpecificStorage("MUON","local://$ALICE_ROOT/MUON/ResMisAlignCDB");
46 gRandom->SetSeed($SEED);
47 AliCDBManager::Instance()->SetDefaultStorage("$CDB");
48 AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C");
49 MuonSim.Run($NEVENTS); 
50 .q
51 EOF
52
53 echo "Running reconstruction  ..."
54
55 aliroot -b >& testReco.out << EOF 
56 gRandom->SetSeed($SEED);
57 AliCDBManager::Instance()->SetDefaultStorage("$CDB");
58 AliReconstruction MuonRec("galice.root"); 
59 MuonRec.SetRunTracking("");
60 MuonRec.SetRunVertexFinder(kFALSE);
61 MuonRec.SetRunLocalReconstruction("MUON");
62 MuonRec.SetFillESD("MUON");
63 MuonRec.Run(); 
64 .q
65 EOF
66
67 echo "Running Trigger efficiency  ..."
68
69 aliroot -b >& testTriggerResults.out << EOF
70 .L $ALICE_ROOT/MUON/MUONTriggerEfficiency.C+
71 MUONTriggerEfficiency();
72 .q
73 EOF
74
75 echo "Running efficiency  ..."
76
77 aliroot -b >& testEfficiency.out << EOF 
78 .L $ALICE_ROOT/MUON/MUONefficiency.C+
79 // no argument assumes Upsilon but MUONefficiency(443) handles Jpsi
80 MUONefficiency();
81 .q
82 EOF
83
84
85 aliroot -b >& testResults.out << EOF 
86 // no argument assumes Upsilon but MUONplotefficiency(443) handles Jpsi
87 .x $ALICE_ROOT/MUON/MUONplotefficiency.C
88 .q
89 EOF
90
91 more  testSim.out | grep 'RunSimulation: Execution time:'  > testTime.out
92 more  testSim.out | grep 'RunSDigitization: Execution time:'  >> testTime.out
93 more  testSim.out | grep 'RunDigitization: Execution time:'  >> testTime.out 
94
95 more  testReco.out | grep 'RunLocalReconstruction: Execution time for MUON'  >> testTime.out
96 more  testReco.out | grep 'Execution time for filling ESD ' >> testTime.out
97
98 rm gphysi.dat
99 rm *.root
100 rm testSim.out
101 rm testReco.out
102 rm *.eps
103
104 echo "Finished"  
105 echo "... see results in testlong_out"
106
107 cd $CURDIR