]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
changes from Per Thomas:
authordsilverm <dsilverm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 30 Nov 2010 10:57:25 +0000 (10:57 +0000)
committerdsilverm <dsilverm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 30 Nov 2010 10:57:25 +0000 (10:57 +0000)
Collecting global EMCAL/PHOS constants in a common namespaces for more consistent use of constants in EMCAL offline, and  PHOS/EMCAL HLT

EMCAL/AliCaloConstants.h
EMCAL/AliCaloFitResults.cxx
EMCAL/AliCaloFitResults.h

index d4c37a15ee8b261233d8ce46bfa47302eb6b626f..417e25d7efac03bd49179aad1726b69295525a64 100644 (file)
@@ -4,7 +4,7 @@
 
 /**************************************************************************
  * This file is property of and copyright by                              *
- * the Relativistic Heavy Ion Group (RHIG), Yale University, US, 2009     *
+ * the Relativistic Heavy Ion Group (RHIG), Yale University, US, 2010     *
  *                                                                        *
  * Primary Author: Per Thomas Hille  <perthomas.hille@yale.edu>           *
  *                                                                        *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+//
+// Constants used by the HLT
+// ALICE Offlinw
+// and by EMCAL standalone debug tools
+//
+//
 namespace CaloConstants
 {
+  const int MAXHOSTS=20; // related to the emcal debug online display
+  
+  namespace ALTROConstants
+  {
+    const int ALTROMAXSAMPLES = 1008;    // The maximum number of samples of the ALTRO
+    const int ALTROMAXPRESAMPLES = 15;   // Maximum number of presamles from the ALTRO chip     
+    const int NALTROS        =   4;      // Number of ALTROs per frontend card
+    const int NALTROCHANNELS =  16;      // Number of readout channels per ALTRO chip
+    const int MINHARDWAREADDRESS = -2;   // Smallest possible HW address ( in offline )
+    const int MAXHARDWAREADDRESS = 4096; // Max harware address,  ( its to high ) 
+    const int MAXBINVALUE = 1023;        // Max possible ALTRO ADC value ( 10 bit )
+    const int NGAINS         =   2;      // Number of gains ( high + low )
+    const int HIGHGAIN    =   1;         // Mnemonic for High Gain
+    const int LOWGAIN     =   0;         // Mnemonic for Low Gain
+    const int HG = HIGHGAIN;             // Abbrevation for HIGHGAIN
+    const int LG = LOWGAIN;              // Abbrevation for LOWGAIN
+ }
+
+  //FEE constants common to PHOS EMCAL
+  const int CSPSPERFEE       =   32;    // Charge Sensitive Preamplifiers (CSPs) per FEE
+  const int NBRANCHES        =    2;    // Branches per RCU   
+  const int MAXHWADDRESSES   = 4096;    // Highest possible harware address
+  
+  namespace EMCALConstants
+  {
+    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*/
+    const int NZROWSRCU     =   48;   // Number of Rows per RCU
+    const int NXCOLUMNSRCU  =   16;   // Number of columns per RCU
+  }
+  
+  
+  namespace PHOSConstants
+  {
+    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 FitAlgorithm
   {
     enum fitAlgorithm { kLMS = 0, kCrude = 1, kPeakFinder = 2, kNeuralNet = 3, kFastFit= 4,
-                       kLogFit = 5, kStandard = 6,  kNONE = 7};
+                       kLogFit = 5, kStandard = 6,  kNONE = 7}; // possible return values
   }
 
   namespace ReturnCodes
   {
-    enum kReturnCode {kFitPar=1, kDummy=-1, kCrude=-9, kNoFit=-99, kInvalid=-9999};// possible return values
+    enum kReturnCode {kFitPar=1, kDummy=-1, kCrude=-9, kNoFit=-99, kInvalid=-9999};  // possible return values
   }
 
   namespace PeakFinderConstants
   {
-    const int  MAXSTART = 3;
-    const int  SAMPLERANGE = 15;
+    const int  MAXSTART = 3;      //  Start max 3 samples into the digitized array
+    const int  SAMPLERANGE = 15;  //  Use maximum 15 samples for the Peak-Finder
   }
 }
 
-
 //For easier notation
-namespace Algo = CaloConstants::FitAlgorithm;
-namespace Ret  = CaloConstants::ReturnCodes; 
-namespace PF   = CaloConstants::PeakFinderConstants;
+namespace ALTRO =   CaloConstants::ALTROConstants;       // For easier notation
+namespace Algo  =   CaloConstants::FitAlgorithm;         // For easier notation 
+namespace Ret   =   CaloConstants::ReturnCodes;          // For easier notation
+namespace PF    =   CaloConstants::PeakFinderConstants;  // For easier notation
+namespace CALO  =   CaloConstants;                       // For easier notation
+namespace EMCAL =   CaloConstants::EMCALConstants;       // For easier notation
+namespace PHOS  =   CaloConstants::PHOSConstants;        // For easier notation
+
 
 #endif
