1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
19 #include "AliRICHSDigit.h"
20 #include "AliRICHDigit.h"
21 #include "AliRICHRawCluster.h"
22 #include "AliRICHRecHit1D.h"
24 #include "AliDetector.h"
26 #include "AliRICHPoints.h"
27 #include "AliSegmentation.h"
28 #include "AliRICHPatRec.h"
30 #include "AliRICHConst.h"
31 #include "AliRICHPoints.h"
33 #include "AliHitMap.h"
35 #include <TParticle.h>
43 ClassImp(AliRICHPatRec)
44 //___________________________________________
45 AliRICHPatRec::AliRICHPatRec() : TNamed()
47 // Default constructor
51 //___________________________________________
52 AliRICHPatRec::AliRICHPatRec(const char *name, const char *title)
55 //Constructor for Bari's pattern recogniton method object
58 void AliRICHPatRec::PatRec()
61 // Pattern recognition algorithm
63 AliRICHChamber* iChamber;
64 AliSegmentation* segmentation;
66 Int_t ntracks, ndigits[kNCH];
77 //printf("PatRec started\n");
79 AliRICH *pRICH = (AliRICH*)gAlice->GetDetector("RICH");
80 TTree *treeH = pRICH->TreeH();
82 ntracks =(Int_t) treeH->GetEntries();
84 for (itr=0; itr<ntracks; itr++) {
86 status = TrackParam(itr,ich,0,0);
87 if(status==1) continue;
88 //printf(" theta %f phi %f track \n",fTrackTheta,fTrackPhi);
89 // ring->Fill(fTrackLoc[0],fTrackLoc[1],100.);
91 iChamber = &(pRICH->Chamber(ich));
92 segmentation=iChamber->GetSegmentationModel();
94 nent=(Int_t)gAlice->TreeD()->GetEntries();
95 gAlice->TreeD()->GetEvent(0);
96 TClonesArray *pDigitss = pRICH->DigitsAddress(ich);
97 ndigits[ich] = pDigitss->GetEntriesFast();
98 printf("Digits in chamber %d: %d\n",ich,ndigits[ich]);
99 AliRICHDigit *padI = 0;
103 for (Int_t dig=0;dig<ndigits[ich];dig++) {
104 padI=(AliRICHDigit*) pDigitss->UncheckedAt(dig);
108 segmentation->GetPadC(x,y,rx,ry,rz);
110 //printf("Pad coordinates x:%d, Real coordinates x:%f\n",x,rx);
111 //printf("Pad coordinates y:%d, Real coordinates y:%f\n",y,ry);
117 fCerenkovAnglePad = PhotonCerenkovAngle();
118 if(fCerenkovAnglePad==-999) continue;
120 if(!PhotonInBand()) continue;
125 segmentation->GetPadI(fXpad,fYpad,0,xpad,ypad);
127 padsUsedX[goodPhotons]=xpad;
128 padsUsedY[goodPhotons]=ypad;
131 fEtaPhotons[goodPhotons-1] = fCerenkovAnglePad;
133 fNumEtaPhotons = goodPhotons;
135 BackgroundEstimation();
138 //CerenkovRingDrawing();
142 rechit[2] = fThetaCerenkov;
143 rechit[3] = fXshift + fTrackLoc[0];
144 rechit[4] = fYshift + fTrackLoc[1];
145 rechit[5] = fEmissPoint;
146 rechit[6] = goodPhotons;
148 //printf("Center coordinates:%f %f\n",rechit[3],rechit[4]);
150 pRICH->AddRecHit1D(ich,rechit,fEtaPhotons,padsUsedX,padsUsedY);
154 gAlice->TreeR()->Fill();
156 for (i=0;i<kNCH;i++) {
157 fRec=pRICH->RecHitsAddress1D(i);
158 int ndig=fRec->GetEntriesFast();
159 printf ("Chamber %d, rings %d\n",i,ndig);
161 pRICH->ResetRecHits1D();
166 Int_t AliRICHPatRec::TrackParam(Int_t itr, Int_t &ich, Float_t rectheta, Float_t recphi)
168 // Get Local coordinates of track impact
170 AliRICHChamber* iChamber;
171 AliSegmentation* segmentation;
173 Float_t trackglob[3];
181 //printf("Calling TrackParam\n");
184 AliRICH *pRICH = (AliRICH*)gAlice->GetDetector("RICH");
185 TTree *treeH = pRICH->TreeH();
186 treeH->GetEvent(itr);
188 AliRICHhit* mHit=(AliRICHhit*)pRICH->FirstHit(-1);
189 if(mHit==0) return 1;
190 ich = mHit->Chamber()-1;
191 trackglob[0] = mHit->X();
192 trackglob[1] = mHit->Y();
193 trackglob[2] = mHit->Z();
197 fTrackMom = sqrt(TMath::Power(pX,2)+TMath::Power(pY,2)+TMath::Power(pZ,2));
198 if(recphi!=0 || rectheta!=0)
205 thetatr = mHit->Theta()*TMath::Pi()/180;
206 phitr = mHit->Phi()*TMath::Pi()/180;
208 iloss = mHit->Loss();
209 part = mHit->Particle();
211 iChamber = &(pRICH->Chamber(ich));
212 iChamber->GlobaltoLocal(trackglob,trackloc);
214 segmentation=iChamber->GetSegmentationModel();
216 // retrieve geometrical params
218 AliRICHGeometry* fGeometry=iChamber->GetGeometryModel();
220 fRw = fGeometry->GetFreonThickness();
221 fQw = fGeometry->GetQuartzThickness();
222 fTgap = fGeometry->GetGapThickness();
223 Float_t radiatorToPads= fGeometry->GetRadiatorToPads();
224 //+ fGeometry->GetProximityGapThickness();
226 //printf("Distance to pads. From geometry:%f, From calculations:%f\n",radiatorToPads,fRw + fQw + fTgap);
228 //Float_t apar = (fRw + fQw + fTgap)*tan(thetatr);
229 Float_t apar = radiatorToPads*tan(thetatr);
230 fTrackLoc[0] = apar*cos(phitr);
231 fTrackLoc[1] = apar*sin(phitr);
232 //fTrackLoc[2] = fRw + fQw + fTgap;
233 fTrackLoc[2] = radiatorToPads;
234 fTrackTheta = thetatr;
237 fXshift = trackloc[0] - fTrackLoc[0];
238 fYshift = trackloc[2] - fTrackLoc[1];
243 Float_t AliRICHPatRec::EstimationAtLimits(Float_t lim, Float_t radius,
247 // Estimation of emission point
249 Float_t nquartz = 1.585;
251 Float_t nfreon = 1.295;
254 // printf("Calling EstimationLimits\n");
256 Float_t apar = (fRw -fEmissPoint + fQw + fTgap)*tan(fTrackTheta);
257 Float_t b1 = (fRw-fEmissPoint)*tan(lim);
258 Float_t b2 = fQw / sqrt(TMath::Power(nquartz,2)-TMath::Power(nfreon*sin(lim),2));
259 Float_t b3 = fTgap / sqrt(TMath::Power(ngas,2)-TMath::Power(nfreon*sin(lim),2));
260 Float_t bpar = b1 + nfreon*sin(lim)*(b2+b3);
261 value = TMath::Power(radius,2)
262 -TMath::Power((apar*cos(fTrackPhi)-bpar*cos(phiphot)),2)
263 -TMath::Power((apar*sin(fTrackPhi)-bpar*sin(phiphot)),2);
268 Float_t AliRICHPatRec::PhotonCerenkovAngle()
270 // Cherenkov pad angle reconstruction
274 Float_t cherMax = 0.8;
276 Float_t eps = 0.0001;
277 Int_t niterEmiss = 0;
278 Int_t niterEmissMax = 0;
279 Float_t x1,x2,x3=0,p1,p2,p3;
283 // printf("Calling PhotonCerenkovAngle\n");
285 radius = sqrt(TMath::Power(fTrackLoc[0]-fXpad,2)+TMath::Power(fTrackLoc[1]-fYpad,2));
286 fEmissPoint = fRw/2.; //Start value of EmissionPoint
288 while(niterEmiss<=niterEmissMax) {
291 argY = fYpad - fEmissPoint*tan(fTrackTheta)*sin(fTrackPhi);
292 argX = fXpad - fEmissPoint*tan(fTrackTheta)*cos(fTrackPhi);
293 phiphot = atan2(argY,argX);
294 p1 = EstimationAtLimits(cherMin,radius,phiphot);
295 p2 = EstimationAtLimits(cherMax,radius,phiphot);
298 // printf("PhotonCerenkovAngle failed\n");
302 //start to find the Cherenkov pad angle
306 p3 = EstimationAtLimits(x3,radius,phiphot);
307 while(TMath::Abs(p3)>eps){
311 p1 = EstimationAtLimits(x1,radius,phiphot);
314 p3 = EstimationAtLimits(x3,radius,phiphot);
318 // printf(" max iterations in PhotonCerenkovAngle\n");
322 // printf("niterFun %i \n",niterFun);
324 if (niterEmiss != niterEmissMax+1) EmissionPoint();
327 printf(" phiphot %f fXpad %f fYpad %f fEmiss %f \n",
328 phiphot,fXpad,fYpad,fEmissPoint);
336 void AliRICHPatRec::EmissionPoint()
339 // Find emission point
341 Float_t absorbtionLength=7.83*fRw; //absorption length in the freon (cm)
342 // 7.83 = -1/ln(T0) where
343 // T0->Trasmission freon at 180nm = 0.88 (Eph=6.85eV)
344 Float_t photonLength, photonLengthMin, photonLengthMax;
346 photonLength=exp(-fRw/(absorbtionLength*cos(fCerenkovAnglePad)));
347 photonLengthMin=fRw*photonLength/(1.-photonLength);
348 photonLengthMax=absorbtionLength*cos(fCerenkovAnglePad);
349 fEmissPoint = fRw + photonLengthMin - photonLengthMax;
353 void AliRICHPatRec::PhotonSelection(Int_t track, Int_t &nphot, Float_t &thetamean)
356 // not implemented yet
360 printf("Calling PhotonSelection\n");
363 void AliRICHPatRec::BackgroundEstimation()
366 // estimate background noise
368 Float_t stepEta = 0.001;
369 Float_t etaMinBkg = 0.72;
370 Float_t etaMaxBkg = 0.75;
372 Float_t etaMax = 0.75;
374 Float_t nfreon = 1.295;
376 Float_t etaStepMin,etaStepMax,etaStepAvg;
378 Int_t numPhotBkg, numPhotonStep;
379 Float_t funBkg,areaBkg,normBkg;
380 Float_t densityBkg,storeBkg,numStore;
386 nstep = (int)((etaMaxBkg-etaMinBkg)/stepEta);
388 for (i=0;i<fNumEtaPhotons;i++) {
390 if(fEtaPhotons[i]>etaMinBkg && fEtaPhotons[i]<etaMaxBkg) {
394 if (numPhotBkg == 0) {
395 for (i=0;i<fNumEtaPhotons;i++) {
396 fWeightPhotons[i] = 1.;
401 // printf(" numPhotBkg %i ",numPhotBkg);
403 for (i=0;i<nstep;i++) {
404 etaStepMin = etaMinBkg + (Float_t)(i)*stepEta;
405 etaStepMax = etaMinBkg + (Float_t)(i+1)*stepEta;
406 etaStepAvg = 0.5*(etaStepMax + etaStepMin);
408 funBkg = tan(etaStepAvg)*TMath::Power((1.+TMath::Power(tan(etaStepAvg),2)),
409 5.52)-7.803 + 22.02*tan(etaStepAvg);
412 //printf("etaStepAvg: %f, etaStepMax: %f, etaStepMin: %f", etaStepAvg,etaStepMax,etaStepMin);
414 thetaSig = TMath::ASin(nfreon/ngas*TMath::Sin(etaStepAvg));
415 funBkg = tan(thetaSig)*(1.+TMath::Power(tan(thetaSig),2))*nfreon
416 /ngas*cos(etaStepAvg)/cos(thetaSig);
417 areaBkg += stepEta*funBkg;
420 densityBkg = 0.95*(Float_t)(numPhotBkg)/areaBkg;
421 // printf(" densityBkg %f \n",densityBkg);
423 nstep = (int)((etaMax-etaMin)/stepEta);
426 for (i=0;i<nstep;i++) {
427 etaStepMin = etaMinBkg + (Float_t)(i)*stepEta;
428 etaStepMax = etaMinBkg + (Float_t)(i+1)*stepEta;
429 etaStepAvg = 0.5*(etaStepMax + etaStepMin);
431 funBkg = tan(etaStepAvg)*TMath::Power((1.+TMath::Power(tan(etaStepAvg),2)),
432 5.52)-7.803 + 22.02*tan(etaStepAvg);
435 thetaSig = asin(nfreon/ngas*sin(etaStepAvg));
436 funBkg = tan(thetaSig)*(1.+TMath::Power(tan(thetaSig),2))*nfreon
437 /ngas*cos(etaStepAvg)/cos(thetaSig);
439 areaBkg = stepEta*funBkg;
440 normBkg = densityBkg*areaBkg;
442 for (ip=0;ip<fNumEtaPhotons;ip++) {
443 if(fEtaPhotons[ip]>etaStepMin && fEtaPhotons[ip]<etaStepMax) {
447 if (numPhotonStep == 0) {
455 if (numPhotonStep == 0) continue;
456 for (ip=0;ip<fNumEtaPhotons;ip++) {
457 if(fEtaPhotons[ip]>etaStepMin && fEtaPhotons[ip]<etaStepMax) {
461 fWeightPhotons[ip] = 1. - normBkg/(Float_t)(numPhotonStep);
463 printf(" normBkg %f numPhotonStep %i fW %f \n",
464 normBkg, numPhotonStep, fWeightPhotons[ip]);
466 if(fWeightPhotons[ip]<0) fWeightPhotons[ip] = 0.;
473 void AliRICHPatRec::FlagPhotons(Int_t track, Float_t theta)
476 // not implemented yet
478 printf("Calling FlagPhotons\n");
482 //////////////////////////////////////////
488 Int_t AliRICHPatRec::PhotonInBand()
490 //0=label for parameters giving internal band ellipse
491 //1=label for parameters giving external band ellipse
493 Float_t imp[2], mass[2], energy[2], beta[2];
494 Float_t emissPointLength[2];
495 Float_t e1, e2, f1, f2;
496 Float_t nfreon[2], nquartz[2];
498 Float_t pointsOnCathode[3];
500 Float_t phpad, thetacer[2];
501 Float_t bandradius[2], padradius;
503 imp[0] = 5.0; //threshold momentum for the proton Cherenkov emission
506 mass[0] = 0.938; //proton mass
507 mass[1] = 0.139; //pion mass
509 emissPointLength[0] = fRw-0.0001; //at the beginning of the radiator
510 emissPointLength[1] = 0.;//at the end of radiator
512 //parameters to calculate freon window refractive index vs. energy
516 //parameters to calculate quartz window refractive index vs. energy
528 phpad = PhiPad(fTrackTheta,fTrackPhi);
530 for (times=0; times<=1; times++) {
532 nfreon[times] = a+b*energy[times];
535 nquartz[times] = sqrt(1+(f1/(TMath::Power(e1,2)-TMath::Power(energy[times],2)))+
536 (f2/(TMath::Power(e2,2)-TMath::Power(energy[times],2))));
538 beta[times] = imp[times]/sqrt(TMath::Power(imp[times],2)+TMath::Power(mass[times],2));
540 thetacer[times] = CherenkovAngle( nfreon[times], beta[times]);
542 bandradius[times] = DistanceFromMip( nfreon[times], nquartz[times],
543 emissPointLength[times],
544 thetacer[times], phpad, pointsOnCathode,fTrackTheta,fTrackPhi);
545 //printf(" ppp %f %f %f \n",pointsOnCathode);
548 bandradius[0] -= 1.6;
549 bandradius[1] += 1.6;
550 padradius = sqrt(TMath::Power(fXpad,2)+TMath::Power(fYpad,2));
551 // printf(" rmin %f r %f rmax %f \n",bandradius[0],padradius,bandradius[1]);
553 if(padradius>=bandradius[0] && padradius<=bandradius[1]) return 1;
557 Float_t AliRICHPatRec::DistanceFromMip(Float_t nfreon, Float_t nquartz,
558 Float_t emissPointLength, Float_t thetacer,
559 Float_t phpad, Float_t pointsOnCathode[3], Float_t rectheta, Float_t recphi)
562 // Find the distance to MIP impact
564 Float_t distanceValue;
566 TVector3 radExitPhot(1,1,1);//photon impact at the radiator exit with respect
567 //to local reference sistem with the origin in the MIP entrance
569 TVector3 vectEmissPointLength(1,1,1);
570 Float_t magEmissPointLenght;
572 TVector3 radExitPhot2(1,1,1);//photon impact at the radiator exit with respect
573 Float_t magRadExitPhot2;
574 //to a reference sistem with origin in the photon emission point and
575 //axes parallel to the MIP reference sistem
577 TVector3 quarExitPhot(1,1,1);//photon impact at the quartz exit with respect
578 Float_t magQuarExitPhot;
580 TVector3 gapExitPhot(1,1,1) ;
581 Float_t magGapExitPhot;
583 TVector3 PhotocatExitPhot(1,1,1);
585 Double_t thetarad , phirad ;
586 Double_t thetaquar, phiquar;
587 Double_t thetagap , phigap ;
591 magEmissPointLenght = emissPointLength/cos(rectheta);
593 vectEmissPointLength.SetMag(magEmissPointLenght);
594 vectEmissPointLength.SetTheta(rectheta);
595 vectEmissPointLength.SetPhi(recphi);
598 radExitPhot2.SetTheta(thetacer);
599 radExitPhot2.SetPhi(phpad);
606 r1. RotateY(rectheta);
611 r = r2 * r1;//rotation about the y axis by MIP theta incidence angle
612 //following by a rotation about the z axis by MIP phi incidence angle;
615 radExitPhot2 = r * radExitPhot2;
616 theta2 = radExitPhot2.Theta();
617 magRadExitPhot2 = (fRw - vectEmissPointLength(2))/cos(theta2);
618 radExitPhot2.SetMag(magRadExitPhot2);
621 radExitPhot = vectEmissPointLength + radExitPhot2;
622 thetarad = radExitPhot.Theta();
623 phirad = radExitPhot.Phi(); //check on the original file //
625 thetaquar = SnellAngle( nfreon, nquartz, theta2);
626 phiquar = radExitPhot2.Phi();
627 if(thetaquar == 999.) return thetaquar;
628 magQuarExitPhot = fQw/cos(thetaquar);
629 quarExitPhot.SetMag( magQuarExitPhot);
630 quarExitPhot.SetTheta(thetaquar);
631 quarExitPhot.SetPhi(phiquar);
633 thetagap = SnellAngle( nquartz, ngas, thetaquar);
635 if(thetagap == 999.) return thetagap;
636 magGapExitPhot = fTgap/cos(thetagap);
637 gapExitPhot.SetMag( magGapExitPhot);
638 gapExitPhot.SetTheta(thetagap);
639 gapExitPhot.SetPhi(phigap);
641 PhotocatExitPhot = radExitPhot + quarExitPhot + gapExitPhot;
643 distanceValue = sqrt(TMath::Power(PhotocatExitPhot(0),2)
644 +TMath::Power(PhotocatExitPhot(1),2));
645 pointsOnCathode[0] = (Float_t) PhotocatExitPhot(0) + fXshift - fTrackLoc[0];
646 pointsOnCathode[1] = (Float_t) PhotocatExitPhot(1) + fYshift - fTrackLoc[1];
647 pointsOnCathode[2] = (Float_t) PhotocatExitPhot(2);
649 //printf(" point in Distance.2. %f %f %f \n",pointsOnCathode[0],pointsOnCathode[1],pointsOnCathode[2]);
651 return distanceValue;
655 Float_t AliRICHPatRec::PhiPad(Float_t rectheta, Float_t recphi)
661 Float_t thetapad, phipad;
662 Float_t thetarot, phirot;
664 zpad = fRw + fQw + fTgap;
666 TVector3 photonPad(fXpad, fYpad, zpad);
667 thetapad = photonPad.Theta();
668 phipad = photonPad.Phi();
674 thetarot = - rectheta;
677 r2. RotateY(thetarot);
679 r = r2 * r1;//rotation about the z axis by MIP -phi incidence angle
680 //following by a rotation about the y axis by MIP -theta incidence angle;
682 photonPad = r * photonPad;
684 phipad = photonPad.Phi();
689 Float_t AliRICHPatRec:: SnellAngle(Float_t n1, Float_t n2, Float_t theta1)
692 // Compute the Snell angle
694 Float_t sinrefractangle;
695 Float_t refractangle;
697 sinrefractangle = (n1/n2)*sin(theta1);
699 if(sinrefractangle>1.) {
704 refractangle = asin(sinrefractangle);
708 Float_t AliRICHPatRec::CherenkovAngle(Float_t n, Float_t beta)
711 // Compute the cerenkov angle
720 thetacer = acos (1./(n*beta));
724 Float_t AliRICHPatRec::BetaCerenkov(Float_t n, Float_t theta)
731 beta = 1./(n*cos(theta));
738 void AliRICHPatRec::HoughResponse()
742 // Implement Hough response pat. rec. method
747 int i, j, k, nCorrBand;
750 float angle, thetaCerMean;
755 float stepEta = 0.001;
756 float windowEta = 0.040;
760 float etaPeakPos = -1;
761 Int_t etaPeakCount = -1;
766 nBin = (int)(0.5+etaMax/(stepEta));
767 nCorrBand = (int)(0.5+ windowEta/(2 * stepEta));
768 memset ((void *)hcs, 0, etaBin*sizeof(int));
770 for (k=0; k< fNumEtaPhotons; k++) {
772 angle = fEtaPhotons[k];
774 if (angle>=etaMin && angle<= etaMax) {
775 bin = (int)(0.5+angle/(stepEta));
779 if (bin2>nBin) bin2=nBin;
781 for (j=bin1; j<bin2; j++) {
782 hcs[j] += fWeightPhotons[k];
785 thetaCerMean += angle;
789 thetaCerMean /= fNumEtaPhotons;
793 for (bin=0; bin <nBin; bin++) {
794 angle = (bin+0.5) * (stepEta);
795 if (hcs[bin] && hcs[bin] > etaPeakPos) {
797 etaPeakPos = hcs[bin];
801 if (hcs[bin] == etaPeakPos) {
802 etaPeak[++etaPeakCount] = angle;
807 for (i=0; i<etaPeakCount+1; i++) {
808 fThetaCerenkov += etaPeak[i];
810 if (etaPeakCount>=0) {
811 fThetaCerenkov /= etaPeakCount+1;
812 fThetaPeakPos = etaPeakPos;
817 void AliRICHPatRec::HoughFiltering(float hcs[])
823 float k[5] = {0.05, 0.25, 0.4, 0.25, 0.05};
830 float stepEta = 0.001;
832 nBin = (int)(1+etaMax/stepEta);
833 sizeHCS = etaBin*sizeof(float);
835 memset ((void *)hcsFilt, 0, sizeHCS);
837 for (nx = 0; nx < nBin; nx++) {
838 for (i = 0; i < 5; i++) {
840 if (nxDx> -1 && nxDx<nBin)
841 hcsFilt[nx] += hcs[nxDx] * k[i];
845 for (nx = 0; nx < nBin; nx++) {
846 hcs[nx] = hcsFilt[nx];
850 /*void AliRICHPatRec::CerenkovRingDrawing()
853 //to draw Cherenkov ring by known Cherenkov angle
858 Float_t nfreonave, nquartzave;
861 Float_t e1, e2, f1, f2;
864 //parameters to calculate freon window refractive index vs. energy
869 //parameters to calculate quartz window refractive index vs. energy
881 for (Nphpad=0; Nphpad<nmaxdegrees;Nphpad++) {
883 phpad = (360./(Float_t)nmaxdegrees)*(Float_t)Nphpad;
885 aveEnerg = (energy[0]+energy[1])/2.;
887 nfreonave = a+b*aveEnerg;
888 nquartzave = sqrt(1+(f1/(TMath::Power(e1,2)-TMath::Power(aveEnerg,2)))+
889 (f2/(TMath::Power(e2,2)-TMath::Power(aveEnerg,2))));
891 bandradius = DistanceFromMip(nfreonave, nquartzave,
892 fEmissPoint,fThetaCerenkov, phpad);
894 fCoordEllipse[0][Nphpad] = fOnCathode[0];
895 fCoordEllipse[1][Nphpad] = fOnCathode[1];
896 printf(" values %f %f \n",fOnCathode[0],fOnCathode[1]);