]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AlirootRun_MUONtestAlign.sh
In AliMUONClusterInfo:
[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);
ce6c70e9 66AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 1, 1., 10., AliMagFMaps::k5kG);
67AliTracker::SetFieldMap(field, kFALSE);
9228b8da 68AliReconstruction MuonRec("galice.root");
1ba08db3 69MuonRec.SetInput("$FULLPATH/raw.root");
9228b8da 70MuonRec.SetRunVertexFinder(kFALSE);
71MuonRec.SetRunLocalReconstruction("MUON");
1ba08db3 72MuonRec.SetRunTracking("MUON");
73MuonRec.SetFillESD("");
e6a01e20 74MuonRec.SetLoadAlignData("MUON")
1ba08db3 75MuonRec.SetNumberOfEventsPerFile(1000);
76AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();
77// muonRecoParam->SaveFullClusterInESD(kTRUE,100.);
78muonRecoParam->CombineClusterTrackReco(kFALSE);
79//muonRecoParam->SetClusteringMode("PEAKFIT");
80//muonRecoParam->SetClusteringMode("PEAKCOG");
81muonRecoParam->Print("FULL");
82
83AliRecoParam::Instance()->RegisterRecoParam(muonRecoParam);
9228b8da 84MuonRec.Run();
85.q
86EOF
87
88echo "Running alignment ..."
89
90aliroot -b >& testAlign.out << EOF
8962ab7c 91.L $ALICE_ROOT/MUON/MUONAlignment.C+
1ba08db3 92AliMpCDB::LoadMpSegmentation2();
8962ab7c 93MUONAlignment();
9228b8da 94.q
95EOF
96
97echo "Finished"
a1a34380 98echo "... see results in " $OUTDIR
9228b8da 99
100cd $CURDIR