forked from mnycz/Summer2022_solid_proton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PVDIS_tri_eff_Rakitha1.h
75 lines (63 loc) · 9.99 KB
/
PVDIS_tri_eff_Rakitha1.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
Last updated Mon Apr 3 10:40:07 EDT 2017 to include the sector separation in the trigger efficiency
Firt created by Rakitha Thu Apr 14 13:42:58 EDT 2016
file name : Get_PVDIS_trigger_efficiency_EC.C
Radial binning is 8 see trig_low_R and trig_high_R
momentum binning is 35 see P_low and P_high
Routines GetPionTriggerEffi and GetElectronTriggerEffi would return the trigger efficiency when radius index and momentum index (bin index) are passed to them
The last radii index in the trig_pi_eff and trig_ele_eff gives the trigger efficiency for all radii average
Use routines GetRadiusIndex and GetMomentumIndex to get the bin index for radius and momentum
The radius is at the front face of the EC
*/
Double_t trig_low_R[8]={110.0 ,130.0 ,150.0 ,170.0 ,190.0 ,210.0 ,230.0 ,250.0};//radius in cm
Double_t trig_high_R[8]={130.0 ,150.0 ,170.0 ,190.0 ,210.0 ,230.0 ,250.0 ,270.0};
Double_t P_low[35] = { 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2, 4.4, 4.6, 4.8, 5.0, 5.2, 5.4, 5.6, 5.8, 6.0, 6.2, 6.4, 6.6, 6.8, 7.0, 7.2, 7.4, 7.6, 7.8}; //momentum in GeV
Double_t P_high[35] = { 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2, 4.4, 4.6, 4.8, 5.0, 5.2, 5.4, 5.6, 5.8, 6.0, 6.2, 6.4, 6.6, 6.8, 7.0, 7.2, 7.4, 7.6, 7.8, 8.0};
Int_t GetRadiusIndex(Double_t radius){
Int_t Ri=-1;
for (Int_t i =0; i<8;i++){
if (radius>trig_low_R[i] && radius<=trig_high_R[i]){
Ri=i;
break;
}
}
return Ri;
};
Int_t GetMomentumIndex(Double_t mom){
Int_t Pi=-1;
for (Int_t i =0; i<35;i++){
if (mom>P_low[i] && mom<=P_high[i]){
Pi=i;
break;
}
}
return Pi;
};
Double_t GetPionTriggerEffi(Int_t rad_index, Int_t mom_index){
Double_t trig_pi_eff[9][35] = { { 0.006,0.005,0.011,0.004,0.015,0.014,0.010,0.037,0.053,0.089,0.078,0.143,0.141,0.151,0.207,0.257,0.215,0.251,0.297,0.304,0.339,0.338,0.326,0.331,0.346,0.421,0.369,0.429,0.471,0.381,0.393,0.412,0.410,0.449,0.420},{ 0.009,0.003,0.010,0.006,0.017,0.030,0.074,0.106,0.113,0.161,0.224,0.247,0.219,0.295,0.340,0.335,0.378,0.356,0.371,0.384,0.382,0.384,0.404,0.416,0.413,0.425,0.432,0.456,0.438,0.448,0.454,0.486,0.456,0.473,0.532},{ 0.009,0.012,0.011,0.016,0.041,0.121,0.135,0.149,0.212,0.249,0.283,0.260,0.333,0.365,0.423,0.379,0.461,0.439,0.413,0.468,0.448,0.515,0.481,0.481,0.470,0.470,0.539,0.494,0.489,0.509,0.534,0.552,0.513,0.463,0.527},{ 0.005,0.021,0.053,0.052,0.121,0.178,0.258,0.299,0.318,0.369,0.372,0.421,0.399,0.398,0.405,0.463,0.412,0.495,0.509,0.490,0.468,0.459,0.471,0.519,0.557,0.496,0.528,0.545,0.544,0.552,0.540,0.544,0.536,0.526,0.544},{ 0.014,0.040,0.099,0.145,0.193,0.298,0.370,0.395,0.418,0.435,0.460,0.436,0.458,0.489,0.544,0.507,0.532,0.556,0.581,0.484,0.533,0.549,0.553,0.527,0.580,0.605,0.549,0.562,0.529,0.548,0.614,0.607,0.545,0.585,0.616},{ 0.008,0.087,0.113,0.212,0.204,0.341,0.360,0.387,0.404,0.398,0.451,0.462,0.467,0.522,0.492,0.532,0.578,0.548,0.544,0.512,0.467,0.553,0.548,0.521,0.544,0.624,0.549,0.532,0.602,0.578,0.566,0.570,0.622,0.603,0.536},{ 0.013,0.022,0.063,0.082,0.095,0.155,0.166,0.209,0.246,0.239,0.213,0.227,0.303,0.260,0.320,0.298,0.317,0.331,0.334,0.338,0.316,0.339,0.317,0.340,0.353,0.322,0.340,0.320,0.311,0.336,0.354,0.346,0.327,0.326,0.355},{ 0.000,0.008,0.003,0.003,0.005,0.003,0.009,0.012,0.023,0.025,0.009,0.015,0.018,0.031,0.023,0.021,0.023,0.031,0.010,0.020,0.021,0.020,0.026,0.028,0.027,0.043,0.029,0.026,0.019,0.018,0.019,0.030,0.032,0.029,0.038},{ 0.008,0.025,0.049,0.068,0.088,0.149,0.172,0.204,0.227,0.252,0.265,0.278,0.296,0.321,0.349,0.351,0.367,0.378,0.390,0.375,0.372,0.393,0.394,0.392,0.413,0.433,0.416,0.413,0.426,0.423,0.436,0.446,0.431,0.438,0.435 }};
if (rad_index!= -1 && mom_index!=-1)
return trig_pi_eff[rad_index][mom_index];
else
return 0;
};
Double_t GetPionTriggerEffiError(Int_t rad_index, Int_t mom_index){
Double_t trig_pi_eff_err[9][35] = { { 0.004,0.004,0.006,0.004,0.008,0.007,0.006,0.012,0.013,0.017,0.016,0.021,0.020,0.021,0.025,0.026,0.024,0.025,0.027,0.027,0.027,0.028,0.027,0.029,0.028,0.030,0.028,0.029,0.029,0.028,0.027,0.030,0.029,0.029,0.028},{ 0.005,0.003,0.006,0.004,0.008,0.009,0.015,0.017,0.018,0.022,0.024,0.025,0.023,0.027,0.026,0.025,0.028,0.027,0.028,0.028,0.028,0.027,0.029,0.028,0.028,0.029,0.028,0.029,0.028,0.028,0.027,0.027,0.028,0.028,0.029},{ 0.005,0.006,0.006,0.007,0.011,0.018,0.019,0.020,0.022,0.023,0.025,0.025,0.025,0.027,0.028,0.026,0.027,0.028,0.027,0.028,0.027,0.027,0.028,0.027,0.027,0.028,0.028,0.028,0.029,0.028,0.027,0.028,0.027,0.028,0.029},{ 0.004,0.008,0.012,0.012,0.017,0.020,0.023,0.025,0.026,0.027,0.026,0.028,0.026,0.025,0.026,0.028,0.026,0.028,0.027,0.026,0.028,0.028,0.027,0.027,0.027,0.026,0.027,0.028,0.027,0.027,0.028,0.027,0.027,0.027,0.027},{ 0.006,0.010,0.015,0.019,0.021,0.024,0.026,0.026,0.026,0.027,0.026,0.027,0.026,0.026,0.026,0.026,0.028,0.026,0.026,0.026,0.027,0.028,0.026,0.027,0.027,0.026,0.026,0.028,0.026,0.026,0.026,0.027,0.027,0.026,0.027},{ 0.005,0.015,0.016,0.022,0.022,0.025,0.027,0.026,0.026,0.026,0.026,0.027,0.027,0.026,0.026,0.026,0.026,0.028,0.026,0.027,0.027,0.026,0.025,0.027,0.026,0.026,0.027,0.028,0.026,0.026,0.026,0.026,0.026,0.025,0.027},{ 0.005,0.008,0.013,0.014,0.016,0.019,0.019,0.021,0.023,0.023,0.021,0.022,0.025,0.023,0.025,0.025,0.025,0.025,0.025,0.025,0.025,0.026,0.025,0.025,0.026,0.025,0.026,0.024,0.024,0.025,0.025,0.025,0.025,0.025,0.025},{ 0.000,0.005,0.003,0.003,0.004,0.003,0.005,0.006,0.008,0.009,0.005,0.007,0.007,0.010,0.008,0.008,0.008,0.010,0.006,0.008,0.008,0.007,0.009,0.009,0.009,0.012,0.009,0.009,0.007,0.007,0.007,0.009,0.010,0.010,0.010},{ 0.002,0.003,0.004,0.005,0.006,0.007,0.007,0.008,0.008,0.009,0.008,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.009,0.010,0.010,0.009,0.010,0.010,0.010,0.009,0.010,0.010,0.010,0.010 }};
if (rad_index!= -1 && mom_index!=-1)
return trig_pi_eff_err[rad_index][mom_index];
else
return 0;
};
Double_t GetElectronTriggerEffi(Int_t rad_index, Int_t mom_index){
Double_t trig_ele_eff[9][35] = { { 0.007,0.006,0.004,0.008,0.036,0.040,0.079,0.200,0.345,0.512,0.741,0.923,0.957,0.994,0.998,0.998,0.998,0.998,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000},{ 0.010,0.014,0.018,0.016,0.041,0.081,0.209,0.398,0.658,0.863,0.964,0.991,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000},{ 0.018,0.013,0.018,0.045,0.116,0.274,0.557,0.806,0.949,0.995,0.998,1.000,0.998,1.000,1.000,1.000,1.000,1.000,1.000,1.000,0.998,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000},{ 0.011,0.026,0.052,0.164,0.394,0.709,0.918,0.974,0.996,0.998,0.998,1.000,0.998,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000},{ 0.028,0.033,0.171,0.432,0.808,0.961,0.988,0.998,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000},{ 0.027,0.055,0.255,0.702,0.938,0.985,0.991,1.000,0.998,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000},{ 0.015,0.030,0.182,0.488,0.746,0.860,0.887,0.909,0.933,0.934,0.954,0.936,0.968,0.961,0.969,0.969,0.971,0.971,0.972,0.983,0.982,0.989,0.986,0.989,0.990,0.990,0.990,0.983,0.984,0.988,0.987,0.987,0.991,0.985,0.991},{ 0.010,0.000,0.009,0.015,0.009,0.034,0.059,0.074,0.073,0.095,0.094,0.101,0.103,0.099,0.115,0.109,0.120,0.118,0.156,0.130,0.144,0.132,0.173,0.175,0.133,0.177,0.210,0.163,0.166,0.139,0.190,0.181,0.179,0.223,0.158},{ 0.016,0.023,0.094,0.246,0.412,0.526,0.598,0.682,0.757,0.802,0.846,0.875,0.878,0.881,0.889,0.884,0.889,0.886,0.891,0.889,0.894,0.885,0.897,0.891,0.888,0.888,0.901,0.892,0.893,0.888,0.905,0.898,0.897,0.904,0.896 }};
if (rad_index!= -1 && mom_index!=-1)
return trig_ele_eff[rad_index][mom_index];
else
return 0;
};
Double_t GetElectronTriggerEffiError(Int_t rad_index, Int_t mom_index){
Double_t trig_ele_eff_err[9][35] = { { 0.004,0.003,0.003,0.004,0.009,0.009,0.012,0.018,0.021,0.022,0.020,0.012,0.009,0.004,0.002,0.002,0.002,0.002,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000},{ 0.004,0.005,0.006,0.005,0.009,0.013,0.017,0.021,0.021,0.015,0.008,0.004,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000},{ 0.005,0.005,0.006,0.009,0.014,0.019,0.022,0.017,0.010,0.003,0.002,0.000,0.002,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.002,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000},{ 0.004,0.006,0.009,0.014,0.021,0.019,0.012,0.007,0.002,0.002,0.002,0.000,0.002,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000},{ 0.006,0.007,0.015,0.021,0.016,0.008,0.004,0.002,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000},{ 0.006,0.009,0.017,0.018,0.010,0.005,0.004,0.000,0.002,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000},{ 0.004,0.007,0.015,0.019,0.018,0.014,0.012,0.011,0.010,0.010,0.009,0.010,0.007,0.008,0.007,0.007,0.007,0.007,0.007,0.005,0.005,0.004,0.005,0.004,0.004,0.004,0.004,0.005,0.005,0.005,0.005,0.005,0.004,0.005,0.004},{ 0.004,0.000,0.004,0.005,0.004,0.007,0.010,0.011,0.011,0.012,0.012,0.013,0.013,0.013,0.014,0.013,0.014,0.014,0.015,0.014,0.015,0.014,0.016,0.016,0.014,0.016,0.018,0.016,0.016,0.015,0.018,0.016,0.017,0.018,0.016},{ 0.002,0.002,0.004,0.006,0.007,0.007,0.007,0.007,0.006,0.006,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.004,0.005,0.005,0.004,0.005}};
if (rad_index!= -1 && mom_index!=-1)
return trig_ele_eff_err[rad_index][mom_index];
else
return 0;
};