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