]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RICH/AliRICHDisplay.cxx
AliRICHcluster chamber-sector adjastment
[u/mrichter/AliRoot.git] / RICH / AliRICHDisplay.cxx
index eff774d3a7eb27d4e9cbff58c077408a16a65669..8ff8656d9f410c961f345499090a5408c7d1229e 100644 (file)
@@ -63,9 +63,7 @@
 #include "AliRICHSDigit.h"
 #include "AliRICHDigit.h"
 #include "AliRICHRawCluster.h"
-#include "AliRICHRecHit1D.h"
-#include "AliRICHRecHit3D.h"
-#include "AliRICHEllipse.h"
+#include "AliMC.h"
 
 ClassImp(AliRICHDisplay)
     
@@ -613,7 +611,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);
@@ -790,128 +788,7 @@ void AliRICHDisplay::LoadCoG(Int_t chamber, Int_t cathode)
 //___________________________________________
 void AliRICHDisplay::LoadRecHits(Int_t chamber, Int_t cathode)
 {
-// Read rec. hits info 
-// Loop on all detectors
-
-   if (chamber > 6) return;
-
-   ///printf("Entering LoadRecHits\n");
-
-
-   AliRICH *pRICH  = (AliRICH*)gAlice->GetModule("RICH");
-   AliRICHChamber*  iChamber;
-
-   TClonesArray *pRICHrechits1D  = pRICH->RecHitsAddress1D(chamber);
-   //printf ("Chamber:%d\n", chamber);
-   if (pRICHrechits1D != 0)
-     {
-
-       //RICH->ResetRecHits();
-
-
-       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(.5);
-            points1D->SetParticle(-1);
-            points1D->SetHitIndex(-1);
-            points1D->SetTrackIndex(-1);
-            points1D->SetDigitIndex(-1);
-            Float_t  vectorLoc[3]={mRec1D->fX,5,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);
-            printf("Ring at x:%f, y:%f - Omega:%f rad, theta:%3.1f deg, phi:%3.1f deg\n",mRec1D->fX,mRec1D->fY,mRec1D->fOmega,mRec1D->fTheta*180/TMath::Pi(),mRec1D->fPhi*180/TMath::Pi());
-            printf("fEmissPoint:%f\n",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,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();         
-            //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);
-            printf("Ring at x:%f, y:%f - Omega:%f rad, theta:%3.1f deg, phi:%3.1f deg\n",mRec3D->fX,mRec3D->fY,mRec3D->fOmega,mRec3D->fTheta*180/TMath::Pi(),mRec3D->fPhi*180/TMath::Pi());
-            //ellipse->CerenkovRingDrawing(chamber,irec);
-            //ellipse->SetFillStyle(1001);
-            ellipse->CreatePoints(chamber);
-            ellipse->SetMarkerStyle(7);
-            ellipse->SetMarkerColor(42);
-            ellipse->SetMarkerSize(1);
-            ellipse->Draw();
-            //marker->SetRefObject((TObject*)points3D);
-            //points3D->Set3DMarker(0, marker); 
-          }
-        }
-     }
+  chamber++;cathode++;
 }
 //___________________________________________
 void AliRICHDisplay::LoadDigits()
@@ -1054,7 +931,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) {