Bug in evaluation absId fixed
[u/mrichter/AliRoot.git] / PHOS / AliPHOSConTableDB.h
CommitLineData
f74edaba 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// Base Class for PHOS
10//
11//*-- Author: (SUBATECH)
12
13
14// --- ROOT system ---
15#include "TNamed.h"
16class TArrayS ;
17
18// --- Standard library ---
19
20// --- AliRoot header files ---
21class AliPHOSGeometry ;
22
23class AliPHOSConTableDB: public TNamed {
24
25public:
26 AliPHOSConTableDB() ; // ctor
27 AliPHOSConTableDB(const char * title) ; // ctor
28 virtual ~AliPHOSConTableDB() ; // dtor
29
30 //Calculate table from known numbe of raws/columns
31 //assuming that prototype is situated in the center of 3 PHOS mod.
32 void BuildDB(void) ;
503394a6 33 Int_t GetNchanels(){return fNcrInProto ; }
34 Int_t GetNRaws(){return fProtoRaws ;}
35 Int_t GetNColumns(){return fProtoColumns ;}
f74edaba 36
37 //set the number of columns in prototype
38 void SetNCols(Int_t ncolumns){fProtoColumns = ncolumns ;}
39 //Set the number of raw in prototype
40 void SetNRaws(Int_t nraws){fProtoRaws = nraws ;}
41
42 //Plot correspondance between Prototype Id and PHOS
43 //Options are "Zoom" - only proto region is plotted
44 // "PHOS" - presents both PHOS and Proto ids
45 void PlotProtoMap(Option_t * opt="Zoom") ;
46
f74edaba 47 //Transforms channel number in prototype into AbsId number in PHOS
48 Int_t Raw2AbsId(Int_t raw) ;
49
50 //Transforms AbsId number in PHOS into channel number in prototype
503394a6 51 Int_t AbsId2Raw(Int_t AbsId) ;
f74edaba 52
3845779e 53 virtual void Print(Option_t * option="") const ;
f74edaba 54
55private:
56 AliPHOSGeometry * fGeom ; //!
57
58 Int_t fProtoRaws ; //Parameters
59 Int_t fProtoColumns ; //used to calculate
60 Int_t fRawOffset ; //correspondance
61 Int_t fColOffset ; //map
62 Int_t fNcrInProto ; //Number of channels in prototype
503394a6 63 Int_t fMinAbsId ;
64 Int_t fMaxAbsId ;
f74edaba 65 TArrayS * fAbsIdMap ; //Map of correspondance between Raw and PHOS ID
503394a6 66 TArrayS * fRawIdMap ; //Map of correspondance between AbsId and Raw
f74edaba 67
68 ClassDef(AliPHOSConTableDB,1) // description
69
70
71};
72
73#endif // AliPHOSCONTABLEDB_H