]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/CALO/AliHLTCaloConstants.h
new centrality selection
[u/mrichter/AliRoot.git] / HLT / CALO / AliHLTCaloConstants.h
1 //-*- Mode: C++ -*-
2 // $Id: AliHLTCALOConstants.h $
3
4 //* This file is property of and copyright by the ALICE HLT Project        * 
5 //* ALICE Experiment at CERN, All rights reserved.                         *
6 //* See cxx source for full Copyright notice                               */
7
8 /// @file   AliHLCaloConstants.h
9 /// @author Svein Lindal
10 /// @date   
11 /// @brief  Class containing constants for PHOS and EMCAL
12 ///         loaded libraries
13
14
15 #include "Rtypes.h"
16 #include "TString.h"
17 #ifndef ALIHLTCALOCONSTANTS_H
18 #define ALIHLTCALOCONSTANTS_H
19
20 #include "AliCaloConstants.h"
21
22
23 // namespace CaloHLTConst
24 // {
25 //   const int MAXHOSTS=20;
26 //   //Constants related to the ALTRO chip (Common to EMCAL / PHOS )
27 //   const int MAXBINVALUE = 1023;
28 //   const int NGAINS         =   2;    
29 //   const int HIGHGAIN    =   1;
30 //   const int LOWGAIN     =   0;
31 //   const int ALTROMAXSAMPLES = 1008;    /**<The maximum number of samples of the ALTRO*/
32 //   const int ALTROMAXPRESAMPLES = 15;        
33 //   const int NALTROS        =   4;      /**<Number of ALTROs per frontend card*/
34 //   const int NALTROCHANNELS =  16;
35
36 //   //FEE constants common to PHOS EMCAL
37 //   const int CSPSPERFEE    = 32;
38 //   const int NBRANCHES      =   2;   
39 //   const int MAXHWADDRESSES = 4096;
40   
41 //   namespace EmcalHLTConst
42 //   {
43 //     const int NZROWSMOD      =  48;   /**<Number of rows per module*/       
44 //     const int NXCOLUMNSMOD   =  24;   /**<Number of columns per module*/ 
45 //     const int NRCUSPERSECTOR = 4;     /**<Number of RCUs per sector*/
46 //     const int NMODULES    =    10;    /**<Number of modules of the EMCAL detector*/
47 //     const int NRCUSPERMODULE =  2 ;   /**<Number of RCUs per Module*/
48 //     const int NFEECS         =  9;    /**<Number of Frontend cards per branch*/
49 //   };
50   
51 //   namespace PhosHLTConst
52 //   {
53 //     const int NZROWSMOD      =  56;   /**<Number of rows per module*/       
54 //     const int NXCOLUMNSMOD   =  64;   /**<Number of columns per module*/ 
55 //     const int NMODULES    =    5;     /**<Number of modules of the PHOS detector*/
56 //     const int NRCUSPERMODULE =  4 ;   /**<Number of RCUs per Module*/
57 //     const int NFEECS         =  14;   /**<Number of Frontend cards per branch*/
58 //   };
59   
60 // };
61
62
63 // namespace CALO  =  CaloHLTConst; // just for easier notation
64 // namespace EMCAL =  CaloHLTConst::EmcalHLTConst;
65 // namespace PHOS  =  CaloHLTConst::PhosHLTConst;
66
67
68
69
70 class AliHLTCaloConstants
71 {
72 public:
73   AliHLTCaloConstants();
74   virtual ~AliHLTCaloConstants();
75   virtual void InitConstants() = 0; 
76
77   // Common PHOS / EMCAL stuff
78   static  Int_t GetALTROMAXSAMPLES()    { return ALTRO::ALTROMAXSAMPLES; };
79   static  Int_t GetNGAINS()             { return ALTRO::NGAINS; };
80   static  Int_t GetHIGHGAIN()           { return ALTRO::HIGHGAIN; };
81   static  Int_t GetLOWGAIN()          { return ALTRO::LOWGAIN; };
82   static  Int_t GetMAXBINVALUE()      { return ALTRO::MAXBINVALUE; };
83   static  Int_t GetCSPSPERFEE()       { return CALO::CSPSPERFEE; };
84   static  Int_t GetNALTROS()           { return ALTRO::NALTROS; };
85   static  Int_t GetNALTROCHANNELS()    { return ALTRO::NALTROCHANNELS; };
86   static  Int_t GetNBRANCHES()         { return CALO::NBRANCHES; };     
87   static Int_t GetMAXHWADDRESSES() { return CALO::MAXHWADDRESSES; }
88
89   // Detector specific stuff
90   // PHOS Only, bad move somewher else, PTH
91   virtual Int_t GetNZROWSRCU() const  { return   56 ; } ; 
92   virtual Int_t GetNXCOLUMNSRCU() const { return 16; } ;
93   // END PHOS Only
94
95   virtual Int_t GetNZROWSMOD() const      = 0; 
96   virtual Int_t GetNXCOLUMNSMOD() const   = 0; 
97   virtual Int_t GetNMODULES() const       = 0; 
98   virtual Int_t GetNRCUSPERMODULE() const = 0;
99   virtual Int_t GetNFEECS() const         = 0;
100   
101   Int_t GetDDLOFFSET() const { return fkDDLOFFSET; }
102   Float_t GetCELLSTEP() const { return fkCELLSTEP; }
103   
104   //EMCAL specific, !! Move somewhere else, PTH
105   Float_t GetMAXCELLSTEPETA() const { return fkMAXCELLSTEPETA; }  //FR
106   Float_t GetMINCELLSTEPETA() const { return fkMINCELLSTEPETA; }  //FR
107   Float_t GetCELLSTEPPHI() const { return fkCELLSTEPPHI; }        //FR
108   Float_t GetCELLHEIGHT() const { return fkCELLHEIGHT; }        //FR
109   Float_t GetCELLANGLE() const { return fkCELLANGLE; }        //FR
110   Float_t GetRADLENGTH() const { return fkRADLENGTH; }        //FR
111   Float_t GetCRITICENERGY() const { return fkCRITICENERGY; }        //FR
112   Float_t GetCJ() const { return fkCJ;} //FR
113   TString GetDETNAME() { return fkDETNAME; };
114
115 protected:
116   //EMCAL specific, !! Move somewhere else, PTH
117   // @todo: These variables should be declared constant, doesnt work right now
118   // because the default copy contructor is called somewhere.
119   Float_t fkMAXCELLSTEPETA;
120   Float_t fkMINCELLSTEPETA;
121   Float_t fkCELLSTEPPHI;
122   Float_t fkCELLHEIGHT;
123   Float_t fkCELLANGLE;
124   Float_t fkRADLENGTH;
125   Float_t fkCRITICENERGY;
126  
127   Float_t fkCJ;
128   Float_t fkCELLSTEP; //Constant
129
130   Int_t fkDDLOFFSET;   //Constant
131   TString fkDETNAME;
132
133 private:
134   AliHLTCaloConstants(const AliHLTCaloConstants & );
135   AliHLTCaloConstants & operator = (const AliHLTCaloConstants &); 
136
137   ClassDef(AliHLTCaloConstants, 1)
138 };
139
140
141
142 #endif