]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONDisplay.cxx
New files for folders and Stack
[u/mrichter/AliRoot.git] / MUON / AliMUONDisplay.cxx
index 0796e41c2a5f9840080f8ad2ea6fa7c3565547ca..a1a8592ff61e17078d723b86dfd295315ea99dda 100644 (file)
 
 /*
 $Log$
+Revision 1.14  2001/04/05 08:30:48  gosset
+Cleaning: suppression of Cpoints and (R2points + CoG2)
+Correction: TreeR->GetEvent(0) for raw clusters
+
+Revision 1.13  2001/03/30 13:01:50  gosset
+Centroid of raw clusters displayed for each cathode plane
+
+Revision 1.12  2001/03/05 23:50:08  morsch
+Correct access to digit and recpoint data.
+
+Revision 1.11  2001/01/26 21:41:55  morsch
+Use access functions to AliMUONDigit member data.
+
 Revision 1.10  2001/01/25 20:41:56  morsch
 Protect against empty TreeD and TreeR.
 
@@ -146,6 +159,7 @@ it is now really the Z position of the chambers.
 #include "AliMUONPoints.h"
 #include "TParticle.h"
 #include "AliMUONTriggerDecision.h"
+#include "AliHeader.h"
 
 #include "AliMUONHit.h"
 #include "AliMUONPadHit.h"
@@ -170,8 +184,6 @@ AliMUONDisplay::AliMUONDisplay()
     fPoints = 0;
     fPhits = 0;
     fRpoints = 0;
-    fR2points = 0;
-    fCpoints = 0;
     fCanvas = 0;
     fNextCathode = kFALSE; 
     fColPad = 0;
@@ -246,15 +258,12 @@ AliMUONDisplay::AliMUONDisplay(Int_t size)
     //   fRzone   = 1.e10;
     fDrawClusters  = kTRUE;
     fDrawCoG       = kTRUE;
-    fDrawCoG  = kTRUE;
     fZoomMode      = 1;
     fZooms         = 0;
     fClustersCuts  = 0;
     fPoints        = 0;
     fPhits         = 0;
     fRpoints       = 0;
-    fR2points = 0;
-    fCpoints = 0;
     // Create colors
     CreateColors();
     // Create display canvas
@@ -343,14 +352,6 @@ AliMUONDisplay::~AliMUONDisplay()
     if (fRpoints) fRpoints->Delete();
     delete fRpoints;
     fRpoints     = 0;
-//
-    if (fR2points) fR2points->Delete();
-    delete fR2points;
-    fR2points     = 0;
-//
-    if (fCpoints) fCpoints->Delete();
-    delete fCpoints;
-    fCpoints     = 0;
 }
 
 //_____________________________________________________________________________
@@ -711,32 +712,6 @@ void AliMUONDisplay::DrawCoG()
        pm->Draw();
     }
 }
-void AliMUONDisplay::DrawCoG2()
-{
-//    Draw hits for MUON chambers
-
-    if (!fDrawCoG) return;
-    if (fChamber > 10) return;  
-
-    if (fCathode==1) {
-       LoadCoG2(fChamber,2);
-    } else if (fCathode==2) {
-       LoadCoG2(fChamber,1);
-    }
-
-    Int_t ncog, icog;
-    TObjArray *points;
-    AliMUONPoints *pm;
-    
-    points = R2points();
-    if (!points) return;
-    ncog = points->GetEntriesFast();
-    for (icog=0;icog<ncog;icog++) {
-       pm = (AliMUONPoints*)points->UncheckedAt(icog);
-       if (!pm) continue;
-       pm->Draw();
-    }
-}
 //_____________________________________________________________________________
 
 void AliMUONDisplay::DrawTitle(Option_t *option)
@@ -814,7 +789,6 @@ void AliMUONDisplay::DrawView(Float_t theta, Float_t phi, Float_t psi)
     DrawClusters();
     DrawHits();
     DrawCoG();
-    DrawCoG2();
 //     DrawSegmentation();
     // add itself to the list (must be last)
     AppendPad();
@@ -915,9 +889,10 @@ void AliMUONDisplay::LoadDigits(Int_t chamber, Int_t cathode)
     Int_t nent = 0;
  
    if (gAlice->TreeD()) {
-       nent = (Int_t) gAlice->TreeD()->GetEntries();
-       printf(" entries %d \n", nent);
-       gAlice->TreeD()->GetEvent(cathode-1);
+     nent = (Int_t) gAlice->TreeD()->GetEntries();
+     printf(" entries %d \n", nent);
+     //     gAlice->TreeD()->GetEvent(nent-2+cathode-1);
+     gAlice->TreeD()->GetEvent(cathode-1);
     }
     
     Int_t ndigits = muonDigits->GetEntriesFast();
@@ -930,8 +905,6 @@ void AliMUONDisplay::LoadDigits(Int_t chamber, Int_t cathode)
     response     = iChamber->ResponseModel();
     Float_t zpos = iChamber->Z();
 
-    segmentation->Dump();
-    
     AliMUONDigit  *mdig;
     AliMUONPoints *points  = 0;
     TMarker3DBox  *marker  = 0;
@@ -1028,7 +1001,7 @@ void AliMUONDisplay::LoadCoG(Int_t chamber, Int_t cathode)
     Int_t nent = 0;
     if (gAlice->TreeR()) {
        nent=(Int_t)gAlice->TreeR()->GetEntries();
-       gAlice->TreeR()->GetEvent(nent-2+cathode-1);
+       gAlice->TreeR()->GetEvent(0);
     }
     
     Int_t nrawcl = muonRawClusters->GetEntriesFast();
@@ -1056,54 +1029,6 @@ void AliMUONDisplay::LoadCoG(Int_t chamber, Int_t cathode)
     }
 }
 //___________________________________________
-void AliMUONDisplay::LoadCoG2(Int_t chamber, Int_t cathode)
-{
-// Read raw clusters info and store x,y,z info in arrays fRpoints
-// Loop on all detectors
-
-    if (chamber > 10) return;
-
-    ResetR2points();
-
-    AliMUON *pMUON  = (AliMUON*)gAlice->GetModule("MUON");
-    AliMUONChamber*  iChamber;
-    
-    TClonesArray *muonRawClusters  = pMUON->RawClustAddress(chamber-1);
-    if (muonRawClusters == 0) return;
-    
-    pMUON->ResetRawClusters();
-    
-    Int_t nent = 0;
-    if (gAlice->TreeR()) {
-       nent=(Int_t)gAlice->TreeR()->GetEntries();
-       gAlice->TreeR()->GetEvent(nent-2+cathode-1);
-    }
-    
-    Int_t nrawcl = muonRawClusters->GetEntriesFast();
-    if (nrawcl == 0) return;
-    if (fR2points == 0) fR2points = new TObjArray(nrawcl);
-    
-    iChamber = &(pMUON->Chamber(chamber-1));
-    Float_t zpos=iChamber->Z();  
-    AliMUONRawCluster  *mRaw;
-    AliMUONPoints *points = 0;
-    //
-    //loop over all raw clusters and store their position
-    points = new AliMUONPoints(nrawcl);
-    for (Int_t iraw=0;iraw<nrawcl;iraw++) {
-       mRaw   = (AliMUONRawCluster*)muonRawClusters->UncheckedAt(iraw);
-       fR2points->AddAt(points,iraw);
-        points->SetMarkerColor(51);
-        points->SetMarkerStyle(4);
-        points->SetMarkerSize(1.3);
-        points->SetParticle(-1);
-        points->SetHitIndex(-1);
-        points->SetTrackIndex(-1);
-        points->SetDigitIndex(-1);
-        points->SetPoint(iraw,mRaw->fX[0],mRaw->fY[0],zpos);
-   }
-}
-//___________________________________________
 void AliMUONDisplay::LoadHits(Int_t chamber)
 {
 // Read hits info and store x,y,z info in arrays fPhits
@@ -1360,31 +1285,6 @@ void AliMUONDisplay::ResetRpoints()
        fRpoints = 0;
     }
 }
-//_____________________________________________________________________________
-void AliMUONDisplay::ResetR2points()
-{
-  //
-  // Reset array of points
-  //
-    if (fR2points) {
-       fR2points->Delete();
-       delete fR2points;
-       fR2points = 0;
-    }
-}
-//_____________________________________________________________________________
-void AliMUONDisplay::ResetCpoints()
-{
-    //
-    // Reset array of points
-    //
-  if (fCpoints) {
-      fCpoints->Delete();
-      delete fCpoints;
-      fCpoints = 0;
-  }
-}
-
 
 AliMUONDisplay & AliMUONDisplay::operator = (const AliMUONDisplay &)
 {