MC-dependent part of AliRun extracted in AliMC (F.Carminati)
[u/mrichter/AliRoot.git] / RICH / AliRICHDisplay.cxx
index 4db3622..4d67d34 100644 (file)
@@ -64,7 +64,7 @@
 #include "AliRICHDigit.h"
 #include "AliRICHRawCluster.h"
 #include "AliRICHRecHit1D.h"
-#include "AliRICHRecHit3D.h"
+#include "AliMC.h"
 
 ClassImp(AliRICHDisplay)
     
@@ -612,7 +612,7 @@ void AliRICHDisplay::DrawTitle(Option_t *option)
        sprintf(ptitle,"Alice event: %d, Run:%d",
                gAlice->GetHeader()->GetEvent(), gAlice->GetHeader()->GetRun());
        title->AddText(ptitle);
-       Int_t nparticles = gAlice->Particles()->GetEntriesFast();
+       Int_t nparticles = gAlice->GetMCApp()->Particles()->GetEntriesFast();
        sprintf(ptitle,"Nparticles = %d Nhits = %d Npads fired = %d",
                nparticles, fHitsCuts,fClustersCuts);
        title->AddText(ptitle);
@@ -840,50 +840,6 @@ void AliRICHDisplay::LoadRecHits(Int_t chamber, Int_t cathode)
         }
      }
 
-   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;
-          //
-          //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,5,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();         
-            //marker->SetRefObject((TObject*)points3D);
-            //points3D->Set3DMarker(0, marker); 
-          }
-        }
-     }
 }
 //___________________________________________
 void AliRICHDisplay::LoadDigits()
@@ -1026,7 +982,7 @@ void AliRICHDisplay::LoadHits(Int_t chamber)
            points = new AliRICHPoints(1);
            fPhits->AddAt(points,npoints);
             mHit = (AliRICHhit*)pRICHhits->UncheckedAt(hit);
-           TParticle *current = (TParticle*)gAlice->Particle(mHit->Track());
+           TParticle *current = (TParticle*)gAlice->GetMCApp()->Particle(mHit->Track());
            if (current->GetPdgCode() == 50000050) {
                points->SetMarkerColor(kBlue);
            } else if (current->GetPdgCode() == 50000051) {