Updated to handle both reconstruction algorithms.
authorjbarbosa <jbarbosa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Nov 2000 15:33:47 +0000 (15:33 +0000)
committerjbarbosa <jbarbosa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Nov 2000 15:33:47 +0000 (15:33 +0000)
RICH/AliRICH.cxx
RICH/AliRICH.h
RICH/AliRICHDisplay.cxx
RICH/RICHpadtest.C

index 4a8453f..bfc8cd8 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
   $Log$
+  Revision 1.31  2000/10/26 20:18:33  jbarbosa
+  Supports for methane and freon vessels
+
   Revision 1.30  2000/10/24 13:19:12  jbarbosa
   Geometry updates.
 
@@ -96,7 +99,8 @@
 #include "AliRICHDigit.h"
 #include "AliRICHTransientDigit.h"
 #include "AliRICHRawCluster.h"
-#include "AliRICHRecHit.h"
+#include "AliRICHRecHit1D.h"
+#include "AliRICHRecHit3D.h"
 #include "AliRICHHitMapA1.h"
 #include "AliRICHClusterFinder.h"
 #include "AliRun.h"
@@ -134,7 +138,8 @@ AliRICH::AliRICH()
       {
        fNdch[i]       = 0;
        fNrawch[i]   = 0;
-       fNrechits[i] = 0;
+       fNrechits1D[i] = 0;
+       fNrechits3D[i] = 0;
       }
 }
 
@@ -162,7 +167,8 @@ AliRICH::AliRICH(const char *name, const char *title)
     
     fDchambers = new TObjArray(kNCH);
 
-    fRecHits = new TObjArray(kNCH);
+    fRecHits1D = new TObjArray(kNCH);
+    fRecHits3D = new TObjArray(kNCH);
     
     Int_t i;
    
@@ -184,7 +190,10 @@ AliRICH::AliRICH(const char *name, const char *title)
     //fNrechits      = new Int_t[kNCH];
     
     for (i=0; i<kNCH ;i++) {
-       (*fRecHits)[i] = new TClonesArray("AliRICHRecHit",1000); 
+      (*fRecHits1D)[i] = new TClonesArray("AliRICHRecHit1D",1000);
+    }
+    for (i=0; i<kNCH ;i++) {
+      (*fRecHits3D)[i] = new TClonesArray("AliRICHRecHit3D",1000);     
     }
     //printf("Created fRecHits with adress:%p",fRecHits);
 
@@ -268,15 +277,27 @@ void AliRICH::AddRawCluster(Int_t id, const AliRICHRawCluster& c)
 }
 
 //_____________________________________________________________________________
-void AliRICH::AddRecHit(Int_t id, Float_t *rechit, Float_t *photons, Int_t *padsx, Int_t* padsy)
+void AliRICH::AddRecHit1D(Int_t id, Float_t *rechit, Float_t *photons, Int_t *padsx, Int_t* padsy)
+{
+  
+  //
+  // Add a RICH reconstructed hit to the list
+  //
+
+    TClonesArray &lrec1D = *((TClonesArray*)(*fRecHits1D)[id]);
+    new(lrec1D[fNrechits1D[id]++]) AliRICHRecHit1D(id,rechit,photons,padsx,padsy);
+}
+
+//_____________________________________________________________________________
+void AliRICH::AddRecHit3D(Int_t id, Float_t *rechit)
 {
   
   //
   // Add a RICH reconstructed hit to the list
   //
 
-    TClonesArray &lrec = *((TClonesArray*)(*fRecHits)[id]);
-    new(lrec[fNrechits[id]++]) AliRICHRecHit(id,rechit,photons,padsx,padsy);
+    TClonesArray &lrec3D = *((TClonesArray*)(*fRecHits3D)[id]);
+    new(lrec3D[fNrechits3D[id]++]) AliRICHRecHit3D(id,rechit);
 }
 
 //___________________________________________
