]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDpropagationLayer.h
Fix compiler warnings
[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   ~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         
53   Double_t     GetYmax() const                                  { return fYmax;                 }
54   Double_t     GetZmax(Int_t c) const                           { return fZmax[c];              }
55   Double_t     GetZc(Int_t c) const                             { return fZc[c];                }
56   UInt_t       GetIndex(Int_t i) const                          { return fIndex[i];             }
57   Double_t     GetX() const                                     { return fX;                    }
58   Double_t     GetdX() const                                    { return fdX;                   }
59   Int_t        GetTimeBinIndex() const                          { return fTimeBinIndex;         }
60   Int_t        GetPlane() const                                 { return fPlane;                }
61   Int_t        GetSector() const                                { return fSec;                  }
62
63   Bool_t       IsHole(Int_t zone) const                         { return fIsHole[zone];         }
64   Bool_t       IsSensitive() const                              { return (fTimeBinIndex >= 0) ? kTRUE : kFALSE;}
65
66   void         Clear(const Option_t * /*o*/)                    { ; } 
67   void         Clear()                                          { for (Int_t i = 0; i < fN; i++) 
68                                                                     fClusters[i] = NULL;
69                                                                   fN = 0;                       }
70         
71   void         InsertCluster(AliTRDcluster *c, UInt_t index);
72   Int_t        Find(Float_t y) const;
73   Int_t        FindNearestCluster(Float_t y, Float_t z, Float_t maxroad, Float_t maxroadz) const;
74
75  protected:
76
77         Int_t         fN;                     // Number of clusters
78         Int_t         fSec;                   // Sector mumber
79         AliTRDcluster **fClusters;            //[fN] Array of pointers to clusters
80         UInt_t        *fIndex;                //[fN] Array of cluster indexes
81         Double_t      fX;                     // X coordinate of the middle plane
82         Double_t      fdX;                    // Radial thickness of the time bin
83         Double_t      fRho;                   // Default density of the material
84         Double_t      fX0;                    // Default radiation length
85         Int_t         fTimeBinIndex;          // Plane * F(local_tb)
86         Int_t         fPlane;                 // Plane number
87         Double_t      fZc[kZones];            // Z position of the center for 5 active areas
88         Double_t      fZmax[kZones];          // Half of active area length in Z
89         Double_t      fZmaxSensitive[kZones]; // Sensitive area for detection Z
90         Bool_t        fIsHole[kZones];        // Is hole in given sector
91         Double_t      fYmax;                  // Half of active area length in Y
92         Double_t      fYmaxSensitive;         // Half of active area length in Y
93         Bool_t        fHole;                  // kTRUE if there is a hole in the layer
94         Double_t      fHoleZc;                // Z of the center of the hole
95         Double_t      fHoleZmax;              // Half of the hole length in Z
96         Double_t      fHoleYc;                // Y of the center of the hole
97         Double_t      fHoleYmax;              // Half of the hole length in Y
98         Double_t      fHoleRho;               // Density of the gas in the hole
99         Double_t      fHoleX0;                // Radiation length of the gas in the hole
100
101         ClassDef(AliTRDpropagationLayer, 1)   // Propagation layer for TRD tracker
102
103 };
104
105 #endif 
106