/*
$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.
#include "AliMUONPoints.h"
#include "TParticle.h"
#include "AliMUONTriggerDecision.h"
+#include "AliHeader.h"
#include "AliMUONHit.h"
#include "AliMUONPadHit.h"
fPoints = 0;
fPhits = 0;
fRpoints = 0;
- fR2points = 0;
- fCpoints = 0;
fCanvas = 0;
fNextCathode = kFALSE;
fColPad = 0;
// 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
if (fRpoints) fRpoints->Delete();
delete fRpoints;
fRpoints = 0;
-//
- if (fR2points) fR2points->Delete();
- delete fR2points;
- fR2points = 0;
-//
- if (fCpoints) fCpoints->Delete();
- delete fCpoints;
- fCpoints = 0;
}
//_____________________________________________________________________________
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)
DrawClusters();
DrawHits();
DrawCoG();
- DrawCoG2();
// DrawSegmentation();
// add itself to the list (must be last)
AppendPad();
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();
response = iChamber->ResponseModel();
Float_t zpos = iChamber->Z();
- segmentation->Dump();
-
AliMUONDigit *mdig;
AliMUONPoints *points = 0;
TMarker3DBox *marker = 0;
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();
}
}
//___________________________________________
-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
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 &)
{