]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AlirootRun_MUONtest.sh
hopefully the last refinements for correct type conversion in calibration
[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 RUN=0
13 FULLPATH="$CURDIR/$OUTDIR"
14 NEVENTS=100
15 SEED=1234567
16
17 echo "Running simulation  ..."
18
19 aliroot -b  >& testSim.out << EOF 
20 // Uncoment following lines to run simulation with local residual mis-alignment
21 // (generated via MUONGenerateGeometryData.C macro)
22 // AliCDBManager* man = AliCDBManager::Instance();
23 // man->SetDefaultStorage("local://$ALICE_ROOT");
24 // man->SetSpecificStorage("MUON/Align/Data","local://$ALICE_ROOT/MUON/ResMisAlignCDB");
25 gRandom->SetSeed($SEED);
26 AliCDBManager::Instance()->SetRun($RUN);
27 AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C");
28 MuonSim.SetMakeTrigger("MUON");
29 MuonSim.SetWriteRawData("MUON");
30 MuonSim.Run($NEVENTS);
31 .q
32 EOF
33
34 echo "Removing Digits files ..."
35 mkdir MUON.Digits
36 mv MUON.Digits*.root MUON.Digits/ 
37
38 echo "Running reconstruction  ..."
39
40 aliroot -b >& testReco.out << EOF
41 AliCDBManager::Instance()->SetRun($RUN);
42 gRandom->SetSeed($SEED);
43 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 1, 1., 10., AliMagFMaps::k5kG);
44 AliTracker::SetFieldMap(field, kFALSE);
45 AliReconstruction MuonRec("galice.root");
46 MuonRec.SetInput("$FULLPATH/");
47 MuonRec.SetRunVertexFinder(kFALSE);
48 MuonRec.SetRunLocalReconstruction("MUON");
49 MuonRec.SetRunTracking("MUON");
50 MuonRec.SetFillESD("MUON");
51 MuonRec.SetLoadAlignData("MUON");
52 // Uncoment following line to run reconstruction with the orginal tracking method
53 // instead of the kalman one (default)
54 //MuonRec.SetOption("MUON","Original");
55 // Use the following to change clustering method
56 //MuonRec.SetOption("MUON","MLEM"); // new scheme AZs clustering
57 //MuonRec.SetOption("MUON","SIMPLEFIT"); // new scheme simple fitting
58 //MuonRec.SetOption("MUON","COG"); // new scheme basic center-of-gravity only
59 // Use the following to disconnect the status map creation (only for debug!)
60 // as this speeds up startup a bit...
61 //MuonRec.SetOption("MUON","NOSTATUSMAP");
62 // Use the following to write to disk the digits (from raw data)
63 //MuonRec.SetOption("MUON","SAVEDIGITS");
64 MuonRec.Run();
65 .q
66 EOF
67
68 if [ ! -e MUON.Digits.root ]; then
69     echo "Moving Digits files back ..."
70     mv MUON.Digits/MUON.Digits.root .
71 fi 
72
73 echo "Running Trigger efficiency  ..."
74 aliroot -b >& testTriggerResults.out << EOF
75 .L $ALICE_ROOT/MUON/MUONTriggerEfficiency.C+
76 MUONTriggerEfficiency("galice.root",1);
77 .q
78 EOF
79
80 echo "Running efficiency  ..."
81
82 aliroot -b >& testResults.out << EOF
83 .L $ALICE_ROOT/MUON/MUONefficiency.C+
84 // no argument assumes Upsilon but MUONefficiency(443) works on Jpsi
85 MUONefficiency();
86 .q
87 EOF
88
89 echo "Running check ..."
90
91 aliroot -b >& testCheck.out << EOF
92 gSystem->Load("libMUONevaluation");
93 .L $ALICE_ROOT/MUON/MUONCheck.C+
94 MUONCheck(0, 9, "galice.root","AliESDs.root"); 
95 .q
96 EOF
97
98 echo "Running dumps for selected event (5) ..."
99
100 aliroot -b << EOF
101 AliMUONData data("galice.root");
102 data.DumpKine(5);       > dump.kine
103 data.DumpHits(5);       > dump.hits
104 data.DumpDigits(5);     > dump.digits
105 data.DumpSDigits(5);    > dump.sdigits
106 data.DumpRecPoints(5);  > dump.recpoints
107 data.DumpRecTrigger(5); > dump.rectrigger
108 .q
109 EOF
110
111 echo "Finished"  
112 echo "... see results in test_out"
113
114 cd $CURDIR