#include "AliMUONTrack.h"
#include "AliMUONTrackParam.h"
-#include "AliSegmentation.h"
+#include "AliMUONGeometrySegmentation.h"
#include "AliMUONChamber.h"
#include "AliMUONConstants.h"
#include "AliMC.h"
void AliMUONDisplay::DrawSegmentation()
{
+ // to be re-written for new seg
// Draw graphical representation of segmenatation
// Attention: still experimental code
- Int_t icat=1;
+// Int_t icat=1;
- AliMUON *pMUON = (AliMUON*)gAlice->GetModule("MUON");
- AliMUONChamber* iChamber;
- AliSegmentation* seg;
- iChamber = &(pMUON->Chamber(fChamber));
- seg=iChamber->SegmentationModel(icat);
- Float_t zpos=iChamber->Z();
- Float_t r=iChamber->ROuter();
+// AliMUON *pMUON = (AliMUON*)gAlice->GetModule("MUON");
+// AliMUONChamber* iChamber;
+
+// AliSegmentation* seg;
+// iChamber = &(pMUON->Chamber(fChamber));
+// seg=iChamber->SegmentationModel(icat);
+
+// Float_t zpos=iChamber->Z();
+// Float_t r=iChamber->ROuter();
- TMarker3DBox *marker;
- if (icat == 1) {
- for (Int_t j=0; j<seg->Npy(); j++) {
- Float_t y0;
- y0=j*seg->Dpy()-seg->Dpy()/2.;
- for (seg->FirstPad(0.,y0,0,300,0.);
- seg->MorePads();
- seg->NextPad())
- {
- if (seg->ISector()==0) continue;
- Float_t x,y,z;
- seg->GetPadC(seg->Ix(), seg->Iy(), x, y, z);
- Float_t dpx=seg->Dpx(seg->ISector())/2;
- Float_t dpy=seg->Dpy(seg->ISector())/2;
- marker=new TMarker3DBox(x,y,zpos,dpx,dpy,0,0,0);
- marker->SetLineColor(seg->ISector()+1);
- marker->SetFillStyle(1001);
- marker->SetFillColor(0);
- marker->Draw();
- }
- }
- } else {
- for (Int_t j=0; j<250; j++) {
- Float_t x0=j*seg->Dpx();
- Float_t y0=TMath::Sqrt(r*r-x0*x0);
+// TMarker3DBox *marker;
+// if (icat == 1) {
+// for (Int_t j=0; j<seg->Npy(); j++) {
+// Float_t y0;
+// y0=j*seg->Dpy()-seg->Dpy()/2.;
+// for (seg->FirstPad(0.,y0,0,300,0.);
+// seg->MorePads();
+// seg->NextPad())
+// {
+// if (seg->ISector()==0) continue;
+// Float_t x,y,z;
+// seg->GetPadC(seg->Ix(), seg->Iy(), x, y, z);
+// Float_t dpx=seg->Dpx(seg->ISector())/2;
+// Float_t dpy=seg->Dpy(seg->ISector())/2;
+// marker=new TMarker3DBox(x,y,zpos,dpx,dpy,0,0,0);
+// marker->SetLineColor(seg->ISector()+1);
+// marker->SetFillStyle(1001);
+// marker->SetFillColor(0);
+// marker->Draw();
+// }
+// }
+// } else {
+// for (Int_t j=0; j<250; j++) {
+// Float_t x0=j*seg->Dpx();
+// Float_t y0=TMath::Sqrt(r*r-x0*x0);
- for (seg->FirstPad(x0,0,0,0,y0);
- seg->MorePads();
- seg->NextPad())
- {
- if (seg->ISector()==0) continue;
+// for (seg->FirstPad(x0,0,0,0,y0);
+// seg->MorePads();
+// seg->NextPad())
+// {
+// if (seg->ISector()==0) continue;
- Float_t x,y,z;
- seg->GetPadC(seg->Ix(), seg->Iy(), x, y, z);
- Float_t dpx=seg->Dpx(seg->ISector())/2;
- Float_t dpy=seg->Dpy(seg->ISector())/2;
- marker=new TMarker3DBox(x,y,zpos,dpx,dpy,0,0,0);
- marker->SetLineColor(seg->ISector()+1);
- marker->SetFillStyle(1001);
- marker->SetFillColor(0);
- marker->Draw();
- }
- }
- }
-}
+// Float_t x,y,z;
+// seg->GetPadC(seg->Ix(), seg->Iy(), x, y, z);
+// Float_t dpx=seg->Dpx(seg->ISector())/2;
+// Float_t dpy=seg->Dpy(seg->ISector())/2;
+// marker=new TMarker3DBox(x,y,zpos,dpx,dpy,0,0,0);
+// marker->SetLineColor(seg->ISector()+1);
+// marker->SetFillStyle(1001);
+// marker->SetFillColor(0);
+// marker->Draw();
+// }
+// }
+// }
+ }
//_____________________________________________________________________________
void AliMUONDisplay::DrawClusters()
void AliMUONDisplay::DrawView(Float_t theta, Float_t phi, Float_t psi)
{
// Draw a view of MUON clusters
- printf("\n Draw View\n");
+ AliInfo(" Draw View");
gPad->SetCursor(kWatch);
// gPad->SetFillColor(39);
AliMUON *pMUON = (AliMUON*)gAlice->GetModule("MUON");
AliMUONChamber* iChamber;
- AliSegmentation* segmentation;
-
+ AliMUONGeometrySegmentation* segmentation2 = 0x0;
+
GetMUONData()->SetTreeAddress("D");
TClonesArray *muonDigits = GetMUONData()->Digits(chamber-1);
iChamber = &(pMUON->Chamber(chamber-1));
- segmentation = iChamber->SegmentationModel(cathode);
+ segmentation2 = iChamber->SegmentationModel2(cathode);
+
Float_t zpos = iChamber->Z();
AliMUONDigit *mdig;
// get the center of the pad - add on x and y half of pad size
Float_t xpad, ypad, zpad;
- segmentation->GetPadC(mdig->PadX(), mdig->PadY(), xpad, ypad, zpad);
+ Int_t isec;
+ Float_t dpx, dpy;
+
+ Int_t detElemId = mdig->DetElemId();
+ segmentation2->GetPadC(detElemId, mdig->PadX(), mdig->PadY(), xpad, ypad, zpad);
+ isec = segmentation2->Sector(detElemId, mdig->PadX(), mdig->PadY());
+ dpx = segmentation2->Dpx(detElemId, isec)/2;
+ dpy = segmentation2->Dpy(detElemId, isec)/2;
- Int_t isec = segmentation->Sector(mdig->PadX(), mdig->PadY());
- Float_t dpx = segmentation->Dpx(isec)/2;
- Float_t dpy = segmentation->Dpy(isec)/2;
//
// segmentation->Dump();