2 #include "AliHLTPHOSConstants.h"
4 //void rec_hlt_phos(const char* input="./")//, char* opt="decoder ESD")
5 void rec_hlt_phos()//, char* opt="decoder ESD")
7 AliCDBManager::Instance()->SetDefaultStorage("raw://");
8 // AliCDBManager::Instance()->SetDefaultStorage("raw://");
9 if(!gSystem->AccessPathName("galice.root")){
10 cerr << "please delete the galice.root or run at different place." << endl;
15 // cerr << "please specify input or run without arguments" << endl;
19 ///////////////////////////////////////////////////////////////////////////////////////////////////
21 // init the HLT system in order to define the analysis chain below
23 AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
25 ///////////////////////////////////////////////////////////////////////////////////////////////////
27 // define the analysis chain to be run
33 TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTPHOS.so libAliHLTGlobal.so loglevel=0x7f chains=ESD-FILE";
37 for (int module = moduleStart; module <= moduleEnd; module++)
41 for(int rcu = rcuStart; rcu <= rcuEnd; rcu++)
43 TString arg, publisher, ra, dm;
44 // raw data publisher components
45 publisher.Form("PHS-RP_%02d_%d", module, rcu);
46 arg.Form("-minid %d -datatype 'DDL_RAW ' 'PHOS' -dataspec 0x%x ", 1792 + module*(PhosHLTConst::NRCUSPERMODULE) + rcu, 0x1 << (module*PhosHLTConst::NRCUSPERMODULE + rcu));
47 AliHLTConfiguration pubConf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
51 ra.Form("PHS-RA_%02d_%d", module, rcu);
52 // AliHLTConfiguration rawConf(ra.Data(), "PhosRawCrudev2", publisher.Data(), arg.Data());
53 AliHLTConfiguration rawConf(ra.Data(), "PhosRawCrude", publisher.Data(), arg.Data());
55 // digit maker components
56 dm.Form("PHS-DM_%02d_%d", module, rcu);
58 arg.Form("-sethighgainfactor 0.005 -setlowgainfactor 0.08 -setdigitthresholds 0.005 0.002");
59 AliHLTConfiguration dmConf(dm.Data(), "PhosDigitMaker", ra.Data(), arg.Data());
61 if(clInput.Length() > 0) clInput += " ";
66 cl.Form("PHS-CL_%02d", module);
68 arg.Form("-digitthreshold 0.005 -recpointthreshold 0.1 -modulemode");
69 AliHLTConfiguration clConf(cl.Data(), "PhosClusterizer", clInput.Data(), arg.Data());
71 ca.Form("PHS-CA_%02d", module);
73 AliHLTConfiguration caConf(ca.Data(), "PhosClusterAnalyser", cl.Data(), arg.Data());
75 if(ecInput.Length() > 0) ecInput += " ";
81 TString arg, ec, em, hp, ef;
84 ec.Form("ESD-CONVERTER");
87 // AliHLTConfiguration emConf(em.Data(), "PhosEsdEntriesMaker", ecInput.Data(), "");
89 AliHLTConfiguration esdcconf(ec.Data(), "GlobalEsdConverter" , ecInput.Data(), "");
91 // the root file writer configuration
93 AliHLTConfiguration sink(ef.Data(), "EsdCollector", ec.Data(), "-directory hlt-phos-esd");
96 ///////////////////////////////////////////////////////////////////////////////////////////////////
98 // Init and run the reconstruction
99 // All but HLT reconstructio is switched off
101 AliReconstruction rec;
102 // rec.SetInput(input);
104 rec.SetRunVertexFinder(kFALSE);
105 rec.SetRunReconstruction("HLT");
106 rec.SetRunTracking(":");
107 rec.SetLoadAlignFromCDB(0);
110 // NOTE: FillESD is a step in the AliReconstruction sequence and has
111 // nothing to do with the fact that this macro writes ESD output
112 // HLT processes the HLTOUT during FillESD and extracts data which
113 // has already been prepared. This step is currently not necessary for
115 // rec.SetRunLocalReconstruction("PHOS") ;
116 rec.SetOption("HLT", option);
117 // rec.SetOption("HLT", "libAliHLTUtil.so libAliHLTRCU.so libAliHLTPHOS.so loglevel=0x7f chains=ESD_WRITER" )