]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/icepack/macros/icechi2.cc
Adding a commented line demsostrating how to switch off
[u/mrichter/AliRoot.git] / RALICE / icepack / macros / icechi2.cc
1 //////////////////////////////////////////////////////////
2 // Example macro to demonstrate the usage of the IceChi2
3 // processor for chi-squared fit reconstruction as a subtask
4 // of an F2K conversion job. The macro also shows how one
5 // can interactively invoke one or more subtasks
6 // (i.e. IceXtalk and EvtAna.cxx) to be executed.
7 // The latter is very convenient in testing/comparing
8 // new reconstruction/analysis algorithms.
9 //
10 // To run this macro in batch, just do
11 //
12 // root -b -q icechi2.cc
13 //
14 // For more details see the docs of class IceChi2
15 //
16 // NvE 28-jul-2006 Utrecht University
17 //////////////////////////////////////////////////////////
18 {
19  gSystem->Load("ralice");
20  gSystem->Load("icepack");
21  gSystem->Load("iceconvert");
22
23  // Interactively compile and load the EvtAna.cxx code
24  gROOT->LoadMacro("EvtAna.cxx+");
25
26  // The database conversion job
27  IceCal2Root cal("IceCal2Root","Calibration format conversion");
28  cal.SetAmacalibFile("amacalib_amanda2_2003.txt");
29  cal.SetOutputFile("cal2003.root");
30  cal.ExecuteJob();
31
32  // The chi-squared fitting procedure
33  IceChi2 chi2("IceChi2","Chi-squared fitting");
34  chi2.UseTracks("IceDwalk");
35
36  // The direct walk reconstruction task
37  IceDwalk dwalk("IceDwalk","Direct walk reconstruction");
38
39  // The calibration processor task
40  IceCalibrate calib("IceCalibrate","Signal calibration");
41  calib.SetCalibFile("cal2003.root");
42
43  // The Xtalk correction processor task
44  IceXtalk xtalk("IceXtalk","Cross talk correction");
45  xtalk.SetCalibFile("cal2003.root");
46
47  // The hit cleaning processor task
48  IceCleanHits clean("IceCleanHits","Hit cleaning");
49
50  // The event analysis task
51  EvtAna evtana("evtana","Event analysis");
52
53  // The F2K event data processing job
54  IceF2k q("IceF2k","Processing of the F2K event data");
55  q.SetMaxEvents(2);
56  q.SetPrintFreq(0);
57  q.SetInputFile("real-reco.f2k");
58  q.SetOutputFile("real-reco.root");
59
60  // Add the various processors as subtasks to the F2K job
61  q.Add(&calib);
62  q.Add(&xtalk);
63  q.Add(&clean);
64  q.Add(&dwalk);
65  q.Add(&chi2);
66  q.Add(&evtana);
67
68  // Perform the conversion
69  q.ExecuteJob();
70 }