]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AlirootRun_MUONtest.sh
Now the full chain includes raw data.
[u/mrichter/AliRoot.git] / MUON / AlirootRun_MUONtest.sh
1 #!/bin/sh
2 # $Id$
3
4 CURDIR=`pwd`
5 OUTDIR=test_out
6
7 rm -fr $OUTDIR
8 mkdir $OUTDIR
9 cp $ALICE_ROOT/MUON/.rootrc $ALICE_ROOT/MUON/rootlogon.C $OUTDIR
10 cd $OUTDIR
11
12 FULLPATH="$CURDIR/$OUTDIR"
13 NEVENTS=100
14 SEED=1234567
15
16 CDBDIRECTORY="$ALICE_ROOT/MUON/CDB/Default";
17 CDB="local://$CDBDIRECTORY";
18
19 if [ ! -d $CDBDIRECTORY"/MUON" ]; then
20
21 echo "Generating Condition Database in directory $CDBDIRECTORY. This may take a while, so please be patient..."
22
23 aliroot -b >& testGenerateCalibrations.out << EOF
24 .L $ALICE_ROOT/MUON/MUONCDB.C++
25 gRandom->SetSeed($SEED);
26 generateCalibrations("$CDB",true);
27 .q
28 EOF
29
30 else
31
32 echo "Condition Database found in directory $CDBDIRECTORY. Will use it if needed."
33
34 fi
35
36 echo "Running simulation  ..."
37
38 aliroot -b  >& testSim.out << EOF 
39 gRandom->SetSeed($SEED);
40 AliCDBManager::Instance()->SetDefaultStorage("$CDB");
41 AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C");
42 MuonSim.SetWriteRawData("MUON");
43 MuonSim.Run($NEVENTS)
44 .q
45 EOF
46
47 echo "Running reconstruction  ..."
48
49 aliroot -b >& testReco.out << EOF
50 gRandom->SetSeed($SEED);
51 AliCDBManager::Instance()->SetDefaultStorage("$CDB");
52 AliReconstruction MuonRec("galice.root")
53 MuonRec.SetInput("$FULLPATH/");
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 aliroot -b >& testTriggerResults.out << EOF
64 .L $ALICE_ROOT/MUON/MUONTriggerEfficiency.C++
65 MUONTriggerEfficiency();
66 .q
67 EOF
68
69 echo "Running efficiency  ..."
70
71 aliroot -b >& testResults.out << EOF
72 .L $ALICE_ROOT/MUON/MUONefficiency.C++
73 // no argument assumes Upsilon but MUONefficiency(443) works on Jpsi
74 MUONefficiency();
75 .q
76 EOF
77
78 echo "Running dumps ..."
79
80 if [ "$NEVENTS" -le 20 ]; then
81
82 aliroot -b > /dev/null << EOF
83 .L $ALICE_ROOT/MUON/MUONCheck.C++
84 MUONdigits(); > check.digits
85 MUONrecpoints(); > check.recpoints
86 MUONrectracks(); > check.rectracks
87 MUONrectrigger(); > check.rectrigger
88 EOF
89
90 fi
91
92 echo "Finished"  
93 echo "... see results in test_out"
94
95 cd $CURDIR