]>
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; | |
ecf39416 | 17 | class AliTRDSimParam; |
18 | class AliTRDcalibDB; | |
dfd03fc3 | 19 | class AliTRDgeometry; |
1d93b218 | 20 | class AliTRDtrapAlu; |
21 | class AliTRDpadPlane; | |
dfd03fc3 | 22 | |
23 | class AliTRDmcmSim : public TObject { | |
24 | ||
25 | public: | |
26 | ||
ecf39416 | 27 | AliTRDmcmSim(); |
6e5d4cb2 | 28 | AliTRDmcmSim(const AliTRDmcmSim &m); |
ecf39416 | 29 | virtual ~AliTRDmcmSim(); |
6e5d4cb2 | 30 | AliTRDmcmSim &operator=(const AliTRDmcmSim &m); |
dfd03fc3 | 31 | |
6e5d4cb2 | 32 | virtual void Copy(TObject &m) const; |
dfd03fc3 | 33 | |
96e6312d | 34 | void Init( Int_t cha, Int_t rob, Int_t mcm, Bool_t newEvent ); // Initialize MCM by the position parameters |
35 | //void Init( Int_t cha, Int_t rob, Int_t mcm ); // Initialize MCM by the position parameters | |
dfd03fc3 | 36 | void SetData(Int_t iadc, Int_t *adc); // Set ADC data with array |
ecf39416 | 37 | void SetData(Int_t iadc, Int_t it, Int_t adc ); // Set ADC data |
dfd03fc3 | 38 | void SetDataPedestal(Int_t iadc ); // Fill ADC data with pedestal values |
39 | ||
0c349049 | 40 | Int_t GetChaId() const { return fChaId; }; // Returns Chamber ID (0-539) |
41 | Int_t GetRobPos() const { return fRobPos; }; // Returns ROB position (0-7) | |
42 | Int_t GetMcmPos() const { return fMcmPos; }; // Returns MCM position (0-17) (16,17 are mergers) | |
43 | Int_t GetRow() const { return fRow; }; // Returns Row number on chamber where the MCM is sitting | |
ecf39416 | 44 | Int_t GetCol( Int_t iadc ); // Get corresponding column (0-143) from for ADC channel iadc = [0:20] |
45 | // for the ADC/Col mapping, see: http://wiki.kip.uni-heidelberg.de/ti/TRD/index.php/Image:ROB_MCM_numbering.pdf | |
dfd03fc3 | 46 | |
1d93b218 | 47 | Int_t* GetPosLUT(); |
48 | ||
987ba9a3 | 49 | Int_t ProduceRawStream( UInt_t *buf, Int_t bufsize ); // Produce raw data stream from this MCM - old |
50 | Int_t ProduceRawStreamV2( UInt_t *buf, Int_t bufsize ); // Produce raw data stream - Read data format | |
1d93b218 | 51 | Int_t ProduceTrackletStream( UInt_t *buf, Int_t bufsize ); // produce the tracklet stream for this MCM |
ecf39416 | 52 | void Filter(); // Apply digital filters for existing data |
53 | void ZSMapping(); // Do ZS mapping for existing data | |
54 | void DumpData( char *f, char *target ); // Dump data stored (only for debugging) | |
1d93b218 | 55 | void Tracklet(); |
56 | void SetPosLUT(); | |
dfd03fc3 | 57 | |
58 | protected: | |
59 | ||
ecf39416 | 60 | Bool_t fInitialized; // Status whether the class is initialized or not |
96e6312d | 61 | Int_t fNextEvent; // 0, if new event; 1 if not |
1d93b218 | 62 | Int_t fMaxTracklets; // maximum number of tracklet-words submitted per mcm **new** |
dfd03fc3 | 63 | Int_t fChaId; // Chamber ID |
64 | Int_t fSector; // Sector number of the supermodule | |
65 | Int_t fStack; // Chamber stack ID | |
66 | Int_t fLayer; // Chamber layer ID | |
ecf39416 | 67 | Int_t fRobPos; // ROB Position on chamber |
68 | Int_t fMcmPos; // MCM Position on chamber | |
dfd03fc3 | 69 | Int_t fNADC; // Number of ADC (usually 21) |
ecf39416 | 70 | Int_t fNTimeBin; // Number of Timebins (variable) |
71 | Int_t fRow; // Pad row number (0-11 or 0-15) of the MCM on chamber | |
1d93b218 | 72 | Int_t **fADCR; // Array with MCM ADC values (Raw) |
dfd03fc3 | 73 | Int_t **fADCF; // Array with MCM ADC values (Filtered) |
1d93b218 | 74 | Int_t **fADCT; // Array with MCM ADC values (filtered) for tracklet (12bits) //***NEW*** |
75 | Int_t *fPosLUT; // position lookup table **new** | |
76 | UInt_t *fMCMT; // tracklet word for one mcm/trap-chip **new** | |
77 | Int_t **fZSM; // Zero suppression map | |
ecf39416 | 78 | Int_t *fZSM1Dim; // Zero suppression map (1 dimensional projection) |
79 | ||
1d93b218 | 80 | |
81 | ||
82 | ||
83 | ||
0c349049 | 84 | // Parameter classes |
85 | AliTRDfeeParam *fFeeParam; // FEE parameters | |
86 | AliTRDSimParam *fSimParam; // Simulation parameters | |
87 | AliTRDcalibDB *fCal; // Calibration interface | |
88 | AliTRDgeometry *fGeo; // Geometry | |
dfd03fc3 | 89 | |
ecf39416 | 90 | Bool_t CheckInitialized(); // Check whether the class is initialized |
dfd03fc3 | 91 | void FilterPedestal(); // Apply pedestal filter |
92 | void FilterGain(); // Apply gain filter | |
93 | void FilterTail(); // Apply tail filter | |
94 | ||
ecf39416 | 95 | // Here are the several sub functions used only in FilterTail |
dfd03fc3 | 96 | void FilterSimDeConvExpA(Int_t *source, Double_t *target, Int_t n, Int_t nexp); |
97 | void FilterSimDeConvExpD(Int_t *source, Int_t *target, Int_t n, Int_t nexp); | |
98 | void FilterSimDeConvExpMI(Int_t *source, Double_t *target, Int_t n); | |
99 | void FilterSimTailMakerSpline(Double_t *ampin, Double_t *ampout, Double_t lambda, Int_t n); | |
100 | void FilterSimTailCancelationMI(Double_t *ampin, Double_t *ampout, Double_t norm, Double_t lambda, Int_t n); | |
1d93b218 | 101 | void FilterSimDeConvExpEl(Int_t *source, Int_t *target, Int_t n, Int_t nexp); |
dfd03fc3 | 102 | |
103 | ClassDef(AliTRDmcmSim,3) | |
104 | ||
105 | }; | |
106 | ||
107 | #endif |