1 // usage: aliroot rec-hlt-trd.cxx("/data/real_runXXX/raw_input.root")
2 // or: aliroot rec-hlt-trd.cxx("/data/sim_run/raw.root")
3 // or: aliroot rec-hlt-trd.cxx("/data/sim_run/") *
4 // or copy into folder and aliroot rec-hlt-trd.cxx
6 // (*) here sim_run has as subfolders rawX (be sure to have the last "/" !!)
8 #if !defined (__CINT__) || defined (__MAKECINT__)
17 #include "AliHLTSystem.h"
18 #include "AliHLTPluginBase.h"
20 #include "AliReconstruction.h"
21 #include "AliHLTDataTypes.h"
22 #include "AliHLTConfiguration.h"
24 #include <valgrind/callgrind.h>
30 const Bool_t fullTRD=kTRUE;
32 void rec_hlt_trd(const char* input ="./raw.root");
33 int main(int argc, char** argv)
35 if(argc>1) rec_hlt_trd(argv[1]);
39 void rec_hlt_trd(const char* input)
42 ///////////////////////////////////////////////////////////////////////////////////////////////////
44 // define the analysis chain to be run
48 Bool_t fullTRD=kFALSE;
50 // If not use these SMs:
51 Int_t TRDmodules[18] = {0,1,7,8,9,10,17,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
53 // What chains should be run?
54 TString chains="TRD-OffEsdFile";
56 ///////////////////////////////////////////////////////////////////////////////////////////////////
58 // init the HLT system in order to define the analysis chain below
60 AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
62 if(!gSystem->AccessPathName("galice.root")){
63 cerr << "please delete the galice.root or run at different place." << endl;
68 GRPDir.Resize(GRPDir.Last('/')+1);
69 if(GRPDir.Length()==0)GRPDir=gSystem->pwd();
70 printf("GRP dir: %s\n",GRPDir.Data());
75 for(int i=0; i<18; i++)
78 for(int i=0; i<18; i++)
79 if(TRDmodules[i]>0)usedModules++;
82 TString option="libAliHLTUtil.so libAliHLTTRD.so libAliHLTGlobal.so libAliHLTTrigger.so loglevel=0x7f chains=";
84 TString nextInput, nextOffInput;
86 for (int module = 0; module < usedModules; module++)
88 TString arg, publisher, cf, tr, trOff;
89 // raw data publisher components
90 publisher.Form("TRD-RP_%02d", module);
91 arg.Form("-minid %d -datatype 'DDL_RAW ' 'TRD ' -dataspec %i -verbose", module+1024, (int)TMath::Power(2,module));
92 AliHLTConfiguration pubConf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
95 cf.Form("TRD-CF_%02d", module);
96 AliHLTConfiguration cfConf(cf.Data(), "TRDClusterizer", publisher.Data(), "output_percentage 700 -lowflux -simulation -yPosMethod LUT");
99 tr.Form("TRD-TR_%02d", module);
100 arg.Form("output_percentage 100 -lowflux -PIDmethod NN");
101 AliHLTConfiguration trConf(tr.Data(), "TRDTrackerV1", cf.Data(), arg.Data());
103 if (nextInput.Length()>0) nextInput+=" ";
106 trOff.Form("TRD-TROFF_%02d", module);
107 AliHLTConfiguration trOffConf(trOff.Data(), "TRDOfflineTrackerV1", cf.Data(), arg.Data());
109 if (nextOffInput.Length()>0) nextOffInput+=" ";
115 AliHLTConfiguration calibConf("TRD-Calib", "TRDCalibration", nextInput.Data(), "");
116 AliHLTConfiguration writerCalibConf( "TRD-CalibFile", "ROOTFileWriter", "TRD-Calib", "-directory hlt-trd-calib/ -datafile calib.root");
119 AliHLTConfiguration esdConf("TRD-Esd", "GlobalEsdConverter", nextInput.Data(), "-notree");
122 AliHLTConfiguration writerConf("TRD-EsdFile", "EsdCollector", "TRD-Esd", "-directory hlt-trd-esd/");
124 // root file writer (with esd friends and some day perhaps MC)
125 AliHLTConfiguration writerOffConf("TRD-OffEsdFile", "TRDEsdWriter", nextOffInput.Data(), "-datafile AliHLTTRDESDs.root -concatenate-events -concatenate-blocks");
127 ///////////////////////////////////////////////////////////////////////////////////////////////////
129 // Init and run the reconstruction
130 // All but HLT reconstructio is switched off
132 AliReconstruction rec;
134 rec.SetRunVertexFinder(kFALSE);
135 rec.SetRunLocalReconstruction("HLT");
136 rec.SetRunTracking(":");
137 rec.SetLoadAlignFromCDB(0);
140 rec.SetRunGlobalQA(kFALSE);
141 rec.SetFillTriggerESD(kFALSE);
142 rec.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
143 rec.SetSpecificStorage("GRP/GRP/Data", Form("local://%s",GRPDir.Data()));
144 //rec.SetSpecificStorage("GRP/GRP/Data", Form("local://%s",gSystem->pwd()));
146 rec.SetOption("HLT", option);