]>
Commit | Line | Data |
---|---|---|
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 | // | |
46 | gSystem->Load("libHLTrec.so"); | |
47 | AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance(); | |
48 | ||
49 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
50 | // | |
51 | // define the analysis chain to be run | |
52 | // | |
53 | int iMinSlice=0; | |
54 | int iMaxSlice=17; | |
55 | int iMinPart=0; | |
56 | int iMaxPart=5; | |
57 | TString writerInput; | |
58 | TString mergerInput; | |
59 | for (int slice=iMinSlice; slice<=iMaxSlice; slice++) { | |
60 | TString trackerInput; | |
61 | for (int part=iMinPart; part<=iMaxPart; part++) { | |
62 | TString arg, publisher, cf; | |
63 | ||
64 | // raw data publisher components | |
65 | int ddlno=768; | |
66 | if (part>1) ddlno+=72+4*slice+(part-2); | |
67 | else ddlno+=2*slice+part; | |
68 | arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC ' -dataspec 0x%02x%02x%02x%02x", ddlno, slice, slice, part, part); | |
69 | publisher.Form("DP_%02d_%d", slice, part); | |
70 | AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data()); | |
71 | ||
72 | // cluster finder components | |
73 | cf.Form("CF_%02d_%d", slice, part); | |
74 | AliHLTConfiguration cfconf(cf.Data(), "TPCClusterFinderDecoder", publisher.Data(), "-timebins 446"); | |
75 | ||
76 | if (trackerInput.Length()>0) trackerInput+=" "; | |
77 | trackerInput+=cf; | |
78 | if (writerInput.Length()>0) writerInput+=" "; | |
79 | writerInput+=cf; | |
80 | } | |
81 | TString tracker; | |
82 | // tracker finder components | |
83 | tracker.Form("TR_%02d", slice); | |
84 | AliHLTConfiguration trackerconf(tracker.Data(), "TPCSliceTracker", trackerInput.Data(), "-pp-run -solenoidBz 0.5"); | |
85 | if (writerInput.Length()>0) writerInput+=" "; | |
86 | writerInput+=tracker; | |
87 | if (mergerInput.Length()>0) mergerInput+=" "; | |
88 | mergerInput+=tracker; | |
89 | } | |
90 | ||
91 | bool bUseTrackSegs=false; | |
92 | ||
93 | if (!bUseTrackSegs) { | |
94 | // GlobalMerger component | |
95 | AliHLTConfiguration mergerconf("globalmerger","TPCGlobalMerger",mergerInput.Data(),""); | |
96 | } else { | |
97 | // collect all tracksegs blocks | |
98 | AliHLTConfiguration mergerconf("globalmerger","BlockFilter",mergerInput.Data(),""); | |
99 | } | |
100 | ||
101 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
102 | // | |
103 | // Init and run the reconstruction | |
104 | // All but HLT reconstruction is switched off | |
105 | // | |
106 | AliReconstruction rec; | |
107 | rec.SetInput(input); | |
108 | rec.SetRunVertexFinder(kFALSE); | |
109 | rec.SetRunLocalReconstruction("HLT"); | |
110 | rec.SetRunTracking(""); | |
111 | rec.SetLoadAlignFromCDB(0); | |
112 | rec.SetRunQA(":"); | |
113 | rec.SetFillESD("HLT"); | |
114 | rec.SetFillTriggerESD(false); | |
115 | rec.SetOption("HLT", "libAliHLTUtil.so libAliHLTRCU.so libAliHLTTPC.so loglevel=0x7c chains=globalmerger"); | |
116 | rec.Run(); | |
117 | } |