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