Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

DataUtil/OscCalc.cxx

Go to the documentation of this file.
00001 #include "OscCalc.h"
00002 #include "TMath.h"
00003 #include <cmath>
00004 #include <cstdlib>
00005 #include <iostream>
00006 #include "MessageService/MsgService.h"
00007 
00008 using namespace std; 
00009 
00010 CVSID("$Id: OscCalc.cxx,v 1.1 2009/04/28 20:13:11 boehm Exp $");
00011 
00012 OscCalc::OscCalc()
00013 {
00014   for(int i = 0; i < 9; i++) fOscPar[i] = 0;  
00015   double par[9] = {0};
00016   SetOscParam(par, true);
00017 }
00018 
00019 double OscCalc::Oscillate(int nuFlavor, int nonOscNuFlavor, double Energy, double * par)
00020 {
00021   SetOscParam(par);
00022   return Oscillate(nuFlavor, nonOscNuFlavor, Energy); 
00023 }
00024 
00025 
00026 double OscCalc::Oscillate(int nuFlavor, int nonOscNuFlavor,  double Energy)
00027 {
00028   double x = Energy;
00029 
00030   if(nonOscNuFlavor > 0) SetOscParam(OscPar::kNuAntiNu, 1);
00031   else SetOscParam(OscPar::kNuAntiNu, -1);
00032 
00033   double prob = 0.0;
00034   if(abs(nonOscNuFlavor)==14) {
00035     if(abs(nuFlavor)==12)      prob = OscCalc::MuToElec(x);
00036     else if(abs(nuFlavor)==14) prob = OscCalc::MuToMu(x);
00037     else if(abs(nuFlavor)==16) prob = OscCalc::MuToTau(x);
00038   }
00039   if(abs(nonOscNuFlavor)==12) {
00040     if(abs(nuFlavor)==14) prob = OscCalc::ElecToMu(x);
00041     else if(abs(nuFlavor)==12) prob = OscCalc::ElecToElec(x);
00042     else if(abs(nuFlavor)==16) prob = OscCalc::ElecToTau(x);
00043   }
00044   if(abs(nonOscNuFlavor)==16) {
00045     if(abs(nuFlavor)==14) prob = OscCalc::TauToMu(x);
00046     else if(abs(nuFlavor)==12) prob = OscCalc::TauToElec(x);
00047     else if(abs(nuFlavor)==16) prob = OscCalc::TauToTau(x);
00048   } 
00049 
00050   if(prob < -1e-4 && Energy > 0.05){  //I'm sorry but the oscillations are just noisy at low E 
00051       MSG("OscCalc",Msg::kInfo)<<"P(<"<<nonOscNuFlavor<<"->"<<nuFlavor
00052                                <<") less than zero at E = "<<x<<" prob = "<<prob<<endl;
00053       prob = 0;
00054   } 
00055 
00056   return prob;
00057 }
00058 
00059 void OscCalc::SetOscParam(OscPar::OscPar_t pos, double val, bool force)
00060 {
00061   if(fabs(fOscPar[pos] - val) > 1e-9 || force){
00062     fOscPar[pos] = val;
00063     if(pos < 3){
00064        fSinTh[pos] = sin(val);
00065        fCosTh[pos] = cos(val);
00066        fSin2Th[pos] = sin(2*val);
00067        fCos2Th[pos] = cos(2*val);
00068     }
00069     if(pos == OscPar::kDensity){
00070       double ne = OscPar::z_a*OscPar::A_av*val; //electron density #/cm^{3}
00071       fElecDensity = ne*OscPar::invCmToeV*OscPar::invCmToGeV*OscPar::invCmToGeV;
00072       //electron density with units Gev^{2} eV
00073       //Gev^{2} to cancel with GeV^{-2} in Gf
00074                                                                                 
00075        fV = OscPar::root2*OscPar::Gf*fElecDensity; //eV
00076     }
00077     if(pos == OscPar::kDelta){
00078        fCosDCP = cos(val); 
00079        fSinDCP = sin(val);
00080     }
00081   }
00082 }
00083 
00084 void OscCalc::SetOscParam(double *par, bool force)
00085 {
00086    for(int i = 0; i < int(OscPar::kUnknown); i++){
00087      SetOscParam(OscPar::OscPar_t(i), par[i], force);
00088    }
00089 }
00090 
00091 void OscCalc::GetOscParam(double *par)
00092 {
00093    for(int i = 0; i < int(OscPar::kUnknown); i++){
00094      par[i] = fOscPar[i];
00095    }
00096 }
00097 
00098 double OscCalc::GetOscParam(OscPar::OscPar_t pos)
00099 {
00100    if(pos >=0 && pos < OscPar::kUnknown)
00101      return fOscPar[pos];
00102    else 
00103      return -9999;
00104 }
00105 
00106 
00107 double OscCalc::MuToElec(double x)
00108 {
00109   double E = x; //energy
00110 
00111   //Building the standard terms
00112   double L = fOscPar[OscPar::kL];  //baseline
00113   double dmsq_23 = fOscPar[OscPar::kDeltaM23];
00114   double dmsq_12 = fOscPar[OscPar::kDeltaM12];
00115   double dmsq_13 = dmsq_23+dmsq_12; //eV^{2}
00116 
00117   double sinsq_2th12 = fSin2Th[OscPar::kTh12]*fSin2Th[OscPar::kTh12];
00118   double sinsq_2th13 = fSin2Th[OscPar::kTh13]*fSin2Th[OscPar::kTh13];
00119                                                                                 
00120   double cos_th23 = fCosTh[OscPar::kTh23];
00121   double cos_th12 = fCosTh[OscPar::kTh12];
00122   double sin_th13 = fSinTh[OscPar::kTh13];
00123   double cos_th13 = fCosTh[OscPar::kTh13];  
00124                                                                               
00125   double sin_2th23 = fSin2Th[OscPar::kTh23];
00126   double sin_2th12 = fSin2Th[OscPar::kTh12];
00127   double cos_2th13 = fCos2Th[OscPar::kTh13];
00128   double cos_2th12 = fCos2Th[OscPar::kTh12];
00129 
00130   double sinsq_th23 = fSinTh[OscPar::kTh23]*fSinTh[OscPar::kTh23];
00131   double sinsq_th12 = fSinTh[OscPar::kTh12]*fSinTh[OscPar::kTh12];
00132 
00133   double d_cp = fOscPar[OscPar::kDelta];
00134   double cos_dcp = fCosDCP;
00135   double sin_dcp = fSinDCP;
00136 
00137   //Building the more complicated terms
00138   double Delta = dmsq_13*L/(4*E*1e9*OscPar::invKmToeV);
00139   double A = 2*fV*E*1e9/(dmsq_13);
00140   double alpha = dmsq_12/dmsq_13;
00141 
00142   // A and d_cp both change sign for antineutrinos
00143   double plusminus = int(fOscPar[OscPar::kNuAntiNu]);
00144   A *= plusminus;
00145   d_cp *= plusminus;
00146   sin_dcp *= plusminus;
00147 
00148   //Now calculate the resonance terms for alpha expansion (C13) and s13 expansion (C12)
00149 
00150   double C13 = TMath::Sqrt(sinsq_2th13+(A-cos_2th13)*(A-cos_2th13));
00151 
00152   double C12 = 1;  //really C12 -> infinity when alpha = 0 but not an option really
00153   if(fabs(alpha) > 1e-10){  //want to be careful here
00154     double temp = cos_2th12 - A/alpha;
00155     C12 = TMath::Sqrt(sinsq_2th12+(temp*temp));
00156   }
00157 
00158   //More complicated sin and cosine terms
00159   double cosC13Delta = cos(C13*Delta);
00160   double sinC13Delta = sin(C13*Delta);
00161   double sin1pADelta = sin((A+1)*Delta);
00162   double cos1pADelta = cos((A+1)*Delta);
00163   double sinADelta = sin(A*Delta);
00164   double sinAm1Delta = sin((A-1)*Delta);
00165   double cosdpDelta = cos(d_cp+Delta);
00166   double sinApam2Delta = sin((A+alpha-2)*Delta);
00167   double cosApam2Delta = cos((A+alpha-2)*Delta);
00168 
00169   double cosaC12Delta = 0;
00170   double sinaC12Delta = 0; 
00171   
00172   if(fabs(alpha) > 1e-10){
00173     cosaC12Delta = cos(alpha*C12*Delta);
00174     sinaC12Delta = sin(alpha*C12*Delta);
00175   } // otherwise not relevant
00176 
00177   //First we calculate the terms for the alpha expansion (good to all orders in th13)
00178   // this is the equivalent of Eq 47 & 48 corrected for Mu to E instead of E to Mu
00179 
00180   // Leading order term 
00181   double p1 = sinsq_th23*sinsq_2th13*sinC13Delta*sinC13Delta/(C13*C13);
00182 
00183   // terms that appear at order alpha
00184   //first work out the vacuum case since we get 0/0 otherwise.......
00185   double p2Inner = Delta*cosC13Delta;
00186 
00187   if(fabs(A) > 1e-9)
00188     p2Inner = Delta*cosC13Delta*(1-A*cos_2th13)/C13 -
00189                       A*sinC13Delta*(cos_2th13-A)/(C13*C13);
00190 
00191   double p2 = -2*sinsq_th12*sinsq_th23*sinsq_2th13*sinC13Delta/(C13*C13)*p2Inner*alpha;
00192 
00193 
00194   //again working out vacuum first.....
00195   double p3Inner = Delta* cos_th13* cos_th13*(-2*sin_dcp*sinC13Delta*sinC13Delta+2*cos_dcp*sinC13Delta*cosC13Delta);
00196 
00197   if(fabs(A) > 1e-9)
00198     p3Inner = (sinC13Delta/(A*C13*C13))*(- sin_dcp*(cosC13Delta - cos1pADelta)*C13
00199                          + cos_dcp*(C13*sin1pADelta - (1-A*cos_2th13)*sinC13Delta));
00200 
00201   double p3 = sin_2th12*sin_2th23*sin_th13*p3Inner*alpha;
00202 
00203   //  p1 + p2 + p3 is the complete contribution for this expansion
00204   
00205   // Now for the expansion in orders of sin(th13) (good to all order alpha) 
00206   //  this is the equivalent of Eq 65 and 66
00207 
00208   // leading order term
00209   double pa1 = 0.0, pa2 = 0.0;
00210 
00211   // no problems here when A -> 0
00212   if(fabs(alpha) > 1e-10){
00213     // leading order term
00214     pa1 = cos_th23*cos_th23*sinsq_2th12*sinaC12Delta*sinaC12Delta/(C12*C12);
00215 
00216     // and now to calculate the first order in s13 term
00217     double t1 = (cos_2th12 - A/alpha)/C12 
00218                   - alpha*A*C12*sinsq_2th12/(2*(1-alpha)*C12*C12);
00219     double t2 = -cos_dcp*(sinApam2Delta-sinaC12Delta*t1);
00220   
00221     double t3 = -(cosaC12Delta-cosApam2Delta)*sin_dcp;
00222  
00223     double denom = (1-A-alpha+A*alpha*cos_th12*cos_th12)*C12;
00224     double t4 = sin_2th12*sin_2th23*(1-alpha)*sinaC12Delta/denom;
00225 
00226     pa2 = t4*(t3+t2)*sin_th13;
00227   }
00228   //pa1+pa2 is the complete contribution from this expansion
00229 
00230   // In order to combine the information correctly we need to add the two
00231   //  expansions and subtract off the terms that are in both (alpha^1, s13^1) 
00232   //  these may be taken from the expansion to second order in both parameters
00233   //  Equation 31 
00234 
00235   double t1 = Delta*sinC13Delta*cosdpDelta;
00236   if(fabs(A) > 1e-9) t1 = sinADelta*cosdpDelta*sinAm1Delta/(A*(A-1));
00237 
00238   double repeated = 2*alpha*sin_2th12*sin_2th23*sin_th13*t1;
00239 
00240   //  Calculate the total probability
00241   double totalP = p1+p2+p3 + (pa1+pa2) - repeated;
00242 
00243   return totalP;
00244 }
00245 
00246 double OscCalc::MuToTau(double x)
00247 {
00248   double E = x; //energy
00249 
00250   double L = fOscPar[OscPar::kL];  //baseline
00251   double dmsq_23 = fOscPar[OscPar::kDeltaM23];
00252   double dmsq_12 = fOscPar[OscPar::kDeltaM12];
00253   double dmsq_13 = dmsq_23+dmsq_12; //eV^{2}
00254 
00255   double sinsq_2th12 = fSin2Th[OscPar::kTh12]*fSin2Th[OscPar::kTh12];
00256   double sinsq_2th13 = fSin2Th[OscPar::kTh13]*fSin2Th[OscPar::kTh13];
00257   double sinsq_2th23 = fSin2Th[OscPar::kTh23]*fSin2Th[OscPar::kTh23];
00258                                                                                 
00259   double cos_th13 = fCosTh[OscPar::kTh13];
00260   double cos_th12 = fCosTh[OscPar::kTh12];
00261   double sin_th12 = fSinTh[OscPar::kTh12];
00262   double sin_th13 = fSinTh[OscPar::kTh13];
00263                                                                                 
00264   double sin_2th23 = fSin2Th[OscPar::kTh23];
00265 //  double sin_2th13 = fSin2Th[OscPar::kTh13];
00266   double sin_2th12 = fSin2Th[OscPar::kTh12];
00267                                                                                 
00268   double cos_2th23 = fCos2Th[OscPar::kTh23];
00269   double cos_2th13 = fCos2Th[OscPar::kTh13];
00270   double cos_2th12 = fCos2Th[OscPar::kTh12];
00271 
00272   double d_cp = fOscPar[OscPar::kDelta];
00273   double cos_dcp = fCosDCP;
00274   double sin_dcp = fSinDCP;
00275 
00276   //Building the more complicated terms                                                                              
00277   double Delta = dmsq_13*L/(4*E*1e9*OscPar::invKmToeV);
00278   double A = 2*fV*E*1e9/(dmsq_13);
00279   double alpha = dmsq_12/dmsq_13;
00280   
00281   // A and d_cp both change sign for antineutrinos
00282   double plusminus = int(fOscPar[OscPar::kNuAntiNu]);
00283   A *= plusminus;
00284   d_cp *= plusminus;
00285   sin_dcp *= plusminus;
00286 
00287   //Now calculate the resonance terms for alpha expansion (C13) and s13 expansion (C12)
00288                                                                                                                        
00289   double C13 = TMath::Sqrt(sinsq_2th13+(A-cos_2th13)*(A-cos_2th13));
00290                                                                                                                        
00291   double C12 = 1;  //really C12 -> infinity when alpha = 0 but not an option really
00292   if(fabs(alpha) > 1e-10){  //want to be careful here
00293     double temp = cos_2th12 - A/alpha;
00294     C12 = TMath::Sqrt(sinsq_2th12+(temp*temp));
00295   }
00296                                                                                                                        
00297   //More complicated sin and cosine terms
00298   double cosC13Delta = cos(C13*Delta);
00299   double sinC13Delta = sin(C13*Delta);
00300   double sin1pADelta = sin((A+1)*Delta);
00301   double cos1pADelta = cos((A+1)*Delta);
00302   double sinADelta = sin((A)*Delta);
00303 
00304   double sin1pAmCDelta = sin(0.5*(A+1-C13)*Delta);
00305   double sin1pApCDelta = sin(0.5*(A+1+C13)*Delta);
00306 
00307   double cosaC12Delta = 0;
00308   double sinaC12Delta = 0;
00309                                                                                                                        
00310   if(fabs(alpha) > 1e-10){
00311     cosaC12Delta = cos(alpha*C12*Delta);
00312     sinaC12Delta = sin(alpha*C12*Delta);
00313   } // otherwise not relevant
00314 
00315   double sinApam2Delta = sin((A+alpha-2)*Delta);
00316   double cosApam2Delta = cos((A+alpha-2)*Delta);
00317   double sinAm1Delta = sin((A-1)*Delta);
00318   double cosAm1Delta = cos((A-1)*Delta);
00319   double sinDelta = sin(Delta);
00320   double sin2Delta = sin(2*Delta);
00321 
00322   double cosaC12pApam2Delta = 0;                                                                                                                       
00323   if(fabs(alpha) > 1e-10){
00324     cosaC12pApam2Delta = cos((alpha*C12+A+alpha-2)*Delta);
00325   }
00326 
00327   //First we calculate the terms for the alpha expansion (good to all orders in th13)
00328   // this is the equivalent of Eq 49 & 50 corrected for Mu to E instead of E to Mu
00329 
00330   // Leading order term
00331   double pmt_0 = 0.5*sinsq_2th23;
00332   pmt_0 *= (1 - (cos_2th13-A)/C13)*sin1pAmCDelta*sin1pAmCDelta 
00333              +  (1 + (cos_2th13-A)/C13)*sin1pApCDelta*sin1pApCDelta
00334              - 0.5*sinsq_2th13*sinC13Delta*sinC13Delta/(C13*C13);
00335 
00336   // terms that appear at order alpha
00337   double t0, t1, t2, t3;
00338   t0 = (cos_th12*cos_th12-sin_th12*sin_th12*sin_th13*sin_th13
00339           *(1+2*sin_th13*sin_th13*A+A*A)/(C13*C13))*cosC13Delta*sin1pADelta*2;
00340   t1 = 2*(cos_th12*cos_th12*cos_th13*cos_th13-cos_th12*cos_th12*sin_th13*sin_th13
00341          +sin_th12*sin_th12*sin_th13*sin_th13
00342          +(sin_th12*sin_th12*sin_th13*sin_th13-cos_th12*cos_th12)*A);
00343   t1 *= sinC13Delta*cos1pADelta/C13;
00344 
00345   t2 =  sin_th12*sin_th12*sinsq_2th13*sinC13Delta/(C13*C13*C13);
00346   t2 *= A/Delta*sin1pADelta+A/Delta*(cos_2th13-A)/C13*sinC13Delta
00347           - (1-A*cos_2th13)*cosC13Delta;
00348 
00349   double pmt_1 = -0.5*sinsq_2th23*Delta*(t0+t1+t2);   
00350 
00351   t0 = t1 = t2 = t3 = 0.0;
00352 
00353   t0 = cosC13Delta-cos1pADelta;
00354   t1 = 2*cos_th13*cos_th13*sin(d_cp)*sinC13Delta/C13*t0;
00355   t2 = -cos_2th23*cos_dcp*(1+A)*t0*t0;
00356 
00357   t3  = cos_2th23*cos_dcp*(sin1pADelta+(cos_2th13-A)/C13*sinC13Delta);
00358   t3 *= (1+2*sin_th13*sin_th13*A + A*A)*sinC13Delta/C13 - (1+A)*sin1pADelta;
00359 
00360 //  cout<<t1<<"  "<<t2<<"  "<<t3<<endl;
00361 
00362   if(fabs(A) > 1e-9) 
00363     pmt_1 = pmt_1 + (t1+t2+t3)*sin_th13*sin_2th12*sin_2th23/(2*A*cos_th13*cos_th13);
00364   else
00365     pmt_1 = pmt_1 + sin_th13*sin_2th12*sin_2th23*cos_th13*cos_th13*Delta*(2*sin_dcp*sinC13Delta*sinC13Delta+cos_dcp*cos_2th23*2*sinC13Delta*cosC13Delta);
00366 
00367   pmt_1 *= alpha;
00368 
00369   //  pmt_0 + pmt_1 is the complete contribution for this expansion
00370                                                                                                                        
00371   // Now for the expansion in orders of sin(th13) (good to all order alpha)
00372   //  this is the equivalent of Eq 67 and 68
00373                                                                                                                        
00374   // leading order term
00375   double pmt_a0 =  0.5*sinsq_2th23;
00376 
00377   pmt_a0 *= 1 - 0.5*sinsq_2th12*sinaC12Delta*sinaC12Delta/(C12*C12)
00378               - cosaC12pApam2Delta
00379               - (1 - (cos_2th12 - A/alpha)/C12)*sinaC12Delta*sinApam2Delta;
00380             
00381   double denom = (1-A-alpha+A*alpha*cos_th12*cos_th12)*C12;
00382 
00383   t0 = (cosaC12Delta-cosApam2Delta)*(cosaC12Delta-cosApam2Delta);
00384            
00385   t1 = (cos_2th12 - A/alpha)/C12*sinaC12Delta+sinApam2Delta;
00386             
00387   t2 = ((cos_2th12 - A/alpha)/C12+2*(1-alpha)/(alpha*A*C12))*sinaC12Delta
00388              + sinApam2Delta;
00389 
00390   t3 = (alpha*A*C12)/2.0*cos_2th23*cos_dcp*(t0 + t1*t2);
00391   
00392   t3 += sin_dcp*(1-alpha)*(cosaC12Delta-cosApam2Delta)*sinaC12Delta;
00393 
00394   double pmt_a1 = sin_th13*sin_2th12*sin_2th23/denom*t3;
00395 
00396   // pmt_a1+pmt_a2 is the complete contribution from this expansion
00397                                                                                                                        
00398   // In order to combine the information correctly we need to add the two
00399   //  expansions and subtract off the terms that are in both (alpha^1, s13^1)
00400   //  and lower order terms
00401   //  these may be taken from the expansion to second order in both parameters
00402   //  Equation 34
00403 
00404 
00405   // Now for the term of order alpha * s13 or lower order!
00406   t0 = t1 = t2 = t3 = 0.0;
00407 
00408   t1 = +sin_dcp*sinDelta*sinADelta*sinAm1Delta/(A*(A-1));
00409   t2 = -1/(A-1)*cos_dcp*sinDelta*(A*sinDelta-sinADelta*cosAm1Delta/A)*cos_2th23;
00410   t0 =  2*alpha*sin_2th12*sin_2th23*sin_th13*(t1+t2);
00411 
00412   t1 = sinsq_2th23*sinDelta*sinDelta 
00413        - alpha*sinsq_2th23*cos_th12*cos_th12*Delta*sin2Delta;
00414 
00415   double repeated = t0+t1;
00416 
00417   //  Calculate the total probability
00418   double totalP = pmt_0 + pmt_1 + pmt_a0 + pmt_a1 - repeated;
00419 
00420   return totalP;
00421 }
00422 
00423 
00424 double OscCalc::MuToMu(double x)
00425 {
00426   double p1 = 1. - OscCalc::MuToTau(x) - OscCalc::MuToElec(x);
00427   if(p1 < 1e-4){ cout<<"P(mu->mu) less than zero Damnation! "<<x<<" "<<p1<<endl; p1 = 0;}
00428   return p1;
00429 }
00430 
00431 double OscCalc::ElecToTau(double x)
00432 {
00433 //  EtoTau is the same as E->Mu wich sinsq_th23 <-> cossq_th23, sin(2th23) <->-sin(2th23)
00434   double origCos = fCosTh[OscPar::kTh23];
00435   double origSin = fSinTh[OscPar::kTh23];
00436   double orig2Sin = fSin2Th[OscPar::kTh23];
00437 
00438   fCosTh[OscPar::kTh23] = origSin;
00439   fSinTh[OscPar::kTh23] = origCos;
00440   fSin2Th[OscPar::kTh23] = -orig2Sin;
00441 
00442   double prob = OscCalc::ElecToMu(x);
00443 
00444   //restore the world
00445   fCosTh[OscPar::kTh23] = origCos;
00446   fSinTh[OscPar::kTh23] = origSin;
00447   fSin2Th[OscPar::kTh23] = orig2Sin;
00448 
00449   return prob;
00450 
00451 /*  This is an option as well but I think results in more cycles
00452   double p1 = 1. - OscCalc::ElecToMu(x) - OscCalc::ElecToElec(x);
00453   if(p1 < 0){ cout<<"Damnation! "<<x[0]<<" "<<p1<<endl; p1 = 0;}
00454   return p1;
00455 */ 
00456 }
00457 
00458 double OscCalc::ElecToMu(double x)
00459 {
00460   // Flip delta to reverse direction
00461   double oldSinDelta = fSinDCP;
00462   double oldDelta =  fOscPar[OscPar::kDelta];
00463 
00464   fOscPar[OscPar::kDelta] = -oldDelta;
00465   fSinDCP = -oldSinDelta;
00466                                                                                                                        
00467   double prob = OscCalc::MuToElec(x);
00468                                                                                                                        
00469   //restore the world
00470   fOscPar[OscPar::kDelta] = oldDelta;
00471   fSinDCP = oldSinDelta;
00472  
00473   return prob;   
00474 }
00475 
00476 double OscCalc::ElecToElec(double x)
00477 {
00478   double E = x; //energy
00479                                                                                                                        
00480   //Building the standard terms
00481   double L = fOscPar[OscPar::kL];  //baseline
00482   double dmsq_23 = fOscPar[OscPar::kDeltaM23];
00483   double dmsq_12 = fOscPar[OscPar::kDeltaM12];
00484   double dmsq_13 = dmsq_23+dmsq_12; //eV^{2}
00485                                                                                                                        
00486   double sinsq_2th12 = fSin2Th[OscPar::kTh12]*fSin2Th[OscPar::kTh12];
00487   double sinsq_2th13 = fSin2Th[OscPar::kTh13]*fSin2Th[OscPar::kTh13];
00488                                                                                                                        
00489   double sin_th12 = fSinTh[OscPar::kTh12];
00490  
00491 //  double cos_2th23 = fCos2Th[OscPar::kTh23];
00492   double cos_2th13 = fCos2Th[OscPar::kTh13];
00493   double cos_2th12 = fCos2Th[OscPar::kTh12];
00494                                                                                                                        
00495   double d_cp = fOscPar[OscPar::kDelta];
00496   double sin_dcp = fSinDCP;
00497                                                                                                                        
00498   //Building the more complicated terms
00499   double Delta = dmsq_13*L/(4*E*1e9*OscPar::invKmToeV);
00500   double A = 2*fV*E*1e9/(dmsq_13);
00501   double alpha = dmsq_12/dmsq_13;
00502                                                                                                                        
00503   // A and d_cp both change sign for antineutrinos
00504   double plusminus = int(fOscPar[OscPar::kNuAntiNu]);
00505   A *= plusminus;
00506   d_cp *= plusminus;
00507   sin_dcp *= plusminus;
00508                                                                                                                        
00509   //Now calculate the resonance terms for alpha expansion (C13) and s13 expansion (C12)
00510   double C13 = TMath::Sqrt(sinsq_2th13+(A-cos_2th13)*(A-cos_2th13));
00511                                                                                                                        
00512   double C12 = 1;  //really C12 -> infinity when alpha = 0 but not an option really
00513   if(fabs(alpha) > 1e-10){  //want to be careful here
00514     double temp = cos_2th12 - A/alpha;
00515     C12 = TMath::Sqrt(sinsq_2th12+(temp*temp));
00516   }
00517                                                                                                                        
00518   //More complicated sin and cosine terms
00519   double cosC13Delta = cos(C13*Delta);
00520   double sinC13Delta = sin(C13*Delta);
00521                                                                                                                        
00522   double cosaC12Delta = 0;
00523   double sinaC12Delta = 0;
00524                                                                                                                        
00525   if(fabs(alpha) > 1e-10){
00526     cosaC12Delta = cos(alpha*C12*Delta);
00527     sinaC12Delta = sin(alpha*C12*Delta);
00528   } // otherwise not relevant
00529                                                                                                                        
00530   //First we calculate the terms for the alpha expansion (good to all orders in th13)
00531   // this is the equivalent of Eq 45 & 46 corrected for Mu to E instead of E to Mu
00532                                                                                                                        
00533   // Leading order term
00534   double p1 = 1 - sinsq_2th13*sinC13Delta*sinC13Delta/(C13*C13);
00535                                                                                                                        
00536   // terms that appear at order alpha
00537   double p2Inner = Delta*cosC13Delta*(1-A*cos_2th13)/C13 -
00538                       A*sinC13Delta*(cos_2th13-A)/(C13*C13);
00539                                                                                                                        
00540   double p2 = +2*sin_th12*sin_th12*sinsq_2th13*sinC13Delta/(C13*C13)*p2Inner*alpha;
00541   //  p1 + p2 is the complete contribution for this expansion
00542                                                                                                                        
00543   // Now for the expansion in orders of sin(th13) (good to all order alpha)
00544   //  this is the equivalent of Eq 63 and 64
00545                                                                                                                        
00546   // leading order term
00547   double pa1 = 1.0, pa2 = 0.0;
00548                                                                                                                        
00549   if(fabs(alpha) > 1e-10){
00550     // leading order term
00551     pa1 = 1.0 - sinsq_2th12*sinaC12Delta*sinaC12Delta/(C12*C12);
00552   }
00553   //pa1 is the complete contribution from this expansion, there is no order s13^1 term
00554                                                                                                                        
00555   // In order to combine the information correctly we need to add the two
00556   //  expansions and subtract off the terms that are in both (alpha^1, s13^1)
00557   //  these may be taken from the expansion to second order in both parameters
00558   //  Equation 30
00559                                                                                                                        
00560   double repeated = 1;
00561                                                                                                                        
00562   //  Calculate the total probability
00563   double totalP = p1+p2 + (pa1+pa2) - repeated;
00564                                                                                                                        
00565   return totalP;
00566 }
00567 
00568 double OscCalc::TauToTau(double x)
00569 {
00570 //  TautoTau is the same as Mu->Mu wich sinsq_th23 <-> cossq_th23, sin(2th23) <->-sin(2th23)
00571   double origCos = fCosTh[OscPar::kTh23];
00572   double origSin = fSinTh[OscPar::kTh23];
00573   double orig2Sin = fSin2Th[OscPar::kTh23];
00574 
00575   fCosTh[OscPar::kTh23] = origSin;
00576   fSinTh[OscPar::kTh23] = origCos;
00577   fSin2Th[OscPar::kTh23] = -orig2Sin;
00578 
00579   double prob = OscCalc::MuToMu(x);
00580   
00581   //restore the world
00582   fCosTh[OscPar::kTh23] = origCos;
00583   fSinTh[OscPar::kTh23] = origSin;
00584   fSin2Th[OscPar::kTh23] = orig2Sin;
00585   
00586   return prob;
00587 } 
00588   
00589 double OscCalc::TauToMu(double x)
00590 {
00591   // Flip delta to reverse direction
00592   double oldSinDelta = fSinDCP;
00593   double oldDelta =  fOscPar[OscPar::kDelta];
00594   
00595   fOscPar[OscPar::kDelta] = -oldDelta;
00596   fSinDCP = -oldSinDelta;
00597                               
00598   double prob = OscCalc::MuToTau(x);
00599                                                                                       
00600   //restore the world
00601   fOscPar[OscPar::kDelta] = oldDelta;
00602   fSinDCP = oldSinDelta;
00603   
00604   return prob;
00605 } 
00606   
00607 double OscCalc::TauToElec(double x)
00608 {
00609   // Flip delta to reverse direction
00610   double oldSinDelta = fSinDCP;
00611   double oldDelta =  fOscPar[OscPar::kDelta];
00612    
00613   fOscPar[OscPar::kDelta] = -oldDelta;
00614   fSinDCP = -oldSinDelta; 
00615                                
00616   double prob = OscCalc::ElecToTau(x);
00617                                  
00618   //restore the world 
00619   fOscPar[OscPar::kDelta] = oldDelta;
00620   fSinDCP = oldSinDelta; 
00621    
00622   return prob; 
00623 }  
00624 

Generated on Mon Feb 15 11:07:17 2010 for loon by  doxygen 1.3.9.1