]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RICH/AliRICHPatRec.cxx
Transition to NewIO
[u/mrichter/AliRoot.git] / RICH / AliRICHPatRec.cxx
index c5426fe60ffa56bd9698354ea030f29f78c12df1..6cebefb102b998fdc8861139e0d66f131f530da6 100644 (file)
 
 /*
   $Log$
+  Revision 1.13.4.1  2002/05/31 09:37:59  hristov
+  First set of changes done by Piotr
+
+  Revision 1.13  2001/10/23 13:03:35  hristov
+  The access to several data members was changed from public to protected. The digitisation was adapted to the multi-event case (J.Chudoba)
+
+  Revision 1.12  2001/05/10 12:34:23  jbarbosa
+  Changed drwaing routines.
+
   Revision 1.11  2001/03/14 18:21:24  jbarbosa
   Corrected bug in digits loading.
 
@@ -113,7 +122,7 @@ void AliRICHPatRec::PatRec()
   //printf("PatRec started\n");
 
   AliRICH *pRICH  = (AliRICH*)gAlice->GetDetector("RICH");
-  TTree *treeH = gAlice->TreeH();
+  TTree *treeH = pRICH->TreeH();
 
   ntracks =(Int_t) treeH->GetEntries();
   //  ntracks = 1;
@@ -138,9 +147,9 @@ void AliRICHPatRec::PatRec()
 
     for (Int_t dig=0;dig<ndigits[ich];dig++) {
       padI=(AliRICHDigit*) pDigitss->UncheckedAt(dig);
-      x=padI->fPadX;
-      y=padI->fPadY;
-      q=padI->fSignal;
+      x=padI->PadX();
+      y=padI->PadY();
+      q=padI->Signal();
       segmentation->GetPadC(x,y,rx,ry,rz);      
 
       //printf("Pad coordinates x:%d, Real coordinates x:%f\n",x,rx);
@@ -217,19 +226,19 @@ Int_t AliRICHPatRec::TrackParam(Int_t itr, Int_t &ich, Float_t rectheta, Float_t
   //printf("Calling TrackParam\n");
 
     gAlice->ResetHits();
-    TTree *treeH = gAlice->TreeH();
+    AliRICH *pRICH  = (AliRICH*)gAlice->GetDetector("RICH");
+    TTree *treeH = pRICH->TreeH();
     treeH->GetEvent(itr);
  
-    AliRICH *pRICH  = (AliRICH*)gAlice->GetDetector("RICH");
     AliRICHHit* mHit=(AliRICHHit*)pRICH->FirstHit(-1);
     if(mHit==0) return 1;
-    ich = mHit->fChamber-1;
+    ich = mHit->Chamber()-1;
     trackglob[0] = mHit->X();
     trackglob[1] = mHit->Y();
     trackglob[2] = mHit->Z();
-    pX = mHit->fMomX;
-    pY = mHit->fMomY;
-    pZ = mHit->fMomZ;
+    pX = mHit->MomX();
+    pY = mHit->MomY();
+    pZ = mHit->MomZ();
     fTrackMom = sqrt(TMath::Power(pX,2)+TMath::Power(pY,2)+TMath::Power(pZ,2));
     if(recphi!=0 || rectheta!=0)
       {
@@ -238,11 +247,11 @@ Int_t AliRICHPatRec::TrackParam(Int_t itr, Int_t &ich, Float_t rectheta, Float_t
       }
     else
       {
-       thetatr = mHit->fTheta*TMath::Pi()/180;
-       phitr = mHit->fPhi*TMath::Pi()/180;
+       thetatr = mHit->Theta()*TMath::Pi()/180;
+       phitr = mHit->Phi()*TMath::Pi()/180;
       }
-    iloss = mHit->fLoss;
-    part  = mHit->fParticle;
+    iloss = mHit->Loss();
+    part  = mHit->Particle();
 
     iChamber = &(pRICH->Chamber(ich));
     iChamber->GlobaltoLocal(trackglob,trackloc);