]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AlirootRun_MUONtest.sh
Set CDB specific storage for MUON/Align/Data only
[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 MuonRec.Run();
63 .q
64 EOF
65
66 echo "Moving Digits files back ..."
67 mv MUON.Digits/MUON.Digits.root . 
68
69 echo "Running Trigger efficiency  ..."
70 aliroot -b >& testTriggerResults.out << EOF
71 .L $ALICE_ROOT/MUON/MUONTriggerEfficiency.C+
72 MUONTriggerEfficiency("galice.root",1);
73 .q
74 EOF
75
76 echo "Running efficiency  ..."
77
78 aliroot -b >& testResults.out << EOF
79 .L $ALICE_ROOT/MUON/MUONefficiency.C+
80 // no argument assumes Upsilon but MUONefficiency(443) works on Jpsi
81 MUONefficiency();
82 .q
83 EOF
84
85 echo "Running check ..."
86
87 aliroot -b >& testCheck.out << EOF
88 gSystem->Load("libMUONevaluation");
89 .L $ALICE_ROOT/MUON/MUONCheck.C+
90 MUONCheck(0, 9); 
91 .q
92 EOF
93
94 echo "Running dumps for selected event (5) ..."
95
96 aliroot -b << EOF
97 AliMUONData data("galice.root");
98 data.DumpKine(5);       > dump.kine
99 data.DumpHits(5);       > dump.hits
100 data.DumpDigits(5);     > dump.digits
101 data.DumpSDigits(5);    > dump.sdigits
102 data.DumpRecPoints(5);  > dump.recpoints
103 data.DumpRecTrigger(5); > dump.rectrigger
104 .q
105 EOF
106
107 echo "Finished"  
108 echo "... see results in test_out"
109
110 cd $CURDIR