]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/scripts/RunAltroEmulOnRAW.C
TPC DAs
[u/mrichter/AliRoot.git] / TPC / scripts / RunAltroEmulOnRAW.C
CommitLineData
b7757586 1
2
3
4// +++++++++++++++++++++++++++++++++++++++++++++++++
5void RunAltroEmulOnRAW(Int_t mode, const char *uri,
6 const char *outputRootFileName ="rawdata.root"){
7
8 // modes
b027d808 9
10 // 0: MAF off / TCF off - ONLY ZS
11
b7757586 12 // 1: MAF on / TCF off
13 // 2: MAF on / TCF on - params from Rehak (baseline)
14 // 3: MAF on / TCF on - params from Rehak (baseline & pulse shortening)
15 // 4: MAF on / TCF on - params from Rehak (baseline, used in P2)
b027d808 16 // 5: MAF on - presample 1, postsample 1
17 // 6: MAF on - presample 1, postsample 3
18 // 7: MAF on - presample 1, postsample 5
b7757586 19
20
b027d808 21 if (mode<0 || mode>7) {
b7757586 22 printf(" ERROR: chosen mode not avalailable ...\n");
23 return;
24 }
25
26
27 TStopwatch timer;
28 timer.Start();
29
30 // READ RAW DATA +++++++++++
31
32 AliRawReader *reader=AliRawReader::Create(uri);
33 reader->NextEvent();
34 Int_t runNumber=reader->GetRunNumber();
35 reader->RewindEvents();
36
37 // ALTRO EMULATOR +++++++++++
38
39 Int_t baseline = 50; // standard in run 137228
40
41 Int_t *K0= new Int_t[2]; Int_t *K1= new Int_t[2]; Int_t *K2= new Int_t[2];
42 Int_t *L0= new Int_t[2]; Int_t *L1= new Int_t[2]; Int_t *L2= new Int_t[2];
43
44 if ( mode == 2 ) { // "middle aggressive"
45 // params from Rehak (baseline)
46 K0[0]=64386; K1[0]=65184; K2[0]= 77;
47 L0[0]=64675; L1[0]=64950; L2[0]= 0;
48 K0[1]=63675; K1[1]=65355; K2[1]= 218;
49 L0[1]=63917; L1[1]=65263; L2[1]= 0;
50
51 } else if ( mode ==3 ) { // "most aggressive"
52 // params from Rehak (baseline & pulse shortening)
53 K0[0]=58684; K1[0]=65273; K2[0]= 1361; // IROC
54 L0[0]=59754; L1[0]=65187; L2[0]= 0;
55 K0[1]=59688; K1[1]=65347; K2[1]= 1349; // OROC
56 L0[1]=60704; L1[1]=65273; L2[1]= 0;
57
58 } else if ( mode == 4 ) { // a bit "aggressive"
59 // params from Rehak (baseline, used in P2);
60 K0[0]=62055; K1[0]=65300; K2[0]= 277; // IROC
61 L0[0]=62339; L1[0]=65208; L2[0]= 0;
62 K0[1]=63151; K1[1]=65435; K2[1]= 266; // OROC
63 L0[1]=63387; L1[1]=65371; L2[1]= 0;
64 }
65
66
67 AliTPCAltroEmulator *a1 = new AliTPCAltroEmulator();
68
69 a1->ConfigBaselineCorrection1(4, baseline, 0, 0);
b7757586 70 a1->ConfigZerosuppression(3,2,0,0);
71
b027d808 72 if (mode ==0) { // do nothing, just ZS
73
74 a1->ConfigAltro(1,0,0,1,1,0);
75
76 } else if (mode==1) { // MAF
b7757586 77
b027d808 78 a1->ConfigBaselineCorrection2(3,3,0,0,0);
79 a1->ConfigAltro(1,0,1,1,1,0);
80
81 } else if (mode==2 || mode ==3 || mode==4) { // MAF and different TCF
82
83 a1->ConfigTailCancellationFilterForRAWfiles(K0,K1,K2,L0,L1,L2);
84 a1->ConfigBaselineCorrection2(3,3,0,0,0);
85 a1->ConfigAltro(1,1,1,1,1,0);
86
87 } else if (mode == 5) { // different MAF
88
89 a1->ConfigBaselineCorrection2(3,3,0,1,1); // 1 presample, 1 postsamples
90 a1->ConfigAltro(1,0,1,1,1,0);
91
92 } else if (mode == 6) { // different MAF
93
94 a1->ConfigBaselineCorrection2(3,3,0,1,3); // 1 presample, 3 postsamples
95 a1->ConfigAltro(1,0,1,1,1,0);
96
97 } else if (mode == 7) { // different MAF
98
99 a1->ConfigBaselineCorrection2(3,3,0,1,5); // 1 presample, 5 postsamples
100 a1->ConfigAltro(1,0,1,1,1,0);
101
102 }
b7757586 103
104
105 a1->SetOutputRootFileName(outputRootFileName);
106 a1->RunEmulationOnRAWdata(reader);
107
108 timer.Stop(); timer.Print();
109}
110
111