4 #include "AliRunLoader.h"
6 #include "AliTPCtracker.h"
8 #include "AliITSgeom.h"
9 #include "AliITSRecPoint.h"
10 #include "AliITSclusterV2.h"
11 #include "AliITSsimulationFastPoints.h"
12 #include "AliITStrackerV2.h"
15 Int_t AliTPCHits2SDigits(Int_t nevent=1)
18 // new version by J.Belikov
20 // Connect the Root Galice file containing Geometry, Kine and Hits
22 //it assures full cleaning of prevous session
25 delete AliRunLoader::Instance();
26 delete gAlice;//if everything was OK here it is already NULL
30 AliRunLoader *rl = AliRunLoader::Open("galice.root","Event","update");
33 cerr<<"Can't load RunLoader from "<<inFile_new<<" !\n";
37 // Get AliRun object from file or create it if not on file
41 gAlice = rl->GetAliRun();
43 cerr<<"AliTPCHits2Digits.C : AliRun object not found on file\n";
48 // gAlice->GetEvent(0);
49 AliTPC *TPC = (AliTPC*)gAlice->GetDetector("TPC");
50 AliLoader * tpcl = rl->GetLoader("TPCLoader");
51 if ((TPC == 0x0) || (tpcl == 0x0))
53 cerr<<"AliTPCHits2Digits.C : Can not find TPC or TPCLoader\n";
58 tpcl->LoadHits("READ");
59 tpcl->LoadSDigits("RECREATE");
64 // uncomment lines below to set active sectors
65 //Int_t sec[10]={4,5,6,7,8,4+36,5+36,6+36,7+36,8+36};
66 //TPC->SetActiveSectors(sec,10);
68 for(Int_t eventn =0;eventn<nevent;eventn++){
69 printf("Processing event %d \n",eventn);
71 TPC->SetTreeAddress();
72 TPC->SetActiveSectors(); // all sectors set active
73 printf("\nActive sectors\n");
74 for (Int_t i=0;i<72;i++) if (TPC->IsSectorActive(i)) printf("%d\t",i);
76 TPC->Hits2SDigits2(eventn);