From: richterm Date: Wed, 26 Mar 2008 21:53:52 +0000 (+0000) Subject: added sample macro for TPC reconstruction X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=631d94141969f6bf6a78f38619febc218ff065e0;hp=7764b305cbe761e7a328c9d28bac7e4e97fb96d5 added sample macro for TPC reconstruction --- diff --git a/HLT/TPCLib/macros/rec-hlt-tpc.C b/HLT/TPCLib/macros/rec-hlt-tpc.C new file mode 100644 index 00000000000..ae30f59a671 --- /dev/null +++ b/HLT/TPCLib/macros/rec-hlt-tpc.C @@ -0,0 +1,94 @@ +// $Id$ +/* + * Example macro to run the HLT Conformal mapping tracker embedded into + * AliRoot reconstruction. The reconstruction is done from the TPC raw + * data. + * + * aliroot -b -q rec-hlt-tpc.C | tee rec-hlt-tpc.log + * + * The chain to be run is defined by the macro given to the parameter + * 'config=' + * + * The makro asumes that raw data is available in the rawx folders, either + * simulated or real data. + * + * In the first section, an analysis chain is defined. The scale of the + * chain can be defined by choosing the range of sectors and partitions. + * + * The reconstruction is steered by the AliReconstruction object in the + * usual way. + * + * Matthias.Richter@ift.uib.no + */ +{ + /////////////////////////////////////////////////////////////////////////////////////////////////// + // + // init the HLT system in order to define the analysis chain below + // + gSystem->Load("libHLTrec.so"); + AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance(); + + // choose between ClusterFinderDecoder (true) and ClusterFinderPacked (false) + bool bUseClusterFinderDecoder=false; + + /////////////////////////////////////////////////////////////////////////////////////////////////// + // + // define the analysis chain to be run + // + int iMinSlice=0; + int iMaxSlice=17; + int iMinPart=0; + int iMaxPart=5; + TString writerInput; + for (int slice=iMinSlice; slice<=iMaxSlice; slice++) { + TString trackerInput; + for (int part=iMinPart; part<=iMaxPart; part++) { + TString arg, publisher, cf; + + // raw data publisher components + int ddlno=768; + if (part>1) ddlno+=72+4*slice+(part-2); + else ddlno+=2*slice+part; + arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC ' -dataspec 0x%02x%02x%02x%02x", ddlno, slice, slice, part, part); + publisher.Form("DP_%02d_%d", slice, part); + AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data()); + + // cluster finder components + cf.Form("CF_%02d_%d", slice, part); + if (bUseClusterFinderDecoder) { + AliHLTConfiguration cfconf(cf.Data(), "TPCClusterFinderDecoder", publisher.Data(), "pp-run timebins 446 unsorted 1"); + } else { + AliHLTConfiguration cfconf(cf.Data(), "TPCClusterFinderPacked", publisher.Data(), "pp-run timebins 446 rawreadermode 4"); + } + if (trackerInput.Length()>0) trackerInput+=" "; + trackerInput+=cf; + if (writerInput.Length()>0) writerInput+=" "; + writerInput+=cf; + } + TString tracker; + // tracker finder components + tracker.Form("TR_%02d", slice); + AliHLTConfiguration trackerconf(tracker.Data(), "TPCSliceTracker", trackerInput.Data(), "-pp-run -bfield 0.5"); + if (writerInput.Length()>0) writerInput+=" "; + writerInput+=tracker; + } + + // the writer configuration + AliHLTConfiguration fwconf("sink1", "FileWriter" , writerInput.Data(), "-specfmt=_%d -subdir=out_%d -blcknofmt=_0x%x -idfmt=_0x%08x"); + + /////////////////////////////////////////////////////////////////////////////////////////////////// + // + // Init and run the reconstruction + // All but HLT reconstructio is switched off + // + AliReconstruction rec; + rec.SetInput("./"); + rec.SetRunVertexFinder(kFALSE); + rec.SetRunLocalReconstruction("HLT"); + rec.SetRunReconstruction(""); + rec.SetRunTracking(""); + rec.SetLoadAlignFromCDB(0); + rec.SetFillESD("HLT"); + rec.SetOption("HLT", "libAliHLTUtil.so libAliHLTRCU.so libAliHLTTPC.so loglevel=0x7c chains=sink1"); + rec.Run(); +} diff --git a/HLT/TPCLib/test/testAliHLTTPCMapping.C b/HLT/TPCLib/test/testAliHLTTPCMapping.C index 91b2333dc07..9ca80f556b1 100644 --- a/HLT/TPCLib/test/testAliHLTTPCMapping.C +++ b/HLT/TPCLib/test/testAliHLTTPCMapping.C @@ -137,7 +137,7 @@ bool compareMapping(int patch, AliHLTTPCMapping* mapper) while(result && inFile>>hwAdd && inFile>>row && inFile>>pad){ row-=rowOffset; if (row!=mapper->GetRow(hwAdd) || pad!=mapper->GetPad(hwAdd)) { - cout << "missmatch at channel " << hwAdd << ": expected " << row << "/" << pad << " got " << mapper->GetRow(hwAdd) << "/" << mapper->GetPad(hwAdd) << endl; + cout << "mismatch at channel " << hwAdd << ": expected " << row << "/" << pad << " got " << mapper->GetRow(hwAdd) << "/" << mapper->GetPad(hwAdd) << endl; result=false; break; }