ROOT logo
#ifndef ALIITSSEGMENTATION_H
#define ALIITSSEGMENTATION_H

#include <TObject.h>
#include "AliLog.h"
#include "AliITSgeom.h"

/* $Id$ */

//----------------------------------------------
//                                             -
// ITS  segmentation virtual base class        -
//                                             -
//----------------------------------------------
class TF1;
class AliITSsegmentation :
public TObject {
 public:
  AliITSsegmentation();
  AliITSsegmentation(const AliITSsegmentation& source);
  virtual ~AliITSsegmentation();
  AliITSsegmentation& operator=(const AliITSsegmentation &source);
    // Set Detector Segmentation Parameters
    //
    // Detector size  
    virtual void    SetDetSize(Float_t p1,Float_t p2,Float_t p3) 
                    {fDx=p1; fDz=p2; fDy=p3;}
    // Cell size   
    virtual void    SetPadSize(Float_t,Float_t) {MayNotUse("SetPadSize");}
    // Maximum number of cells along the two coordinates  
    virtual void    SetNPads(Int_t,Int_t) = 0;
    // Returns the maximum number of cells (digits) posible
    virtual Int_t   GetNPads() const = 0;
    // Set layer
    virtual void SetLayer(Int_t) {MayNotUse("SetLayer");}
    // Number of Chips
    virtual Int_t    GetNumberOfChips() const {MayNotUse("GetNumberOfChips"); return 0;}
    virtual Int_t    GetMaximumChipIndex() const {MayNotUse("GetNumberOfChips"); return 0;}
    // Chip number from local coordinates
    virtual Int_t    GetChipFromLocal(Float_t, Float_t) const {MayNotUse("GetChipFromLocal"); return 0;}
    virtual Int_t    GetChipsInLocalWindow(Int_t* /*array*/, Float_t /*zmin*/, Float_t /*zmax*/, Float_t /*xmin*/, Float_t /*xmax*/) const {MayNotUse("GetChipsInLocalWindow"); return 0;}
    // Chip number from channel number
    virtual Int_t    GetChipFromChannel(Int_t, Int_t) const {MayNotUse("GetChipFromChannel"); return 0;}

    // Transform from real to cell coordinates
    virtual void    GetPadIxz(Float_t,Float_t,Int_t &,Int_t &) const = 0;
    // Transform from cell to real coordinates
    virtual void    GetPadCxz(Int_t,Int_t,Float_t &,Float_t &) const = 0;
    // Local transformation of real local coordinates -
    virtual void    GetPadTxz(Float_t &,Float_t &) const = 0;
    // Transformation from Geant cm detector center local coordinates
    // to detector segmentation/cell coordiantes starting from (0,0).
    virtual Bool_t LocalToDet(Float_t,Float_t,Int_t &,Int_t &) const = 0;
    // Transformation from detector segmentation/cell coordiantes starting
    // from (0,0) to Geant cm detector center local coordinates.
    virtual void    DetToLocal(Int_t,Int_t,Float_t &,Float_t &) const = 0;
    // Initialisation
    virtual void Init() = 0;
    //
    // Get member data
    //
    // Detector length
    virtual Float_t Dx() const {return fDx;}
    // Detector width
    virtual Float_t Dz() const {return fDz;}
    // Detector thickness
    virtual Float_t Dy() const {return fDy;}
    // Cell size in x
    virtual Float_t Dpx(Int_t) const = 0;
    // Cell size in z 
    virtual Float_t Dpz(Int_t) const = 0;
    // Maximum number of Cells in x
    virtual Int_t    Npx() const = 0;
    // Maximum number of Cells in z
    virtual Int_t    Npz() const = 0;
    // Layer
    virtual Int_t GetLayer() const {MayNotUse("GetLayer"); return 0;}
    // Set hit position
    //    virtual void     SetHit(Float_t, Float_t) {}
    // angles
    virtual void Angles(Float_t& /* p */, Float_t& /* n */) const
                                          {MayNotUse("Angles");}

    //
    // Get next neighbours 
    virtual void Neighbours(Int_t,Int_t,Int_t*,Int_t[10],Int_t[10]) const
                     {MayNotUse("Neighbours");}

    // Function for systematic corrections
    // Set the correction function
    virtual void SetCorrFunc(TF1* fc) {fCorr = fc;}
    // Get the correction Function
    virtual TF1* CorrFunc() {return fCorr;}
    // Print Default parameters
    virtual void PrintDefaultParameters() const = 0;

 protected:

    virtual void Copy(TObject &obj) const;

    Float_t fDx;    //SPD: Full width of the detector (x axis)- microns
                    //SDD: Drift distance of the 1/2detector (x axis)-microns
                    //SSD: Full length of the detector (x axis)- microns
    Float_t fDz;    //SPD: Full length of the detector (z axis)- microns
                    //SDD: Full Length of the detector (z axis) - microns
                    //SSD: Full width of the detector (z axis)- microns
    Float_t fDy;    //SPD:  Full thickness of the detector (y axis) -um 
                    //SDD: Full thickness of the detector (y axis) - microns
                    //SSD: Full thickness of the detector (y axis) -um 
    TF1*       fCorr;   // correction function

    ClassDef(AliITSsegmentation,2) //Segmentation virtual base class 
};
#endif
 AliITSsegmentation.h:1
 AliITSsegmentation.h:2
 AliITSsegmentation.h:3
 AliITSsegmentation.h:4
 AliITSsegmentation.h:5
 AliITSsegmentation.h:6
 AliITSsegmentation.h:7
 AliITSsegmentation.h:8
 AliITSsegmentation.h:9
 AliITSsegmentation.h:10
 AliITSsegmentation.h:11
 AliITSsegmentation.h:12
 AliITSsegmentation.h:13
 AliITSsegmentation.h:14
 AliITSsegmentation.h:15
 AliITSsegmentation.h:16
 AliITSsegmentation.h:17
 AliITSsegmentation.h:18
 AliITSsegmentation.h:19
 AliITSsegmentation.h:20
 AliITSsegmentation.h:21
 AliITSsegmentation.h:22
 AliITSsegmentation.h:23
 AliITSsegmentation.h:24
 AliITSsegmentation.h:25
 AliITSsegmentation.h:26
 AliITSsegmentation.h:27
 AliITSsegmentation.h:28
 AliITSsegmentation.h:29
 AliITSsegmentation.h:30
 AliITSsegmentation.h:31
 AliITSsegmentation.h:32
 AliITSsegmentation.h:33
 AliITSsegmentation.h:34
 AliITSsegmentation.h:35
 AliITSsegmentation.h:36
 AliITSsegmentation.h:37
 AliITSsegmentation.h:38
 AliITSsegmentation.h:39
 AliITSsegmentation.h:40
 AliITSsegmentation.h:41
 AliITSsegmentation.h:42
 AliITSsegmentation.h:43
 AliITSsegmentation.h:44
 AliITSsegmentation.h:45
 AliITSsegmentation.h:46
 AliITSsegmentation.h:47
 AliITSsegmentation.h:48
 AliITSsegmentation.h:49
 AliITSsegmentation.h:50
 AliITSsegmentation.h:51
 AliITSsegmentation.h:52
 AliITSsegmentation.h:53
 AliITSsegmentation.h:54
 AliITSsegmentation.h:55
 AliITSsegmentation.h:56
 AliITSsegmentation.h:57
 AliITSsegmentation.h:58
 AliITSsegmentation.h:59
 AliITSsegmentation.h:60
 AliITSsegmentation.h:61
 AliITSsegmentation.h:62
 AliITSsegmentation.h:63
 AliITSsegmentation.h:64
 AliITSsegmentation.h:65
 AliITSsegmentation.h:66
 AliITSsegmentation.h:67
 AliITSsegmentation.h:68
 AliITSsegmentation.h:69
 AliITSsegmentation.h:70
 AliITSsegmentation.h:71
 AliITSsegmentation.h:72
 AliITSsegmentation.h:73
 AliITSsegmentation.h:74
 AliITSsegmentation.h:75
 AliITSsegmentation.h:76
 AliITSsegmentation.h:77
 AliITSsegmentation.h:78
 AliITSsegmentation.h:79
 AliITSsegmentation.h:80
 AliITSsegmentation.h:81
 AliITSsegmentation.h:82
 AliITSsegmentation.h:83
 AliITSsegmentation.h:84
 AliITSsegmentation.h:85
 AliITSsegmentation.h:86
 AliITSsegmentation.h:87
 AliITSsegmentation.h:88
 AliITSsegmentation.h:89
 AliITSsegmentation.h:90
 AliITSsegmentation.h:91
 AliITSsegmentation.h:92
 AliITSsegmentation.h:93
 AliITSsegmentation.h:94
 AliITSsegmentation.h:95
 AliITSsegmentation.h:96
 AliITSsegmentation.h:97
 AliITSsegmentation.h:98
 AliITSsegmentation.h:99
 AliITSsegmentation.h:100
 AliITSsegmentation.h:101
 AliITSsegmentation.h:102
 AliITSsegmentation.h:103
 AliITSsegmentation.h:104
 AliITSsegmentation.h:105
 AliITSsegmentation.h:106
 AliITSsegmentation.h:107
 AliITSsegmentation.h:108
 AliITSsegmentation.h:109
 AliITSsegmentation.h:110
 AliITSsegmentation.h:111
 AliITSsegmentation.h:112
 AliITSsegmentation.h:113
 AliITSsegmentation.h:114