@@ -1294,13 +1315,22 @@ void AliRICH::MakeBranch(Option_t* option)
 
   // one branch for rec hits per chamber
   for (i=0; i<kNCH ;i++) {
-    sprintf(branchname,"%sRecHits%d",GetName(),i+1);
+    sprintf(branchname,"%sRecHits1D%d",GetName(),i+1);
+    
+    if (fRecHits1D   && gAlice->TreeR()) {
+      gAlice->TreeR()->Branch(branchname,&((*fRecHits1D)[i]), kBufferSize);
+      printf("Making Branch %s for 1D rec. hits in chamber %d\n",branchname,i+1);
+    }  
+  }
+  for (i=0; i<kNCH ;i++) {
+    sprintf(branchname,"%sRecHits3D%d",GetName(),i+1);
     
-    if (fRecHits   && gAlice->TreeR()) {
-      gAlice->TreeR()->Branch(branchname,&((*fRecHits)[i]), kBufferSize);
-      printf("Making Branch %s for rec. hits in chamber %d\n",branchname,i+1);
+    if (fRecHits3D   && gAlice->TreeR()) {
+      gAlice->TreeR()->Branch(branchname,&((*fRecHits3D)[i]), kBufferSize);
+      printf("Making Branch %s for 3D rec. hits in chamber %d\n",branchname,i+1);
     }  
   }
+  
 }
 
 //___________________________________________
@@ -1347,13 +1377,21 @@ void AliRICH::SetTreeAddress()
       }
       
       for (i=0; i<kNCH; i++) {
-       sprintf(branchname,"%sRecHits%d",GetName(),i+1);
-       if (fRecHits) {
+       sprintf(branchname,"%sRecHits1D%d",GetName(),i+1);
+       if (fRecHits1D) {
          branch = treeR->GetBranch(branchname);
-         if (branch) branch->SetAddress(&((*fRecHits)[i]));
+         if (branch) branch->SetAddress(&((*fRecHits1D)[i]));
          }
       }
       
+     for (i=0; i<kNCH; i++) {
+       sprintf(branchname,"%sRecHits3D%d",GetName(),i+1);
+       if (fRecHits3D) {
+         branch = treeR->GetBranch(branchname);
+         if (branch) branch->SetAddress(&((*fRecHits3D)[i]));
+         }
+      } 
+      
   }
 }
 //___________________________________________
@@ -1393,15 +1431,28 @@ void AliRICH::ResetRawClusters()
 }
 
 //____________________________________________
-void AliRICH::ResetRecHits()
+void AliRICH::ResetRecHits1D()
+{
+  //
+  // Reset number of raw clusters and the raw clust array for this detector
+  //
+  
+  for ( int i=0;i<kNCH;i++ ) {
+       if ((*fRecHits1D)[i])    ((TClonesArray*)(*fRecHits1D)[i])->Clear();
+       if (fNrechits1D)  fNrechits1D[i]=0;
+    }
+}
+
+//____________________________________________
+void AliRICH::ResetRecHits3D()
 {
   //
   // Reset number of raw clusters and the raw clust array for this detector
   //
   
   for ( int i=0;i<kNCH;i++ ) {
-       if ((*fRecHits)[i])    ((TClonesArray*)(*fRecHits)[i])->Clear();
-       if (fNrechits)  fNrechits[i]=0;
+       if ((*fRecHits3D)[i])    ((TClonesArray*)(*fRecHits3D)[i])->Clear();
+       if (fNrechits3D)  fNrechits3D[i]=0;
     }
 }
 
@@ -2010,7 +2061,8 @@ void AliRICH::Streamer(TBuffer &R__b)
     AliRICHResponse      *response;
     TClonesArray         *digitsaddress;
     TClonesArray         *rawcladdress;
