]>
Commit | Line | Data |
---|---|---|
560f2905 | 1 | // $Id$ |
2 | /* | |
3 | * Example macro to run the HLT Conformal mapping tracker embedded into | |
4 | * AliRoot reconstruction. The reconstruction is done from the TPC raw | |
5 | * data. The last component in the chain is the global merger and the | |
6 | * output of the chain is of type {'TRACKS ':'TPC '}. The output is | |
7 | * added to the HLTOUT and processed during the FillESD step. | |
8 | * Alternativly the merger is skipped and all {'TRAKSEGS':'TPC '} blocks | |
9 | * are forwarded to the output. The merger step is included in the | |
10 | * HLTOUT processing in that case (see bUseTrackSegs variable below). | |
11 | * | |
12 | * Usage: | |
13 | * <pre> | |
14 | * aliroot -b -q rec-hlt-tpc-tracks.C | tee rec-hlt-tpc-tracks.log | |
15 | * </pre> | |
16 | * | |
17 | * The chain to be run is defined by the macro given to the parameter | |
18 | * 'config=' | |
19 | * | |
20 | * The macro asumes raw data to be available in the rawx folders, either | |
21 | * simulated or real data. A different input can be specified as parameter | |
22 | * <pre> | |
23 | * aliroot -b -q rec-hlt-tpc-tracks.C'("input.root")' | |
24 | * </pre> | |
25 | * | |
26 | * In the first section, an analysis chain is defined. The scale of the | |
27 | * chain can be defined by choosing the range of sectors and partitions. | |
28 | * | |
29 | * The reconstruction is steered by the AliReconstruction object in the | |
30 | * usual way. | |
31 | * | |
32 | * @ingroup alihlt_tpc | |
33 | * @author Matthias.Richter@ift.uib.no | |
34 | */ | |
35 | void rec_hlt_tpc_tracks(const char* input="./") | |
36 | { | |
37 | if (!input) { | |
38 | cerr << "please specify input or run without arguments" << endl; | |
39 | return; | |
40 | } | |
41 | ||
42 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
43 | // | |
44 | // init the HLT system in order to define the analysis chain below | |
45 | // | |
7bf6c76d | 46 | AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance(); |
560f2905 | 47 | |
48 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
49 | // | |
50 | // define the analysis chain to be run | |
51 | // | |
52 | int iMinSlice=0; | |
53 | int iMaxSlice=17; | |
54 | int iMinPart=0; | |
55 | int iMaxPart=5; | |
56 | TString writerInput; | |
57 | TString mergerInput; | |
58 | for (int slice=iMinSlice; slice<=iMaxSlice; slice++) { | |
59 | TString trackerInput; | |
60 | for (int part=iMinPart; part<=iMaxPart; part++) { | |
61 | TString arg, publisher, cf; | |
62 | ||
63 | // raw data publisher components | |
64 | int ddlno=768; | |
65 | if (part>1) ddlno+=72+4*slice+(part-2); | |
66 | else ddlno+=2*slice+part; | |
67 | arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC ' -dataspec 0x%02x%02x%02x%02x", ddlno, slice, slice, part, part); | |
68 | publisher.Form("DP_%02d_%d", slice, part); | |
69 | AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data()); | |
70 | ||
71 | // cluster finder components | |
72 | cf.Form("CF_%02d_%d", slice, part); | |
73 | AliHLTConfiguration cfconf(cf.Data(), "TPCClusterFinderDecoder", publisher.Data(), "-timebins 446"); | |
74 | ||
75 | if (trackerInput.Length()>0) trackerInput+=" "; | |
76 | trackerInput+=cf; | |
77 | if (writerInput.Length()>0) writerInput+=" "; | |
78 | writerInput+=cf; | |
79 | } | |
80 | TString tracker; | |
81 | // tracker finder components | |
82 | tracker.Form("TR_%02d", slice); | |
e2d341d2 | 83 | AliHLTConfiguration trackerconf(tracker.Data(), "TPCSliceTracker", trackerInput.Data(), "-pp-run -solenoidBz 0.5"); |
560f2905 | 84 | if (writerInput.Length()>0) writerInput+=" "; |
85 | writerInput+=tracker; | |
86 | if (mergerInput.Length()>0) mergerInput+=" "; | |
87 | mergerInput+=tracker; | |
88 | } | |
89 | ||
90 | bool bUseTrackSegs=false; | |
91 | ||
92 | if (!bUseTrackSegs) { | |
93 | // GlobalMerger component | |
94 | AliHLTConfiguration mergerconf("globalmerger","TPCGlobalMerger",mergerInput.Data(),""); | |
95 | } else { | |
96 | // collect all tracksegs blocks | |
97 | AliHLTConfiguration mergerconf("globalmerger","BlockFilter",mergerInput.Data(),""); | |
98 | } | |
99 | ||
100 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
101 | // | |
102 | // Init and run the reconstruction | |
103 | // All but HLT reconstruction is switched off | |
104 | // | |
105 | AliReconstruction rec; | |
106 | rec.SetInput(input); | |
107 | rec.SetRunVertexFinder(kFALSE); | |
108 | rec.SetRunLocalReconstruction("HLT"); | |
109 | rec.SetRunTracking(""); | |
110 | rec.SetLoadAlignFromCDB(0); | |
5a78a6e3 | 111 | rec.SetRunQA(":"); |
560f2905 | 112 | rec.SetFillESD("HLT"); |
113 | rec.SetFillTriggerESD(false); | |
114 | rec.SetOption("HLT", "libAliHLTUtil.so libAliHLTRCU.so libAliHLTTPC.so loglevel=0x7c chains=globalmerger"); | |
115 | rec.Run(); | |
116 | } |