]>
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; |
20 | ||
21 | class AliTRDmcmSim : public TObject { | |
22 | ||
23 | public: | |
24 | ||
ecf39416 | 25 | AliTRDmcmSim(); |
26 | virtual ~AliTRDmcmSim(); | |
dfd03fc3 | 27 | |
28 | //PH virtual void Copy(TObject &m) const; | |
29 | ||
ecf39416 | 30 | void Init( Int_t cha, Int_t rob, Int_t mcm ); // Initialize MCM by the position parameters |
dfd03fc3 | 31 | void SetData(Int_t iadc, Int_t *adc); // Set ADC data with array |
ecf39416 | 32 | void SetData(Int_t iadc, Int_t it, Int_t adc ); // Set ADC data |
dfd03fc3 | 33 | void SetDataPedestal(Int_t iadc ); // Fill ADC data with pedestal values |
34 | ||
ecf39416 | 35 | Int_t GetChaId() { return fChaId; }; // Returns Chamber ID (0-539) |
36 | Int_t GetRobPos() { return fRobPos; }; // Returns ROB position (0-7) | |
37 | Int_t GetMcmPos() { return fMcmPos; }; // Returns MCM position (0-17) (16,17 are mergers) | |
38 | Int_t GetRow() { return fRow; }; // Returns Row number on chamber where the MCM is sitting | |
39 | Int_t GetCol( Int_t iadc ); // Get corresponding column (0-143) from for ADC channel iadc = [0:20] | |
40 | // for the ADC/Col mapping, see: http://wiki.kip.uni-heidelberg.de/ti/TRD/index.php/Image:ROB_MCM_numbering.pdf | |
dfd03fc3 | 41 | |
ecf39416 | 42 | Int_t ProduceRawStream( UInt_t *buf, Int_t bufsize ); // Produce raw data stream from this MCM |
43 | void Filter(); // Apply digital filters for existing data | |
44 | void ZSMapping(); // Do ZS mapping for existing data | |
45 | void DumpData( char *f, char *target ); // Dump data stored (only for debugging) | |
dfd03fc3 | 46 | |
47 | protected: | |
48 | ||
ecf39416 | 49 | Bool_t fInitialized; // Status whether the class is initialized or not |
dfd03fc3 | 50 | Int_t fChaId; // Chamber ID |
51 | Int_t fSector; // Sector number of the supermodule | |
52 | Int_t fStack; // Chamber stack ID | |
53 | Int_t fLayer; // Chamber layer ID | |
ecf39416 | 54 | Int_t fRobPos; // ROB Position on chamber |
55 | Int_t fMcmPos; // MCM Position on chamber | |
dfd03fc3 | 56 | Int_t fNADC; // Number of ADC (usually 21) |
ecf39416 | 57 | Int_t fNTimeBin; // Number of Timebins (variable) |
58 | Int_t fRow; // Pad row number (0-11 or 0-15) of the MCM on chamber | |
dfd03fc3 | 59 | Int_t **fADCR; // Array with MCM ADC values (Raw) |
60 | Int_t **fADCF; // Array with MCM ADC values (Filtered) | |
ecf39416 | 61 | Int_t **fZSM; // Zero suppression map |
62 | Int_t *fZSM1Dim; // Zero suppression map (1 dimensional projection) | |
63 | ||
64 | // parameter classes | |
65 | AliTRDfeeParam *fFeeParam; | |
66 | AliTRDSimParam *fSimParam; | |
67 | AliTRDcalibDB *fCal; | |
68 | AliTRDgeometry *fGeo; | |
dfd03fc3 | 69 | |
ecf39416 | 70 | Bool_t CheckInitialized(); // Check whether the class is initialized |
dfd03fc3 | 71 | void FilterPedestal(); // Apply pedestal filter |
72 | void FilterGain(); // Apply gain filter | |
73 | void FilterTail(); // Apply tail filter | |
74 | ||
ecf39416 | 75 | // Here are the several sub functions used only in FilterTail |
dfd03fc3 | 76 | void FilterSimDeConvExpA(Int_t *source, Double_t *target, Int_t n, Int_t nexp); |
77 | void FilterSimDeConvExpD(Int_t *source, Int_t *target, Int_t n, Int_t nexp); | |
78 | void FilterSimDeConvExpMI(Int_t *source, Double_t *target, Int_t n); | |
79 | void FilterSimTailMakerSpline(Double_t *ampin, Double_t *ampout, Double_t lambda, Int_t n); | |
80 | void FilterSimTailCancelationMI(Double_t *ampin, Double_t *ampout, Double_t norm, Double_t lambda, Int_t n); | |
81 | ||
82 | ClassDef(AliTRDmcmSim,3) | |
83 | ||
84 | }; | |
85 | ||
86 | #endif |