]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/CALO/AliHLTCaloConstants.h
- include a series of HLT histograms with cuts for selecting primary tracks
[u/mrichter/AliRoot.git] / HLT / CALO / AliHLTCaloConstants.h
index 2905bf43092c02e3a0f01f67730dc7a285c7063e..14c374831f4c554031ebf0c250b72c595b9a35fa 100644 (file)
 /// @brief  Class containing constants for PHOS and EMCAL
 ///         loaded libraries
 
+
 #include "Rtypes.h"
 #include "TString.h"
-
 #ifndef ALIHLTCALOCONSTANTS_H
 #define ALIHLTCALOCONSTANTS_H
 
+#include "AliCaloConstants.h"
+
+
+// namespace CaloHLTConst
+// {
+//   const int MAXHOSTS=20;
+//   //Constants related to the ALTRO chip (Common to EMCAL / PHOS )
+//   const int MAXBINVALUE = 1023;
+//   const int NGAINS         =   2;    
+//   const int HIGHGAIN    =   1;
+//   const int LOWGAIN     =   0;
+//   const int ALTROMAXSAMPLES = 1008;    /**<The maximum number of samples of the ALTRO*/
+//   const int ALTROMAXPRESAMPLES = 15;        
+//   const int NALTROS        =   4;      /**<Number of ALTROs per frontend card*/
+//   const int NALTROCHANNELS =  16;
+
+//   //FEE constants common to PHOS EMCAL
+//   const int CSPSPERFEE    = 32;
+//   const int NBRANCHES      =   2;   
+//   const int MAXHWADDRESSES = 4096;
+  
+//   namespace EmcalHLTConst
+//   {
+//     const int NZROWSMOD      =  48;   /**<Number of rows per module*/       
+//     const int NXCOLUMNSMOD   =  24;   /**<Number of columns per module*/ 
+//     const int NRCUSPERSECTOR = 4;     /**<Number of RCUs per sector*/
+//     const int NMODULES    =    10;    /**<Number of modules of the EMCAL detector*/
+//     const int NRCUSPERMODULE =  2 ;   /**<Number of RCUs per Module*/
+//     const int NFEECS         =  9;    /**<Number of Frontend cards per branch*/
+//   };
+  
+//   namespace PhosHLTConst
+//   {
+//     const int NZROWSMOD      =  56;   /**<Number of rows per module*/       
+//     const int NXCOLUMNSMOD   =  64;   /**<Number of columns per module*/ 
+//     const int NMODULES    =    5;     /**<Number of modules of the PHOS detector*/
+//     const int NRCUSPERMODULE =  4 ;   /**<Number of RCUs per Module*/
+//     const int NFEECS         =  14;   /**<Number of Frontend cards per branch*/
+//   };
+  
+// };
+
+
+// namespace CALO  =  CaloHLTConst; // just for easier notation
+// namespace EMCAL =  CaloHLTConst::EmcalHLTConst;
+// namespace PHOS  =  CaloHLTConst::PhosHLTConst;
+
+
 
 
 class AliHLTCaloConstants
 {
-
 public:
-
   AliHLTCaloConstants();
   virtual ~AliHLTCaloConstants();
-  
-  virtual Int_t GetMAXHOSTS() const = 0;                                               
-  virtual Int_t GetDEFAULTEVENTPORT() const = 0;                                       
-  virtual Int_t GetMAXBINVALUE() const = 0;                                            
-  virtual Int_t GetHIGHGAIN() const = 0;                                               
-  virtual Int_t GetLOWGAIN() const = 0;                                                        
-                                                               
-  virtual Int_t GetALTROMAXSAMPLES() const = 0;                                                
-  virtual Int_t GetALTROMAXPRESAMPLES() const = 0;                                      
-                                                               
-  virtual Int_t GetNZROWSRCU() const = 0;                                              
-  virtual Int_t GetNXCOLUMNSRCU() const = 0;                                           
-  virtual Int_t GetNZROWSMOD() const = 0;                                              
-  virtual Int_t GetNXCOLUMNSMOD() const = 0;                                           
-  virtual Int_t GetNGAINS() const = 0;                                 
-  virtual Int_t GetNDATATYPES() const = 0;                                             
-                                                               
-  virtual Int_t GetPFMAXPATHLENGTH() const = 0;                                                
-                                                               
-  virtual Int_t GetPFDEFAULTNSAMPLES() const = 0;                                      
-  virtual Int_t GetPFDEFAULTSTARTINDEX() const = 0;                                     
-                                                               
-  virtual Double_t GetDEFAULTTAU() const = 0;                                   
-  virtual Int_t GetDEFAULTFS() const = 0;                                              
-                                                               
-  virtual Int_t GetMODULE0() const = 0;                                                        
-  virtual Int_t GetMODULE1() const = 0;                                                        
-  virtual Int_t GetMODULE2() const = 0;                                                        
-  virtual Int_t GetMODULE3() const = 0;                                                        
-  virtual Int_t GetMODULE4() const = 0;                                                        
-                                                               
-  virtual Int_t GetCSPSPERFEE() const = 0;                                             
-  virtual Int_t GetRCU0() const = 0;                                                   
-  virtual Int_t GetRCU1() const = 0;                                                   
-  virtual Int_t GetRCU2() const = 0;                                                   
-  virtual Int_t GetRCU3() const = 0;                                                   
-                                                               
-  virtual Int_t GetZ0() const = 0;                                                     
-  virtual Int_t GetZ1() const = 0;                                                     
-  virtual Int_t GetX0() const = 0;                                                     
-  virtual Int_t GetX1() const = 0;                                                     
-                                                               
-  virtual Int_t GetNMODULES() const = 0;                                               
-  virtual Int_t GetNRCUS() const = 0;                                                  
-                                                               
-  virtual Int_t GetNRCUSPERMODULE() const = 0;                                                 
-  virtual Int_t GetNRCUSPERTOTAL() const = 0;                                          
-  virtual Int_t GetNFEECS() const = 0;                                                         
-  virtual Int_t GetNALTROS() const = 0;                                                        
-  virtual Int_t GetNALTROCHANNELS() const = 0;                                                 
-  virtual Int_t GetNBRANCHES() const = 0;                                              
-                                                               
-  virtual Float_t GetCELLSTEP() const = 0;                                     
-  virtual Int_t GetNRCUSPERSECTOR() const = 0;                                                 
-  virtual Int_t GetDDLOFFSET() const = 0;
+  virtual void InitConstants() = 0; 
 
+  // Common PHOS / EMCAL stuff
+  static  Int_t GetALTROMAXSAMPLES()    { return ALTRO::ALTROMAXSAMPLES; };
+  static  Int_t GetNGAINS()             { return ALTRO::NGAINS; };
+  static  Int_t GetHIGHGAIN()           { return ALTRO::HIGHGAIN; };
+  static  Int_t GetLOWGAIN()          { return ALTRO::LOWGAIN; };
+  static  Int_t GetMAXBINVALUE()      { return ALTRO::MAXBINVALUE; };
+  static  Int_t GetCSPSPERFEE()       { return CALO::CSPSPERFEE; };
+  static  Int_t GetNALTROS()           { return ALTRO::NALTROS; };
+  static  Int_t GetNALTROCHANNELS()    { return ALTRO::NALTROCHANNELS; };
+  static  Int_t GetNBRANCHES()         { return CALO::NBRANCHES; };    
+  static Int_t GetMAXHWADDRESSES() { return CALO::MAXHWADDRESSES; }
+
+  // Detector specific stuff
+  // PHOS Only, bad move somewher else, PTH
+  virtual Int_t GetNZROWSRCU() const  { return   56 ; } ; 
+  virtual Int_t GetNXCOLUMNSRCU() const { return 16; } ;
+  // END PHOS Only
+
+  virtual Int_t GetNZROWSMOD() const      = 0; 
+  virtual Int_t GetNXCOLUMNSMOD() const   = 0; 
+  virtual Int_t GetNMODULES() const       = 0; 
+  virtual Int_t GetNRCUSPERMODULE() const = 0;
+  virtual Int_t GetNFEECS() const         = 0;
+  
+  Int_t GetDDLOFFSET() const { return fkDDLOFFSET; }
+  Float_t GetCELLSTEP() const { return fkCELLSTEP; }
   
+  //EMCAL specific, !! Move somewhere else, PTH
+  Float_t GetMAXCELLSTEPETA() const { return fkMAXCELLSTEPETA; }  //FR
+  Float_t GetMINCELLSTEPETA() const { return fkMINCELLSTEPETA; }  //FR
+  Float_t GetCELLSTEPPHI() const { return fkCELLSTEPPHI; }        //FR
+  Float_t GetCELLHEIGHT() const { return fkCELLHEIGHT; }        //FR
+  Float_t GetCELLANGLE() const { return fkCELLANGLE; }        //FR
+  Float_t GetRADLENGTH() const { return fkRADLENGTH; }        //FR
+  Float_t GetCRITICENERGY() const { return fkCRITICENERGY; }        //FR
+  Float_t GetCJ() const { return fkCJ;} //FR
+  TString GetDETNAME() { return fkDETNAME; };
+
+protected:
+  //EMCAL specific, !! Move somewhere else, PTH
+  // @todo: These variables should be declared constant, doesnt work right now
+  // because the default copy contructor is called somewhere.
+  Float_t fkMAXCELLSTEPETA;
+  Float_t fkMINCELLSTEPETA;
+  Float_t fkCELLSTEPPHI;
+  Float_t fkCELLHEIGHT;
+  Float_t fkCELLANGLE;
+  Float_t fkRADLENGTH;
+  Float_t fkCRITICENERGY;
+  Float_t fkCJ;
+  Float_t fkCELLSTEP; //Constant
+
+  Int_t fkDDLOFFSET;   //Constant
+  TString fkDETNAME;
+
 private:
-  ClassDef(AliHLTCaloConstants, 1);
+  AliHLTCaloConstants(const AliHLTCaloConstants & );
+  AliHLTCaloConstants & operator = (const AliHLTCaloConstants &); 
 
+  ClassDef(AliHLTCaloConstants, 1)
 };
+
+
+
 #endif