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 /* History of cvs commits:
13 //_________________________________________________________________________
14 // Class for PHOS connection table, i.e. correspondence between
15 // "cable number" and PHOS AbsId number.
17 //*-- Author: D.Peressounko "RRC Kurchatov Institute"
20 // --- ROOT system ---
24 // --- Standard library ---
26 // --- AliRoot header files ---
27 class AliPHOSGeometry ;
29 class AliPHOSConTableDB: public TNamed {
32 AliPHOSConTableDB() ; // ctor
33 AliPHOSConTableDB(const char * title) ; // ctor
35 AliPHOSConTableDB(const AliPHOSConTableDB & cdb) ; // cpy ctor
36 virtual ~AliPHOSConTableDB() ; // dtor
38 //Calculate table from known number of raws/columns
39 //assuming that prototype is situated in the center of 3 PHOS mod.
41 Int_t GetNchanels()const {return fNcrInProto ; }
42 Int_t GetNRaws()const{return fProtoRaws ;}
43 Int_t GetNColumns()const{return fProtoColumns ;}
45 //set the number of columns in prototype
46 void SetNCols(Int_t ncolumns){fProtoColumns = ncolumns ;}
47 //Set the number of raw in prototype
48 void SetNRaws(Int_t nraws){fProtoRaws = nraws ;}
50 //Plot correspondance between Prototype Id and PHOS
51 //Options are "Zoom" - only proto region is plotted
52 // "PHOS" - presents both PHOS and Proto ids
53 void PlotProtoMap(Option_t * opt="Zoom") ;
55 //Transforms channel number in prototype into AbsId number in PHOS
56 Int_t Raw2AbsId(Int_t raw)const ;
58 //Transforms AbsId number in PHOS into channel number in prototype
59 Int_t AbsId2Raw(Int_t AbsId)const ;
61 virtual void Print(const Option_t * = "") const ;
64 AliPHOSConTableDB& operator=(const AliPHOSConTableDB& cdb) ;
67 AliPHOSGeometry * fGeom ; //! PHOS geometry class
69 Int_t fProtoRaws ; // Parameters
70 Int_t fProtoColumns ; // used to calculate
71 Int_t fRawOffset ; // correspondance
72 Int_t fColOffset ; // map
73 Int_t fNcrInProto ; //Number of channels in prototype
74 Int_t fMinAbsId ; //Minimal AbsId, corresponding to some prototype cristall.
75 Int_t fMaxAbsId ; //Maximal AbsId, corresponding to some prototype cristall
76 TArrayS * fAbsIdMap ; //Map of correspondance between Raw and PHOS ID
77 TArrayS * fRawIdMap ; //Map of correspondance between AbsId and Raw
79 ClassDef(AliPHOSConTableDB,1) // description
84 #endif // AliPHOSCONTABLEDB_H