Line data Source code
1 : #ifndef ALITRDFEEPARAM_H
2 : #define ALITRDFEEPARAM_H
3 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 : * See cxx source for full Copyright notice */
5 :
6 : /* $Id$ */
7 :
8 : ////////////////////////////////////////////////////////////////////////////
9 : // //
10 : // TRD front end electronics parameters class //
11 : // Contains all FEE (MCM, TRAP, PASA) related //
12 : // parameters, constants, and mapping. //
13 : // //
14 : // Author: //
15 : // Ken Oyama (oyama@physi.uni-heidelberg.de) //
16 : // //
17 : // many things now configured by AliTRDtrapConfig reflecting //
18 : // the real memory structure of the TRAP (Jochen) //
19 : // //
20 : ////////////////////////////////////////////////////////////////////////////
21 :
22 : #include <TObject.h>
23 :
24 : class TRootIoCtor;
25 :
26 : class AliTRDCommonParam;
27 : class AliTRDpadPlane;
28 : class AliTRDgeometry;
29 :
30 : //_____________________________________________________________________________
31 : class AliTRDfeeParam : public TObject
32 : {
33 :
34 : public:
35 :
36 : AliTRDfeeParam(TRootIoCtor *);
37 : AliTRDfeeParam(const AliTRDfeeParam &p);
38 : virtual ~AliTRDfeeParam();
39 : AliTRDfeeParam &operator=(const AliTRDfeeParam &p);
40 : virtual void Copy(TObject &p) const;
41 :
42 : static AliTRDfeeParam *Instance(); // Singleton
43 : static void Terminate();
44 :
45 : // Translation from MCM to Pad and vice versa
46 : virtual Int_t GetPadRowFromMCM(Int_t irob, Int_t imcm) const;
47 : virtual Int_t GetPadColFromADC(Int_t irob, Int_t imcm, Int_t iadc) const;
48 : virtual Int_t GetExtendedPadColFromADC(Int_t irob, Int_t imcm, Int_t iadc) const;
49 : virtual Int_t GetMCMfromPad(Int_t irow, Int_t icol) const;
50 : virtual Int_t GetMCMfromSharedPad(Int_t irow, Int_t icol) const;
51 : virtual Int_t GetROBfromPad(Int_t irow, Int_t icol) const;
52 : virtual Int_t GetROBfromSharedPad(Int_t irow, Int_t icol) const;
53 : virtual Int_t GetRobSide(Int_t irob) const;
54 : virtual Int_t GetColSide(Int_t icol) const;
55 :
56 : // SCSN-related
57 : static UInt_t AliToExtAli(Int_t rob, Int_t aliid); // Converts the MCM-ROB combination to the extended MCM ALICE ID (used to address MCMs on the SCSN Bus)
58 : static Int_t ExtAliToAli( UInt_t dest, UShort_t linkpair, UShort_t rocType, Int_t *list, Int_t listSize); // translates an extended MCM ALICE ID to a list of MCMs
59 : static Short_t ChipmaskToMCMlist( UInt_t cmA, UInt_t cmB, UShort_t linkpair, Int_t *mcmList, Int_t listSize );
60 : static Short_t GetRobAB( UShort_t robsel, UShort_t linkpair ); // Returns the chamber side (A=0, B=0) of a ROB
61 :
62 : // geometry
63 0 : static Float_t GetSamplingFrequency() { return (Float_t)fgkLHCfrequency / 4000000.0; }
64 0 : static Int_t GetNmcmRob() { return fgkNmcmRob; }
65 0 : static Int_t GetNmcmRobInRow() { return fgkNmcmRobInRow; }
66 0 : static Int_t GetNmcmRobInCol() { return fgkNmcmRobInCol; }
67 0 : static Int_t GetNrobC0() { return fgkNrobC0; }
68 0 : static Int_t GetNrobC1() { return fgkNrobC1; }
69 186373216 : static Int_t GetNadcMcm() { return fgkNadcMcm; }
70 28 : static Int_t GetNcol() { return fgkNcol; }
71 4466 : static Int_t GetNcolMcm() { return fgkNcolMcm; }
72 0 : static Int_t GetNrowC0() { return fgkNrowC0; }
73 0 : static Int_t GetNrowC1() { return fgkNrowC1; }
74 :
75 : // tracklet simulation
76 58896 : Bool_t GetTracklet() const { return fgTracklet; }
77 0 : static void SetTracklet(Bool_t trackletSim = kTRUE) { fgTracklet = trackletSim; }
78 3096 : Bool_t GetRejectMultipleTracklets() const { return fgRejectMultipleTracklets; }
79 0 : static void SetRejectMultipleTracklets(Bool_t rej = kTRUE) { fgRejectMultipleTracklets = rej; }
80 3096 : Bool_t GetUseMisalignCorr() const { return fgUseMisalignCorr; }
81 0 : static void SetUseMisalignCorr(Bool_t misalign = kTRUE) { fgUseMisalignCorr = misalign; }
82 2080 : Bool_t GetUseTimeOffset() const { return fgUseTimeOffset; }
83 0 : static void SetUseTimeOffset(Bool_t timeOffset = kTRUE) { fgUseTimeOffset = timeOffset; }
84 :
85 : // Concerning raw data format
86 50252 : Int_t GetRAWversion() const { return fRAWversion; }
87 : void SetRAWversion( Int_t rawver );
88 :
89 : protected:
90 :
91 : static AliTRDfeeParam *fgInstance; // Singleton instance
92 : static Bool_t fgTerminated; // Defines if this class has already been terminated
93 :
94 : AliTRDCommonParam *fCP; // TRD common parameters class
95 :
96 : // Remark: ISO C++ allows initialization of static const values only for integer.
97 :
98 : // Basic Geometrical numbers
99 : static const Int_t fgkLHCfrequency = 40079000 ; // [Hz] LHC clock (should be moved to STEER?)
100 : static const Int_t fgkNmcmRob = 16; // Number of MCMs per ROB (old fgkMCMmax)
101 : static const Int_t fgkNmcmRobInRow = 4; // Number of MCMs per ROB in row dir. (old fgkMCMrow)
102 : static const Int_t fgkNmcmRobInCol = 4; // Number of MCMs per ROB in col dir. (old fgkMCMrow)
103 : static const Int_t fgkNrobC0 = 6; // Number of ROBs per C0 chamber (old fgkROBmaxC0)
104 : static const Int_t fgkNrobC1 = 8; // Number of ROBs per C1 chamber (old fgkROBmaxC1)
105 : static const Int_t fgkNadcMcm = 21; // Number of ADC channels per MCM (old fgkADCmax)
106 : static const Int_t fgkNcol = 144; // Number of pads per padplane row(old fgkColmax)
107 : static const Int_t fgkNcolMcm = 18; // Number of pads per MCM (old fgkPadmax)
108 : static const Int_t fgkNrowC0 = 12; // Number of Rows per C0 chamber (old fgkRowmaxC0)
109 : static const Int_t fgkNrowC1 = 16; // Number of Rows per C1 chamber (old fgkRowmaxC1)
110 :
111 : // Tracklet processing on/off
112 : static Bool_t fgTracklet; // tracklet processing
113 : static Bool_t fgRejectMultipleTracklets; // only accept best tracklet if found more than once
114 : static Bool_t fgUseMisalignCorr; // add correction for mis-alignment in y
115 : static Bool_t fgUseTimeOffset; // add time offset in calculation of fit sums
116 :
117 : // For raw production
118 : Int_t fRAWversion; // Raw data production version
119 : static const Int_t fgkMaxRAWversion = 3; // Maximum raw version number supported
120 :
121 : private:
122 :
123 : AliTRDfeeParam();
124 :
125 48 : ClassDef(AliTRDfeeParam,4) // The TRD front end electronics parameter
126 :
127 : };
128 : #endif
129 :
|