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