Resolving all symbols in the library
[u/mrichter/AliRoot.git] / MUON / AlirootRun_MUONtestAlign.sh
CommitLineData
9228b8da 1#!/bin/sh
2# $Id$
3#
4# By J. Castillo
5
9228b8da 6CURDIR=`pwd`
7OUTDIR=test_align
1ba08db3 8SIMDIR="generated"
9228b8da 9
10rm -fr $OUTDIR
11mkdir $OUTDIR
12cp $ALICE_ROOT/MUON/.rootrc $ALICE_ROOT/MUON/rootlogon.C $OUTDIR
13cd $OUTDIR
14
15FULLPATH="$CURDIR/$OUTDIR"
16NEVENTS=1000
17SEED=1234567
18
19echo "Generating misalignment ..."
20
21aliroot -b >& testMisalign.out << EOF
1ba08db3 22AliMpCDB::LoadMpSegmentation2();
a1a34380 23TString configFileName = "$ALICE_ROOT/MUON/Config.C";
24gROOT->LoadMacro(configFileName.Data());
25gInterpreter->ProcessLine(gAlice->GetConfigFunction());
26gAlice->GetMCApp()->Init();
8962ab7c 27gGeoManager->Export("geometry.root");
28.L $ALICE_ROOT/MUON/MUONCheckMisAligner.C+
29MUONCheckMisAligner(0., 0.03, 0., 0.03, 0., 0.03, "FullMisAlignCDB");
9228b8da 30.q
31EOF
32
9228b8da 33echo "Running simulation ..."
34
35aliroot -b >& testSim.out << EOF
1ba08db3 36// Uncoment following lines to run simulation with local full mis-alignment
9228b8da 37// (generated via MUONGenerateGeometryData.C macro)
38AliCDBManager* man = AliCDBManager::Instance();
162637e4 39man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
ce6c70e9 40man->SetSpecificStorage("MUON/Align/Data","local://FullMisAlignCDB");
9228b8da 41AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C");
1ba08db3 42MuonSim.SetSeed($SEED);
9228b8da 43MuonSim.SetMakeTrigger("MUON");
1ba08db3 44MuonSim.SetWriteRawData("MUON","raw.root",kTRUE);
45MuonSim.SetMakeDigits("MUON");
46MuonSim.SetMakeSDigits("MUON");
47MuonSim.SetMakeDigitsFromHits("");
9228b8da 48MuonSim.Run($NEVENTS);
49.q
50EOF
51
1ba08db3 52echo "Moving generated files to $SIMDIR"
53mkdir $SIMDIR
54mv *QA*.root *.log $SIMDIR
55mv MUON*.root Kinematics*.root galice.root TrackRefs*.root $SIMDIR
56
9228b8da 57echo "Running reconstruction ..."
58
59aliroot -b >& testReco.out << EOF
1ba08db3 60// Uncoment following lines to run reconstruction with local full mis-alignment
61// (generated via MUONGenerateGeometryData.C macro)
62//AliCDBManager* man = AliCDBManager::Instance();
162637e4 63//man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
64//man->SetSpecificStorage("MUON/Align/Data","local://$ALICE_ROOT/OCDB/MUON/FullMisAlignCDB");
9228b8da 65gRandom->SetSeed($SEED);
66AliReconstruction MuonRec("galice.root");
1ba08db3 67MuonRec.SetInput("$FULLPATH/raw.root");
9228b8da 68MuonRec.SetRunVertexFinder(kFALSE);
69MuonRec.SetRunLocalReconstruction("MUON");
1ba08db3 70MuonRec.SetRunTracking("MUON");
71MuonRec.SetFillESD("");
e6a01e20 72MuonRec.SetLoadAlignData("MUON")
1ba08db3 73MuonRec.SetNumberOfEventsPerFile(1000);
74AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();
75// muonRecoParam->SaveFullClusterInESD(kTRUE,100.);
76muonRecoParam->CombineClusterTrackReco(kFALSE);
77//muonRecoParam->SetClusteringMode("PEAKFIT");
78//muonRecoParam->SetClusteringMode("PEAKCOG");
79muonRecoParam->Print("FULL");
80
81AliRecoParam::Instance()->RegisterRecoParam(muonRecoParam);
9228b8da 82MuonRec.Run();
83.q
84EOF
85
86echo "Running alignment ..."
87
88aliroot -b >& testAlign.out << EOF
8962ab7c 89.L $ALICE_ROOT/MUON/MUONAlignment.C+
1ba08db3 90AliMpCDB::LoadMpSegmentation2();
8962ab7c 91MUONAlignment();
9228b8da 92.q
93EOF
94
95echo "Finished"
a1a34380 96echo "... see results in " $OUTDIR
9228b8da 97
98cd $CURDIR