]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONSegmentation.h
removing unneeded include
[u/mrichter/AliRoot.git] / MUON / AliMUONSegmentation.h
index 8f7bb53cb02511681462c641a590cec6c906f84f..80ee5d546508ea9d02c513217b6edaeff61f56e2 100644 (file)
-#ifndef ALIMUONSEGMENTATION_H
-#define ALIMUONSEGMENTATION_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-/* $Id$ */
+// $Id$
 
-#include "TObject.h"
+/// \ingroup geometry
+/// \class AliMUONSegmentation
+/// \brief Container class for modules segmentations
+///
+/// It provides access to DE segmentations based on the
+/// old AliSegmentation interface:
+/// - DE segmentation (operating in local DE reference frame)
+/// - module segmentation (operating in global reference frame)
+///
+/// As some detection elements are sharing the same objects
+/// (AliMUONVGeometryDESegmentation),
+/// all segmentations objects have to be always deleted
+/// altogether via deleting this container object. 
+/// 
+/// \author Ivana Hrivnacova, IPN Orsay
 
-class TF1;
-class AliMUONChamber;
-class AliMUONRecCluster;
+#ifndef ALI_MUON_SEGMENTATION_H
+#define ALI_MUON_SEGMENTATION_H
+
+#include <TObject.h>
+#include <TGeoMatrix.h>
+
+class TObjArray;
+
+class AliMpVSegmentation;
+
+class AliMUONGeometrySegmentation;
+class AliMUONVGeometryDESegmentation;
+
+class AliMUONSegmentation : public TObject
+{
+  public:
+    AliMUONSegmentation(Int_t nofModules);
+    AliMUONSegmentation();
+    virtual  ~AliMUONSegmentation();
+    
+    // methods
+    void  AddDESegmentation(AliMUONVGeometryDESegmentation* segmentation);
+
+    void  AddModuleSegmentation(Int_t moduleId, Int_t cathod,
+                            AliMUONGeometrySegmentation* segmentation);
+    void  Init();
+            // This function should not be needed;
+           // the segmentations should be built in a valid state
+           // To be revised                        
 
-//----------------------------------------------
-//
-// Chamber segmentation virtual base class
-//
-class AliMUONSegmentation :
-public TObject {
- public:
-    // Set Chamber Segmentation Parameters
-    //
-    // Pad size Dx*Dy 
-    virtual void    SetPadSize(Float_t p1, Float_t p2)  =0;
-    // Anod Pitch
-    virtual void    SetDAnod(Float_t D)                =0;
-    // Transform from pad (wire) to real coordinates and vice versa
-    //
-    // Anod wire coordinate closest to xhit
-    virtual Float_t GetAnod(Float_t xhit)              =0;
-    // Transform from pad to real coordinates
-    virtual void    GetPadIxy(Float_t x ,Float_t y ,Int_t   &ix,Int_t   &iy)=0;
-    // Transform from real to pad coordinates
-    virtual void    GetPadCxy(Int_t   ix,Int_t   iy,Float_t &x ,Float_t &y )=0;
-    //
-    // Initialisation
-    virtual void Init(AliMUONChamber*)                 =0;
     //
-    // Get member data
+    // get methods
     //
-    // Pad size in x
-    virtual Float_t Dpx()                              =0;
-    // Pad size in y 
-    virtual Float_t Dpy()                              =0;
-    // Pad size in x by Sector 
-    virtual Float_t Dpx(Int_t)                         =0;
-    // Pad size in y by Sector 
-    virtual Float_t Dpy(Int_t)                         =0;
-    // Maximum number of Pads in x
-    virtual Int_t    Npx()                             =0;
-    // Maximum number of Pads in y
-    virtual Int_t    Npy()                             =0;
-    // Set pad position
-    virtual void     SetPad(Int_t, Int_t)              =0;
-    // Set hit position
-    virtual void     SetHit(Float_t, Float_t)          =0;
     
+    // Geometry segmentations
     //
-    // Iterate over pads
-    // Initialiser
-    virtual void  FirstPad(Float_t xhit, Float_t yhit, Float_t dx, Float_t dy) =0;
-    // Stepper
-    virtual void  NextPad()                            =0;
-    // Condition
-    virtual Int_t MorePads()                           =0;
-    //
-    // Distance between 1 pad and a position
-    virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY, Float_t X, Float_t Y, Int_t *dummy) =0;
-    // Number of pads read in parallel and offset to add to x 
-    // (specific to LYON, but mandatory for display)
-    virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
-                                      Int_t *Nparallel, Int_t *Offset) =0;
-    // Get next neighbours 
-    virtual void Neighbours
-       (Int_t iX, Int_t iY, Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10])     =0;
+
+    AliMUONGeometrySegmentation* GetModuleSegmentationByDEId(
+                     Int_t detElemId, Int_t cathod, Bool_t warn = true) const;
+
+    // DE segmentations
     //
-    // Current pad cursor during disintegration
-    // x-coordinate
-    virtual Int_t  Ix()                                =0;
-    // y-coordinate
-    virtual Int_t  Iy()                                =0;
-    // current sector
-    virtual Int_t  ISector()                           =0;
-    // calculate sector from pad coordinates
-    virtual Int_t  Sector(Int_t ix, Int_t iy)          =0;
+    const AliMUONVGeometryDESegmentation* GetDESegmentation(
+                     Int_t detElemId, Int_t cathod, Bool_t warn = true) const;
+
+                        
+    // DE properties
     //
-    // Signal Generation Condition during Stepping
-    virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z) = 0;
-    // Initialise signal generation at coord (x,y,z)
-    virtual void  SigGenInit(Float_t x, Float_t y, Float_t z) = 0;
-    // Current integration limits 
-    virtual void  IntegrationLimits
-       (Float_t& x1, Float_t& x2, Float_t& y1, Float_t& y2)  = 0;
-    // Test points for auto calibration
-    virtual void GiveTestPoints(Int_t &n, Float_t *x, Float_t *y) = 0;
-    // Draw the segmentation zones
-    virtual void Draw()                                           = 0;
-    // Function for systematic corrections
-    // Set the correction function
-    virtual void SetCorrFunc(Int_t, TF1*)                         = 0;
-    // Get the correction Function
-    virtual TF1* CorrFunc(Int_t)                                  = 0;
-           
-    ClassDef(AliMUONSegmentation,1) //Segmentation virtual base class 
+    Bool_t   HasDE(Int_t detElemId, Int_t cathod = 0) const;
+    TString  GetDEName(Int_t detElemId, Int_t cathod = 0) const;
+
+  protected:
+    AliMUONSegmentation(const AliMUONSegmentation& right);
+    AliMUONSegmentation&  operator = (const AliMUONSegmentation& right);
+     
+  private:
+    AliMUONGeometrySegmentation* GetModuleSegmentation(
+                     Int_t moduleId, Int_t cathod, Bool_t warn = true) const;
+
+    // data members
+    TObjArray*  fDESegmentations;        ///< array of DE segmentations
+    TObjArray*  fModuleSegmentations[2]; ///< \brief array of module segmentations
+                                         /// for two cathods         
+  ClassDef(AliMUONSegmentation,2)  // Container class for module segmentations
 };
-#endif
+
+#endif //ALI_MUON_SEGMENTATION_H
+
+
+
+
+
+
+