]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliCaloConstants.h
Verbose printout commented out
[u/mrichter/AliRoot.git] / EMCAL / AliCaloConstants.h
1 // -*- mode: c++ -*-
2 #ifndef ALICALOCONSTANTS_H
3 #define ALICALOCONSTANTS_H
4
5 /**************************************************************************
6  * This file is property of and copyright by                              *
7  * the Relativistic Heavy Ion Group (RHIG), Yale University, US, 2010     *
8  *                                                                        *
9  * Primary Author: Per Thomas Hille  <perthomas.hille@yale.edu>           *
10  *                                                                        *
11  * Contributors are mentioned in the code where appropriate.              *
12  * Please report bugs to   perthomas.hille@yale.edu                       *
13  *                                                                        *
14  * Permission to use, copy, modify and distribute this software and its   *
15  * documentation strictly for non-commercial purposes is hereby granted   *
16  * without fee, provided that the above copyright notice appears in all   *
17  * copies and that both the copyright notice and this permission notice   *
18  * appear in the supporting documentation. The authors make no claims     *
19  * about the suitability of this software for any purpose. It is          *
20  * provided "as is" without express or implied warranty.                  *
21  **************************************************************************/
22
23
24 //
25 // Constants used by the HLT
26 // ALICE Offlinw
27 // and by EMCAL standalone debug tools
28 //
29 //
30 namespace CaloConstants
31 {
32   const int MAXHOSTS=20; // related to the emcal debug online display
33   const int TIMEBINS     = 256;       // number of sampling bins of the raw RO signal (we typically use 15-50; max is 1k+) 
34   const double TIMEBINWITH = 100E-9 ;   // each sample is 100 ns
35   const double TIMEBINMAX  =  TIMEBINS*TIMEBINWITH; 
36   //  const double TAU = 2.35;
37   //  const int  ORDER = 2;
38   
39   const int OVERFLOWCUT = 950;
40  
41   const double HGLGFACTOR = 16;
42   
43   // const double ECENTRALHIT = 0.85; //Percentage of total enegry contain in a single tower for a central hit 
44
45   namespace ALTROConstants
46   {
47     const int ALTROMAXSAMPLES = 1008;    // The maximum number of samples of the ALTRO
48     const int ALTROMAXPRESAMPLES = 15;   // Maximum number of presamles from the ALTRO chip     
49     const int NALTROS        =   4;      // Number of ALTROs per frontend card
50     const int NALTROCHANNELS =  16;      // Number of readout channels per ALTRO chip
51     const int MINHARDWAREADDRESS = -2;   // Smallest possible HW address ( in offline )
52     const int MAXHARDWAREADDRESS = 4096; // Max harware address,  ( its to high ) 
53     const int MAXBINVALUE = 1023;        // Max possible ALTRO ADC value ( 10 bit )
54     const int NGAINS         =   2;      // Number of gains ( high + low )
55     const int HIGHGAIN    =   1;         // Mnemonic for High Gain
56     const int LOWGAIN     =   0;         // Mnemonic for Low Gain
57     const int HG = HIGHGAIN;             // Abbrevation for HIGHGAIN
58     const int LG = LOWGAIN;              // Abbrevation for LOWGAIN
59   }
60
61   //FEE constants common to PHOS EMCAL
62   const int CSPSPERFEE       =   32;    // Charge Sensitive Preamplifiers (CSPs) per FEE
63   const int NBRANCHES        =    2;    // Branches per RCU   
64   const int MAXHWADDRESSES   = 4096;    // Highest possible harware address
65   
66   namespace EMCALConstants
67   {
68     // const int NZROWSMOD      =  48;   // Number of rows per module
69     // const int NXCOLUMNSMOD   =  24;   // Number of columns per module 
70     const double ECENTRALHIT = 0.845678; //Percentage of total enegry contain in a single tower for a central hit  
71     
72     const int NZROWSMOD      =  24;   // Number of rows per module
73     const int NXCOLUMNSMOD   =  48;   // Number of columns per module 
74     
75     const int NROWSMOD     = NZROWSMOD;   // Number of rows per module
76     const int NCOLUMNSMOD  = NXCOLUMNSMOD;   // Number of columns per module 
77     
78     //   const int NZROWSMOD      =  24;   // Number of rows per module
79     //   const int NXCOLUMNSMOD   =  48;   // Number of columns per module 
80     
81     const int NRCUSPERSECTOR = 4;     // Number of RCUs per sector
82     const int NMODULES    =    10;    // Number of modules of the EMCAL detector
83     const int NRCUSPERMODULE =  2 ;   // Number of RCUs per Module
84     const int NFEECS         =  9;    // Number of Frontend cards per branch*/
85     const int NZROWSRCU     =   48;   // Number of Rows per RCU
86     const int NXCOLUMNSRCU  =   16;   // Number of columns per RCU
87     const int ORDER  = 2; // Order of shaping stages of the signal conditioning unit
88     const double TAU = 2.35;  // approximate shaping time
89     
90   }
91
92   namespace PHOSConstants
93   {
94     const int NZROWSMOD      =  56;   // Number of rows per module       
95     const int NXCOLUMNSMOD   =  64;   // Number of columns per module
96     const int NMODULES    =     5;    // Number of modules of the PHOS detector
97     const int NRCUSPERMODULE =  4 ;   // Number of RCUs per Module
98     const int NFEECS         =  14;   // Number of Frontend cards per branch
99   }
100
101
102   //namespace FitAlgorithm
103   // {
104   //  enum fitAlgorithm { kStandard = 0, kCrude = 1, kPeakFinder = 2, kNeuralNet = 3, kFastFit= 4,
105   //                    kLogFit = 5, kLMS = 6,  kLMSOffline = 7, kFakeAltro = 9, kNONE = 8}; // possible return values
106   // }
107   
108   namespace FitAlgorithm
109   {
110     enum fitAlgorithm { kStandard = 0, kCrude = 1, kPeakFinder = 2, kNeuralNet = 3, kFastFit= 4, kFakeAltro = 9, kNONE = 8}; // possible return values
111   }
112
113   
114   
115   namespace ReturnCodes
116   {
117     enum kReturnCode {kFitPar=1, kDummy=-1, kCrude=-9, kNoFit=-99, kInvalid=-9999};  // possible return values
118   }
119
120   namespace PeakFinderConstants
121   {
122     const int  MAXSTART = 3;      //  Start max 3 samples into the digitized array
123     const int  SAMPLERANGE = 15;  //  Use maximum 15 samples for the Peak-Finder
124   }
125 }
126
127 //For easier notation
128 namespace ALTRO =   CaloConstants::ALTROConstants;       // For easier notation
129 namespace Algo  =   CaloConstants::FitAlgorithm;         // For easier notation 
130 namespace Ret   =   CaloConstants::ReturnCodes;          // For easier notation
131 namespace PF    =   CaloConstants::PeakFinderConstants;  // For easier notation
132 namespace CALO  =   CaloConstants;                       // For easier notation
133 namespace EMCAL =   CaloConstants::EMCALConstants;       // For easier notation
134 namespace PHOS  =   CaloConstants::PHOSConstants;        // For easier notation
135
136
137 #endif
138