]>
Commit | Line | Data |
---|---|---|
5ac2e3b1 | 1 | #ifndef ALITRDMCMSIMCONFIGHANDLER_H |
2 | #define ALITRDMCMSIMCONFIGHANDLER_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | //////////////////////////////////////////////////////////////// | |
7 | // // | |
8 | // Multi Chip Module Simulation Configuration Handler Class // | |
9 | // // | |
10 | //////////////////////////////////////////////////////////////// | |
11 | ||
12 | ||
13 | #include <TObject.h> | |
5e86ff99 | 14 | #include "AliTRDltuParam.h" |
5ac2e3b1 | 15 | |
5ac2e3b1 | 16 | class AliTRDtrapConfig; |
5ac2e3b1 | 17 | |
18 | class AliTRDtrapConfigHandler : public TObject { | |
19 | public: | |
20 | AliTRDtrapConfigHandler(); | |
21 | virtual ~AliTRDtrapConfigHandler(); | |
22 | ||
23 | void ResetMCMs(); // Reset all trap registers and DMEM of the MCMs | |
5e86ff99 | 24 | Int_t LoadConfig(); // load a default configuration suitable for simulation |
5ac2e3b1 | 25 | Int_t LoadConfig(TString filename, Int_t det); // load a TRAP configuration from a file |
26 | ||
27 | void ProcessLTUparam(Int_t dest, Int_t addr, UInt_t data); // Process the LTU parameters | |
28 | void PrintGeoTest(); // Prints some information about the geometry. Only for debugging | |
29 | ||
30 | // UInt_t peek(Int_t rob, Int_t mcm, Int_t addr); // not implemented yet | |
31 | // Int_t poke(Int_t rob, Int_t mcm, Int_t addr, UInt_t value); // not implemented yet | |
32 | ||
33 | private: | |
34 | void ConfigureDyCorr(); // deflection length correction due to Lorentz angle and tilted pad correction | |
35 | void ConfigureDRange(); // deflection range LUT, range calculated according to B-field (in T) and pt_min (in GeV/c) | |
36 | void ConfigureNTimebins(); // timebins in the drift region | |
37 | void ConfigurePIDcorr(); // Calculate the mcm individual correction factors for the PID | |
38 | ||
5e86ff99 | 39 | Double_t Square(Double_t val) { return val*val; }; // returns the square of a given number |
5ac2e3b1 | 40 | |
41 | AliTRDtrapConfigHandler(const AliTRDtrapConfigHandler &h); // not implemented | |
42 | AliTRDtrapConfigHandler &operator=(const AliTRDtrapConfigHandler &h); // not implemented | |
43 | ||
5ac2e3b1 | 44 | static const UInt_t fgkScsnCmdWrite=10; // SCSN command for the write command |
5e86ff99 | 45 | static const UInt_t fgkScsnCmdRestr=18; // SCSN command to restrict commands to specified chambers |
5ac2e3b1 | 46 | static const UInt_t fgkScsnLTUparam=27; // extended SCSN command for the LTU configuration |
47 | ||
5ac2e3b1 | 48 | static const Int_t fgkMCMperROBCol = 4; // MCMs per ROB column |
49 | static const Int_t fgkPadsPerMCM = 18; // readout pads per MCM | |
50 | static const Int_t fgkMCMperROBRow = 4; // MCMs per ROB row | |
51 | ||
5e86ff99 | 52 | AliTRDltuParam ltuParam; // ltuParam class for the actual calculation of the parameters |
5ac2e3b1 | 53 | |
5e86ff99 | 54 | Int_t fDet; // detector number (0 - 539) |
5ac2e3b1 | 55 | |
5e86ff99 | 56 | UInt_t fRestrictiveMask; // mask to restrict subsequent commands to specified chambers |
5ac2e3b1 | 57 | |
58 | ClassDef(AliTRDtrapConfigHandler,0) | |
59 | }; | |
60 | ||
5ac2e3b1 | 61 | #endif |