]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSConTableDB.h
updating
[u/mrichter/AliRoot.git] / PHOS / AliPHOSConTableDB.h
1 #ifndef ALIPHOSCONTABLEDB_H
2 #define ALIPHOSCONTABLEDB_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 //_________________________________________________________________________
9 //  Class for PHOS connection table, i.e. correspondence between 
10 //  "cable number" and PHOS AbsId number.
11 //                  
12 //*-- Author: D.Peressounko "RRC Kurchatov Institute"
13
14
15 // --- ROOT system ---
16 #include "TNamed.h"
17 class TArrayS ;
18
19 // --- Standard library ---
20
21 // --- AliRoot header files ---
22 class AliPHOSGeometry ;
23
24 class AliPHOSConTableDB: public TNamed {
25
26 public:
27   AliPHOSConTableDB() ;          // ctor
28   AliPHOSConTableDB(const char * title) ;          // ctor
29
30   AliPHOSConTableDB(const AliPHOSConTableDB & cdb) ;   // cpy ctor
31   virtual ~AliPHOSConTableDB() ; // dtor
32
33   //Calculate table from known number of raws/columns 
34   //assuming that prototype is situated in the center of 3 PHOS mod.
35   void BuildDB(void) ;
36   Int_t GetNchanels()const {return fNcrInProto ; } 
37   Int_t GetNRaws()const{return fProtoRaws ;} 
38   Int_t GetNColumns()const{return fProtoColumns ;}
39
40   //set the number of columns in prototype
41   void SetNCols(Int_t ncolumns){fProtoColumns = ncolumns ;}
42   //Set the number of raw in prototype
43   void SetNRaws(Int_t nraws){fProtoRaws = nraws ;}
44
45   //Plot correspondance between Prototype Id and PHOS
46   //Options are "Zoom" - only proto region is plotted
47   //            "PHOS" - presents both PHOS and Proto ids
48   void PlotProtoMap(Option_t * opt="Zoom") ; 
49
50   //Transforms channel number in prototype into AbsId number in PHOS
51   Int_t Raw2AbsId(Int_t raw)const ;
52
53   //Transforms AbsId number in PHOS into channel number in prototype 
54   Int_t AbsId2Raw(Int_t AbsId)const ;
55
56   virtual void Print() const ;
57
58
59   AliPHOSConTableDB& operator=(const AliPHOSConTableDB& cdb) ;
60
61 private:
62   AliPHOSGeometry * fGeom ;   //! PHOS geometry class
63
64   Int_t     fProtoRaws ;        //  Parameters
65   Int_t     fProtoColumns ;     //  used to calculate
66   Int_t     fRawOffset ;        //  correspondance
67   Int_t     fColOffset ;        //  map
68   Int_t     fNcrInProto ;       //Number of channels in prototype
69   Int_t     fMinAbsId ;         //Minimal AbsId, corresponding to some prototype cristall.
70   Int_t     fMaxAbsId ;         //Maximal AbsId, corresponding to some prototype cristall
71   TArrayS * fAbsIdMap ;         //Map of correspondance between Raw and PHOS ID
72   TArrayS * fRawIdMap ;         //Map of correspondance between AbsId and Raw
73
74   ClassDef(AliPHOSConTableDB,1)  // description 
75
76
77 };
78
79 #endif // AliPHOSCONTABLEDB_H