]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AlirootRun_MUONtestAlign.sh
Fixing the decoding of regional header bits.
[u/mrichter/AliRoot.git] / MUON / AlirootRun_MUONtestAlign.sh
1 #!/bin/sh
2 # $Id$
3 #
4 # By J. Castillo
5
6 CURDIR=`pwd`
7 OUTDIR=test_align
8 SIMDIR="generated"
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 AliMpCDB::LoadMpSegmentation2();
23 gAlice->Init("$ALICE_ROOT/MUON/Config.C");
24 gGeoManager->Export("geometry.root");
25 .L $ALICE_ROOT/MUON/MUONCheckMisAligner.C+
26 MUONCheckMisAligner(0., 0.03, 0., 0.03, 0., 0.03, "FullMisAlignCDB");
27 .q
28 EOF
29
30 echo "Running simulation  ..."
31
32 aliroot -b  >& testSim.out << EOF 
33 // Uncoment following lines to run simulation with local full mis-alignment
34 // (generated via MUONGenerateGeometryData.C macro)
35 AliCDBManager* man = AliCDBManager::Instance();
36 man->SetDefaultStorage("local://$ALICE_ROOT");
37 man->SetSpecificStorage("MUON/Align/Data","local://FullMisAlignCDB");
38 AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C");
39 MuonSim.SetSeed($SEED);
40 MuonSim.SetMakeTrigger("MUON");
41 MuonSim.SetWriteRawData("MUON","raw.root",kTRUE);
42 MuonSim.SetMakeDigits("MUON");
43 MuonSim.SetMakeSDigits("MUON");
44 MuonSim.SetMakeDigitsFromHits("");
45 MuonSim.Run($NEVENTS);
46 .q
47 EOF
48
49 echo "Moving generated files to $SIMDIR"
50 mkdir $SIMDIR
51 mv *QA*.root *.log $SIMDIR
52 mv MUON*.root Kinematics*.root galice.root TrackRefs*.root $SIMDIR
53
54 echo "Running reconstruction  ..."
55
56 aliroot -b >& testReco.out << EOF
57 // Uncoment following lines to run reconstruction with local full mis-alignment
58 // (generated via MUONGenerateGeometryData.C macro)
59 //AliCDBManager* man = AliCDBManager::Instance();
60 //man->SetDefaultStorage("local://$ALICE_ROOT");
61 //man->SetSpecificStorage("MUON/Align/Data","local://$ALICE_ROOT/MUON/FullMisAlignCDB");
62 gRandom->SetSeed($SEED);
63 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 1, 1., 10., AliMagFMaps::k5kG);
64 AliTracker::SetFieldMap(field, kFALSE);
65 AliReconstruction MuonRec("galice.root");
66 MuonRec.SetInput("$FULLPATH/raw.root");
67 MuonRec.SetRunVertexFinder(kFALSE);
68 MuonRec.SetRunLocalReconstruction("MUON");
69 MuonRec.SetRunTracking("MUON");
70 MuonRec.SetFillESD("");
71 MuonRec.SetLoadAlignData("MUON")
72 MuonRec.SetNumberOfEventsPerFile(1000);
73 AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();
74 //  muonRecoParam->SaveFullClusterInESD(kTRUE,100.);
75 muonRecoParam->CombineClusterTrackReco(kFALSE);
76 //muonRecoParam->SetClusteringMode("PEAKFIT");
77 //muonRecoParam->SetClusteringMode("PEAKCOG");
78 muonRecoParam->Print("FULL");
79
80 AliRecoParam::Instance()->RegisterRecoParam(muonRecoParam);
81 MuonRec.Run();
82 .q
83 EOF
84
85 echo "Running alignment ..."
86
87 aliroot -b >& testAlign.out << EOF
88 .L $ALICE_ROOT/MUON/MUONAlignment.C+
89 AliMpCDB::LoadMpSegmentation2();
90 MUONAlignment();
91 .q
92 EOF
93
94 echo "Finished"  
95 echo "... see results in test_align"
96
97 cd $CURDIR