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