-    TClonesArray         *rechitaddress;
+    TClonesArray         *rechitaddress1D;
+    TClonesArray         *rechitaddress3D;
       
     if (R__b.IsReading()) {
        Version_t R__v = R__b.ReadVersion(); if (R__v) { }
@@ -2021,11 +2073,13 @@ void AliRICH::Streamer(TBuffer &R__b)
        R__b >> fCerenkovs; // diff
        R__b >> fDchambers;
        R__b >> fRawClusters;
-       R__b >> fRecHits;  //diff
+       R__b >> fRecHits1D;  //diff
+       R__b >> fRecHits3D;  //diff
        R__b >> fDebugLevel;  //diff
        R__b.ReadStaticArray(fNdch);
        R__b.ReadStaticArray(fNrawch);
-       R__b.ReadStaticArray(fNrechits);
+       R__b.ReadStaticArray(fNrechits1D);
+       R__b.ReadStaticArray(fNrechits3D);
 //
        R__b >> fChambers;
 // Stream chamber related information
@@ -2038,8 +2092,10 @@ void AliRICH::Streamer(TBuffer &R__b)
            response->Streamer(R__b);     
            rawcladdress=(TClonesArray*) (*fRawClusters)[i];
            rawcladdress->Streamer(R__b);
-           rechitaddress=(TClonesArray*) (*fRecHits)[i];
-           rechitaddress->Streamer(R__b);
+           rechitaddress1D=(TClonesArray*) (*fRecHits1D)[i];
+           rechitaddress1D->Streamer(R__b);
+           rechitaddress3D=(TClonesArray*) (*fRecHits3D)[i];
+           rechitaddress3D->Streamer(R__b);
            digitsaddress=(TClonesArray*) (*fDchambers)[i];
            digitsaddress->Streamer(R__b);
        }
@@ -2070,12 +2126,14 @@ void AliRICH::Streamer(TBuffer &R__b)
        R__b << fCerenkovs; // diff
        R__b << fDchambers;
        R__b << fRawClusters;
-       R__b << fRecHits; //diff
+       R__b << fRecHits1D; //diff
+       R__b << fRecHits3D; //diff
        R__b << fDebugLevel; //diff
        R__b.WriteArray(fNdch, kNCH);
        R__b.WriteArray(fNrawch, kNCH);
-       R__b.WriteArray(fNrechits, kNCH);
-       //
+       R__b.WriteArray(fNrechits1D, kNCH);
+       R__b.WriteArray(fNrechits3D, kNCH);
+//
        R__b << fChambers;
 //  Stream chamber related information
        for (Int_t i =0; i<kNCH; i++) {
@@ -2087,8 +2145,10 @@ void AliRICH::Streamer(TBuffer &R__b)
            response->Streamer(R__b);
            rawcladdress=(TClonesArray*) (*fRawClusters)[i];
            rawcladdress->Streamer(R__b);
-           rechitaddress=(TClonesArray*) (*fRecHits)[i];
-           rechitaddress->Streamer(R__b);
+           rechitaddress1D=(TClonesArray*) (*fRecHits1D)[i];
+           rechitaddress1D->Streamer(R__b);
+           rechitaddress3D=(TClonesArray*) (*fRecHits3D)[i];
+           rechitaddress3D->Streamer(R__b);
            digitsaddress=(TClonesArray*) (*fDchambers)[i];
            digitsaddress->Streamer(R__b);
        }
index a6eef63..4e13184 100644 (file)
@@ -19,7 +19,8 @@ static const int kNCH=7;
 class AliRICHHit;
 class AliRICHPadHit;
 class AliRICHRawCluster;
-class AliRICHRecHit;
+class AliRICHRecHit1D;
+class AliRICHRecHit3D;
 class AliRICHClusterFinder;
 class AliRICHDetect;
 class AliRICHChamber;
