3 * Example macro to run the HLT global track merger embedded
4 * into AliRoot reconstruction. The reconstruction is done from the raw data.
8 * aliroot -b -q rec-hlt-global-merger.C | tee rec-hlt-global-merger.log
11 * The chain to be run is defined by the macro given to the parameter
14 * The macro asumes raw data to be available in the rawx folders, either
15 * simulated or real data. A different input can be specified as parameter
17 * aliroot -b -q rec-hlt-global-merger.C'("input.root")'
20 * By the second parameter the digit reader can be chosen, default is
21 * AliHLTTPCDigitReaderPacked (=false). Set to true to use
22 * AliHLTTPCDigitReaderDecoder
24 * In the first section, an analysis chain is defined. The scale of the
25 * chain can be defined by choosing the range of sectors and partitions.
27 * The reconstruction is steered by the AliReconstruction object in the
30 * @ingroup alihlt_global
33 void rec_hlt_global_merger(const char* input="./", bool bUseClusterFinderDecoder=true)
36 cerr << "please specify input or run without arguments" << endl;
40 gSystem->Exec("rm galice.root");
42 ///////////////////////////////////////////////////////////////////////////////////////////////////
44 // init the HLT system in order to define the analysis chain below
46 AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
47 gHLT->SetGlobalLoggingLevel(0x4);
48 /* enum AliHLTComponentLogSeverity {
50 kHLTLogBenchmark = 0x1,
56 few important messages not to be filtered out.
57 redirected to kHLTLogInfo in AliRoot
58 kHLTLogImportant = 0x40,
59 special value to enable all messages
61 the default logging filter
66 // set TPC debug stream level
67 AliTPCReconstructor::SetStreamLevel(1);
69 //gHLT->LoadComponentLibraries("libAliHLTUtil.so libAliHLTRCU.so libAliHLTTRD.so libAliHLTTPC.so libAliHLTGlobal.so");
71 ///////////////////////////////////////////////////////////////////////////////////////////////////
73 // define the analysis chain to be run
77 TString globalmergerInput;
88 for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
90 for (int part=iMinPart; part<=iMaxPart; part++) {
91 TString arg, publisher, cf;
93 // raw data publisher components
95 if (part>1) ddlno+=72+4*slice+(part-2);
96 else ddlno+=2*slice+part;
97 arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC ' -dataspec 0x%02x%02x%02x%02x -verbose", ddlno, slice, slice, part, part);
98 publisher.Form("DP_%02d_%d", slice, part);
99 AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
101 // cluster finder components
102 cf.Form("CF_%02d_%d",slice,part);
103 if (bUseClusterFinderDecoder) {
104 AliHLTConfiguration cfconf(cf.Data(), "TPCClusterFinderDecoder", publisher.Data(), "-timebins 446");
106 AliHLTConfiguration cfconf(cf.Data(), "TPCClusterFinderPacked", publisher.Data(), "-timebins 446 -sorted");
108 if (trackerInput.Length()>0) trackerInput+=" ";
110 if (writerInput.Length()>0) writerInput+=" ";
114 // tracker finder components
115 tracker.Form("TR_%02d",slice);
116 AliHLTConfiguration trackerconf(tracker.Data(), "TPCCATracker", trackerInput.Data(), "-solenoidBz 5");
117 if (writerInput.Length()>0) writerInput+=" ";
118 writerInput+=tracker;
119 if (mergerInput.Length()>0) mergerInput+=" ";
120 mergerInput+=tracker;
122 // TPC GlobalMerger component
123 AliHLTConfiguration mergerconf("globalmerger","TPCGlobalMerger",mergerInput.Data(),"");
132 TString writerInput1;
133 TString mergerInput1;
134 for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
135 //TString trackerInput1;
136 TString arg1, publisher1, cf1;
138 // raw data publisher components
142 arg1.Form("-minid %d -datatype 'DDL_RAW ' 'TRD ' -verbose", ddlno);
143 publisher1.Form("DP1_%02d", slice);
144 AliHLTConfiguration pubconf(publisher1.Data(), "AliRawReaderPublisher", NULL , arg1.Data());
146 //arg1.Form("-datatype 'DDL_RAW ' 'TRD ' -datafile raw0/TRD_%d.ddl", ddlno);
147 //publisher1.Form("DP1_%02d",slice);
148 //AliHLTConfiguration pubconf(publisher1.Data(), "FilePublisher", NULL , arg.Data());
149 //cout << arg.Data() << endl;
151 // cluster finder components
152 cf1.Form("CF1_%02d",slice);
153 AliHLTConfiguration cfconf(cf1.Data(), "TRDClusterizer", publisher1.Data(), "output_percentage 1000 -geometry geometry.root -lowflux -simulation");
155 // tracker finder components
157 tracker1.Form("TR1_%02d",slice);
158 AliHLTConfiguration trackerconf(tracker1.Data(), "TRDTrackerV1", cf1.Data(), "output_percentage 300 -NTimeBins 24 -magnetic_field_ON -lowflux -geometry geometry.root");
160 if (writerInput1.Length()>0) writerInput1+=" ";
161 writerInput1+=tracker1;
163 if (mergerInput1.Length()>0) mergerInput1+=" ";
164 mergerInput1 += tracker1;
167 if (globalmergerInput.Length()>0) globalmergerInput+=" ";
168 globalmergerInput += "globalmerger";
170 if (globalmergerInput.Length()>0) globalmergerInput+=" ";
171 globalmergerInput += mergerInput1;
173 //TString datatype = "sim";
174 //AliHLTConfiguration HWriterTR( "HWriterTR", "FileWriter", writerInput.Data(), "-directory . -datafile tr_" + datatype + ".out");
176 //GlobalTrackMerger component
177 AliHLTConfiguration gtrackmergerconf("gtrackmerger","GlobalTrackMerger",globalmergerInput.Data(),"");
179 // the root file writer configuration
180 AliHLTConfiguration sink("sink1", "EsdCollector" , "gtrackmerger" , "-directory hlt-global-track");
182 ///////////////////////////////////////////////////////////////////////////////////////////////////
184 // Init and run the reconstruction
185 // All but HLT reconstructio is switched off
187 AliReconstruction rec;
189 rec.SetRunVertexFinder(kFALSE);
190 rec.SetRunLocalReconstruction("HLT");
191 rec.SetRunTracking("");
192 rec.SetLoadAlignFromCDB(0);
194 rec.SetFillESD("HLT");
195 rec.SetOption("HLT", "libAliHLTUtil.so libAliHLTRCU.so libAliHLTTRD.so libAliHLTTPC.so libAliHLTGlobal.so chains=sink1");