]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/icepack/macros/icedwalk.cc
08-nov-2005 NvE Sorting memberfunctions in AliDevice, AliVertex and AliJet optimised...
[u/mrichter/AliRoot.git] / RALICE / icepack / macros / icedwalk.cc
1 //////////////////////////////////////////////////////////
2 // Example macro to demonstrate the usage of the IceDwalk
3 // processor for direct walk 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 icedwalk.cc
13 //
14 // For more details see the docs of class IceDwalk
15 //
16 // NvE 07-oct-2005 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 direct walk reconstruction task
33  IceDwalk dwalk("IceDwalk","Direct walk reconstruction");
34
35  // The calibration processor task
36  IceCalibrate calib("IceCalibrate","Signal calibration");
37  calib.SetCalibFile("cal2003.root");
38
39  // The Xtalk correction processor task
40  IceXtalk xtalk("IceXtalk","Cross talk correction");
41  xtalk.SetCalibFile("cal2003.root");
42  xtalk.SetMinProb(0.5);
43  xtalk.SetXtalkPE(1);
44
45  // The hit cleaning processor task
46  IceCleanHits clean("IceCleanHits","Hit cleaning");
47
48  // The event analysis task
49  EvtAna evtana("evtana","Event analysis");
50
51  // The F2K event data processing job
52  IceF2k q("IceF2k","Processing of the F2K event data");
53  q.SetMaxEvents(2);
54  q.SetPrintFreq(0);
55  q.SetInputFile("real-reco.f2k");
56  q.SetOutputFile("real-reco.root");
57
58  // Add the Xtalk and EvtAna processors as subtasks to the F2K job
59  q.Add(&calib);
60  q.Add(&xtalk);
61  q.Add(&clean);
62  q.Add(&dwalk);
63  q.Add(&evtana);
64
65  // Perform the conversion
66  q.ExecuteJob();
67 }