- TVector2 pos1=TracePhot(ckovAng,0);//trace the first photon
- for(Int_t i=1;i<kN;i++){
- TVector2 pos2=TracePhot(ckovAng,Double_t(TMath::TwoPi()*(i+1)/kN));//trace the next photon
- if(pos1.X()==-999||pos2.X()==-999) return 0; //no area: open ring
- area+=TMath::Abs((pos1-fTrkPos).X()*(pos2-fTrkPos).Y()-(pos1-fTrkPos).Y()*(pos2-fTrkPos).X()); //add area of the triangle...
- pos1=pos2; // actual photon becomes the first one
+ Double_t area=0;
+//--- find points from first ring
+ for(Int_t i=0;i<kN;i++){
+ TVector2 pos=TracePhot(ckovAngMin,Double_t(TMath::TwoPi()*(i+1)/kN));//trace the next photon
+ if(pos.X()==-999) continue; //no area: open ring
+ if(AliHMPIDParam::IsInside(pos.X(),pos.Y(),0)) continue;
+ xP[np] = pos.X();
+ yP[np] = pos.Y();
+ np++;
+ }
+//--- find points from last ring
+ for(Int_t i=kN-1;i>=0;i--){
+ TVector2 pos=TracePhot(ckovAngMax,Double_t(TMath::TwoPi()*(i+1)/kN));//trace the next photon
+ if(pos.X()==-999) continue;
+ if(AliHMPIDParam::IsInside(pos.X(),pos.Y(),0)) continue;
+ xP[np] = pos.X();
+ yP[np] = pos.Y();
+ np++;