]>
Commit | Line | Data |
---|---|---|
66fd8363 | 1 | Int_t GeneralTest(Int_t verpoint=2) { |
2 | Int_t rc=0; | |
3 | ||
4 | //Test TPC simulation | |
5 | ||
6 | gROOT->LoadMacro("$(ALICE_ROOT)/macros/grun.C"); | |
7 | grun(); | |
8 | ||
9 | Int_t ver=gAlice->GetDetector("TPC")->IsVersion(); | |
10 | delete gAlice; gAlice=0; | |
11 | ||
12 | if ((ver!=1)&&(ver!=2)) { | |
13 | cerr<<"Invalid TPC version: "<<ver<<" ! (must be 1 or 2)\n"; | |
14 | return 12345; | |
15 | } | |
16 | ||
17 | if (ver==2) { | |
18 | gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCHits2Digits.C"); | |
19 | if (rc=AliTPCHits2Digits()) return rc; | |
20 | ||
21 | } | |
22 | ||
23 | //Test TPC reconstruction | |
24 | gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCFindClusters.C"); | |
25 | if (rc=AliTPCFindClusters()) return rc; | |
26 | ||
27 | gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCFindTracks.C"); | |
28 | if (rc=AliTPCFindTracks()) return rc; | |
29 | gROOT->LoadMacro("$(ALICE_ROOT)/ITS/TPCtracks.C"); | |
30 | if (rc=TPCtracks()) return rc; | |
31 | ||
32 | ||
33 | TFile *file=TFile::Open("galice.root"); | |
34 | if (!file->IsOpen()) {cerr<<"Can't open galice.root !\n"; exit(4);} | |
35 | ||
36 | if (!(gAlice=(AliRun*)file->Get("gAlice"))) { | |
37 | cerr<<"gAlice have not been found on galice.root !\n"; | |
38 | exit(5); | |
39 | } | |
40 | ||
41 | Int_t ver=gAlice->GetDetector("ITS")->IsVersion(); | |
42 | delete gAlice; gAlice=0; | |
43 | ||
44 | if (ver!=5) { | |
45 | cerr<<"Invalid ITS version: "<<ver<<" ! (must be 5 for the moment)\n"; | |
46 | return 12345; | |
47 | } | |
48 | cout<<" verpoint = "<<verpoint<<"\n"; | |
49 | switch(verpoint){ | |
50 | case 1: | |
51 | { | |
52 | printf(" Start Fast Points calculation \n"); | |
53 | gROOT->LoadMacro("$(ALICE_ROOT)/ITS/ITSHitsToFastPoints.C"); | |
54 | if (rc=ITSHitsToFastPoints()) return rc; | |
55 | } | |
56 | break; | |
57 | case 2: | |
58 | printf("Start digitization \n"); | |
59 | ||
60 | if (ver==5) { | |
61 | gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSHits2Digits.C"); | |
62 | if (rc=AliITSHits2Digits()) return rc; | |
63 | } | |
64 | ||
65 | printf("start reconstruction\n"); | |
66 | ||
67 | //Test ITS reconstruction | |
68 | gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSFindClusters.C"); | |
69 | if (rc=AliITSFindClusters()) return rc; | |
70 | ||
71 | break; | |
72 | default: | |
73 | cerr<<"Invalid Recpoint version !\n"; | |
74 | file->Close(); | |
75 | exit(7); | |
76 | } | |
77 | ||
78 | file->Close(); | |
79 | ||
80 | ||
81 | printf(" Start ITS tracking \n"); | |
82 | gROOT->LoadMacro("$(ALICE_ROOT)/ITS/ITStrackingGeneral.C"); | |
83 | if (rc=ITStrackingGeneral()) return rc; | |
84 | ||
85 | return rc; | |
86 | } |