* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-$Log$
-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.
-
-Revision 1.9 2001/01/23 18:58:19 hristov
-Initialisation of some pointers
-
-Revision 1.8 2000/10/06 09:09:01 morsch
-Pad colour according to z-position (slats).
-
-Revision 1.7 2000/10/02 21:28:09 fca
-Removal of useless dependecies via forward declarations
-
-Revision 1.6 2000/07/03 11:54:57 morsch
-AliMUONSegmentation and AliMUONHitMap have been replaced by AliSegmentation and AliHitMap in STEER
-The methods GetPadIxy and GetPadXxy of AliMUONSegmentation have changed name to GetPadI and GetPadC.
-
-Revision 1.5 2000/06/28 15:16:35 morsch
-(1) Client code adapted to new method signatures in AliMUONSegmentation (see comments there)
-to allow development of slat-muon chamber simulation and reconstruction code in the MUON
-framework. The changes should have no side effects (mostly dummy arguments).
-(2) Hit disintegration uses 3-dim hit coordinates to allow simulation
-of chambers with overlapping modules (MakePadHits, Disintegration).
-
-Revision 1.4 2000/06/27 09:46:57 morsch
-kMAXZOOM global constant now in AliMUONConstants
-
-Revision 1.3 2000/06/26 14:02:38 morsch
-Add class AliMUONConstants with MUON specific constants using static memeber data and access methods.
-
-Revision 1.2 2000/06/15 07:58:48 morsch
-Code from MUON-dev joined
-
-Revision 1.1.2.15 2000/06/14 14:37:53 morsch
-method Trigger() modified
-
-Revision 1.1.2.14 2000/06/09 21:57:09 morsch
-Bug in color scale diplay corrected.
-Most coding rule violations corrected.
-
-Revision 1.1.2.13 2000/05/02 11:57:27 morsch
-Coding rules RN3, RN13, RN17 violations corrected.
-
-Revision 1.1.2.12 2000/04/26 12:27:33 morsch
-Mods for trigger display (P. Crochet):
-- color code versus time for pad hits in trigger chambers
-- call to TriggerDecision corrected
-
-Revision 1.1.2.11 2000/04/26 09:04:46 morsch
-Obsolete cathode correlation related code removed.
-
-Revision 1.1.2.10 2000/04/19 19:43:47 morsch
-change NCH to kNCH as in AliMUON.h
-no more TreeC related methods
-
-Revision 1.1.2.9 2000/03/20 18:10:33 morsch
-Trigger method for "online" trigger decission added
-
-Revision 1.1.2.8 2000/02/23 10:12:01 morsch
-Dont't try to draw reconstructed hit coordinates for Trigger Chambers.
-General clean-up of commented code.
-
-Revision 1.1.2.7 2000/02/17 14:36:55 morsch
-Display of Trigger hits and clusters added.
-Displacement between clusters and hits has to be investigated and corrected ! (A.M.)
-
-Revision 1.1.2.6 2000/02/15 10:19:42 morsch
-Previous log messages included
-
-Revision 1.1.2.5 2000/02/15 10:09:09 morsch
-Log Message added
-
-Revision 1.1.2.4 2000/02/08 09:17:16 gosset
-One more improvement of MUON display:
-same zoom for both cathode planes in a chamber
-
-Revision 1.1.2.3 2000/02/07 15:37:21 gosset
-A few improvements of the MUON display:
-new buttons to change either chamber or cathode,
-added to the more complicated way
-(right mouse click and explicit filling of chamber and cathode)
-
-Revision 1.1.2.2 2000/02/04 10:57:34 gosset
-Z position of the chambers:
-it was the Z position of the stations;
-it is now really the Z position of the chambers.
- !!!! WARNING: THE CALLS TO "AliMUONChamber::SetZPOS"
- !!!! AND "AliMUONChamber::ZPosition"
- !!!! HAVE TO BE CHANGED TO "AliMUONChamber::"SetZ"
- !!!! AND "AliMUONChamber::Z"
-*/
+/* $Id$ */
//////////////////////////////////////////////////////////////////////////
// //
#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
Float_t dxtr = 0.15;
Float_t dytr = 0.45;
fTrigPad = new TPad("trigger", "range and mode pad",0,0,dxtr,dytr);
- fTrigPad->SetEditable(kFALSE);
fTrigPad->Draw();
fTrigPad->cd();
fTrigPad->SetFillColor(22);
AppendPad(); // append display object as last object to force selection
fCanvas->cd();
+ fTrigPad->SetEditable(kFALSE);
+ fButtons->SetEditable(kFALSE);
fCanvas->Update();
fNextCathode = kFALSE;
}
-AliMUONDisplay::AliMUONDisplay(const AliMUONDisplay & display)
+AliMUONDisplay::AliMUONDisplay(const AliMUONDisplay & display):AliDisplay(display)
{
// Dummy copy constructor
;
if (fRpoints) fRpoints->Delete();
delete fRpoints;
fRpoints = 0;
-//
- if (fR2points) fR2points->Delete();
- delete fR2points;
- fR2points = 0;
-//
- if (fCpoints) fCpoints->Delete();
- delete fCpoints;
- fCpoints = 0;
}
//_____________________________________________________________________________
fButtons = new TPad("buttons", "newpad",0,0.45,0.15,1);
- fButtons->SetEditable(kFALSE);
fButtons->Draw();
fButtons->SetFillColor(38);
fButtons->SetBorderSize(2);
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();
AliSegmentation* segmentation;
AliMUONResponse* response;
- TClonesArray *muonDigits = pMUON->DigitsAddress(chamber-1);
+ TClonesArray *muonDigits = pMUON->GetMUONData()->Digits(chamber-1);
if (muonDigits == 0) return;
- gAlice->ResetDigits();
+// gAlice->ResetDigits();
Int_t nent = 0;
- if (gAlice->TreeD()) {
- nent = (Int_t) gAlice->TreeD()->GetEntries();
+ if (pMUON->GetLoader()->TreeD()) {
+ nent = (Int_t) pMUON->GetLoader()->TreeD()->GetEntries();
printf(" entries %d \n", nent);
// gAlice->TreeD()->GetEvent(nent-2+cathode-1);
- gAlice->TreeD()->GetEvent(cathode-1);
+ pMUON->GetMUONData()->GetCathode(cathode-1);
}
Int_t ndigits = muonDigits->GetEntriesFast();
}
}
//___________________________________________
-void AliMUONDisplay::LoadCoG(Int_t chamber, Int_t cathode)
+void AliMUONDisplay::LoadCoG(Int_t chamber, Int_t /*cathode*/)
{
// Read raw clusters info and store x,y,z info in arrays fRpoints
// Loop on all detectors
AliMUON *pMUON = (AliMUON*)gAlice->GetModule("MUON");
AliMUONChamber* iChamber;
- TClonesArray *muonRawClusters = pMUON->RawClustAddress(chamber-1);
+ TClonesArray *muonRawClusters = pMUON->GetMUONData()->RawClusters(chamber-1);
if (muonRawClusters == 0) return;
- pMUON->ResetRawClusters();
+// pMUON->ResetRawClusters();
Int_t nent = 0;
if (gAlice->TreeR()) {
nent=(Int_t)gAlice->TreeR()->GetEntries();
- gAlice->TreeR()->GetEvent(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
iChamber = &(pMUON->Chamber(chamber-1));
Float_t zpos=iChamber->Z();
- Int_t ntracks = (Int_t)gAlice->TreeH()->GetEntries();
+ Int_t ntracks = (Int_t)pMUON->TreeH()->GetEntries(); //skowron
Int_t nthits = 0;
for (track = 0; track < ntracks; track++) {
gAlice->ResetHits();
- gAlice->TreeH()->GetEvent(track);
+ pMUON->TreeH()->GetEvent(track);//skowron
TClonesArray *muonHits = pMUON->Hits();
if (muonHits == 0) return;
nthits += muonHits->GetEntriesFast();
Int_t nhold=0;
for (track=0; track<ntracks;track++) {
gAlice->ResetHits();
- gAlice->TreeH()->GetEvent(track);
+ pMUON->TreeH()->GetEvent(track);//skowron
TClonesArray *muonHits = pMUON->Hits();
if (muonHits == 0) return;
Int_t nhits = muonHits->GetEntriesFast();
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 &)
{