]>
Commit | Line | Data |
---|---|---|
7f167a74 | 1 | // $Id: rec-tpc-its.C 35299 2009-10-07 09:07:29Z kkanaki $ |
2 | /* | |
3 | * Example macro to run the ITS tracker with the TPC reconstruction. | |
4 | * The reconstruction is done from the TPC and ITS raw data. | |
5 | * | |
6 | * Usage: | |
7 | * <pre> | |
8 | * aliroot -b -q rec-tpc-its.C | tee rec-tpc-its.log | |
9 | * aliroot -b -q rec-tpc-its.C'("./","spd")' | tee rec-tpc-its.log | |
10 | * </pre> | |
11 | * | |
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 | |
14 | * <pre> | |
15 | * aliroot -b -q rec-tpc-its.C'("input.root")' | |
16 | * </pre> | |
17 | * | |
18 | * In the first section, an analysis chain is defined. The scale of the | |
19 | * chain can be defined by choosing the range of sectors and partitions. | |
20 | * | |
21 | * The reconstruction is steered by the AliReconstruction object in the | |
22 | * usual way. | |
23 | * | |
24 | * @ingroup alihlt_tpc | |
25 | * @author Gaute.Ovrebekk@ift.uib.no | |
26 | */ | |
27 | void rec_vtxSPD(const char* input="./") | |
28 | { | |
29 | ||
30 | if(!gSystem->AccessPathName("galice.root")){ | |
31 | cerr << "please delete the galice.root or run at different place." << endl; | |
32 | return; | |
33 | } | |
34 | ||
35 | if (!input) { | |
36 | cerr << "please specify input or run without arguments" << endl; | |
37 | return; | |
38 | } | |
39 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
40 | // | |
41 | // init the HLT system in order to define the analysis chain below | |
42 | // | |
43 | AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance(); | |
44 | ||
45 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
46 | // | |
47 | // Setting up which output to give | |
48 | // | |
49 | TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTTPC.so libAliHLTITS.so libAliHLTGlobal.so loglevel=0x7c chains="; | |
50 | ||
51 | ||
52 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
53 | // | |
54 | // define the analysis chain to be run | |
55 | // | |
56 | int minddl=0; //min ddl number for SPD | |
57 | int maxddl=19; //max ddl number for SPD | |
58 | int spec=0x1; //spec for ddl's | |
59 | int ddlno=0; | |
60 | TString cfout=""; | |
61 | ||
62 | for(ddlno=minddl;ddlno<=maxddl;ddlno++){ | |
63 | TString arg, publisher, cf; | |
64 | ||
65 | arg.Form("-minid %d -datatype 'DDL_RAW ' 'ISPD ' -dataspec 0x%08x -verbose",ddlno, spec); | |
66 | publisher.Form("DP_%d", ddlno); | |
67 | new AliHLTConfiguration(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data()); | |
68 | ||
69 | cf.Form("CF_%d",ddlno); | |
70 | new AliHLTConfiguration(cf.Data(), "ITSClusterFinderSPD", publisher.Data(), ""); | |
71 | ||
72 | if (cfout.Length()>0) cfout+=" "; | |
73 | cfout+=cf; | |
74 | ||
75 | spec=spec<<1; | |
76 | } | |
77 | ||
78 | ||
79 | AliHLTConfiguration itsvtx("itsvtx", "ITSVertexerSPD" , cfout.Data(), ""); | |
80 | ||
81 | AliHLTConfiguration rootFileWriterClusters("historootfile", "ROOTFileWriter", "itsvtx" , "-datafile ITSHistograms -concatenate-events -overwrite"); | |
82 | ||
83 | ||
84 | AliHLTConfiguration globalConverter("globalConverter", "GlobalEsdConverter" , "itsvtx", ""); | |
85 | AliHLTConfiguration sink("esdfile", "EsdCollector" , "globalConverter", ""); | |
86 | option+="historootfile,esdfile "; | |
87 | ||
88 | /////////////////////////////////////////////////////////////////////////////////////////////////// | |
89 | // | |
90 | // Init and run the reconstruction | |
91 | // All but HLT reconstructio is switched off | |
92 | // | |
93 | AliReconstruction rec; | |
94 | rec.SetInput(input); | |
95 | rec.SetRunVertexFinder(kFALSE); | |
96 | rec.SetRunReconstruction("HLT"); | |
97 | rec.SetLoadAlignFromCDB(0); | |
98 | rec.SetDefaultStorage("local://$ALICE_ROOT/OCDB"); | |
99 | rec.SetSpecificStorage("GRP/GRP/Data",Form("local://%s",gSystem->pwd())); | |
100 | rec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ; | |
101 | rec.SetRunQA(":"); | |
102 | rec.SetOption("HLT", option); | |
103 | //rec.SetEventRange(0,0); | |
104 | rec.Run(); | |
105 | } |