]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/global/macros/rec-hlt-tpc-its.C
Make SetChi2 method public
[u/mrichter/AliRoot.git] / HLT / global / macros / rec-hlt-tpc-its.C
1 void addInput( TString &input, const TString &add )
2 {
3   if (input.Length()>0) input+=" ";
4   input+=add;
5 }
6  
7 void rec_hlt_tpc_its(const char* input="./")
8 {
9   
10   if(!gSystem->AccessPathName("galice.root")){
11     cerr << "please delete the galice.root or run at different place." << endl;
12     return;
13   }
14
15   if (!input) {
16     cerr << "please specify input or run without arguments" << endl;
17     return;
18   }
19
20   ///////////////////////////////////////////////////////////////////////////////////////////////////
21   //
22   // init the HLT system in order to define the analysis chain below
23   //
24   AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
25  
26   TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTTPC.so libAliHLTGlobal.so loglevel=0x7c chains=";
27
28   TString histoInput;
29   TString esdInput;
30   TString Bz = "";
31   //Bz = "-solenoidBz -5";
32
33   // TPC 
34   {
35     TString tpcMergerInput;
36
37     int iMinSlice=0;
38     int iMaxSlice=35;
39     int iMinPart=0;
40     int iMaxPart=5;
41
42     for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
43       TString trackerInput;
44       for (int part=iMinPart; part<=iMaxPart; part++) {
45         TString arg, publisher, cf;
46         TString clusterHistoOutput;
47         // raw data publisher components
48         int ddlno=768;
49         if (part>1) ddlno+=72+4*slice+(part-2);
50         else ddlno+=2*slice+part;
51         arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC '  -dataspec 0x%02x%02x%02x%02x -verbose", ddlno, slice, slice, part, part);
52         publisher.Form("DP_%02d_%d", slice, part);
53         new AliHLTConfiguration(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
54         
55         cf.Form("CF_%02d_%d", slice, part);
56         new AliHLTConfiguration(cf.Data(), "TPCClusterFinder32Bit", publisher.Data(), "-release-memory");
57         
58         addInput( trackerInput, cf);
59       }
60       TString tracker;
61       tracker.Form("TR_%02d", slice);
62       new AliHLTConfiguration(tracker.Data(), "TPCCATracker", trackerInput.Data(), Bz.Data());
63       
64       addInput( tpcMergerInput, tracker);
65     }
66
67     new AliHLTConfiguration("tpcMerger","TPCCAGlobalMerger",tpcMergerInput.Data(), Bz.Data());
68     addInput( esdInput, "tpcMerger");
69   }
70
71   // ITS 
72   {
73     Bool_t runspd=1, runsdd=1, runssd=1;
74     TString cfout="";
75
76     if(runspd){
77       int minddl=0;          //min ddl number for SPD
78       int maxddl=19;         //max ddl number for SPD
79       int spec=0x1;          //spec for ddl's
80       for(int ddlno=minddl;ddlno<=maxddl;ddlno++){  
81         TString arg, publisher, cf;     
82         publisher.Form("DP_%d", ddlno);
83         cf.Form("CF_%d",ddlno);
84         arg.Form("-minid %d -datatype 'DDL_RAW ' 'ISPD ' -dataspec 0x%08x -verbose",ddlno, spec);
85         new AliHLTConfiguration(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());  
86         new AliHLTConfiguration (cf.Data(), "ITSClusterFinderSPD", publisher.Data(), "");       
87         addInput( cfout, cf);
88         spec=spec<<1;
89       }       
90       AliHLTConfiguration itsVtx("itsVtx", "ITSVertexerSPD"   , cfout.Data(), Bz.Data());
91       addInput( esdInput, "itsVtx");
92       addInput( histoInput, "itsVtx");
93     }
94   
95     if(runsdd){
96       int minddl=256;        //min ddl number for SDD    
97       int maxddl=279;        //max ddl number for SDD
98       int spec=0x1;          //spec for ddl's    
99       for(int ddlno=minddl;ddlno<=maxddl;ddlno++){  
100         TString arg, publisher, cf;      
101         publisher.Form("DP_%d", ddlno);
102         cf.Form("CF_%d",ddlno);
103         arg.Form("-minid %d -datatype 'DDL_RAW ' 'ISDD ' -dataspec 0x%08x -verbose",ddlno, spec); 
104         AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());      
105         AliHLTConfiguration cfconf(cf.Data(), "ITSClusterFinderSDD", publisher.Data(), "");     
106         addInput( cfout, cf);
107         spec=spec<<1;
108       }
109     }
110
111     if(runssd){
112       minddl=512;      //min ddl number for SSD     
113       maxddl=527;      //max ddl number for SSD
114       spec=0x1;        //spec for ddl's      
115       for(int ddlno=minddl;ddlno<=maxddl;ddlno++){  
116         TString arg, publisher, cf;      
117         publisher.Form("DP_%d", ddlno);
118         cf.Form("CF_%d",ddlno);
119         arg.Form("-minid %d -datatype 'DDL_RAW ' 'ISSD ' -dataspec 0x%08x -verbose",ddlno, spec);
120         AliHLTConfiguration pubconf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());      
121         AliHLTConfiguration cfconf(cf.Data(), "ITSClusterFinderSSD", publisher.Data(), "");      
122         addInput( cfout, cf);      
123         spec=spec<<1;
124       }
125     }
126
127     addInput( cfout, "tpcMerger");      
128     AliHLTConfiguration its("itsTracker", "ITSTracker"   , cfout.Data(), Bz.Data());
129     addInput( esdInput, "itsTracker");
130   }
131
132   
133   new AliHLTConfiguration ("esd-converter", "GlobalEsdConverter", esdInput.Data(), Bz.Data());
134   new AliHLTConfiguration ("globalVtx", "GlobalVertexer"   , "esd-converter", "");
135   new AliHLTConfiguration ("v0Histo", "V0Histo"   , "globalVtx", "");
136
137   addInput( histoInput, "globalVtx v0Histo");  
138
139   new AliHLTConfiguration("histFilter", "BlockFilter", histoInput.Data(), "-datatype 'ROOTHIST' '    '");
140   new AliHLTConfiguration("histoRootFile", "ROOTFileWriter", "histFilter", "-datafile hltHisto -concatenate-events -overwrite");    
141   
142   new AliHLTConfiguration("sink-esd-file", "EsdCollector" , "globalVtx", "");
143
144   option+="histoRootFile,sink-esd-file";
145
146
147   ///////////////////////////////////////////////////////////////////////////////////////////////////
148   //
149   // Init and run the reconstruction
150   // All but HLT reconstructio is switched off
151   //
152   AliReconstruction rec;
153
154
155   rec.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
156   // rec.SetDefaultStorage("local://$HOME/HCDB"); 
157    rec.SetSpecificStorage("GRP/GRP/Data",
158                          Form("local://%s",gSystem->pwd()));
159
160   rec.SetInput(input);
161   rec.SetRunVertexFinder(kFALSE);
162   rec.SetRunReconstruction("HLT");
163   rec.SetLoadAlignFromCDB(0);
164   rec.SetRunQA(":");
165   rec.SetOption("HLT",option);
166   // switch off cleanESD
167   rec.SetCleanESD(kFALSE);
168   //rec.SetEventRange(0, 0);
169   rec.Run();
170 }