1 /****************************************************************************
2 * Origin: I.Belikov, CERN, Jouri.Belikov@cern.ch *
3 ****************************************************************************/
5 #if !defined(__CINT__) || defined(__MAKECINT__)
7 #include "AliTPCParam.h"
8 #include "AliTPCtracker.h"
9 #include "AliTPCtrackerMI.h"
11 #include "AliRunLoader.h"
12 #include "AliTPCLoader.h"
15 #include "TStopwatch.h"
18 extern AliRun *gAlice;
21 Int_t AliTPCFindTracksMI(Int_t N=-1) {
23 cerr<<"Looking for tracks...\n";
27 delete AliRunLoader::Instance();
32 AliRunLoader *rl = AliRunLoader::Open("galice.root");
35 cerr<<"Can not open session"<<endl;
38 AliTPCLoader *tpcl = (AliTPCLoader*)rl->GetLoader("TPCLoader");
41 cerr<<"Can not get TPC Loader"<<endl;
47 cerr<<"Error occured while l"<<endl;
50 AliKalmanTrack::SetFieldMap(rl->GetAliRun()->Field());
54 AliTPCParam *param=(AliTPCParam *)gDirectory->Get("75x40_100x60_150x60");
57 param=(AliTPCParam *)gDirectory->Get("75x40_100x60");
60 cerr<<"TPC parameters have not been found !\n";
65 cout<<"TPC 75x40_100x60 geometry found"<<endl;
70 cout<<"TPC 75x40_100x60_150x60 geometry found"<<endl;
74 tpcl->LoadTracks("recreate");
79 eventn = rl->GetNumberOfEvents();
87 for (Int_t i=0;i<eventn;i++)
90 TTree * input = tpcl->TreeR();
93 tpcl->LoadRecPoints("read");
94 input = tpcl->TreeR();
97 cerr << "Problems with input tree (TreeR) for event " << i <<endl;
101 TTree * output = tpcl->TreeT();
105 output = tpcl->TreeT();
108 cerr << "Problems with output tree (TreeT) for event " << i <<endl;
113 printf("Processing event %d\n",i);
114 AliTPCtrackerMI *tracker = new AliTPCtrackerMI(param);
116 tracker->LoadClusters();
117 rc=tracker->Clusters2Tracks();
118 tracker->WriteTracks(output);
119 tracker->UnloadClusters();
120 tpcl->WriteTracks("OVERWRITE");
121 //output->GetDirectory()->cd();
125 timer.Stop(); timer.Print();