]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDfeeParam.h
TRD nSigma OADB related new codes and modifications and OADB root file -- Xianguo Lu
[u/mrichter/AliRoot.git] / TRD / AliTRDfeeParam.h
CommitLineData
022e76c3 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
bf397f30 6/* $Id$ */
022e76c3 7
acc49af9 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// //
3b4b024f 17// many things now configured by AliTRDtrapConfig reflecting //
18// the real memory structure of the TRAP (Jochen) //
19// //
acc49af9 20////////////////////////////////////////////////////////////////////////////
022e76c3 21
22#include <TObject.h>
23
ba84a3e3 24class TRootIoCtor;
25
022e76c3 26class AliTRDCommonParam;
27class AliTRDpadPlane;
28class AliTRDgeometry;
29
30//_____________________________________________________________________________
31class AliTRDfeeParam : public TObject
32{
33
34 public:
35
ba84a3e3 36 AliTRDfeeParam(TRootIoCtor *);
022e76c3 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;
860f3a82 48 virtual Int_t GetExtendedPadColFromADC(Int_t irob, Int_t imcm, Int_t iadc) const;
022e76c3 49 virtual Int_t GetMCMfromPad(Int_t irow, Int_t icol) const;
1785640c 50 virtual Int_t GetMCMfromSharedPad(Int_t irow, Int_t icol) const;
022e76c3 51 virtual Int_t GetROBfromPad(Int_t irow, Int_t icol) const;
1785640c 52 virtual Int_t GetROBfromSharedPad(Int_t irow, Int_t icol) const;
022e76c3 53 virtual Int_t GetRobSide(Int_t irob) const;
54 virtual Int_t GetColSide(Int_t icol) const;
55
3b4b024f 56 // SCSN-related
8ea391e3 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
3b4b024f 62 // geometry
022e76c3 63 static Float_t GetSamplingFrequency() { return (Float_t)fgkLHCfrequency / 4000000.0; }
acc49af9 64 static Int_t GetNmcmRob() { return fgkNmcmRob; }
022e76c3 65 static Int_t GetNmcmRobInRow() { return fgkNmcmRobInRow; }
66 static Int_t GetNmcmRobInCol() { return fgkNmcmRobInCol; }
acc49af9 67 static Int_t GetNrobC0() { return fgkNrobC0; }
68 static Int_t GetNrobC1() { return fgkNrobC1; }
69 static Int_t GetNadcMcm() { return fgkNadcMcm; }
acc49af9 70 static Int_t GetNcol() { return fgkNcol; }
71 static Int_t GetNcolMcm() { return fgkNcolMcm; }
72 static Int_t GetNrowC0() { return fgkNrowC0; }
73 static Int_t GetNrowC1() { return fgkNrowC1; }
74
3b4b024f 75 // tracklet simulation
837e440c 76 Bool_t GetTracklet() const { return fgTracklet; }
77 static void SetTracklet(Bool_t trackletSim = kTRUE) { fgTracklet = trackletSim; }
dfd03fc3 78
ecf39416 79 // Concerning raw data format
acc49af9 80 Int_t GetRAWversion() const { return fRAWversion; }
ecf39416 81 void SetRAWversion( Int_t rawver );
f2979d08 82
022e76c3 83 protected:
84
acc49af9 85 static AliTRDfeeParam *fgInstance; // Singleton instance
86 static Bool_t fgTerminated; // Defines if this class has already been terminated
022e76c3 87
acc49af9 88 AliTRDCommonParam *fCP; // TRD common parameters class
022e76c3 89
90 // Remark: ISO C++ allows initialization of static const values only for integer.
91
92 // Basic Geometrical numbers
93 static const Int_t fgkLHCfrequency = 40079000 ; // [Hz] LHC clock (should be moved to STEER?)
94 static const Int_t fgkNmcmRob = 16; // Number of MCMs per ROB (old fgkMCMmax)
95 static const Int_t fgkNmcmRobInRow = 4; // Number of MCMs per ROB in row dir. (old fgkMCMrow)
96 static const Int_t fgkNmcmRobInCol = 4; // Number of MCMs per ROB in col dir. (old fgkMCMrow)
97 static const Int_t fgkNrobC0 = 6; // Number of ROBs per C0 chamber (old fgkROBmaxC0)
98 static const Int_t fgkNrobC1 = 8; // Number of ROBs per C1 chamber (old fgkROBmaxC1)
99 static const Int_t fgkNadcMcm = 21; // Number of ADC channels per MCM (old fgkADCmax)
022e76c3 100 static const Int_t fgkNcol = 144; // Number of pads per padplane row(old fgkColmax)
101 static const Int_t fgkNcolMcm = 18; // Number of pads per MCM (old fgkPadmax)
102 static const Int_t fgkNrowC0 = 12; // Number of Rows per C0 chamber (old fgkRowmaxC0)
103 static const Int_t fgkNrowC1 = 16; // Number of Rows per C1 chamber (old fgkRowmaxC1)
104
1d93b218 105 // Tracklet processing on/off
837e440c 106 static Bool_t fgTracklet; // tracklet processing
1d93b218 107
022e76c3 108 // For raw production
acc49af9 109 Int_t fRAWversion; // Raw data production version
110 static const Int_t fgkMaxRAWversion = 3; // Maximum raw version number supported
022e76c3 111
112 private:
113
114 AliTRDfeeParam();
115
3b4b024f 116 ClassDef(AliTRDfeeParam,4) // The TRD front end electronics parameter
022e76c3 117
acc49af9 118};
022e76c3 119#endif
1785640c 120