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 */
8 //_________________________________________________________________________
9 // Class for PHOS connection table, i.e. correspondence between
10 // "cable number" and PHOS AbsId number.
12 //*-- Author: D.Peressounko "RRC Kurchatov Institute"
15 // --- ROOT system ---
19 // --- Standard library ---
21 // --- AliRoot header files ---
22 class AliPHOSGeometry ;
24 class AliPHOSConTableDB: public TNamed {
27 AliPHOSConTableDB() ; // ctor
28 AliPHOSConTableDB(const char * title) ; // ctor
30 AliPHOSConTableDB(const AliPHOSConTableDB & cdb) ; // cpy ctor
31 virtual ~AliPHOSConTableDB() ; // dtor
33 //Calculate table from known number of raws/columns
34 //assuming that prototype is situated in the center of 3 PHOS mod.
36 Int_t GetNchanels()const {return fNcrInProto ; }
37 Int_t GetNRaws()const{return fProtoRaws ;}
38 Int_t GetNColumns()const{return fProtoColumns ;}
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 ;}
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") ;
50 //Transforms channel number in prototype into AbsId number in PHOS
51 Int_t Raw2AbsId(Int_t raw)const ;
53 //Transforms AbsId number in PHOS into channel number in prototype
54 Int_t AbsId2Raw(Int_t AbsId)const ;
56 virtual void Print() const ;
59 AliPHOSConTableDB& operator=(const AliPHOSConTableDB& cdb) ;
62 AliPHOSGeometry * fGeom ; //! PHOS geometry class
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
74 ClassDef(AliPHOSConTableDB,1) // description
79 #endif // AliPHOSCONTABLEDB_H