4 // +++++++++++++++++++++++++++++++++++++++++++++++++
5 void RunAltroEmulOnRAW(Int_t mode, const char *uri,
6 const char *outputRootFileName ="rawdata.root"){
10 // 0: MAF off / TCF off - ONLY ZS
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)
16 // 5: MAF on - presample 1, postsample 1
17 // 6: MAF on - presample 1, postsample 3
18 // 7: MAF on - presample 1, postsample 5
21 if (mode<0 || mode>7) {
22 printf(" ERROR: chosen mode not avalailable ...\n");
30 // READ RAW DATA +++++++++++
32 AliRawReader *reader=AliRawReader::Create(uri);
34 Int_t runNumber=reader->GetRunNumber();
35 reader->RewindEvents();
37 // ALTRO EMULATOR +++++++++++
39 Int_t baseline = 50; // standard in run 137228
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];
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;
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;
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;
67 AliTPCAltroEmulator *a1 = new AliTPCAltroEmulator();
69 a1->ConfigBaselineCorrection1(4, baseline, 0, 0);
70 a1->ConfigZerosuppression(3,2,0,0);
72 if (mode ==0) { // do nothing, just ZS
74 a1->ConfigAltro(1,0,0,1,1,0);
76 } else if (mode==1) { // MAF
78 a1->ConfigBaselineCorrection2(3,3,0,0,0);
79 a1->ConfigAltro(1,0,1,1,1,0);
81 } else if (mode==2 || mode ==3 || mode==4) { // MAF and different TCF
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);
87 } else if (mode == 5) { // different MAF
89 a1->ConfigBaselineCorrection2(3,3,0,1,1); // 1 presample, 1 postsamples
90 a1->ConfigAltro(1,0,1,1,1,0);
92 } else if (mode == 6) { // different MAF
94 a1->ConfigBaselineCorrection2(3,3,0,1,3); // 1 presample, 3 postsamples
95 a1->ConfigAltro(1,0,1,1,1,0);
97 } else if (mode == 7) { // different MAF
99 a1->ConfigBaselineCorrection2(3,3,0,1,5); // 1 presample, 5 postsamples
100 a1->ConfigAltro(1,0,1,1,1,0);
105 a1->SetOutputRootFileName(outputRootFileName);
106 a1->RunEmulationOnRAWdata(reader);
108 timer.Stop(); timer.Print();