]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AlirootRun_MUONtest.sh
Correct function Compare() for "pixels" from MLEM cluster finder.
[u/mrichter/AliRoot.git] / MUON / AlirootRun_MUONtest.sh
CommitLineData
fa701981 1#!/bin/sh
2# $Id$
3bc0b4a4 3# with galice.root, galice_sim.root
fa701981 4
32bf5f82 5if [ $# -ne 1 ]; then
dd1fc333 6 NEVENTS=100
32bf5f82 7 echo "Number of events not specified. Using $NEVENTS"
8else
9 NEVENTS=$1
10fi
11
fa701981 12CURDIR=`pwd`
32bf5f82 13OUTDIR=test_out.$NEVENTS
fa701981 14
15rm -fr $OUTDIR
16mkdir $OUTDIR
7430be1c 17cp $ALICE_ROOT/MUON/.rootrc $ALICE_ROOT/MUON/rootlogon.C $OUTDIR
fa701981 18cd $OUTDIR
19
32bf5f82 20DUMPEVENT=5
3c465f70 21RUN=0
7430be1c 22FULLPATH="$CURDIR/$OUTDIR"
b7368825 23SEED=1234567
32bf5f82 24SIMDIR="generated"
b7368825 25
fa701981 26echo "Running simulation ..."
27
32bf5f82 28aliroot -b >& testSim.out << EOF
f6d516e9 29// Uncoment following lines to run simulation with local residual mis-alignment
30// (generated via MUONGenerateGeometryData.C macro)
31// AliCDBManager* man = AliCDBManager::Instance();
32// man->SetDefaultStorage("local://$ALICE_ROOT");
0d24599f 33// man->SetSpecificStorage("MUON/Align/Data","local://$ALICE_ROOT/MUON/ResMisAlignCDB");
b7368825 34gRandom->SetSeed($SEED);
3c465f70 35AliCDBManager::Instance()->SetRun($RUN);
7430be1c 36AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C");
10c8d1ce 37MuonSim.SetMakeTrigger("MUON");
32bf5f82 38MuonSim.SetWriteRawData("MUON","raw.root",kTRUE);
5c6f99c2 39MuonSim.Run($NEVENTS);
fa701981 40.q
41EOF
42
32bf5f82 43echo "Moving generated files to $SIMDIR"
44mkdir $SIMDIR
45mv MUON*.root Kinematics*.root galice.root TrackRefs*.root $SIMDIR
7aef07e5 46
fa701981 47echo "Running reconstruction ..."
48
49aliroot -b >& testReco.out << EOF
3c465f70 50AliCDBManager::Instance()->SetRun($RUN);
7430be1c 51gRandom->SetSeed($SEED);
bd0cb923 52AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 1, 1., 10., AliMagFMaps::k5kG);
b6675e8f 53AliTracker::SetFieldMap(field, kFALSE);
32bf5f82 54AliReconstruction* MuonRec = new AliReconstruction("galice.root");
fe460659 55MuonRec.SetInput("$FULLPATH/raw.root");
5c6f99c2 56MuonRec.SetRunVertexFinder(kFALSE);
57MuonRec.SetRunLocalReconstruction("MUON");
196471e9 58MuonRec.SetRunTracking("MUON");
32bf5f82 59MuonRec.SetFillESD("");
de2cd600 60MuonRec.SetLoadAlignData("MUON");
32bf5f82 61MuonRec.SetNumberOfEventsPerFile(1000);
62MuonRec.SetOption("MUON","SAVEDIGITS");
c588cbb1 63// Change the line above with the line below to run without local reconstruction
64// MuonRec.SetOption("MUON","SAVEDIGITS NOLOCALRECONSTRUCTION");
7430be1c 65MuonRec.Run();
32bf5f82 66delete MuonRec;
fa701981 67.q
68EOF
69
858e5b75 70echo "Running Trigger efficiency ..."
858e5b75 71aliroot -b >& testTriggerResults.out << EOF
5c6f99c2 72.L $ALICE_ROOT/MUON/MUONTriggerEfficiency.C+
32bf5f82 73MUONTriggerEfficiency("$SIMDIR/galice.root", "galice.root", 1);
858e5b75 74.q
75EOF
76
72a7d831 77echo "Running efficiency ..."
fa701981 78
79aliroot -b >& testResults.out << EOF
5c6f99c2 80.L $ALICE_ROOT/MUON/MUONefficiency.C+
72a7d831 81// no argument assumes Upsilon but MUONefficiency(443) works on Jpsi
32bf5f82 82MUONefficiency("$SIMDIR/galice.root");
fa701981 83.q
84EOF
85
8dc57946 86echo "Running check ..."
8dc57946 87aliroot -b >& testCheck.out << EOF
88gSystem->Load("libMUONevaluation");
5c6f99c2 89.L $ALICE_ROOT/MUON/MUONCheck.C+
32bf5f82 90MUONCheck(0, $NEVENTS-1, "generated/galice.root", "galice.root", "AliESDs.root");
5c6f99c2 91.q
7430be1c 92EOF
858e5b75 93
32bf5f82 94
95echo "Running dumps for selected event ($DUMPEVENT) ..."
8dc57946 96
3bc0b4a4 97aliroot -b << EOF
32bf5f82 98AliMUONMCDataInterface mcdSim("$SIMDIR/galice.root");
99mcdSim.DumpKine($DUMPEVENT); > dump.kine
100mcdSim.DumpHits($DUMPEVENT); > dump.hits
101mcdSim.DumpTrackRefs($DUMPEVENT); > dump.trackrefs
940ec282 102mcdSim.DumpDigits($DUMPEVENT,true); > dump.simdigits
103mcdSim.DumpSDigits($DUMPEVENT,true); > dump.sdigits
32bf5f82 104
105AliMUONDataInterface dRec("galice.root");
106dRec.DumpRecPoints($DUMPEVENT); > dump.recpoints
107dRec.DumpTracks($DUMPEVENT); > dump.tracks
108dRec.DumpTriggerTracks($DUMPEVENT); > dump.triggertracks
940ec282 109dRec.DumpTrigger($DUMPEVENT); > dump.trigger
32bf5f82 110dRec.DumpDigits($DUMPEVENT,true); > dump.recdigits
8dc57946 111.q
112EOF
858e5b75 113
32bf5f82 114
fa701981 115echo "Finished"
116echo "... see results in test_out"
117
118cd $CURDIR