Script for testing alignment using physics tracks
[u/mrichter/AliRoot.git] / MUON / AlirootRun_MUONtestAlign.sh
CommitLineData
9228b8da 1#!/bin/sh
2# $Id$
3#
4# By J. Castillo
5
6
7CURDIR=`pwd`
8OUTDIR=test_align
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
22gAlice->Init("$ALICE_ROOT/MUON/Config.C");
23.x $ALICE_ROOT/MUON/MUONCheckMisAligner.C(0., 0.03, 0., 0.03, 0., 0.03, "FullMisAlignCDB");
24.q
25EOF
26
27cp -r $ALICE_ROOT/MUON/Calib FullMisAlignCDB/MUON/
28
29echo "Running simulation ..."
30
31aliroot -b >& testSim.out << EOF
32// Uncoment following lines to run simulation with local residual mis-alignment
33// (generated via MUONGenerateGeometryData.C macro)
34AliCDBManager* man = AliCDBManager::Instance();
35man->SetDefaultStorage("local://$ALICE_ROOT");
36man->SetSpecificStorage("MUON","local://FullMisAlignCDB");
37gRandom->SetSeed($SEED);
38AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C");
39MuonSim.SetMakeTrigger("MUON");
40MuonSim.SetWriteRawData("MUON");
41MuonSim.Run($NEVENTS);
42.q
43EOF
44
45echo "Running reconstruction ..."
46
47aliroot -b >& testReco.out << EOF
48gRandom->SetSeed($SEED);
49AliReconstruction MuonRec("galice.root");
50MuonRec.SetInput("$FULLPATH/");
51MuonRec.SetRunTracking("");
52MuonRec.SetRunVertexFinder(kFALSE);
53MuonRec.SetRunLocalReconstruction("MUON");
54MuonRec.SetFillESD("MUON");
55MuonRec.Run();
56.q
57EOF
58
59echo "Running alignment ..."
60
61aliroot -b >& testAlign.out << EOF
62.x $ALICE_ROOT/MUON/MUONAlignment.C
63.q
64EOF
65
66echo "Finished"
67echo "... see results in test_align"
68
69cd $CURDIR