Small improvment in the speed
[u/mrichter/AliRoot.git] / TPC / AliTPCtest.C
CommitLineData
c2b0eaa4 1/****************************************************************************
2 * Origin: I.Belikov, CERN, Jouri.Belikov@cern.ch *
3 ****************************************************************************/
4
88cb7938 5Int_t AliTPCtest(Int_t n = 5) {
73042f01 6 Int_t rc=0;
7
8//Test TPC simulation
9 gROOT->LoadMacro("$(ALICE_ROOT)/macros/grun.C");
88cb7938 10 grun(n);
73042f01 11
dc2495a3 12
c630aafd 13AliKalmanTrack::SetConvConst(1000/0.299792458/gAlice->Field()->SolenoidField());
9b280d80 14
73042f01 15 Int_t ver=gAlice->GetDetector("TPC")->IsVersion();
88cb7938 16
c630aafd 17 AliRunLoader *rl = gAlice->GetRunLoader();
18 if (rl == 0x0) {
88cb7938 19 cerr<<"Can not get run loader from gAlice"<<endl;
20 return 1;
c630aafd 21 }
88cb7938 22
23 delete rl;//close the session left after generation (grun.C)
c630aafd 24 delete gAlice; gAlice=0x0;
88cb7938 25
26 cout<<" \n\n\nClean -> Proceeding witg digitization \n\n\n";
37831078 27 if ((ver!=1)&&(ver!=2)) {
28 cerr<<"Invalid TPC version: "<<ver<<" ! (must be 1 or 2)\n";
29 return 12345;
30 }
31
73042f01 32 if (ver==2) {
33 gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCHits2Digits.C");
88cb7938 34 if (rc=AliTPCHits2Digits(n)) return rc;
73042f01 35
c2b0eaa4 36 //gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCDisplayDigits.C");
37 //if (rc=AliTPCDisplayDigits(1,1)) return rc;
73042f01 38 }
39
37831078 40
73042f01 41//Test TPC reconstruction
42 gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCFindClusters.C");
88cb7938 43 if (rc=AliTPCFindClusters(n)) return rc;
73042f01 44
c2b0eaa4 45 //gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCDisplayClusters.C");
46 //if (rc=AliTPCDisplayClusters()) return rc;
73042f01 47
48 gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCFindTracks.C");
88cb7938 49 if (rc=AliTPCFindTracks(n)) return rc;
73042f01 50
a4c38b1c 51 gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include -I$ALICE_ROOT/TPC -I$ALICE_ROOT/CONTAINERS");
82e68d97 52 gROOT->ProcessLine(".L $(ALICE_ROOT)/TPC/AliTPCComparison.C++");
73042f01 53 if (rc=AliTPCComparison()) return rc;
54
55 return rc;
56}
2ab0c725 57