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