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.
10 // To run this macro in batch, just do
12 // root -b -q icechi2.cc
14 // For more details see the docs of class IceChi2
16 // NvE 28-jul-2006 Utrecht University
17 //////////////////////////////////////////////////////////
19 gSystem->Load("ralice");
20 gSystem->Load("icepack");
21 gSystem->Load("iceconvert");
23 // Interactively compile and load the EvtAna.cxx code
24 gROOT->LoadMacro("EvtAna.cxx+");
26 // The database conversion job
27 IceCal2Root cal("IceCal2Root","Calibration format conversion");
28 cal.SetAmacalibFile("amacalib_amanda2_2003.txt");
29 cal.SetOutputFile("cal2003.root");
32 // The chi-squared fitting procedure
33 IceChi2 chi2("IceChi2","Chi-squared fitting");
34 chi2.UseTracks("IceDwalk");
36 // The direct walk reconstruction task
37 IceDwalk dwalk("IceDwalk","Direct walk reconstruction");
39 // The calibration processor task
40 IceCalibrate calib("IceCalibrate","Signal calibration");
41 calib.SetCalibFile("cal2003.root");
43 // The Xtalk correction processor task
44 IceXtalk xtalk("IceXtalk","Cross talk correction");
45 xtalk.SetCalibFile("cal2003.root");
47 // The hit cleaning processor task
48 IceCleanHits clean("IceCleanHits","Hit cleaning");
50 // The event analysis task
51 EvtAna evtana("evtana","Event analysis");
53 // The F2K event data processing job
54 IceF2k q("IceF2k","Processing of the F2K event data");
57 q.SetInputFile("real-reco.f2k");
58 q.SetOutputFile("real-reco.root");
60 // Add the various processors as subtasks to the F2K job
68 // Perform the conversion