Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:15:01

0001 #include <iostream>
0002 #include <fstream>
0003 #include <stdio.h>
0004 #include <cstdlib>
0005 #include <stdlib.h>
0006 #include <iomanip>
0007 #include <stdio.h>
0008 #include <math.h>
0009 #include <cmath>
0010 
0011 using std::setw;
0012 using std::setprecision;
0013 using std::cout;
0014 using std::cin;
0015 using std::endl;
0016 using namespace std;
0017 
0018 
0019 double correctionToSigTT( double Sig_TT, double Sig_T , double qsq ) { 
0020 
0021   double fCheck = Sig_TT;
0022 
0023   if ( ( qsq < 0.5 ) &&                  ( std::abs( Sig_TT ) > std::abs( Sig_T ) ) ) Sig_TT = Sig_T * 0.977833;  
0024   if ( ( qsq > 0.5 ) && ( qsq < 1   ) && ( std::abs( Sig_TT ) > std::abs( Sig_T ) ) ) Sig_TT = Sig_T * 0.823989;
0025   if ( ( qsq > 1   ) && ( qsq < 1.5 ) && ( std::abs( Sig_TT ) > std::abs( Sig_T ) ) ) Sig_TT = Sig_T * 0.669703;
0026   if ( ( qsq > 1.5 ) && ( qsq < 2   ) && ( std::abs( Sig_TT ) > std::abs( Sig_T ) ) ) Sig_TT = Sig_T * 0.558281;
0027   if ( ( qsq > 2   ) && ( qsq < 2.5 ) && ( std::abs( Sig_TT ) > std::abs( Sig_T ) ) ) Sig_TT = Sig_T * 0.475644;
0028   if ( ( qsq > 2.5 ) && ( qsq < 3   ) && ( std::abs( Sig_TT ) > std::abs( Sig_T ) ) ) Sig_TT = Sig_T * 0.411432;
0029   if ( ( qsq > 3   ) && ( qsq < 3.5 ) && ( std::abs( Sig_TT ) > std::abs( Sig_T ) ) ) Sig_TT = Sig_T * 0.359239;
0030   if ( ( qsq > 3.5 ) && ( qsq < 4   ) && ( std::abs( Sig_TT ) > std::abs( Sig_T ) ) ) Sig_TT = Sig_T * 0.315289;
0031   if ( ( qsq > 4   ) && ( qsq < 4.5 ) && ( std::abs( Sig_TT ) > std::abs( Sig_T ) ) ) Sig_TT = Sig_T * 0.27723;
0032   if ( ( qsq > 4.5 ) && ( qsq < 5   ) && ( std::abs( Sig_TT ) > std::abs( Sig_T ) ) ) Sig_TT = Sig_T * 0.243903;
0033   if ( ( qsq > 5   ) &&                  ( std::abs( Sig_TT ) > std::abs( Sig_T ) ) ) Sig_TT = Sig_T * 0.219363;
0034   
0035   double s =  Sig_TT;
0036 
0037   if ( fCheck < 0 && s > 0 )
0038     s = -1.0*s;
0039 
0040   return s;
0041 }
0042 
0043 
0044 double correctionToSigLT( double Sig_LT, double Sig_T , double qsq ) { 
0045 
0046   double fCheck = Sig_LT;
0047 
0048   if ( ( qsq < 0.5 )                  && ( std::abs( Sig_LT ) > std::abs( Sig_T ) ) ) Sig_LT = Sig_T * 0.200121;
0049   if ( ( qsq > 0.5 ) && ( qsq < 1   ) && ( std::abs( Sig_LT ) > std::abs( Sig_T ) ) ) Sig_LT = Sig_T * 0.65716;
0050   if ( ( qsq > 1   ) && ( qsq < 1.5 ) && ( std::abs( Sig_LT ) > std::abs( Sig_T ) ) ) Sig_LT = Sig_T * 0.744639;
0051   if ( ( qsq > 1.5 ) && ( qsq < 2   ) && ( std::abs( Sig_LT ) > std::abs( Sig_T ) ) ) Sig_LT = Sig_T * 0.716045;
0052   if ( ( qsq > 2   ) && ( qsq < 2.5 ) && ( std::abs( Sig_LT ) > std::abs( Sig_T ) ) ) Sig_LT = Sig_T * 0.665329;
0053   if ( ( qsq > 2.5 ) && ( qsq < 3   ) && ( std::abs( Sig_LT ) > std::abs( Sig_T ) ) ) Sig_LT = Sig_T * 0.615555;
0054   if ( ( qsq > 3   ) && ( qsq < 3.5 ) && ( std::abs( Sig_LT ) > std::abs( Sig_T ) ) ) Sig_LT = Sig_T * 0.571544;
0055   if ( ( qsq > 3.5 ) && ( qsq < 4   ) && ( std::abs( Sig_LT ) > std::abs( Sig_T ) ) ) Sig_LT = Sig_T * 0.53366;
0056   if ( ( qsq > 4   ) && ( qsq < 4.5 ) && ( std::abs( Sig_LT ) > std::abs( Sig_T ) ) ) Sig_LT = Sig_T * 0.513469;
0057   if ( ( qsq > 4.5 ) && ( qsq < 5   ) && ( std::abs( Sig_LT ) > std::abs( Sig_T ) ) ) Sig_LT = Sig_T * 0.498549;
0058   if ( ( qsq > 5   )                  && ( std::abs( Sig_LT ) > std::abs( Sig_T ) ) ) Sig_LT = Sig_T * 0.47498;
0059 
0060   double s =  Sig_LT;
0061 
0062   if ( fCheck < 0 && s > 0 )
0063     s = -1.0*s;
0064 
0065   return s;
0066 }