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