3 #include "AliTPCtracker.h"
5 Int_t AliTPCSDigits2Digits(Int_t nevent=1)
8 // new version by J.Belikov
10 // Connect the Root Galice file containing Geometry, Kine and Hits
12 const char * inFile_old = "galice.root";
13 const char * inFile_new = "galice.root";
17 delete AliRunLoader::Instance();
18 delete gAlice;//if everything was OK here it is already NULL
22 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(inFile_old);
23 if (file) {file->Close(); delete file;}
25 AliRunLoader *rl = AliRunLoader::Open(inFile_new,"Event","update");
28 cerr<<"Can't open "<<inFile_new<<" !\n";
32 // Get AliRun object from file or create it if not on file
33 // if (gAlice) delete gAlice;
37 gAlice = rl->GetAliRun();
39 cerr<<"AliTPCHits2Digits.C : AliRun object not found on file\n";
44 // gAlice->GetEvent(0);
45 AliTPC *TPC = (AliTPC*)gAlice->GetDetector("TPC");
47 AliLoader * tpcl = rl->GetLoader("TPCLoader");
49 if ((TPC == 0x0) || (tpcl == 0x0))
51 cerr<<"AliTPCHits2Digits.C : Can not find TPC or TPCLoader\n";
56 tpcl->LoadSDigits("READ");
57 tpcl->LoadDigits("RECREATE");
59 AliTPCParamSR *dig=(AliTPCParamSR *)gDirectory->Get("75x40_100x60");
61 cerr<<"2 pad-length geom hits with 3 pad-lengths geom digits\n";
63 dig = new AliTPCParamSR();
67 dig=(AliTPCParamSR *)gDirectory->Get("75x40_100x60_150x60");
69 if (!dig) {cerr<<"TPC parameters have not been found !\n"; return 4;}
76 for(Int_t eventn =0;eventn<nevent;eventn++){
77 printf("Processing event %d\n",eventn);
78 cout<<"rl->GetEvent(eventn);\n";
80 cout<<"TPC->SDigits2Digits2(eventn);\n";
81 TPC->SDigits2Digits2(eventn);