]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONSegmentationV01.cxx
Logging of Debug, Info and Error Messages follwing AliRoot Standard http://aliweb...
[u/mrichter/AliRoot.git] / MUON / AliMUONSegmentationV01.cxx
index f8b9f7228c68674fd371db0fd47041ce524c092e..9b9186236315dd9ea4ccccf0a8013ea6d7433e90 100644 (file)
 #include <TF1.h> 
 #include <TVector3.h> 
 #include <TObjArray.h>
-#include <Riostream.h>
 
 #include "AliMUONSegmentationV01.h"
 #include "AliMUON.h"
 #include "AliMUONChamber.h"
 #include "AliRun.h"
+#include "AliLog.h"
 
 
 
 //___________________________________________
 ClassImp(AliMUONSegmentationV01)
 
-  AliMUONSegmentationV01::AliMUONSegmentationV01(const AliMUONSegmentationV01& segmentation):AliMUONSegmentationV0(segmentation)
+AliMUONSegmentationV01::AliMUONSegmentationV01(const AliMUONSegmentationV01& segmentation)
+  : AliMUONSegmentationV0(segmentation)
 {
-// Dummy copy constructor
+// Protected copy constructor
+
+  AliFatal("Not implemented.");
 }
 
 AliMUONSegmentationV01::AliMUONSegmentationV01() 
+  : AliMUONSegmentationV0()
 {
 // Default constructor
     fRSec = 0;
     fNDiv = 0;      
     fDpxD = 0;
     fCorrA = 0;
+    fSector = -1;
 }
 
 AliMUONSegmentationV01::AliMUONSegmentationV01(Int_t nsec) 
+  : AliMUONSegmentationV0()
 {
 //  Non default constructor
 
@@ -71,6 +77,7 @@ AliMUONSegmentationV01::AliMUONSegmentationV01(Int_t nsec)
     fCorrA->AddAt(0,1);
     fCorrA->AddAt(0,2);
     fOffsetY=0;
+    fSector = -1;
 } 
 
 AliMUONSegmentationV01::~AliMUONSegmentationV01() 
@@ -133,6 +140,7 @@ void AliMUONSegmentationV01::Init(Int_t chamber)
 //  vice versa.
 //  This version approximates concentric segmentation zones
 //
+
     Int_t isec;
     //printf("\n Initialise Segmentation V01\n");
 
@@ -185,13 +193,18 @@ void AliMUONSegmentationV01::Init(Int_t chamber)
            }
        } // y-pad loop
     } // sector loop
+
 // reference to chamber
     AliMUON *pMUON  = (AliMUON *) gAlice->GetModule("MUON");
     fChamber=&(pMUON->Chamber(chamber));
+    fRmin=fChamber->RInner();
+    fRmax=fChamber->ROuter();    
+    fCorr=0;
     fZ = fChamber->Z();
     fId=chamber;
 }
 
+//______________________________________________________________________
 Int_t AliMUONSegmentationV01::Sector(Int_t ix, Int_t iy)
 {
 // Returns sector number for given pad position
@@ -207,6 +220,7 @@ Int_t AliMUONSegmentationV01::Sector(Int_t ix, Int_t iy)
     }
     return isec;
 }
+
 //______________________________________________________________________
 void AliMUONSegmentationV01::GetPadI(Float_t x, Float_t y, Int_t &ix, Int_t &iy)
 {
@@ -353,6 +367,11 @@ void AliMUONSegmentationV01::FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Fl
     fIx=fIxmin;
     fIy=fIymin;
     GetPadC(fIx,fIy,fX,fY);
+
+    // added 
+    if (fSector == -1) {
+      fSector=Sector(fIx,fIy);
+    }
 }
 
 
@@ -539,7 +558,7 @@ void AliMUONSegmentationV01::GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) co
     y[2]=x[2];
 }
 
-void AliMUONSegmentationV01::Draw(const char* opt) const
+void AliMUONSegmentationV01::Draw(const char* opt)
 {
  
 // Draws the segmentation zones
@@ -653,10 +672,15 @@ TF1* AliMUONSegmentationV01::CorrFunc(Int_t isec) const
     return (TF1*) fCorrA->At(isec);
 }
 
-AliMUONSegmentationV01& AliMUONSegmentationV01::operator 
-=(const AliMUONSegmentationV01 & /*rhs*/)
+AliMUONSegmentationV01& 
+AliMUONSegmentationV01::operator =(const AliMUONSegmentationV01 & rhs)
 {
-// Dummy assignment operator
-    return *this;
+// Protected assignement operator
+
+  if (this == &rhs) return *this;
+
+  AliFatal("Not implemented.");
+    
+  return *this;  
 }