+
+//_____________________________________________________________________________
+Double_t IntSpecGeant(Double_t *x, Double_t *)
+{
+ //
+ // Integrated spectrum from Geant3
+ //
+
+ const Int_t npts = 83;
+ Double_t arre[npts] = {
+ 2.421257, 2.483278, 2.534301, 2.592230,
+ 2.672067, 2.813299, 3.015059, 3.216819,
+ 3.418579, 3.620338, 3.868209, 3.920198,
+ 3.978284, 4.063923, 4.186264, 4.308605,
+ 4.430946, 4.553288, 4.724261, 4.837736,
+ 4.999842, 5.161949, 5.324056, 5.486163,
+ 5.679688, 5.752998, 5.857728, 5.962457,
+ 6.067185, 6.171914, 6.315653, 6.393674,
+ 6.471694, 6.539689, 6.597658, 6.655627,
+ 6.710957, 6.763648, 6.816338, 6.876198,
+ 6.943227, 7.010257, 7.106285, 7.252151,
+ 7.460531, 7.668911, 7.877290, 8.085670,
+ 8.302979, 8.353585, 8.413120, 8.483500,
+ 8.541030, 8.592857, 8.668865, 8.820485,
+ 9.037086, 9.253686, 9.470286, 9.686887,
+ 9.930838, 9.994655, 10.085822, 10.176990,
+ 10.268158, 10.359325, 10.503614, 10.627565,
+ 10.804637, 10.981709, 11.158781, 11.335854,
+ 11.593397, 11.781165, 12.049404, 12.317644,
+ 12.585884, 12.854123, 14.278421, 16.975889,
+ 20.829416, 24.682943, 28.536469
+ };
+ /*
+ Double_t arrdndx[npts] = {
+ 19.344431, 18.664679, 18.136106, 17.567745,
+ 16.836426, 15.677382, 14.281277, 13.140237,
+ 12.207677, 11.445510, 10.697049, 10.562296,
+ 10.414673, 10.182341, 9.775256, 9.172330,
+ 8.240271, 6.898587, 4.808303, 3.889751,
+ 3.345288, 3.093431, 2.897347, 2.692470,
+ 2.436222, 2.340029, 2.208579, 2.086489,
+ 1.975535, 1.876519, 1.759626, 1.705024,
+ 1.656374, 1.502638, 1.330566, 1.200697,
+ 1.101168, 1.019323, 0.943867, 0.851951,
+ 0.755229, 0.671576, 0.570675, 0.449672,
+ 0.326722, 0.244225, 0.188225, 0.149608,
+ 0.121529, 0.116289, 0.110636, 0.103490,
+ 0.096147, 0.089191, 0.079780, 0.063927,
+ 0.047642, 0.036341, 0.028250, 0.022285,
+ 0.017291, 0.016211, 0.014802, 0.013533,
+ 0.012388, 0.011352, 0.009803, 0.008537,
+ 0.007039, 0.005829, 0.004843, 0.004034,
+ 0.003101, 0.002564, 0.001956, 0.001494,
+ 0.001142, 0.000873, 0.000210, 0.000014,
+ 0.000000, 0.000000, 0.000000
+ };
+ */
+ // Differentiate
+ // dnde = (arrdndx[i-1] - arrdndx[i]) / (arre[i] - arre[i-1]);
+
+ Double_t arrdnde[npts] = {
+ 10.960000, 10.960000, 10.359500, 9.811340,
+ 9.1601500, 8.206670, 6.919630, 5.655430,
+ 4.6221300, 3.777610, 3.019560, 2.591950,
+ 2.5414600, 2.712920, 3.327460, 4.928240,
+ 7.6185300, 10.966700, 12.225800, 8.094750,
+ 3.3586900, 1.553650, 1.209600, 1.263840,
+ 1.3241100, 1.312140, 1.255130, 1.165770,
+ 1.0594500, 0.945450, 0.813231, 0.699837,
+ 0.6235580, 2.260990, 2.968350, 2.240320,
+ 1.7988300, 1.553300, 1.432070, 1.535520,
+ 1.4429900, 1.247990, 1.050750, 0.829549,
+ 0.5900280, 0.395897, 0.268741, 0.185320,
+ 0.1292120, 0.103545, 0.0949525, 0.101535,
+ 0.1276380, 0.134216, 0.123816, 0.104557,
+ 0.0751843, 0.0521745, 0.0373546, 0.0275391,
+ 0.0204713, 0.0169234, 0.0154552, 0.0139194,
+ 0.0125592, 0.0113638, 0.0107354, 0.0102137,
+ 0.00845984, 0.00683338, 0.00556836, 0.00456874,
+ 0.0036227, 0.00285991, 0.00226664, 0.00172234,
+ 0.00131226, 0.00100284, 0.000465492, 7.26607e-05,
+ 3.63304e-06, 0.0000000, 0.0000000
+ };
+
+ Int_t i;
+ Double_t energy = x[0];
+
+ for( i = 0 ; i < npts ; i++ )
+ if( energy < arre[i] ) break;
+
+ if( i == 0 )
+ AliErrorGeneral("AliTRDv1","Given energy value is too small or zero");
+
+ return arrdnde[i];
+
+}