]>
Commit | Line | Data |
---|---|---|
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"); | |
31 | MuonSim.SetWriteRawData("MUON"); | |
32 | MuonSim.Run($NEVENTS); | |
33 | .q | |
34 | EOF | |
35 | ||
36 | echo "Removing Digits files ..." | |
37 | mkdir MUON.Digits | |
38 | mv MUON.Digits*.root MUON.Digits/ | |
39 | mv galice.root MUON.Digits/ | |
40 | ||
41 | echo "Running reconstruction ..." | |
42 | ||
43 | aliroot -b >& testReco.out << EOF | |
44 | AliCDBManager::Instance()->SetRun($RUN); | |
45 | gRandom->SetSeed($SEED); | |
46 | AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 1, 1., 10., AliMagFMaps::k5kG); | |
47 | AliTracker::SetFieldMap(field, kFALSE); | |
48 | AliReconstruction MuonRec("galice.root"); | |
49 | MuonRec.SetInput("$FULLPATH/"); | |
50 | MuonRec.SetRunVertexFinder(kFALSE); | |
51 | MuonRec.SetRunLocalReconstruction("MUON"); | |
52 | MuonRec.SetRunTracking("MUON"); | |
53 | MuonRec.SetFillESD("MUON"); | |
54 | MuonRec.SetLoadAlignData("MUON"); | |
55 | MuonRec.SetNumberOfEventsPerFile($NEVENTS); | |
56 | // Uncoment following line to run reconstruction with the orginal tracking method | |
57 | // instead of the kalman one (default) | |
58 | //MuonRec.SetOption("MUON","Original"); | |
59 | // Use the following to change clustering method | |
60 | //MuonRec.SetOption("MUON","MLEM"); // new scheme AZs clustering | |
61 | //MuonRec.SetOption("MUON","SIMPLEFIT"); // new scheme simple fitting | |
62 | //MuonRec.SetOption("MUON","COG"); // new scheme basic center-of-gravity only | |
63 | // Use the following to disconnect the status map creation (only for debug!) | |
64 | // as this speeds up startup a bit... | |
65 | //MuonRec.SetOption("MUON","NOSTATUSMAP"); | |
66 | // Use the following to write to disk the digits (from raw data) | |
67 | //MuonRec.SetOption("MUON","SAVEDIGITS"); | |
68 | MuonRec.Run(); | |
69 | .q | |
70 | EOF | |
71 | ||
72 | if [ ! -e MUON.Digits.root ]; then | |
73 | echo "Moving Digits files back ..." | |
74 | mv MUON.Digits/MUON.Digits.root . | |
75 | fi | |
76 | mv MUON.Digits/galice.root ./galice_sim.root | |
77 | ||
78 | echo "Running Trigger efficiency ..." | |
79 | aliroot -b >& testTriggerResults.out << EOF | |
80 | .L $ALICE_ROOT/MUON/MUONTriggerEfficiency.C+ | |
81 | MUONTriggerEfficiency("galice_sim.root", "galice.root", 1); | |
82 | .q | |
83 | EOF | |
84 | ||
85 | echo "Running efficiency ..." | |
86 | ||
87 | aliroot -b >& testResults.out << EOF | |
88 | .L $ALICE_ROOT/MUON/MUONefficiency.C+ | |
89 | // no argument assumes Upsilon but MUONefficiency(443) works on Jpsi | |
90 | MUONefficiency("galice_sim.root"); | |
91 | .q | |
92 | EOF | |
93 | ||
94 | echo "Running check ..." | |
95 | ||
96 | aliroot -b >& testCheck.out << EOF | |
97 | gSystem->Load("libMUONevaluation"); | |
98 | .L $ALICE_ROOT/MUON/MUONCheck.C+ | |
99 | MUONCheck(0, 9, "galice_sim.root", "galice.root", "AliESDs.root"); | |
100 | .q | |
101 | EOF | |
102 | ||
103 | echo "Running dumps for selected event (5) ..." | |
104 | ||
105 | aliroot -b << EOF | |
106 | AliMUONSimData simData("galice_sim.root"); | |
107 | simData.DumpKine(5); > dump.kine | |
108 | simData.DumpHits(5); > dump.hits | |
109 | simData.DumpDigits(5); > dump.digits | |
110 | simData.DumpSDigits(5); > dump.sdigits | |
111 | ||
112 | AliMUONRecData recData("galice.root"); | |
113 | recData.DumpRecPoints(5); > dump.recpoints | |
114 | recData.DumpTracks(5); > dump.tracks | |
115 | recData.DumpRecTrigger(5); > dump.rectrigger | |
116 | .q | |
117 | EOF | |
118 | ||
119 | echo "Finished" | |
120 | echo "... see results in test_out" | |
121 | ||
122 | cd $CURDIR |