]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/macros/rec-hlt-tpc-ca.C
The present commit corresponds to an important change in the way the
[u/mrichter/AliRoot.git] / HLT / TPCLib / macros / rec-hlt-tpc-ca.C
CommitLineData
59512cfc 1// $Id$
2/*
3 * Example macro to run the HLT TPC Cellular Automaton tracker embedded
4 * into AliRoot reconstruction. The reconstruction is done from the TPC
5 * raw data.
6 *
7 * Usage:
8 * <pre>
9 * aliroot -b -q rec-hlt-tpc-ca.C | tee rec-hlt-tpc-ca.log
10 * </pre>
11 *
12 * The chain to be run is defined by the macro given to the parameter
13 * 'config='
14 *
15 * The macro asumes raw data to be available in the rawx folders, either
16 * simulated or real data. A different input can be specified as parameter
17 * <pre>
18 * aliroot -b -q rec-hlt-tpc-ca.C'("input.root")'
19 * </pre>
20 *
21 * By the second parameter the digit reader can be chosen, default is
22 * AliHLTTPCDigitReaderPacked (=false). Set to true to use
23 * AliHLTTPCDigitReaderDecoder
24 *
25 * In the first section, an analysis chain is defined. The scale of the
26 * chain can be defined by choosing the range of sectors and partitions.
27 *
28 * The reconstruction is steered by the AliReconstruction object in the
29 * usual way.
30 *
31 * @ingroup alihlt_tpc
32 * @author Matthias.Richter@ift.uib.no
33 */
34void rec_hlt_tpc_ca(const char* input="./", bool bUseClusterFinderDecoder=true)
35{
36 if (!input) {
37 cerr << "please specify input or run without arguments" << endl;
38 return;
39 }
40
41 gSystem->Exec("rm galice.root");
42
43 ///////////////////////////////////////////////////////////////////////////////////////////////////
44 //
45 // init the HLT system in order to define the analysis chain below
46 //
47 gSystem->Load("libHLTrec.so");
48 AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance();
49
50 ///////////////////////////////////////////////////////////////////////////////////////////////////
51 //
52 // define the analysis chain to be run
53 //
54 int iMinSlice=0;
55 int iMaxSlice=35;
56 int iMinPart=0;
57 int iMaxPart=5;
58 TString writerInput;
59 TString mergerInput;
60 for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
61 TString trackerInput;
62 for (int part=iMinPart; part<=iMaxPart; part++) {
63 TString arg, publisher, cf;
64
65 // raw data publisher components
66 int ddlno=768;
67 if (part>1) ddlno+=72+4*slice+(part-2);
68 else ddlno+=2*slice+part;
03df9065 69 arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC ' -dataspec 0x%02x%02x%02x%02x -verbose", ddlno, slice, slice, part, part);
59512cfc 70 publisher.Form("DP_%02d_%d", slice, part);
71 AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
72
73 // cluster finder components
74 cf.Form("CF_%02d_%d", slice, part);
75 if (bUseClusterFinderDecoder) {
76 AliHLTConfiguration cfconf(cf.Data(), "TPCClusterFinderDecoder", publisher.Data(), "-timebins 446");
77 } else {
78 AliHLTConfiguration cfconf(cf.Data(), "TPCClusterFinderPacked", publisher.Data(), "-timebins 446 -sorted");
79 }
80 if (trackerInput.Length()>0) trackerInput+=" ";
81 trackerInput+=cf;
82 if (writerInput.Length()>0) writerInput+=" ";
83 writerInput+=cf;
84 }
85 TString tracker;
86 // tracker finder components
87 tracker.Form("TR_%02d", slice);
9400082f 88 AliHLTConfiguration trackerconf(tracker.Data(), "TPCCATracker", trackerInput.Data(), "-solenoidBz 5");
59512cfc 89 if (writerInput.Length()>0) writerInput+=" ";
90 writerInput+=tracker;
91 if (mergerInput.Length()>0) mergerInput+=" ";
92 mergerInput+=tracker;
93 }
94
95 // GlobalMerger component
96 AliHLTConfiguration mergerconf("globalmerger","TPCGlobalMerger",mergerInput.Data(),"");
97
98 // the esd converter configuration
99 AliHLTConfiguration esdcconf("esd-converter", "TPCEsdConverter" , "globalmerger", "-tree");
100
101 // the root file writer configuration
102 AliHLTConfiguration sink("sink1", "EsdCollector" , "esd-converter", "-directory hlt-tpc-ca");
103
104 ///////////////////////////////////////////////////////////////////////////////////////////////////
105 //
106 // Init and run the reconstruction
107 // All but HLT reconstructio is switched off
108 //
109 AliReconstruction rec;
110 rec.SetInput(input);
111 rec.SetRunVertexFinder(kFALSE);
112 rec.SetRunLocalReconstruction("HLT");
113 rec.SetRunTracking("");
114 rec.SetLoadAlignFromCDB(0);
115 rec.SetRunQA(":");
59512cfc 116 rec.SetFillESD("HLT");
117 rec.SetOption("HLT", "libAliHLTUtil.so libAliHLTRCU.so libAliHLTTPC.so chains=sink1");
118 rec.Run();
119}