+
index f2d37f5b728f812f0ca9233e89df274e6fec7508..80c9009af1eb62bae0c54d0dbb2e986764346e98 100644 (file)
@@ -45,10 +45,15 @@ AliCaloFitResults::AliCaloFitResults() : fMaxSig(-1),
 // The signal was fitted sucessfully. fStatus might have a different meaning If other 
 // procedures than  A different meaning Fitting is applied 
 
-AliCaloFitResults::AliCaloFitResults(const Int_t maxSig, const Float_t ped, 
-                                    const Short_t fitstatus, const Float_t  amp,  
-                                    const Float_t time,  const Int_t maxTimebin, const Float_t chi,  
-                                    const Int_t ndf, Int_t minSig,
+AliCaloFitResults::AliCaloFitResults(const Int_t maxSig, 
+                                    const Float_t ped, 
+                                    const Short_t fitstatus, 
+                                    const Float_t  amp,  
+                                    const Float_t time,  
+                                    const Int_t maxTimebin, 
+                                    const Float_t chi,  
+                                    const Int_t ndf, 
+                                    Int_t minSig,
                                     const AliCaloFitSubarray fitSubarray ) : 
   fMaxSig(maxSig),
   fPed(ped), 
index 1b5b683d73368b0d5fd14b9113228195b55c8106..a282f601994fc8625375e1f5bcbfda6be05bac77 100644 (file)
 #include "AliCaloFitSubarray.h"
 #include "AliCaloConstants.h"
 
-//using namespace CaloConstants::ReturnCodes;
-// using CaloConstants::FitAlgorithm;
-
-// Container class to hold results from fitting 
-// as well as other methods for
-// raw data signals extraction
 class  AliCaloFitResults
 {
  public:
@@ -45,7 +39,8 @@ class  AliCaloFitResults
                              const Float_t  amp, 
                              const Float_t time,
                              const Int_t maxTimebin,
-                             const Float_t chi, 
+                             //   const Float_t chi, 
+                             const Float_t chi,  
                              const Int_t ndf, 
                              const Int_t minSig, 
                              const AliCaloFitSubarray fitSubarray  ); 
@@ -56,6 +51,7 @@ class  AliCaloFitResults
                              const Float_t  amp, 
                              const Float_t time,
                              const Int_t maxTimebin,
+                             //   const Float_t chi, 
                              const Float_t chi, 
                              const Int_t ndf, 
                              const Int_t minSig = Ret::kDummy);  
@@ -74,29 +70,30 @@ class  AliCaloFitResults
 
   AliCaloFitResults();
   virtual  ~AliCaloFitResults();
-  Int_t  GetMaxSig() const  { return fMaxSig;};
+  UShort_t  GetMaxSig() const  { return fMaxSig;};
   Float_t   GetPed() const { return fPed;};
-  Int_t  GetMinSig() const { return fMinSig;};
+  UShort_t  GetMinSig() const { return fMinSig;};
   Int_t  GetStatus() const  { return fStatus;};
   Float_t   GetAmp() const {  return fAmpSig; };
   Float_t   GetTof() const {  return fTime; }; 
   Float_t   GetTime() const {  return fTime; };
   Int_t   GetMaxTimebin() const {  return fMaxTimebin; };
   Float_t   GetChi2() const { return fChi2Sig;};
-  Int_t  GetNdf() const { return fNdfSig; };
+  UShort_t  GetNdf() const { return fNdfSig; };
   AliCaloFitSubarray  GetFitSubarray() const { return fFitSubarray; };
   
+  
  private:
   // AliCaloFitResults();
-  Int_t   fMaxSig;      //Maximum sample value ( 0 - 1023 )
+  UShort_t   fMaxSig;      //Maximum sample value ( 0 - 1023 )
   Float_t    fPed;      //Pedestal 
   Int_t   fStatus;      //Sucess or failure of fitting pocedure
   Float_t    fAmpSig;   //Amplitude in entities of ADC counts
   Float_t    fTime;     //peak/max time of signal in entities of sample intervals 
   Int_t    fMaxTimebin; //timebin with maximum ADC value
   Float_t    fChi2Sig;  //Chi Square of fit 
-  Int_t   fNdfSig;      //Number of degrees of freedom of fit
-  Int_t   fMinSig;      //Pedestal 
+  UShort_t   fNdfSig;      //Number of degrees of freedom of fit
+  UShort_t   fMinSig;      //Pedestal 
   AliCaloFitSubarray fFitSubarray; // info on time-bin array used for the fitting
 };