@@ -40,7 +41,8 @@ class AliRICH : public  AliDetector {
     virtual void   AddPadHit(Int_t *clhits);
     virtual void   AddDigits(Int_t id, Int_t *tracks, Int_t *charges, Int_t *digits);
     virtual void   AddRawCluster(Int_t id, const AliRICHRawCluster& cluster);
-    virtual void   AddRecHit(Int_t id, Float_t* rechit, Float_t* photons, Int_t* padsx, Int_t* padsy);
+    virtual void   AddRecHit1D(Int_t id, Float_t* rechit, Float_t* photons, Int_t* padsx, Int_t* padsy);
+    virtual void   AddRecHit3D(Int_t id, Float_t* rechit);
 
 
     virtual void   BuildGeometry();
@@ -59,7 +61,8 @@ class AliRICH : public  AliDetector {
     virtual void   ResetHits();
     virtual void   ResetDigits();
     virtual void   ResetRawClusters();
-    virtual void   ResetRecHits();
+    virtual void   ResetRecHits1D();
+    virtual void   ResetRecHits3D();
     virtual void   FindClusters(Int_t nev,Int_t lastEntry);
     virtual void   Digitise(Int_t nev,Int_t flag,Option_t *opt=" ",Text_t *name=" ");
 // 
@@ -90,9 +93,13 @@ class AliRICH : public  AliDetector {
     Int_t                *Ndch() {return fNdch;}
     virtual TClonesArray *DigitsAddress(Int_t id) {return ((TClonesArray *) (*fDchambers)[id]);}
 // Return pointers to rec. hits
-    TObjArray            *RecHits() {return fRecHits;}
-    Int_t                *Nrechits() {return fNrechits;}
-    virtual TClonesArray *RecHitsAddress(Int_t id) {return ((TClonesArray *) (*fRecHits)[id]);}
+    TObjArray            *RecHits1D() {return fRecHits1D;}
+    Int_t                *Nrechits1D() {return fNrechits1D;}
+    virtual TClonesArray *RecHitsAddress1D(Int_t id) {return ((TClonesArray *) (*fRecHits1D)[id]);}
+    TObjArray            *RecHits3D() {return fRecHits3D;}
+    Int_t                *Nrechits3D() {return fNrechits3D;}
+    virtual TClonesArray *RecHitsAddress3D(Int_t id) {return ((TClonesArray *) (*fRecHits3D)[id]);}
+    
 // Return pointers to reconstructed clusters
     virtual TClonesArray *RawClustAddress(Int_t id) {return ((TClonesArray *) (*fRawClusters)[id]);}    
 // Assignment operator
@@ -106,13 +113,15 @@ class AliRICH : public  AliDetector {
     TClonesArray         *fPadHits;            // List of clusters
     TObjArray            *fDchambers;          // List of digits
     TClonesArray         *fCerenkovs;          // List of cerenkovs
-    Int_t                fNdch[kNCH];               // Number of digits
+    Int_t                 fNdch[kNCH];         // Number of digits
     Text_t               *fFileName;           // Filename for event mixing
     TObjArray            *fRawClusters;        // List of raw clusters
-    TObjArray            *fRecHits;            // List of rec. hits
-    Int_t                fNrawch[kNCH];             // Number of raw clusters
-    Int_t                fNrechits[kNCH];           // Number of rec hits 
-    Int_t                 fDebugLevel;          // Source debugging level
+    TObjArray            *fRecHits1D;          // List of rec. hits
+    TObjArray            *fRecHits3D;          // List of rec. hits
+    Int_t                 fNrawch[kNCH];       // Number of raw clusters
+    Int_t                 fNrechits1D[kNCH];   // Number of rec hits 
+    Int_t                 fNrechits3D[kNCH];   // Number of rec hits 
+    Int_t                 fDebugLevel;         // Source debugging level
 
     Int_t fCkovNumber;                   // Number of Cerenkov photons
     Int_t fCkovQuarz;                    // Cerenkovs crossing quartz
index 55fe1c5..5835baa 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
   $Log$
+  Revision 1.8  2000/10/03 21:44:09  morsch
+  Use AliSegmentation and AliHit abstract base classes.
+
   Revision 1.7  2000/10/02 21:28:12  fca
   Removal of useless dependecies via forward declarations
 
@@ -85,7 +88,8 @@
 #include "AliRICHPadHit.h"
 #include "AliRICHDigit.h"
 #include "AliRICHRawCluster.h"
-#include "AliRICHRecHit.h"
+#include "AliRICHRecHit1D.h"
+#include "AliRICHRecHit3D.h"
 #include "AliRICHEllipse.h"
 
 ClassImp(AliRICHDisplay)
@@ -816,54 +820,111 @@ void AliRICHDisplay::LoadRecHits(Int_t chamber, Int_t cathode)
    AliRICH *pRICH  = (AliRICH*)gAlice->GetModule("RICH");
    AliRICHChamber*  iChamber;
 
-   TClonesArray *pRICHrechits  = pRICH->RecHitsAddress(chamber);
+   TClonesArray *pRICHrechits1D  = pRICH->RecHitsAddress1D(chamber);
    printf ("Chamber:%d\n", chamber);
-   if (pRICHrechits == 0) return;
+   if (pRICHrechits1D != 0)
+     {
 
-   //RICH->ResetRecHits();
+       //RICH->ResetRecHits();
 
 
-   Int_t nent=(Int_t)gAlice->TreeR()->GetEntries();
-   gAlice->TreeR()->GetEvent(nent-1+cathode-1);
-   Int_t nrechits = pRICHrechits->GetEntriesFast();
-   printf ("nrechits:%d\n",nrechits);
-   if (nrechits == 0) return;
-   if (fRecpoints == 0) fRecpoints = new TObjArray(50);
-   
-   iChamber = &(pRICH->Chamber(chamber));
-   AliRICHRecHit  *mRec;
-   AliRICHPoints *points = 0;
-   //AliRICHEllipse *ellipse = 0;
-   //
-   //loop over all rechits and store their position  
-
-   points = new AliRICHPoints(nrechits);
-   for (Int_t irec=0;irec<nrechits;irec++) {
-       mRec   = (AliRICHRecHit*)pRICHrechits->UncheckedAt(irec);
-       fRecpoints->AddAt(points,irec);
-       points->SetMarkerColor(38);
-       points->SetMarkerStyle(8);
-       points->SetMarkerSize(1.);
-       points->SetParticle(-1);
-       points->SetHitIndex(-1);
-       points->SetTrackIndex(-1);
-       points->SetDigitIndex(-1);
-       Float_t  vectorLoc[3]={mRec->fX,6.276,mRec->fY};
-       Float_t  vectorGlob[3];
-       iChamber->LocaltoGlobal(vectorLoc,vectorGlob);
-       points->SetPoint(irec,vectorGlob[0],vectorGlob[1],vectorGlob[2]);
-       //Float_t theta = iChamber->GetRotMatrix()->GetTheta();
-       //Float_t phi   = iChamber->GetRotMatrix()->GetPhi();      
-       //ellipse=new TEllipse(vectorGlob[0],vectorGlob[2],10,10,0,360,phi);
-       printf("Generating ellipse %d\n",irec);
-       AliRICHEllipse *ellipse=new AliRICHEllipse(mRec->fX,mRec->fY,mRec->fOmega,mRec->fTheta,mRec->fPhi,mRec->fEmissPoint);
-       ellipse->CerenkovRingDrawing(chamber,irec);
-       //ellipse->SetFillStyle(1001);
-       ellipse->SetMarkerColor(38);
-       ellipse->Draw();
-       //marker->SetRefObject((TObject*)points);
-       //points->Set3DMarker(0, marker); 
-   }
+       Int_t nent1D=(Int_t)gAlice->TreeR()->GetEntries();
+       gAlice->TreeR()->GetEvent(nent1D-1+cathode-1);
+       Int_t nrechits1D = pRICHrechits1D->GetEntriesFast();
+       printf ("nrechits1D:%d\n",nrechits1D);
+       if (nrechits1D != 0)
+        {
+          if (fRecpoints == 0) fRecpoints = new TObjArray(50);
+          
+          iChamber = &(pRICH->Chamber(chamber));
+          AliRICHRecHit1D  *mRec1D;
+          AliRICHPoints *points1D = 0;
+          //AliRICHEllipse *ellipse = 0;
+          //
+          //loop over all rechits and store their position  
+          
+          points1D = new AliRICHPoints(nrechits1D);
+          for (Int_t irec=0;irec<nrechits1D;irec++) {
+            mRec1D   = (AliRICHRecHit1D*)pRICHrechits1D->UncheckedAt(irec);
+            fRecpoints->AddAt(points1D,irec);
+            points1D->SetMarkerColor(38);
+            points1D->SetMarkerStyle(8);
+            points1D->SetMarkerSize(1.);
+            points1D->SetParticle(-1);
+            points1D->SetHitIndex(-1);
+            points1D->SetTrackIndex(-1);
+            points1D->SetDigitIndex(-1);
+            Float_t  vectorLoc[3]={mRec1D->fX,6.276,mRec1D->fY};
+            Float_t  vectorGlob[3];
+            iChamber->LocaltoGlobal(vectorLoc,vectorGlob);
+            points1D->SetPoint(irec,vectorGlob[0],vectorGlob[1],vectorGlob[2]);
+            //Float_t theta = iChamber->GetRotMatrix()->GetTheta();
+            //Float_t phi   = iChamber->GetRotMatrix()->GetPhi();         
+            //ellipse=new TEllipse(vectorGlob[0],vectorGlob[2],10,10,0,360,phi);
+            printf("Generating ellipse %d\n",irec);
+            AliRICHEllipse *ellipse=new AliRICHEllipse(mRec1D->fX,mRec1D->fY,mRec1D->fOmega,mRec1D->fTheta,mRec1D->fPhi,mRec1D->fEmissPoint);
+            ellipse->CerenkovRingDrawing(chamber,irec);
+            //ellipse->SetFillStyle(1001);
+            ellipse->SetMarkerColor(38);
+            ellipse->Draw();
+            //marker->SetRefObject((TObject*)points1D);
+            //points1D->Set3DMarker(0, marker); 
+          }
+        }
+     }
+
+   TClonesArray *pRICHrechits3D  = pRICH->RecHitsAddress3D(chamber);
+   printf ("Chamber:%d\n", chamber);
+   if (pRICHrechits3D != 0)
+     {
+       
+       //RICH->ResetRecHits();
+       
+       
+       Int_t nent3D=(Int_t)gAlice->TreeR()->GetEntries();
+       gAlice->TreeR()->GetEvent(nent3D-1+cathode-1);
+       Int_t nrechits3D = pRICHrechits3D->GetEntriesFast();
+       printf ("nrechits3D:%d\n",nrechits3D);
+       if (nrechits3D != 0)
+        {
+          if (fRecpoints == 0) fRecpoints = new TObjArray(50);
+          
+          iChamber = &(pRICH->Chamber(chamber));
+          AliRICHRecHit3D  *mRec3D;
+          AliRICHPoints *points3D = 0;
+          //AliRICHEllipse *ellipse = 0;
+          //
+          //loop over all rechits and store their position  
+          
+          points3D = new AliRICHPoints(nrechits3D);
+          for (Int_t irec=0;irec<nrechits3D;irec++) {
+            mRec3D   = (AliRICHRecHit3D*)pRICHrechits3D->UncheckedAt(irec);
+            fRecpoints->AddAt(points3D,irec);
+            points3D->SetMarkerColor(42);
+            points3D->SetMarkerStyle(8);
+            points3D->SetMarkerSize(1.);
+            points3D->SetParticle(-1);
+            points3D->SetHitIndex(-1);
+            points3D->SetTrackIndex(-1);
+            points3D->SetDigitIndex(-1);
+            Float_t  vectorLoc[3]={mRec3D->fX,6.276,mRec3D->fY};
+            Float_t  vectorGlob[3];
+            iChamber->LocaltoGlobal(vectorLoc,vectorGlob);
+            points3D->SetPoint(irec,vectorGlob[0],vectorGlob[1],vectorGlob[2]);
+            //Float_t theta = iChamber->GetRotMatrix()->GetTheta();
+            //Float_t phi   = iChamber->GetRotMatrix()->GetPhi();         
+            //ellipse=new TEllipse(vectorGlob[0],vectorGlob[2],10,10,0,360,phi);
+            printf("Generating ellipse %d\n",irec);
+            AliRICHEllipse *ellipse=new AliRICHEllipse(mRec3D->fX,mRec3D->fY,mRec3D->fOmega,mRec3D->fTheta,mRec3D->fPhi,0.75);
+            ellipse->CerenkovRingDrawing(chamber,irec);
+            //ellipse->SetFillStyle(1001);
+            ellipse->SetMarkerColor(42);
+            ellipse->Draw();
+            //marker->SetRefObject((TObject*)points3D);
+            //points3D->Set3DMarker(0, marker); 
+          }
+        }
+     }
 }
 //___________________________________________
 void AliRICHDisplay::LoadDigits()
index fbebb50..cbbb9f6 100644 (file)
@@ -150,9 +150,9 @@ void RICHpadtest (Int_t diaglevel,Int_t evNumber1=0,Int_t evNumber2=0)
        
 
        //cout<<"nev  "<<nev<<endl;
-       printf ("\n**********************************\nProcessing Event: %d\n\n",nev);
+       printf ("\n**********************************\nProcessing Event: %d\n",nev);
        //cout<<"nparticles  "<<nparticles<<endl;
-       printf ("Particles       : %d\n",nparticles);
+       printf ("Particles       : %d\n\n",nparticles);
        if (nev < evNumber1) continue;
        if (nparticles <= 0) return;
        
@@ -166,8 +166,8 @@ void RICHpadtest (Int_t diaglevel,Int_t evNumber1=0,Int_t evNumber2=0)
        Int_t nrawclusters = Rawclusters->GetEntriesFast();
        //printf (" nrawclusters:%d\n",nrawclusters);
        gAlice->TreeR()->GetEvent(nent-1);
-       TClonesArray *RecHits = RICH->RecHitsAddress(2);
-       Int_t nrechits = RecHits->GetEntriesFast();
+       TClonesArray *RecHits1D = RICH->RecHitsAddress1D(2);
+       Int_t nrechits1D = RecHits1D->GetEntriesFast();
        //printf (" nrechits:%d\n",nrechits);
        TTree *TH = gAlice->TreeH(); 
        Int_t ntracks = TH->GetEntries();
@@ -180,7 +180,7 @@ void RICHpadtest (Int_t diaglevel,Int_t evNumber1=0,Int_t evNumber2=0)
 // Start loop on tracks in the hits containers
        Int_t Nc=0;
        for (Int_t track=0; track<ntracks;track++) {
-          printf ("Processing Track: %d\n",track);
+          printf ("\nProcessing Track: %d\n",track);
           gAlice->ResetHits();
           Int_t nbytes += TH->GetEvent(track);
           if (RICH)  {
@@ -383,17 +383,17 @@ void RICHpadtest (Int_t diaglevel,Int_t evNumber1=0,Int_t evNumber2=0)
               }
           }
 
-          if(nrechits)
+          if(nrechits1D)
             {
-              for (Int_t hit=0;hit<nrechits;hit++) {
-                recHit = (AliRICHRecHit*) RecHits->UncheckedAt(hit);
-                Float_t r_omega = recHit->fOmega;                  // Cerenkov angle
-                Float_t r_theta = recHit->fTheta;                  // Theta angle of incidence
-                Float_t r_phi   = recHit->fPhi;                    // Phi angle if incidence
-                Float_t *cer_pho = recHit->fCerPerPhoton;        // Cerenkov angle per photon
-                Int_t *padsx = recHit->fPadsUsedX;           // Pads Used fo reconstruction (x)
-                Int_t *padsy = recHit->fPadsUsedY;           // Pads Used fo reconstruction (y)
-                Int_t goodPhotons = recHit->fGoodPhotons;    // Number of pads used for reconstruction
+              for (Int_t hit=0;hit<nrechits1D;hit++) {
+                recHit1D = (AliRICHRecHit1D*) RecHits1D->UncheckedAt(hit);
+                Float_t r_omega = recHit1D->fOmega;                  // Cerenkov angle
+                Float_t r_theta = recHit1D->fTheta;                  // Theta angle of incidence
+                Float_t r_phi   = recHit1D->fPhi;                    // Phi angle if incidence
+                Float_t *cer_pho = recHit1D->fCerPerPhoton;        // Cerenkov angle per photon
+                Int_t *padsx = recHit1D->fPadsUsedX;           // Pads Used fo reconstruction (x)
+                Int_t *padsy = recHit1D->fPadsUsedY;           // Pads Used fo reconstruction (y)
+                Int_t goodPhotons = recHit1D->fGoodPhotons;    // Number of pads used for reconstruction
                 
                 Omega->Fill(r_omega,(float) 1);
                 Theta->Fill(r_theta*180/TMath::Pi(),(float) 1);