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 gSystem->Load("libHLTrec.so");
47 AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance();
48 gHLT->SetGlobalLoggingLevel(0x4);
49 /* enum AliHLTComponentLogSeverity {
51 kHLTLogBenchmark = 0x1,
57 few important messages not to be filtered out.
58 redirected to kHLTLogInfo in AliRoot
59 kHLTLogImportant = 0x40,
60 special value to enable all messages
62 the default logging filter
67 // set TPC debug stream level
68 AliTPCReconstructor::SetStreamLevel(1);
70 //gHLT->LoadComponentLibraries("libAliHLTUtil.so libAliHLTRCU.so libAliHLTTRD.so libAliHLTTPC.so libAliHLTGlobal.so");
72 ///////////////////////////////////////////////////////////////////////////////////////////////////
74 // define the analysis chain to be run
78 TString globalmergerInput;
89 for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
91 for (int part=iMinPart; part<=iMaxPart; part++) {
92 TString arg, publisher, cf;
94 // raw data publisher components
96 if (part>1) ddlno+=72+4*slice+(part-2);
97 else ddlno+=2*slice+part;
98 arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC ' -dataspec 0x%02x%02x%02x%02x -verbose", ddlno, slice, slice, part, part);
99 publisher.Form("DP_%02d_%d", slice, part);
100 AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
102 // cluster finder components
103 cf.Form("CF_%02d_%d",slice,part);
104 if (bUseClusterFinderDecoder) {
105 AliHLTConfiguration cfconf(cf.Data(), "TPCClusterFinderDecoder", publisher.Data(), "-timebins 446");
107 AliHLTConfiguration cfconf(cf.Data(), "TPCClusterFinderPacked", publisher.Data(), "-timebins 446 -sorted");
109 if (trackerInput.Length()>0) trackerInput+=" ";
111 if (writerInput.Length()>0) writerInput+=" ";
115 // tracker finder components
116 tracker.Form("TR_%02d",slice);
117 AliHLTConfiguration trackerconf(tracker.Data(), "TPCCATracker", trackerInput.Data(), "-solenoidBz 5");
118 if (writerInput.Length()>0) writerInput+=" ";
119 writerInput+=tracker;
120 if (mergerInput.Length()>0) mergerInput+=" ";
121 mergerInput+=tracker;
123 // TPC GlobalMerger component
124 AliHLTConfiguration mergerconf("globalmerger","TPCGlobalMerger",mergerInput.Data(),"");
133 TString writerInput1;
134 TString mergerInput1;
135 for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
136 //TString trackerInput1;
137 TString arg1, publisher1, cf1;
139 // raw data publisher components
143 arg1.Form("-minid %d -datatype 'DDL_RAW ' 'TRD ' -verbose", ddlno);
144 publisher1.Form("DP1_%02d", slice);
145 AliHLTConfiguration pubconf(publisher1.Data(), "AliRawReaderPublisher", NULL , arg1.Data());
147 //arg1.Form("-datatype 'DDL_RAW ' 'TRD ' -datafile raw0/TRD_%d.ddl", ddlno);
148 //publisher1.Form("DP1_%02d",slice);
149 //AliHLTConfiguration pubconf(publisher1.Data(), "FilePublisher", NULL , arg.Data());
150 //cout << arg.Data() << endl;
152 // cluster finder components
153 cf1.Form("CF1_%02d",slice);
154 AliHLTConfiguration cfconf(cf1.Data(), "TRDClusterizer", publisher1.Data(), "output_percentage 1000 -geometry geometry.root -lowflux -simulation");
156 // tracker finder components
158 tracker1.Form("TR1_%02d",slice);
159 AliHLTConfiguration trackerconf(tracker1.Data(), "TRDTrackerV1", cf1.Data(), "output_percentage 300 -NTimeBins 24 -magnetic_field_ON -lowflux -geometry geometry.root");
161 if (writerInput1.Length()>0) writerInput1+=" ";
162 writerInput1+=tracker1;
164 if (mergerInput1.Length()>0) mergerInput1+=" ";
165 mergerInput1 += tracker1;
168 if (globalmergerInput.Length()>0) globalmergerInput+=" ";
169 globalmergerInput += "globalmerger";
171 if (globalmergerInput.Length()>0) globalmergerInput+=" ";
172 globalmergerInput += mergerInput1;
174 //TString datatype = "sim";
175 //AliHLTConfiguration HWriterTR( "HWriterTR", "FileWriter", writerInput.Data(), "-directory . -datafile tr_" + datatype + ".out");
177 //GlobalTrackMerger component
178 AliHLTConfiguration gtrackmergerconf("gtrackmerger","GlobalTrackMerger",globalmergerInput.Data(),"");
180 // the root file writer configuration
181 AliHLTConfiguration sink("sink1", "EsdCollector" , "gtrackmerger" , "-directory hlt-global-track");
183 ///////////////////////////////////////////////////////////////////////////////////////////////////
185 // Init and run the reconstruction
186 // All but HLT reconstructio is switched off
188 AliReconstruction rec;
190 rec.SetRunVertexFinder(kFALSE);
191 rec.SetRunLocalReconstruction("HLT");
192 rec.SetRunTracking("");
193 rec.SetLoadAlignFromCDB(0);
195 rec.SetFillESD("HLT");
196 rec.SetOption("HLT", "libAliHLTUtil.so libAliHLTRCU.so libAliHLTTRD.so libAliHLTTPC.so libAliHLTGlobal.so chains=sink1");