+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+/////////////// allocate memory and define vector fNRecPoints and matrices fRecCylR, fRecCylPhi, fRecCylZ /////////////
+ gAlice->GetEvent(evnumber);
+ Int_t numOfModules = g1->GetIndexMax();
+ fRecCylR = new Double_t *[numOfModules];
+ fRecCylPhi = new Double_t *[numOfModules];
+ fRecCylZ = new Double_t *[numOfModules];
+ AliITSRecPoint *recp;
+ fNRecPoints = new Int_t[numOfModules];
+
+ for(Int_t module=0; module<numOfModules; module++) {
+ fITS->ResetRecPoints();
+ gAlice->TreeR()->GetEvent(module);
+ frecPoints=fITS->RecPoints();
+ Int_t nRecPoints=fNRecPoints[module]=frecPoints->GetEntries();
+ fRecCylR[module] = new Double_t[nRecPoints];
+ fRecCylPhi[module] = new Double_t[nRecPoints];
+ fRecCylZ[module] = new Double_t[nRecPoints];
+ Int_t ind;
+ for(ind=0; ind<fNRecPoints[module]; ind++) {
+ recp=(AliITSRecPoint*)frecPoints->UncheckedAt(ind);
+ // Float_t global[3], local[3];
+ Double_t global[3], local[3];
+ local[0]=recp->GetX();
+ local[1]=0.;
+ local[2]= recp->GetZ();
+ g1->LtoG(module,local,global);
+
+ Double_t r = TMath::Sqrt(global[0]*global[0]+global[1]*global[1]); // r hit
+ Double_t phi = TMath::ATan2(global[1],global[0]); if(phi<0.) phi+=2.*TMath::Pi(); // phi hit
+ Double_t z = global[2]; // z hit
+
+ fRecCylR[module][ind]=r;
+ fRecCylPhi[module][ind]=phi;
+ fRecCylZ[module][ind]=z;
+ }
+ }
+ //}
+ //}
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+