3 # with galice.root, galice_sim.root
7 echo "Number of events not specified. Using $NEVENTS"
13 OUTDIR=test_out.$NEVENTS
17 cp $ALICE_ROOT/MUON/.rootrc $ALICE_ROOT/MUON/rootlogon.C $OUTDIR
22 FULLPATH="$CURDIR/$OUTDIR"
26 echo "Running simulation ..."
28 aliroot -b >& testSim.out << EOF
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");
33 // man->SetSpecificStorage("MUON/Align/Data","local://$ALICE_ROOT/MUON/ResMisAlignCDB");
34 gRandom->SetSeed($SEED);
35 AliCDBManager::Instance()->SetRun($RUN);
36 AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C");
37 MuonSim.SetMakeTrigger("MUON");
38 MuonSim.SetWriteRawData("MUON","raw.root",kTRUE);
39 MuonSim.Run($NEVENTS);
43 echo "Moving generated files to $SIMDIR"
45 mv MUON*.root Kinematics*.root galice.root TrackRefs*.root $SIMDIR
47 echo "Running reconstruction ..."
49 aliroot -b >& testReco.out << EOF
50 AliCDBManager::Instance()->SetRun($RUN);
51 gRandom->SetSeed($SEED);
52 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 1, 1., 10., AliMagFMaps::k5kG);
53 AliTracker::SetFieldMap(field, kFALSE);
54 AliReconstruction* MuonRec = new AliReconstruction("galice.root");
55 MuonRec.SetInput("$FULLPATH/raw.root");
56 MuonRec.SetRunVertexFinder(kFALSE);
57 MuonRec.SetRunLocalReconstruction("MUON");
58 MuonRec.SetRunTracking("MUON");
59 MuonRec.SetFillESD("");
60 MuonRec.SetLoadAlignData("MUON");
61 MuonRec.SetNumberOfEventsPerFile(1000);
62 MuonRec.SetOption("MUON","SAVEDIGITS");
63 // Change the line above with the line below to run without local reconstruction
64 // MuonRec.SetOption("MUON","SAVEDIGITS NOLOCALRECONSTRUCTION");
70 echo "Running Trigger efficiency ..."
71 aliroot -b >& testTriggerResults.out << EOF
72 .L $ALICE_ROOT/MUON/MUONTriggerEfficiency.C+
73 MUONTriggerEfficiency("$SIMDIR/galice.root", "galice.root", 1);
77 echo "Running efficiency ..."
79 aliroot -b >& testResults.out << EOF
80 .L $ALICE_ROOT/MUON/MUONefficiency.C+
81 // no argument assumes Upsilon but MUONefficiency(443) works on Jpsi
82 MUONefficiency("$SIMDIR/galice.root");
86 echo "Running check ..."
87 aliroot -b >& testCheck.out << EOF
88 gSystem->Load("libMUONevaluation");
89 .L $ALICE_ROOT/MUON/MUONCheck.C+
90 MUONCheck(0, $NEVENTS-1, "generated/galice.root", "galice.root", "AliESDs.root");
95 echo "Running dumps for selected event ($DUMPEVENT) ..."
98 AliMUONMCDataInterface mcdSim("$SIMDIR/galice.root");
99 mcdSim.DumpKine($DUMPEVENT); > dump.kine
100 mcdSim.DumpHits($DUMPEVENT); > dump.hits
101 mcdSim.DumpTrackRefs($DUMPEVENT); > dump.trackrefs
102 mcdSim.DumpDigits($DUMPEVENT,true); > dump.simdigits
103 mcdSim.DumpSDigits($DUMPEVENT,true); > dump.sdigits
105 AliMUONDataInterface dRec("galice.root");
106 dRec.DumpRecPoints($DUMPEVENT); > dump.recpoints
107 dRec.DumpTracks($DUMPEVENT); > dump.tracks
108 dRec.DumpTriggerTracks($DUMPEVENT); > dump.triggertracks
109 dRec.DumpTrigger($DUMPEVENT); > dump.trigger
110 dRec.DumpDigits($DUMPEVENT,true); > dump.recdigits
116 echo "... see results in test_out"