ICRC2019/TriggerFunctions.hh
Go to the documentation of this file.
1 //EFFICIENCY FUNCTIONS FROM NOW
2 double SDTriggerEfficiencyICRC2017_SD1500(const double lgE, const double zenith, TVectorD pCal) {
3  //used in ICRC 2017
4  //efficiency is parameterized as function of S38
5  const double pA[4] = {1.18586522, -2.5940793, 3.25692833, -1.19604131};
6  const double cos2th = pow(TMath::Cos(zenith), 2.);
7  const double A_EFF = pA[0] + cos2th * pA[1] + cos2th * cos2th * pA[2] + cos2th * cos2th * cos2th * pA[3];
8  const double B_EFF = 0.36868343 ;
9  double effpars[2];
10  effpars[0] = A_EFF;
11  effpars[1] = B_EFF;
12  const std::vector<double> parvec(effpars, effpars + 2);
13  const double lgS38 = InverseSdCalibration(lgE, pCal);
14  const double feff = ScaledErrorFunction(lgS38, parvec);
15 
16  return feff;
17 }
18 
19 double SDTriggerEfficiencyICRC2017_SD750(const double lgE, const double zenith, TVectorD pCal) {
20  //used in ICRC 2017
21  //efficiency is parameterized as function of S35
22  const double pA_750[4] = {2.38516877 , -4.85552037, 4.10415064, -0.97515248 };
23  const double cos2th = pow(TMath::Cos(zenith), 2.);
24  const double A_750 = pA_750[0] + cos2th * pA_750[1] + cos2th * cos2th * pA_750[2] + cos2th * cos2th * cos2th * pA_750[3];
25  const double B_750 = 0.24852449 ;
26  double effpars[2];
27  effpars[0] = A_750;
28  effpars[1] = B_750;
29 
30  const std::vector<double> parvec(effpars, effpars + 2);
31  const double lgS38 = InverseSdCalibration(lgE, pCal);
32  const double feff = ScaledErrorFunction(lgS38, parvec);
33 
34  return feff;
35 }
36 
37 double SDTriggerEfficiencyICRC2019_SD750(const double lgE, const double zenith, TVectorD pCal, bool oldTrig) {
38  //used in ICRC 2019
39  //efficiency is parameterized as function of S35
40  //From simulated QGS showers 50/50 P/Fe by Alan (GAP-2018-037)
41 
42  double A, B;
43 
44  const double sin2th = pow(TMath::Sin(zenith), 2.);
45 
46  if (oldTrig) {
47 
48  //50/50 mix of P/Fe, old triggers
49  const double pA[4] = {0.5667 + 0.0372, -0.2405, 1.3124, 0.0692};
50  const double pB[2] = {0.2546, -0.0362};
51  A = pA[0] + sin2th * pA[1] + sin2th * sin2th * pA[2] + sin2th * sin2th * sin2th * pA[3];
52  B = pB[0] + sin2th * pB[1];
53 
54  } else {
55 
56  //const double pA[4] = {0.3739, -0.0783, 1.0496, 0.4007}; //Proton
57  //const double pA[4] = {0.4346, -0.1092, 1.0880, 0.5030}; //Iron
58  const double pA[4] = {0.3999, -0.0631, 0.9291, 0.6118}; //50/50
59 
60  //const double pB[2] = {0.2043, 0.0770}; //Proton
61  //const double pB[2] = {0.2115, -0.0081}; //Iron
62  const double pB[2] = {0.2075, 0.0434}; //50/50
63 
64  A = pA[0] + sin2th * pA[1] + sin2th * sin2th * pA[2] + sin2th * sin2th * sin2th * pA[3];
65  B = pB[0] + sin2th * pB[1];
66  }
67 
68  const double effpars[] = {A, B};
69  const std::vector<double> parvec(effpars, effpars + 2);
70 
71  const double lgS35 = InverseSdCalibration(lgE, pCal);
72  const double feff = ScaledErrorFunction(lgS35, parvec);
73 
74  return feff;
75 }
76 
77 double SD1500TriggerEfficiencyHybrids2019(const double lgE) {
78  // From I. Valino; May 2019
79  // calculated on hybrids
80  // function is parameterized on energy only
81  double A_EFF = 17.9052;
82  double B_EFF = 0.379812;
83  double effpars[2];
84  effpars[0] = A_EFF;
85  effpars[1] = B_EFF;
86  const std::vector<double> parvec(effpars, effpars + 2);
87  const double feff = ScaledErrorFunction(lgE, parvec);
88  return feff;
89 }
90 
91 double SD1500TriggerEfficiency_ICRC2019(const double lgE, const double zenith) {
92  // From I. Valino; June 2019
93  // calculated on Hybrids
94 
95  const double pA[4] = {18.6348, -3.18143, 4.38488, -1.87468};
96  const double cos2th = pow(TMath::Cos(zenith), 2.);
97 
98  const double A_EFF = pA[0] + cos2th * pA[1] + cos2th * cos2th * pA[2] + cos2th * cos2th * cos2th * pA[3];
99  const double B_EFF = 0.372832;
100 
101  double effpars[2];
102  effpars[0] = A_EFF;
103  effpars[1] = B_EFF;
104  const std::vector<double> parvec(effpars, effpars + 2);
105 
106  const double feff = ScaledErrorFunction(lgE, parvec);
107 
108  return feff;
109 
110 }
111 
112 double TriggerEfficiency_TestExample(const double lgE) {
113  double feff = 1;
114  //test function. Add here any function you want to test
115  // input is logE and zenith angle
116  // output is efficiency
117 
118  return feff;
119 }
120 
double SD1500TriggerEfficiencyHybrids2019(const double lgE)
double SD1500TriggerEfficiency_ICRC2019(const double lgE, const double zenith)
double pow(const double x, const unsigned int i)
double SDTriggerEfficiencyICRC2017_SD750(const double lgE, const double zenith, TVectorD pCal)
double InverseSdCalibration(const double lgE, TVectorD pCal)
double SDTriggerEfficiencyICRC2017_SD1500(const double lgE, const double zenith, TVectorD pCal)
double ScaledErrorFunction(const double x, const std::vector< double > &pars)
double TriggerEfficiency_TestExample(const double lgE)
double SDTriggerEfficiencyICRC2019_SD750(const double lgE, const double zenith, TVectorD pCal, bool oldTrig)

, generated on Tue Sep 26 2023.