3 * Example macro to run the Offline ITS Cluster Finding in HLT.
4 * The reconstruction is done from the ITS raw data.
8 * aliroot -b -q rec-its-cluster.C | tee rec-its-cluster.log
9 * aliroot -b -q rec-its-cluster.C'("./","spd")' | tee rec-its-cluster.log
12 * The macro asumes raw data to be available in the rawx folders, either
13 * simulated or real data. A different input can be specified as parameter
15 * aliroot -b -q rec-its-cluster.C'("input.root")'
18 * In the second parameter you can change the clusterfinders to run only
19 * SPD, SDD, SSD or All:
20 * - SPD runs only Silicon Pixels
21 * - SDD runs only Silicon Drift
22 * - SSD runs only Silicon Stips
23 * - All will run the full ITS
25 * All is default. The chain ends in a histogram component.
27 * The reconstruction is steered by the AliReconstruction object in the
31 * @author st05886@ift.uib.no
34 void rec_its_cluster(const char* input="./", char* opt="All")
37 if(!gSystem->AccessPathName("galice.root")){
38 cerr << "please delete the galice.root or run at different place." << endl;
43 cerr << "please specify input or run without arguments" << endl;
47 ///////////////////////////////////////////////////////////////////////////////////////////////////
49 // init the HLT system in order to define the analysis chain below
51 AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
52 int verbosity=1; // 1 higher verbosity, 0 reduced output
54 ///////////////////////////////////////////////////////////////////////////////////////////////////
56 // Setting up which output to give
59 option+="libAliHLTUtil.so libAliHLTRCU.so libAliHLTITS.so libAliHLTSample.so ";
61 option+=verbosity>0?"0x7c":"0x79";
63 Bool_t runspd=kFALSE, runsdd=kFALSE, runssd=kFALSE;
66 TObjArray* pTokens=allArgs.Tokenize(" ");
68 for (int i=0; i<pTokens->GetEntries(); i++) {
69 argument=((TObjString*)pTokens->At(i))->GetString();
70 if (argument.IsNull()) continue;
72 if (argument.CompareTo("spd", TString::kIgnoreCase)==0) {
76 if (argument.CompareTo("sdd", TString::kIgnoreCase)==0) {
80 if (argument.CompareTo("ssd",TString::kIgnoreCase)==0) {
84 if (argument.CompareTo("all",TString::kIgnoreCase)==0) {
96 ///////////////////////////////////////////////////////////////////////////////////////////////////
98 // define the analysis chain to be run
101 //The spec starts from 0x1 in SPD, SDD and SSD. So 0x1 is ddl 0 for SPD, 0x10 is ddl 1, and so on
102 //in SDD 0x1 is ddl 256, 0x10 is ddl 257, and so on. This means that the spec has to be set to 0x1
103 //before the loops over the clusterfinder
105 int minddl=0; //min ddl number for SPD
106 int maxddl=19; //max ddl number for SPD
107 int spec=0x1; //spec for ddl's
109 TString dummyInput="";
112 for(ddlno=minddl;ddlno<=maxddl;ddlno++){
113 TString arg, publisher, cf;
115 arg.Form("-minid %d -datatype 'DDL_RAW ' 'ISPD ' -dataspec 0x%08x %s",ddlno, spec, (verbosity>0?" -verbose":""));
116 publisher.Form("DP_%d", ddlno);
117 AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
119 cf.Form("CF_%d",ddlno);
120 AliHLTConfiguration cfconf(cf.Data(), "ITSClusterFinderSPD", publisher.Data(), "");
122 if (dummyInput.Length()>0) dummyInput+=" ";
130 minddl=256; //min ddl number for SDD
131 maxddl=279; //max ddl number for SDD
132 spec=0x1; //spec for ddl's
134 for(ddlno=minddl;ddlno<=maxddl;ddlno++){
135 TString arg, publisher, cf;
137 arg.Form("-minid %d -datatype 'DDL_RAW ' 'ISDD ' -dataspec 0x%08x %s",ddlno, spec, (verbosity>0?" -verbose":""));
138 publisher.Form("DP_%d", ddlno);
139 AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
141 cf.Form("CF_%d",ddlno);
142 AliHLTConfiguration cfconf(cf.Data(), "ITSClusterFinderSDD", publisher.Data(), "");
144 if (dummyInput.Length()>0) dummyInput+=" ";
152 minddl=512; //min ddl number for SSD
153 maxddl=527; //max ddl number for SSD
154 spec=0x1; //spec for ddl's
156 for(ddlno=minddl;ddlno<=maxddl;ddlno++){
157 TString arg, publisher, cf;
159 arg.Form("-minid %d -datatype 'DDL_RAW ' 'ISSD ' -dataspec 0x%08x %s",ddlno, spec, (verbosity>0?" -verbose":""));
160 publisher.Form("DP_%d", ddlno);
161 AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
163 cf.Form("CF_%d",ddlno);
164 AliHLTConfiguration cfconf(cf.Data(), "ITSClusterFinderSSD", publisher.Data(), "");
166 if (dummyInput.Length()>0) dummyInput+=" ";
173 AliHLTConfiguration cfconf("clusterHisto","ITSClusterHisto",dummyInput.Data(),"-pushback-period=10");
174 AliHLTConfiguration fwconf("histFile","ROOTFileWriter", "clusterHisto","-datafile ClusterHisto -concatenate-events -overwrite");
178 ///////////////////////////////////////////////////////////////////////////////////////////////////
180 // Init and run the reconstruction
181 // All but HLT reconstructio is switched off
183 AliReconstruction rec;
185 rec.SetRunVertexFinder(kFALSE);
186 rec.SetRunLocalReconstruction("HLT");
187 rec.SetRunTracking("");
188 rec.SetLoadAlignFromCDB(0);
191 // NOTE: FillESD is a step in the AliReconstruction sequence and has
192 // nothing to do with the fact that this macro writes ESD output
193 // HLT processes the HLTOUT during FillESD and extracts data which
194 // has already been prepared. This step is currently not necessary for
197 rec.SetOption("HLT", option);