]>
Commit | Line | Data |
---|---|---|
dfd03fc3 | 1 | #ifndef ALITRDMCMSIM_H |
2 | #define ALITRDMCMSIM_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 | // Multi Chip Module Simulation Class // | |
11 | // // | |
12 | /////////////////////////////////////////////////////// | |
13 | ||
14 | #include <TObject.h> | |
15 | ||
16 | class AliTRDfeeParam; | |
17 | class AliTRDgeometry; | |
18 | ||
19 | class AliTRDmcmSim : public TObject { | |
20 | ||
21 | public: | |
22 | ||
23 | AliTRDmcmSim(); | |
24 | virtual ~AliTRDmcmSim(); | |
25 | ||
26 | //PH virtual void Copy(TObject &m) const; | |
27 | ||
28 | void Init( Int_t cha_id, Int_t rob_pos, Int_t mcm_pos ); // Initialize MCM by the position parameters | |
29 | void SetData(Int_t iadc, Int_t *adc); // Set ADC data with array | |
30 | void SetData(Int_t iadc, Int_t it, Int_t adc ); // Set ADC data one by one | |
31 | void SetDataPedestal(Int_t iadc ); // Fill ADC data with pedestal values | |
32 | ||
33 | Int_t GetChaId() { return fChaId; }; // Returns Chamber ID (0-539) | |
34 | Int_t GetRobPos() { return fRobPos; }; // Returns ROB position (0-7) | |
35 | Int_t GetMcmPos() { return fMcmPos; }; // Returns MCM position (0-17) (16,17 are mergers) | |
36 | Int_t GetRow() { return fRow; }; // Returns Row number on chamber where it is sitting | |
37 | Int_t GetCol( Int_t iadc ); // Get corresponding column (0-143) from adc ID (= 0-20) | |
38 | // for the ADC/Col mapping, see: http://wiki.kip.uni-heidelberg.de/ti/TRD/index.php/Image:ROB_MCM_numbering.pdf | |
39 | ||
40 | Int_t ProduceRawStream( UInt_t *buf, Int_t bufsize ); // Produce raw data stream from this MCM | |
41 | void Filter(); // Apply digital filters | |
42 | void ZSMapping(); // Do ZS mapping | |
43 | ||
44 | protected: | |
45 | ||
46 | Bool_t fInitialized; // Status | |
47 | ||
48 | AliTRDfeeParam *fFeeParam; | |
49 | AliTRDgeometry *fGeo; | |
50 | ||
51 | Int_t fChaId; // Chamber ID | |
52 | Int_t fSector; // Sector number of the supermodule | |
53 | Int_t fStack; // Chamber stack ID | |
54 | Int_t fLayer; // Chamber layer ID | |
55 | Int_t fRobPos; // ROB Position | |
56 | Int_t fMcmPos; // MCM Position | |
57 | Int_t fNADC; // Number of ADC (usually 21) | |
58 | Int_t fNTimeBin; // Number of Timebin (valiable) | |
59 | Int_t fRow; // Pad row number (0-11 or 0-15) | |
60 | Int_t fColOfADCbeg; // Column corresponds to ADC channel 0 | |
61 | Int_t fColOfADCend; // Column corresponds to ADC channel [fNADC-1] (usually 20) | |
62 | Int_t **fADCR; // Array with MCM ADC values (Raw) | |
63 | Int_t **fADCF; // Array with MCM ADC values (Filtered) | |
64 | Int_t **fZSM; // Zero Suppression Map | |
65 | Int_t *fZSM1Dim; // Zero Suppression (1 dimensional projection) | |
66 | ||
67 | void FilterPedestal(); // Apply pedestal filter | |
68 | void FilterGain(); // Apply gain filter | |
69 | void FilterTail(); // Apply tail filter | |
70 | ||
71 | void FilterSimDeConvExpA(Int_t *source, Double_t *target, Int_t n, Int_t nexp); | |
72 | void FilterSimDeConvExpD(Int_t *source, Int_t *target, Int_t n, Int_t nexp); | |
73 | void FilterSimDeConvExpMI(Int_t *source, Double_t *target, Int_t n); | |
74 | void FilterSimTailMakerSpline(Double_t *ampin, Double_t *ampout, Double_t lambda, Int_t n); | |
75 | void FilterSimTailCancelationMI(Double_t *ampin, Double_t *ampout, Double_t norm, Double_t lambda, Int_t n); | |
76 | ||
77 | ClassDef(AliTRDmcmSim,3) | |
78 | ||
79 | }; | |
80 | ||
81 | #endif |