X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=MUON%2FAlirootRun_MUONtest.sh;h=d024b72d92fed5ba3c727ea1d36e16b23f8421d3;hp=9b75a185003bfc7065db5628018e7ac9b557b634;hb=7430be1c2eec3e9edc17081c818d81c6b38ee07f;hpb=b73688255505262ddc18dc2fcca127d47d7a348f diff --git a/MUON/AlirootRun_MUONtest.sh b/MUON/AlirootRun_MUONtest.sh index 9b75a185003..d024b72d92f 100755 --- a/MUON/AlirootRun_MUONtest.sh +++ b/MUON/AlirootRun_MUONtest.sh @@ -6,37 +6,60 @@ OUTDIR=test_out rm -fr $OUTDIR mkdir $OUTDIR -cp .rootrc rootlogon.C $OUTDIR +cp $ALICE_ROOT/MUON/.rootrc $ALICE_ROOT/MUON/rootlogon.C $OUTDIR cd $OUTDIR +FULLPATH="$CURDIR/$OUTDIR" +NEVENTS=100 SEED=1234567 +CDBDIRECTORY="$ALICE_ROOT/MUON/CDB/Default"; +CDB="local://$CDBDIRECTORY"; + +if [ ! -d $CDBDIRECTORY"/MUON" ]; then + +echo "Generating Condition Database in directory $CDBDIRECTORY. This may take a while, so please be patient..." + +aliroot -b >& testGenerateCalibrations.out << EOF +.L $ALICE_ROOT/MUON/MUONCDB.C++ +gRandom->SetSeed($SEED); +generateCalibrations("$CDB",true); +.q +EOF + +else + +echo "Condition Database found in directory $CDBDIRECTORY. Will use it if needed." + +fi + echo "Running simulation ..." -aliroot -b >& testSim.out << EOF -AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C") +aliroot -b >& testSim.out << EOF gRandom->SetSeed($SEED); -MuonSim.Run(100) +AliCDBManager::Instance()->SetDefaultStorage("$CDB"); +AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C"); +MuonSim.SetWriteRawData("MUON"); +MuonSim.Run($NEVENTS) .q EOF echo "Running reconstruction ..." aliroot -b >& testReco.out << EOF -TPluginManager* pluginManager = gROOT->GetPluginManager(); -pluginManager->AddHandler("AliReconstructor", "MUON","AliMUONReconstructor", "MUON","AliMUONReconstructor()") +gRandom->SetSeed($SEED); +AliCDBManager::Instance()->SetDefaultStorage("$CDB"); AliReconstruction MuonRec("galice.root") +MuonRec.SetInput("$FULLPATH/"); MuonRec.SetRunTracking("") MuonRec.SetRunVertexFinder(kFALSE) MuonRec.SetRunLocalReconstruction("MUON") MuonRec.SetFillESD("MUON") -gRandom->SetSeed($SEED); -MuonRec.Run() +MuonRec.Run(); .q EOF echo "Running Trigger efficiency ..." - aliroot -b >& testTriggerResults.out << EOF .L $ALICE_ROOT/MUON/MUONTriggerEfficiency.C++ MUONTriggerEfficiency(); @@ -52,7 +75,19 @@ MUONefficiency(); .q EOF +echo "Running dumps ..." + +if [ "$NEVENTS" -le 20 ]; then + +aliroot -b > /dev/null << EOF +.L $ALICE_ROOT/MUON/MUONCheck.C++ +MUONdigits(); > check.digits +MUONrecpoints(); > check.recpoints +MUONrectracks(); > check.rectracks +MUONrectrigger(); > check.rectrigger +EOF +fi echo "Finished" echo "... see results in test_out"