]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDtrapConfigHandler.h
Removal of old raw reader calls (Raphaelle)
[u/mrichter/AliRoot.git] / TRD / AliTRDtrapConfigHandler.h
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>
14
15 class AliTRDgeometry;
16 class AliTRDtrapConfig;
17 class AliTRDpadPlane;
18
19
20 class AliTRDtrapConfigHandler : public TObject {
21  public:
22                     AliTRDtrapConfigHandler();
23   virtual          ~AliTRDtrapConfigHandler();
24
25   void ResetMCMs();                                           // Reset all trap registers and DMEM of the MCMs
26   Int_t LoadConfig(TString filename, Int_t det);              // load a TRAP configuration from a file
27
28   void ProcessLTUparam(Int_t dest, Int_t addr, UInt_t data);  // Process the LTU parameters
29   void PrintGeoTest();                                        // Prints some information about the geometry. Only for debugging
30
31   // UInt_t peek(Int_t rob, Int_t mcm, Int_t addr);   // not implemented yet
32   // Int_t poke(Int_t rob, Int_t mcm, Int_t addr, UInt_t value);   // not implemented yet
33
34  private:
35   void  ConfigureDyCorr();                                    // deflection length correction due to Lorentz angle and tilted pad correction
36   void  ConfigureDRange();                                    // deflection range LUT,  range calculated according to B-field (in T) and pt_min (in GeV/c)
37   void  ConfigureNTimebins();                                 // timebins in the drift region
38   void  ConfigurePIDcorr();                                   // Calculate the mcm individual correction factors for the PID
39
40   Int_t GetPadPosNonRot(Int_t rob, Int_t mcm, Int_t channel, Double_t trackCoor[3]);    // calcutate the gobal coordinates for an mcm channel in the supermodule at position -0.5
41   void GetLocalPadPos(AliTRDpadPlane *plane, Int_t rob, Int_t mcm, Int_t channel, Double_t result[2]); // calculate the local coordinates for an mcm channel
42
43   Double_t Square(Double_t val);  // returns the square of a given number
44
45   AliTRDtrapConfigHandler(const AliTRDtrapConfigHandler &h);             // not implemented
46   AliTRDtrapConfigHandler &operator=(const AliTRDtrapConfigHandler &h);  // not implemented
47
48
49
50   static const UInt_t fgkScsnCmdWrite=10;  // SCSN command for the write command
51   static const UInt_t fgkScsnLTUparam=27;  // extended SCSN command for the LTU configuration
52
53   static const Int_t fgkDyMaxCut = 63;     // Maximum value of the deflection cut
54   static const Int_t fgkDyMinCut = -64;    // Minimum value of the deflection cut
55
56   static const Int_t fgkMCMperROBCol = 4;  // MCMs per ROB column
57   static const Int_t fgkPadsPerMCM = 18;   // readout pads per MCM
58   static const Int_t fgkMCMperROBRow = 4;  // MCMs per ROB row
59
60
61   AliTRDgeometry *fGeo;                    // Pointer to the AliTRDgeometry class
62
63   Int_t fDet;   // detector number (0 - 539)
64
65   Double_t fBField;                        // value of the L3 magnet field
66   Double_t fOmegaTau;                      // ometa tau
67   Double_t fPtMin;                         // lower p_t threshold for the tracks which should pass the deflection cut
68   Int_t fNTimebins;                        // Number of time bins in the drift region (only relevant for GTU)
69   UInt_t fScaleQ0;                         // scale parameter to map the accumulated charge in the first time window to a memory address
70   UInt_t fScaleQ1;                         // scale parameter to map the accumulated charge in the second time window to a memory address
71   Bool_t fPidTracklengthCorr;              // Factor to correct the accumulated charge for track length effects
72   Bool_t fTiltCorr;                        // tilting correction
73
74
75   ClassDef(AliTRDtrapConfigHandler,0)
76 };
77
78
79 #endif
80