The present commit corresponds to an important change in the way the
[u/mrichter/AliRoot.git] / TRD / AliTRDpropagationLayer.h
1 #ifndef ALITRDPROPAGATIONLAYER_H
2 #define ALITRDPROPAGATIONLAYER_H   
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */ 
6
7 /* $Id$ */
8
9 ////////////////////////////////////////////////////////////////////////////
10 //                                                                        //
11 //  The TRD propagation layer                                             //
12 //                                                                        //
13 ////////////////////////////////////////////////////////////////////////////
14
15 #ifndef ROOT_TObject
16 #include "TObject.h"
17 #endif
18
19 class AliTRDcluster;
20
21 class AliTRDpropagationLayer : public TObject
22 {       
23
24  public:        
25
26   enum { kMaxClusterPerTimeBin = 2300
27        , kZones                = 5    };
28         
29   AliTRDpropagationLayer();
30   AliTRDpropagationLayer(Double_t x, Double_t dx, Double_t rho
31                        , Double_t x0, Int_t tbIndex, Int_t plane);
32   AliTRDpropagationLayer(const AliTRDpropagationLayer &p);
33   virtual ~AliTRDpropagationLayer();
34   AliTRDpropagationLayer &operator=(const AliTRDpropagationLayer &/*p*/) { return *this; }
35
36   operator Int_t() const                                        { return fN;                    }
37   AliTRDcluster *operator[](Int_t i)                            { return fClusters[i];          }
38   virtual void Copy(TObject &o) const;
39         
40   void         SetZmax(Int_t cham, Double_t center, Double_t w) { fZc[cham]      = center;
41                                                                   fZmax[cham]    = w;           }
42   void         SetYmax(Double_t w, Double_t wsensitive)         { fYmax          = w;
43                                                                   fYmaxSensitive = wsensitive;  }
44
45   void         SetZ(Double_t* center, Double_t *w, Double_t *wsensitive);
46   void         SetHoles(Bool_t* holes);
47   //void         SetHole(Double_t Zmax, Double_t Ymax
48   //                   , Double_t rho = 1.29e-3, Double_t x0 = 36.66
49   //                   , Double_t Yc = 0.0, Double_t Zc = 0.0);
50   void         SetSector(const Int_t sec)                       { fSec           = sec;         }
51   void         SetX(Double_t x)                                 { fX             = x;           }
52         void         SetT0(Bool_t set = kTRUE) {SetBit(1, set);}
53         
54   Double_t     GetYmax() const                                  { return fYmax;                 }
55   Double_t     GetZmax(Int_t c) const                           { return fZmax[c];              }
56   Double_t     GetZc(Int_t c) const                             { return fZc[c];                }
57   UInt_t       GetIndex(Int_t i) const                          { return fIndex[i];             }
58   Double_t     GetX() const                                     { return fX;                    }
59   Double_t     GetdX() const                                    { return fdX;                   }
60   Int_t        GetTimeBinIndex() const                          { return fTimeBinIndex;         }
61   Int_t        GetPlane() const                                 { return fPlane;                }
62   Int_t        GetSector() const                                { return fSec;                  }
63
64   Bool_t       IsHole(Int_t zone) const                         { return fIsHole[zone];         }
65   Bool_t       IsSensitive() const                              { return (fTimeBinIndex >= 0) ? kTRUE : kFALSE;}
66         Bool_t       IsT0() const {return TestBit(1);}
67
68   void         Clear(const Option_t * /*o*/)                    { ; } 
69   void         Clear()                                          { for (Int_t i = 0; i < fN; i++) 
70                                                                     fClusters[i] = NULL;
71                                                                   fN = 0;                       }
72         
73   void         InsertCluster(AliTRDcluster *c, UInt_t index);
74   Int_t        Find(Float_t y) const;
75   Int_t        FindNearestCluster(Float_t y, Float_t z, Float_t maxroad, Float_t maxroadz) const;
76
77  protected:
78
79         Int_t         fN;                     // Number of clusters
80         Int_t         fSec;                   // Sector mumber
81         AliTRDcluster **fClusters;            //[fN] Array of pointers to clusters
82         UInt_t        *fIndex;                //[fN] Array of cluster indexes
83         Double_t      fX;                     // X coordinate of the middle plane
84         Double_t      fdX;                    // Radial thickness of the time bin
85         Double_t      fRho;                   // Default density of the material
86         Double_t      fX0;                    // Default radiation length
87         Int_t         fTimeBinIndex;          // Plane * F(local_tb)
88         Int_t         fPlane;                 // Plane number
89         Double_t      fZc[kZones];            // Z position of the center for 5 active areas
90         Double_t      fZmax[kZones];          // Half of active area length in Z
91         Double_t      fZmaxSensitive[kZones]; // Sensitive area for detection Z
92         Bool_t        fIsHole[kZones];        // Is hole in given sector
93         Double_t      fYmax;                  // Half of active area length in Y
94         Double_t      fYmaxSensitive;         // Half of active area length in Y
95         Bool_t        fHole;                  // kTRUE if there is a hole in the layer
96         Double_t      fHoleZc;                // Z of the center of the hole
97         Double_t      fHoleZmax;              // Half of the hole length in Z
98         Double_t      fHoleYc;                // Y of the center of the hole
99         Double_t      fHoleYmax;              // Half of the hole length in Y
100         Double_t      fHoleRho;               // Density of the gas in the hole
101         Double_t      fHoleX0;                // Radiation length of the gas in the hole
102
103         ClassDef(AliTRDpropagationLayer, 1)   // Propagation layer for TRD tracker
104
105 };
106
107 #endif 
108