]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AlirootRun_MUONtestAlign.sh
Small fixes. Clean-up.
[u/mrichter/AliRoot.git] / MUON / AlirootRun_MUONtestAlign.sh
1 #!/bin/sh
2 # $Id$
3 #
4 # By J. Castillo
5
6
7 CURDIR=`pwd`
8 OUTDIR=test_align
9
10 rm -fr $OUTDIR
11 mkdir $OUTDIR
12 cp $ALICE_ROOT/MUON/.rootrc $ALICE_ROOT/MUON/rootlogon.C $OUTDIR
13 cd $OUTDIR
14
15 FULLPATH="$CURDIR/$OUTDIR"
16 NEVENTS=1000
17 SEED=1234567
18
19 echo "Generating misalignment ..."
20
21 aliroot -b >& testMisalign.out << EOF
22 gAlice->Init("$ALICE_ROOT/MUON/Config.C");
23 gGeoManager->Export("geometry.root");
24 .L $ALICE_ROOT/MUON/MUONCheckMisAligner.C+
25 MUONCheckMisAligner(0., 0.03, 0., 0.03, 0., 0.03, "FullMisAlignCDB");
26 .q
27 EOF
28
29 echo "Running simulation  ..."
30
31 aliroot -b  >& testSim.out << EOF 
32 // Uncoment following lines to run simulation with local residual mis-alignment
33 // (generated via MUONGenerateGeometryData.C macro)
34 AliCDBManager* man = AliCDBManager::Instance();
35 man->SetDefaultStorage("local://$ALICE_ROOT");
36 man->SetSpecificStorage("MUON/Align/Data","local://FullMisAlignCDB");
37 gRandom->SetSeed($SEED);
38 AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C");
39 MuonSim.SetMakeTrigger("MUON");
40 MuonSim.SetWriteRawData("MUON");
41 MuonSim.Run($NEVENTS);
42 .q
43 EOF
44
45 echo "Running reconstruction  ..."
46
47 aliroot -b >& testReco.out << EOF
48 gRandom->SetSeed($SEED);
49 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 1, 1., 10., AliMagFMaps::k5kG);
50 AliTracker::SetFieldMap(field, kFALSE);
51 AliReconstruction MuonRec("galice.root");
52 MuonRec.SetInput("$FULLPATH/");
53 MuonRec.SetRunTracking("MUON");
54 MuonRec.SetRunVertexFinder(kFALSE);
55 MuonRec.SetRunLocalReconstruction("MUON");
56 MuonRec.SetFillESD("MUON");
57 MuonRec.SetLoadAlignData("MUON")
58 MuonRec.Run();
59 .q
60 EOF
61
62 echo "Running alignment ..."
63
64 aliroot -b >& testAlign.out << EOF
65 .L $ALICE_ROOT/MUON/MUONAlignment.C+
66 MUONAlignment();
67 .q
68 EOF
69
70 echo "Finished"  
71 echo "... see results in test_align"
72
73 cd $CURDIR