From 59512cfc61e210c032a783c9cbc9224d5150e88d Mon Sep 17 00:00:00 2001 From: richterm Date: Sun, 26 Oct 2008 15:55:05 +0000 Subject: [PATCH] updating test macro for TPC HLT CM tracker and run on all sectors, AliAltroDecoder input by default; adding macro for TPC CA tracker --- HLT/TPCLib/macros/rec-hlt-tpc-ca.C | 121 +++++++++++++++++++++++++++++ HLT/TPCLib/macros/rec-hlt-tpc.C | 6 +- 2 files changed, 124 insertions(+), 3 deletions(-) create mode 100644 HLT/TPCLib/macros/rec-hlt-tpc-ca.C diff --git a/HLT/TPCLib/macros/rec-hlt-tpc-ca.C b/HLT/TPCLib/macros/rec-hlt-tpc-ca.C new file mode 100644 index 00000000000..803e99de107 --- /dev/null +++ b/HLT/TPCLib/macros/rec-hlt-tpc-ca.C @@ -0,0 +1,121 @@ +// $Id$ +/* + * Example macro to run the HLT TPC Cellular Automaton tracker embedded + * into AliRoot reconstruction. The reconstruction is done from the TPC + * raw data. + * + * Usage: + *
+ *   aliroot -b -q rec-hlt-tpc-ca.C | tee rec-hlt-tpc-ca.log
+ * 
+ * + * The chain to be run is defined by the macro given to the parameter + * 'config=' + * + * The macro asumes raw data to be available in the rawx folders, either + * simulated or real data. A different input can be specified as parameter + *
+ *   aliroot -b -q rec-hlt-tpc-ca.C'("input.root")'
+ * 
+ * + * By the second parameter the digit reader can be chosen, default is + * AliHLTTPCDigitReaderPacked (=false). Set to true to use + * AliHLTTPCDigitReaderDecoder + * + * 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. + * + * @ingroup alihlt_tpc + * @author Matthias.Richter@ift.uib.no + */ +void rec_hlt_tpc_ca(const char* input="./", bool bUseClusterFinderDecoder=true) +{ + if (!input) { + cerr << "please specify input or run without arguments" << endl; + return; + } + + gSystem->Exec("rm galice.root"); + + /////////////////////////////////////////////////////////////////////////////////////////////////// + // + // init the HLT system in order to define the analysis chain below + // + gSystem->Load("libHLTrec.so"); + AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance(); + + /////////////////////////////////////////////////////////////////////////////////////////////////// + // + // define the analysis chain to be run + // + int iMinSlice=0; + int iMaxSlice=35; + int iMinPart=0; + int iMaxPart=5; + TString writerInput; + TString mergerInput; + 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(), "-timebins 446"); + } else { + AliHLTConfiguration cfconf(cf.Data(), "TPCClusterFinderPacked", publisher.Data(), "-timebins 446 -sorted"); + } + 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(), "TPCCATracker", trackerInput.Data(), ""); + if (writerInput.Length()>0) writerInput+=" "; + writerInput+=tracker; + if (mergerInput.Length()>0) mergerInput+=" "; + mergerInput+=tracker; + } + + // GlobalMerger component + AliHLTConfiguration mergerconf("globalmerger","TPCGlobalMerger",mergerInput.Data(),""); + + // the esd converter configuration + AliHLTConfiguration esdcconf("esd-converter", "TPCEsdConverter" , "globalmerger", "-tree"); + + // the root file writer configuration + AliHLTConfiguration sink("sink1", "EsdCollector" , "esd-converter", "-directory hlt-tpc-ca"); + + /////////////////////////////////////////////////////////////////////////////////////////////////// + // + // Init and run the reconstruction + // All but HLT reconstructio is switched off + // + AliReconstruction rec; + rec.SetInput(input); + rec.SetRunVertexFinder(kFALSE); + rec.SetRunLocalReconstruction("HLT"); + rec.SetRunTracking(""); + rec.SetLoadAlignFromCDB(0); + rec.SetRunQA(":"); + AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., AliMagFMaps::k5kG); + AliTracker::SetFieldMap(field,kTRUE); + rec.SetFillESD("HLT"); + rec.SetOption("HLT", "libAliHLTUtil.so libAliHLTRCU.so libAliHLTTPC.so chains=sink1"); + rec.Run(); +} diff --git a/HLT/TPCLib/macros/rec-hlt-tpc.C b/HLT/TPCLib/macros/rec-hlt-tpc.C index d4d1d2bf41e..da9ee615dc8 100644 --- a/HLT/TPCLib/macros/rec-hlt-tpc.C +++ b/HLT/TPCLib/macros/rec-hlt-tpc.C @@ -31,7 +31,7 @@ * @ingroup alihlt_tpc * @author Matthias.Richter@ift.uib.no */ -void rec_hlt_tpc(const char* input="./", bool bUseClusterFinderDecoder=false) +void rec_hlt_tpc(const char* input="./", bool bUseClusterFinderDecoder=true) { if (!input) { cerr << "please specify input or run without arguments" << endl; @@ -50,7 +50,7 @@ void rec_hlt_tpc(const char* input="./", bool bUseClusterFinderDecoder=false) // define the analysis chain to be run // int iMinSlice=0; - int iMaxSlice=17; + int iMaxSlice=35; int iMinPart=0; int iMaxPart=5; TString writerInput; @@ -105,7 +105,7 @@ void rec_hlt_tpc(const char* input="./", bool bUseClusterFinderDecoder=false) AliHLTConfiguration esdcconf("esd-converter", "TPCEsdConverter" , "globalmerger", "-tree"); // the root file writer configuration - AliHLTConfiguration sink("sink1", "EsdCollector" , "esd-converter", "-directory hlt-tpc"); + AliHLTConfiguration sink("sink1", "EsdCollector" , "esd-converter", "-directory hlt-tpc-cm"); } /////////////////////////////////////////////////////////////////////////////////////////////////// -- 2.39.3