]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDtrapConfigHandler.h
Switch off debug tree
[u/mrichter/AliRoot.git] / TRD / AliTRDtrapConfigHandler.h
CommitLineData
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"
5f7c3c48 15#include "AliTRDCalOnlineGainTable.h"
5ac2e3b1 16
5ac2e3b1 17class AliTRDtrapConfig;
5ac2e3b1 18
19class AliTRDtrapConfigHandler : public TObject {
20 public:
21 AliTRDtrapConfigHandler();
22 virtual ~AliTRDtrapConfigHandler();
23
24 void ResetMCMs(); // Reset all trap registers and DMEM of the MCMs
5e86ff99 25 Int_t LoadConfig(); // load a default configuration suitable for simulation
51380642 26 Int_t LoadConfig(TString filename); // load a TRAP configuration from a file
5f7c3c48 27 Int_t SetGaintable(AliTRDCalOnlineGainTable const &gtbl); // Set a gain table to correct Q0 and Q1 for PID
5ac2e3b1 28
29 void ProcessLTUparam(Int_t dest, Int_t addr, UInt_t data); // Process the LTU parameters
30 void PrintGeoTest(); // Prints some information about the geometry. Only for debugging
31
32 // UInt_t peek(Int_t rob, Int_t mcm, Int_t addr); // not implemented yet
33 // Int_t poke(Int_t rob, Int_t mcm, Int_t addr, UInt_t value); // not implemented yet
34
35 private:
51380642 36 void ConfigureDyCorr(Int_t det); // deflection length correction due to Lorentz angle and tilted pad correction
37 void ConfigureDRange(Int_t det); // deflection range LUT, range calculated according to B-field (in T) and pt_min (in GeV/c)
38 void ConfigureNTimebins(Int_t det); // timebins in the drift region
39 void ConfigurePIDcorr(Int_t det); // Calculate the mcm individual correction factors for the PID
5ac2e3b1 40
5e86ff99 41 Double_t Square(Double_t val) { return val*val; }; // returns the square of a given number
5ac2e3b1 42
43 AliTRDtrapConfigHandler(const AliTRDtrapConfigHandler &h); // not implemented
44 AliTRDtrapConfigHandler &operator=(const AliTRDtrapConfigHandler &h); // not implemented
45
759042e7 46 static const UInt_t fgkScsnCmdReset=6; // SCSN command for reset
47 static const UInt_t fgkScsnCmdPause=8; // SCSN command to pause
48 static const UInt_t fgkScsnCmdRead=9; // SCSN command to read
49 static const UInt_t fgkScsnCmdWrite=10; // SCSN command to write
50 static const UInt_t fgkScsnCmdPtrg=12; // SCSN command for pretrigger
51 static const UInt_t fgkScsnCmdRobPower=16; // SCSN command to switch ROB power
52 static const UInt_t fgkScsnCmdRobReset=17; // SCSN command for ROB reset
53
54 static const UInt_t fgkScsnCmdRestr=18; // SCSN command to restrict commands to specified chambers
55 static const UInt_t fgkScsnCmdTtcRx=19; // SCSN command to configure TTCrx
56 static const UInt_t fgkScsnCmdHwPtrg=20; // SCSN command to issue pretrigger pulse
57 static const UInt_t fgkScsnCmdSetHC=22; // SCSN command to set HC ID
58 static const UInt_t fgkScsnCmdMcmTemp=24; // SCSN command for MCM temperature sensors
59 static const UInt_t fgkScsnCmdPM=25; // SCSN command for patchmaker
60 static const UInt_t fgkScsnCmdOri=26; // SCSN command for ORI configuration
61 static const UInt_t fgkScsnLTUparam=27; // extended SCSN command for the LTU configuration
5ac2e3b1 62
5ac2e3b1 63 static const Int_t fgkMCMperROBCol = 4; // MCMs per ROB column
64 static const Int_t fgkPadsPerMCM = 18; // readout pads per MCM
65 static const Int_t fgkMCMperROBRow = 4; // MCMs per ROB row
66
5e86ff99 67 AliTRDltuParam ltuParam; // ltuParam class for the actual calculation of the parameters
5ac2e3b1 68
5e86ff99 69 UInt_t fRestrictiveMask; // mask to restrict subsequent commands to specified chambers
5ac2e3b1 70
5f7c3c48 71 AliTRDCalOnlineGainTable fGtbl; // gain table
72
5ac2e3b1 73 ClassDef(AliTRDtrapConfigHandler,0)
74};
75
5ac2e3b1 76#endif