Add conversion class to produce fake raw data
[u/mrichter/AliRoot.git] / TRD / AliTRDraw2digits.C
CommitLineData
5990c064 1void AliTRDraw2digits()
2{
3
4 AliTRDrawData *raw = new AliTRDrawData();
5 raw->SetDebug(3);
6 raw->Raw2Digit();
7
8 AliTRDdigitsManager *digitsManager = raw->GetDigitsManager();
9
10 // The geometry object
11 AliTRDgeometryFull *geo = new AliTRDgeometryFull();
12
13 // The parameter object
14 AliTRDparameter *par = new AliTRDparameter("TRDparameter"
15 ,"TRD parameter class");
16
17 // Get the detector number
18 Int_t iDet = 514;
19 cout << " iDet = " << iDet << endl;
20
21 // Define the detector matrix for one chamber
22 const Int_t iSec = geo->GetSector(iDet);
23 const Int_t iCha = geo->GetChamber(iDet);
24 const Int_t iPla = geo->GetPlane(iDet);
25 Int_t rowMax = par->GetRowMax(iPla,iCha,iSec);
26 Int_t colMax = par->GetColMax(iPla);
27 Int_t timeMax = par->GetTimeMax();
28 cout << "Geometry: rowMax = " << rowMax
29 << " colMax = " << colMax
30 << " timeMax = " << timeMax << endl;
31 AliTRDmatrix *matrix = new AliTRDmatrix(rowMax,colMax,timeMax,iSec,iCha,iPla);
32
33 // Loop through the detector pixel
34 for (Int_t time = 0; time < timeMax; time++) {
35 for (Int_t col = 0; col < colMax; col++) {
36 for (Int_t row = 0; row < rowMax; row++) {
37
38 digit = digitsManager->GetDigit(row,col,time,iDet);
39
40 matrix->SetSignal(row,col,time,digit->GetAmp());
41
42 delete digit;
43
44 }
45 }
46 }
47
48 // Display the detector matrix
49 matrix->Draw();
50 matrix->ProjRow();
51 matrix->ProjCol();
52 matrix->ProjTime();
53
54}
55
56