]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALCellInfo.h
Fixes to the preprocessor.
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALCellInfo.h
1 #ifndef ALIEMCALCELLINFO_H
2 #define ALIEMCALCELLINFO_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5
6 /* $Id$ */
7
8 //_________________________________________________________________________
9 // This is a table of emcal indexes.
10 // Simplify a work with cell indexes 
11 // Initial version was created with TTable staff
12 // 
13 //*-- Authors: Aleksei Pavlinov (WSU)
14 #include <TNamed.h>
15
16 // Aug 1, 2007; Corr. Sep 05
17 // cellInfo -> AliEMCALCellIndexes - Oct 15, 2007
18 class AliEMCALCellIndexes : public TObject { 
19   // See AliEMCALGeometry
20   // Indexes information
21   friend class AliEMCALCellInfo;
22   friend class AliEMCALRecPointsQaESDSelector;
23  public:
24   virtual const char* GetName() const {return Form("Ind%5.5i",fAbsId);}
25   AliEMCALCellIndexes();
26   virtual ~AliEMCALCellIndexes() {};
27
28  protected:
29   Int_t fAbsId;   // abs id of cell as in Geant
30   // Geant numbering tree - see AliEMCALv2
31   Int_t fNSupMod; // index of super module (SM)
32   Int_t fNModule; // index of module in SM
33   Int_t fNIphi;   // phi index of tower(cell) in module
34   Int_t fNIeta;   // eta index of tower(cell) in module
35   // Inside SM - used in cluster finder
36   Int_t fIPhi;    // phi index of tower(cell) in SM 
37   Int_t fIEta;    // eta index of tower(cell) in SM
38   Int_t fIPhim;   // phi index of module in SM
39   Int_t fIEtam;   // eta index of module in SM
40   // Coordinate information should be include too ??
41   ClassDef(AliEMCALCellIndexes,2) // Cell indexes information
42 };
43
44 class AliEMCALGeometry;
45 class TObjArray;
46
47 class AliEMCALCellInfo : public TNamed {
48  public:
49   AliEMCALCellInfo(); // default constractor
50   AliEMCALCellInfo(const char* name, const Int_t nrow);
51   virtual ~AliEMCALCellInfo();
52
53   AliEMCALCellInfo & operator = (const AliEMCALCellInfo  & /*rvalue*/) {
54     // assignement operator requested by coding convention but not needed
55     Fatal("operator =", "not implemented");
56     return *this;
57   };
58   // 
59   void AddAt(AliEMCALCellIndexes* r);
60   AliEMCALCellIndexes* GetTable(Int_t i) const;
61
62   void PrintTable(int ind1=-1, int ind2=-1) const;  //*MENU*
63
64   static AliEMCALCellInfo *GetTableForGeometry(const char* geoName);
65   static AliEMCALCellInfo *GetTableForGeometry(AliEMCALGeometry *g);
66   //
67  protected:
68   TObjArray *fTable; // Array of  AliEMCALCellIndexes
69   Int_t fCurrentInd; // Current index
70
71   ClassDef(AliEMCALCellInfo,2) // Table of emcal indexes  
72 };
73
74 #endif // ALIEMCALCELLINFO_H