66 {
70
71 if(theData.size()==1) return theData[theData.size()-1].second;
72
73 for(size_t i=0; i<theData.size(); i++)
74 {
75 if(theData[i].first>sqrts)
76 {
77 if(0==i)
78 {
79 x1 = theData[i].first;
80 y1 = theData[i].second;
81 x2 = theData[i+1].first;
82 y2 = theData[i+1].second;
83 }
84 else if(theData.size()-1==i)
85 {
86 x1 = theData[theData.size()-2].first;
87 y1 = theData[theData.size()-2].second;
88 x2 = theData[theData.size()-1].first;
89 y2 = theData[theData.size()-1].second;
90 }
91 else
92 {
93 x1 = theData[i-1].first;
94 y1 = theData[i-1].second;
95 x2 = theData[i].first;
96 y2 = theData[i].second;
97 }
98 break;
99 }
100 }
101
102
103 G4double result = y1 + (sqrts-x1) * (y2-y1)/(x2-x1);
104 if(result<0) result = 0;
105 if(y1<0.01*CLHEP::millibarn) result = 0;
106 return result;
107 }
const G4LorentzVector & Get4Momentum() const