OscFit::Oscillation Class Reference

#include <Oscillation.h>

List of all members.

Public Member Functions

void SetParams (GridPoint *params)
void UseFastPropagator (Bool_t yesno=1)
void TwoFlavours ()
void ThreeFlavours ()
void UseTwoFlavours (Bool_t yesno=1)
void UseThreeFlavours (Bool_t yesno=1)
void InVacuum ()
void InMatter ()
void DoMatterEffects (Bool_t yesno=1)
Bool_t DoingMatterEffects ()
Bool_t UsingTwoFlavours ()
Bool_t UsingThreeFlavours ()
void SetDMSq12 (Double_t d)
Double_t GetDMSq12 ()
void SetDMSq23 (Double_t d)
Double_t GetDMSq23 ()
void SetTheta12 (Double_t d)
Double_t GetTheta12 ()
void SetTheta23 (Double_t d)
Double_t GetTheta23 ()
void SetTheta13 (Double_t d)
Double_t GetTheta13 ()
void SetDeltaCP (Double_t d)
Double_t GetDeltaCP ()
void SetSinSq2Theta12 (Double_t d)
Double_t GetSinSq2Theta12 ()
void SetSinSq2Theta23 (Double_t d)
Double_t GetSinSq2Theta23 ()
void SetSinSq2Theta13 (Double_t d)
Double_t GetSinSq2Theta13 ()
void SetDensity (Double_t d)
Double_t GetDensity ()
void SetDetectorDepth (Double_t d)
double GetDetectorDepth ()
void SetPropagationLength (Double_t d)
Double_t GetPropagationLength ()
void LoadEarthModel_4Layers ()
void LoadEarthModel_55Layers ()
void LoadEarthModel (int nlayers, double *radius, double *density)
Double_t PropagationLengthThroughEarth (Double_t coszen, Double_t height)
Double_t SimpleOscProb (Int_t ipdg, Int_t jpdg, Double_t energy, Double_t coszen, Double_t height)
Double_t SimpleOscProb (Int_t ipdg, Int_t jpdg, Double_t energy, Double_t length)
Double_t SimpleOscProb (Int_t ipdg, Int_t jpdg, Double_t energy)
Double_t OscProb (Int_t ipdg, Int_t jpdg, Double_t energy, Double_t coszen, Double_t height)
Double_t OscProb (Int_t ipdg, Int_t jpdg, Double_t energy, Double_t length)
Double_t OscProb (Int_t ipdg, Int_t jpdg, Double_t energy)
Double_t OscProb (Int_t ipdg, Int_t jpdg)
Double_t OscProb (GridPoint *gridPoint, Int_t ipdg, Int_t jpdg, Double_t energy)
Double_t OscProb (GridPoint *gridPoint, Int_t ipdg, Int_t jpdg, Double_t energy, Double_t coszen)
void RunPropagator (Int_t ipdg, Double_t energy, Double_t length)
void RunPropagator (Int_t ipdg, Double_t energy)
void RunPropagator (Int_t ipdg, Double_t energy, Double_t coszen, Double_t height)
void PropagateThroughEarth (Int_t ipdg, Double_t energy, Double_t coszen, Double_t height)
void PropagateThroughVacuum (Int_t ipdg, Double_t energy, Double_t coszen, Double_t height)
void PrintParameters ()
void PrintConfig ()
void PrintPMNS ()

Static Public Member Functions

static OscillationInstance ()

Private Member Functions

 Oscillation ()
virtual ~Oscillation ()
Int_t PdgToNu (Int_t ipdg)
Double_t SinSq2Theta (Double_t d)
Double_t InvSinSq2Theta (Double_t d)
void SetPMNS ()

Private Attributes

Bool_t fUseTwoFlavours
Double_t fDMSq12
Double_t fDMSq23
Double_t fTheta12
Double_t fTheta23
Double_t fTheta13
Double_t fDeltaCP
Int_t fLayers
Double_t * fInnerRadiusOfLayer
Double_t * fOuterRadiusOfLayer
Double_t * fDensityOfLayer
Double_t fEarthRadius
Double_t fAtmosDensity
Double_t fLength
Double_t fDepth
Bool_t fDoMatterEffects
Double_t fDensity

Detailed Description

Definition at line 11 of file Oscillation.h.


Constructor & Destructor Documentation

Oscillation::Oscillation (  )  [private]

Definition at line 21 of file Oscillation.cxx.

References OscFit::DeltaCP(), OscFit::DetectorDepth(), OscFit::DMSq12(), OscFit::DMSq23(), fAtmosDensity, fDeltaCP, fDensity, fDensityOfLayer, fDepth, fDMSq12, fDMSq23, fDoMatterEffects, fEarthRadius, fInnerRadiusOfLayer, fLayers, fLength, fOuterRadiusOfLayer, fTheta12, fTheta13, fTheta23, fUseTwoFlavours, LoadEarthModel_4Layers(), OscFit::PropagationDistance(), SetPMNS(), OscFit::Theta12(), OscFit::Theta13(), and OscFit::Theta23().

Referenced by Instance().

00022 {
00023   // two or three flavours
00024   fUseTwoFlavours = 0; // (three flavours by default)
00025 
00026   // oscillation parameters
00027   fDMSq12 = OscFit::DMSq12();
00028   fDMSq23 = OscFit::DMSq23();
00029 
00030   fTheta12 = OscFit::Theta12();
00031   fTheta23 = OscFit::Theta23();
00032   fTheta13 = OscFit::Theta13();
00033   fDeltaCP = OscFit::DeltaCP();
00034 
00035   SetPMNS();  
00036   
00037   // propagation length
00038   fLength = OscFit::PropagationDistance();
00039 
00040   // detector depth
00041   fDepth = OscFit::DetectorDepth();
00042 
00043   // matter effects
00044   fDoMatterEffects = 0;
00045 
00046   // electron density (MINOS DocDB 9765)
00047   fDensity = 1.36; // mole cm^{-3}
00048     
00049   // atmospheric density
00050   fAtmosDensity = 6.0e-4;
00051 
00052   // load default earth model
00053   fLayers = 0;
00054   fInnerRadiusOfLayer = 0;
00055   fOuterRadiusOfLayer = 0;
00056   fDensityOfLayer = 0;
00057   fEarthRadius = 0.0;
00058 
00059   // four-layer model
00060   this->LoadEarthModel_4Layers();
00061 }

Oscillation::~Oscillation (  )  [private, virtual]

Definition at line 63 of file Oscillation.cxx.

References fDensityOfLayer, fInnerRadiusOfLayer, and fOuterRadiusOfLayer.

00064 {
00065   if( fInnerRadiusOfLayer ) delete [] fInnerRadiusOfLayer;
00066   if( fOuterRadiusOfLayer ) delete [] fOuterRadiusOfLayer;
00067   if( fDensityOfLayer )     delete [] fDensityOfLayer; 
00068 }


Member Function Documentation

Bool_t OscFit::Oscillation::DoingMatterEffects (  )  [inline]

Definition at line 43 of file Oscillation.h.

References fDoMatterEffects.

00043 { return  fDoMatterEffects; }

void OscFit::Oscillation::DoMatterEffects ( Bool_t  yesno = 1  )  [inline]

Definition at line 38 of file Oscillation.h.

References InMatter(), and InVacuum().

00038                                              {
00039       if( yesno ) InMatter(); else InVacuum();
00040     }

Double_t OscFit::Oscillation::GetDeltaCP (  )  [inline]

Definition at line 64 of file Oscillation.h.

References fDeltaCP.

00064 { return fDeltaCP; }

Double_t OscFit::Oscillation::GetDensity (  )  [inline]

Definition at line 77 of file Oscillation.h.

References fDensity.

00077 { return fDensity; }

double OscFit::Oscillation::GetDetectorDepth (  )  [inline]

Definition at line 81 of file Oscillation.h.

References fDepth.

00081 { return fDepth; }

Double_t OscFit::Oscillation::GetDMSq12 (  )  [inline]

Definition at line 49 of file Oscillation.h.

References fDMSq12.

00049 { return fDMSq12; }

Double_t OscFit::Oscillation::GetDMSq23 (  )  [inline]

Definition at line 52 of file Oscillation.h.

References fDMSq23.

00052 { return fDMSq23; }

Double_t OscFit::Oscillation::GetPropagationLength (  )  [inline]

Definition at line 85 of file Oscillation.h.

References fLength.

00085 { return fLength; }

Double_t OscFit::Oscillation::GetSinSq2Theta12 (  )  [inline]

Definition at line 67 of file Oscillation.h.

References fTheta12, and SinSq2Theta().

00067 { return SinSq2Theta(fTheta12); }

Double_t OscFit::Oscillation::GetSinSq2Theta13 (  )  [inline]

Definition at line 73 of file Oscillation.h.

References fTheta13, and SinSq2Theta().

00073 { return SinSq2Theta(fTheta13); }

Double_t OscFit::Oscillation::GetSinSq2Theta23 (  )  [inline]

Definition at line 70 of file Oscillation.h.

References fTheta23, and SinSq2Theta().

00070 { return SinSq2Theta(fTheta23); }

Double_t OscFit::Oscillation::GetTheta12 (  )  [inline]

Definition at line 55 of file Oscillation.h.

References fTheta12.

00055 { return fTheta12; }

Double_t OscFit::Oscillation::GetTheta13 (  )  [inline]

Definition at line 61 of file Oscillation.h.

References fTheta13.

00061 { return fTheta13; }

Double_t OscFit::Oscillation::GetTheta23 (  )  [inline]

Definition at line 58 of file Oscillation.h.

References fTheta23.

00058 { return fTheta23; }

void OscFit::Oscillation::InMatter (  )  [inline]

Definition at line 36 of file Oscillation.h.

References fDoMatterEffects.

Referenced by DoMatterEffects().

00036 { fDoMatterEffects = 1; }

Oscillation * Oscillation::Instance (  )  [static]
void OscFit::Oscillation::InVacuum (  )  [inline]

Definition at line 35 of file Oscillation.h.

References fDoMatterEffects.

Referenced by DoMatterEffects().

00035 { fDoMatterEffects = 0; }

Double_t Oscillation::InvSinSq2Theta ( Double_t  d  )  [private]

Definition at line 97 of file Oscillation.cxx.

Referenced by SetSinSq2Theta12(), SetSinSq2Theta13(), and SetSinSq2Theta23().

00098 {
00099   Double_t TwoTheta = asin( sqrt(sinsq) );
00100   return 0.5*TwoTheta;
00101 }

void OscFit::Oscillation::LoadEarthModel ( int  nlayers,
double *  radius,
double *  density 
)
void Oscillation::LoadEarthModel_4Layers (  ) 

Definition at line 109 of file Oscillation.cxx.

References LoadEarthModel().

Referenced by Oscillation().

00110 {
00111   // Load Four Layer Model
00112   // =====================
00113 
00114   int layers = 4;  // inner core, outer core, mantle, crust
00115   double* radius = new double[layers];
00116   double* density = new double[layers];
00117 
00118   radius[0] = 1220.0;   // inner core
00119   radius[1] = 3470.0;   // outer core
00120   radius[2] = 6336.0;   // mantle
00121   radius[3] = 6371.315; // crust
00122 
00123   density[0] = 6.05;
00124   density[1] = 5.15;
00125   density[2] = 2.25;
00126   density[3] = 1.45;
00127 
00128   this->LoadEarthModel(layers,radius,density);
00129 
00130   delete [] radius;
00131   delete [] density;
00132 
00133   return;
00134 }

void Oscillation::LoadEarthModel_55Layers (  ) 

Definition at line 136 of file Oscillation.cxx.

References LoadEarthModel(), and MuELoss::R.

00137 {
00138   // Load Fifty-Five Layer Model
00139   // ===========================
00140 
00141   double* R = new double[55];  // radius
00142   double* P = new double[55];  // density
00143   double* Y = new double[55];  // electron fraction 
00144   double* N = new double[55];  // electron density
00145 
00146   R[0]  = 0.0;      P[0]  = 13.088;   Y[0]  = 0.466;
00147   R[1]  = 200.0;    P[1]  = 13.080;   Y[1]  = 0.466;
00148   R[2]  = 400.0;    P[2]  = 13.054;   Y[2]  = 0.466;
00149   R[3]  = 600.0;    P[3]  = 13.010;   Y[3]  = 0.466;
00150   R[4]  = 800.0;    P[4]  = 12.949;   Y[4]  = 0.466;
00151   R[5]  = 1000.0;   P[5]  = 12.871;   Y[5]  = 0.466;
00152   R[6]  = 1200.0;   P[6]  = 12.775;   Y[6]  = 0.466;
00153   R[7]  = 1221.5;   P[7]  = 12.764;   Y[7]  = 0.466;
00154 
00155   R[8]  = 1221.5;   P[8]  = 12.166;   Y[8]  = 0.466;
00156   R[9]  = 1400.0;   P[9]  = 12.069;   Y[9]  = 0.466;
00157   R[10] = 1600.0;   P[10] = 11.947;   Y[10] = 0.466;
00158   R[11] = 1800.0;   P[11] = 11.809;   Y[11] = 0.466;
00159   R[12] = 2000.0;   P[12] = 11.655;   Y[12] = 0.466;
00160   R[13] = 2200.0;   P[13] = 11.483;   Y[13] = 0.466;
00161   R[14] = 2400.0;   P[14] = 11.293;   Y[14] = 0.466;
00162   R[15] = 2600.0;   P[15] = 11.083;   Y[15] = 0.466;
00163   R[16] = 2800.0;   P[16] = 10.853;   Y[16] = 0.466;
00164   R[17] = 3000.0;   P[17] = 10.602;   Y[17] = 0.466;
00165   R[18] = 3200.0;   P[18] = 10.327;   Y[18] = 0.466;
00166   R[19] = 3400.0;   P[19] = 10.029;   Y[19] = 0.466;
00167   R[20] = 3480.0;   P[20] =  9.903;   Y[20] = 0.466;
00168 
00169   R[21] = 3480.0;   P[21] =  5.566;   Y[21] = 0.494;
00170   R[22] = 3600.0;   P[22] =  5.491;   Y[22] = 0.494;
00171   R[23] = 3630.0;   P[23] =  5.491;   Y[23] = 0.494;
00172 
00173   R[24] = 3630.0;   P[24] =  5.407;   Y[24] = 0.494;
00174   R[25] = 3800.0;   P[25] =  5.307;   Y[25] = 0.494;
00175   R[26] = 4000.0;   P[26] =  5.207;   Y[26] = 0.494;
00176   R[27] = 4200.0;   P[27] =  5.106;   Y[27] = 0.494;
00177   R[28] = 4400.0;   P[28] =  5.003;   Y[28] = 0.494;
00178   R[29] = 4600.0;   P[29] =  4.898;   Y[29] = 0.494;
00179 
00180   R[30] = 4800.0;   P[30] =  4.898;   Y[30] = 0.494;
00181   R[31] = 5000.0;   P[31] =  4.780;   Y[31] = 0.494;
00182   R[32] = 5200.0;   P[32] =  4.678;   Y[32] = 0.494;
00183   R[33] = 5400.0;   P[33] =  4.563;   Y[33] = 0.494;
00184   R[34] = 5600.0;   P[34] =  4.443;   Y[34] = 0.494;
00185   R[35] = 5701.0;   P[35] =  4.380;   Y[35] = 0.494;
00186 
00187   R[36] = 5701.0;   P[36] =  3.992;   Y[36] = 0.494;
00188   R[37] = 5771.0;   P[37] =  3.976;   Y[37] = 0.494;
00189   R[38] = 5871.0;   P[38] =  3.850;   Y[38] = 0.494;
00190   R[39] = 5971.0;   P[39] =  3.724;   Y[39] = 0.494;
00191 
00192   R[40] = 5971.0;   P[40] =  3.543;   Y[40] = 0.494;
00193   R[41] = 6061.0;   P[41] =  3.490;   Y[41] = 0.494;
00194   R[42] = 6151.0;   P[42] =  3.436;   Y[42] = 0.494;
00195 
00196   R[43] = 6151.0;   P[43] =  3.360;   Y[43] = 0.494;
00197   R[44] = 6221.0;   P[44] =  3.367;   Y[44] = 0.494;
00198   R[45] = 6291.0;   P[45] =  3.375;   Y[45] = 0.494;
00199   R[46] = 6346.6;   P[46] =  3.381;   Y[46] = 0.494;
00200 
00201   R[47] = 6346.6;   P[47] =  2.900;   Y[47] = 0.500;
00202   R[48] = 6356.0;   P[48] =  2.900;   Y[48] = 0.500;
00203 
00204   R[49] = 6356.0;   P[49] =  2.600;   Y[49] = 0.500;
00205   R[50] = 6368.0;   P[50] =  2.600;   Y[50] = 0.500;
00206 
00207   R[51] = 6368.0;   P[51] =  1.020;   Y[51] = 0.500;
00208   R[52] = 6371.0;   P[52] =  1.020;   Y[52] = 0.500;
00209 
00210   R[53] = 6371.0;   P[53] =  0.001;   Y[53] = 0.500;
00211   R[54] = 6386.0;   P[54] =  0.001;   Y[54] = 0.500;
00212 
00213   for( int i=0; i<55; i++ ){  N[i] = P[i]*Y[i]; }
00214 
00215   this->LoadEarthModel( 55, R, N );
00216 
00217   delete [] R;
00218   delete [] P;
00219   delete [] Y;
00220   delete [] N;
00221 
00222   return;
00223 }

Double_t Oscillation::OscProb ( GridPoint gridPoint,
Int_t  ipdg,
Int_t  jpdg,
Double_t  energy,
Double_t  coszen 
)

Definition at line 511 of file Oscillation.cxx.

References OscFit::ProductionHeight::GetHeight(), OscFit::ProductionHeight::kPdfMean, OscProb(), and SetParams().

00512 {
00513   if( gridPoint==0 ) return 0.0;
00514 
00515   SetParams( gridPoint );
00516 
00517   Double_t height = ProductionHeight::GetHeight( ipdg, coszen, energy, ProductionHeight::kPdfMean );
00518 
00519   return OscProb( ipdg, jpdg, energy, coszen, height );
00520 }

Double_t Oscillation::OscProb ( GridPoint gridPoint,
Int_t  ipdg,
Int_t  jpdg,
Double_t  energy 
)

Definition at line 522 of file Oscillation.cxx.

References OscProb(), and SetParams().

00523 {
00524   if( gridPoint==0 ) return 0.0;
00525 
00526   SetParams( gridPoint );
00527 
00528   return OscProb( ipdg, jpdg, energy );
00529 }

Double_t Oscillation::OscProb ( Int_t  ipdg,
Int_t  jpdg 
)

Definition at line 564 of file Oscillation.cxx.

References Instance(), OscProb(), and PdgToNu().

00565 {
00566   if( ( ipdg>0 && jpdg<0 ) 
00567    || ( ipdg<0 && jpdg>0 ) ){
00568     return 0.0;
00569   }
00570 
00571   int inu = PdgToNu(ipdg);
00572   int jnu = PdgToNu(jpdg);
00573 
00574   if( ( inu>=0 && inu<=2 ) 
00575   &&  ( jnu>=0 && jnu<=2 ) ){
00576     Double_t prob = OscillationCalculator::Instance()->OscProb(inu,jnu);
00577     
00578     if( std::isnan(prob) ){            // need to protect against NaN
00579       if( inu==jnu ) return 1.0;  //  if OscProb=NaN, return probability
00580       else return 0.0;            //  for case of no oscillations
00581     }
00582     return prob;
00583   }
00584 
00585   if( ipdg==jpdg ) return 1.0;
00586   else return 0.0;
00587 }

Double_t Oscillation::OscProb ( Int_t  ipdg,
Int_t  jpdg,
Double_t  energy 
)

Definition at line 559 of file Oscillation.cxx.

References fLength, and OscProb().

00560 {
00561   return OscProb( ipdg, jpdg, energy, fLength );
00562 }

Double_t Oscillation::OscProb ( Int_t  ipdg,
Int_t  jpdg,
Double_t  energy,
Double_t  length 
)

Definition at line 545 of file Oscillation.cxx.

References fUseTwoFlavours, OscProb(), RunPropagator(), and SimpleOscProb().

00546 {
00547   // two neutrino flavours
00548   if( fUseTwoFlavours ){
00549     return SimpleOscProb( ipdg, jpdg, energy, length );
00550   }
00551 
00552   // neutrino propagation
00553   this->RunPropagator( ipdg, energy, length );
00554 
00555   // return probability
00556   return this->OscProb( ipdg, jpdg );
00557 }

Double_t Oscillation::OscProb ( Int_t  ipdg,
Int_t  jpdg,
Double_t  energy,
Double_t  coszen,
Double_t  height 
)

Definition at line 531 of file Oscillation.cxx.

References fUseTwoFlavours, PropagationLengthThroughEarth(), RunPropagator(), and SimpleOscProb().

Referenced by OscProb().

00532 {
00533   // two neutrino flavours
00534   if( fUseTwoFlavours ){
00535     return SimpleOscProb( ipdg, jpdg, energy, PropagationLengthThroughEarth( coszen, height ) );
00536   }
00537 
00538   // neutrino propagation
00539   this->RunPropagator( ipdg, energy, coszen, height );
00540 
00541   // return probability
00542   return OscProb( ipdg, jpdg );
00543 }

Int_t Oscillation::PdgToNu ( Int_t  ipdg  )  [private]

Definition at line 310 of file Oscillation.cxx.

Referenced by OscProb(), PropagateThroughEarth(), PropagateThroughVacuum(), and RunPropagator().

00311 {
00312   if( fabs(ipdg)==12 ) return 0;
00313   if( fabs(ipdg)==14 ) return 1;
00314   if( fabs(ipdg)==16 ) return 2;
00315   return -1;
00316 }

void Oscillation::PrintConfig (  ) 

Definition at line 258 of file Oscillation.cxx.

References fDensity, fDoMatterEffects, fLength, and fUseTwoFlavours.

00259 {
00260   std::cout << " *** Oscillation::PrintConfig() *** " << std::endl;
00261   std::cout << "  Flavours: "; if( fUseTwoFlavours ) std::cout << "Two"; 
00262                                else std::cout << "Three"; std::cout << std::endl;
00263   std::cout << "  Length: " << fLength << " km " << std::endl;
00264   std::cout << "  Density: " << fDensity << " mol cm^{-3} " << std::endl;  
00265   std::cout << "  Matter Effects: "; if( fDoMatterEffects ) std::cout << "On";
00266                                      else std::cout << "Off"; std::cout << std::endl;
00267 }

void Oscillation::PrintParameters (  ) 

Definition at line 269 of file Oscillation.cxx.

References fAtmosDensity, fDeltaCP, fDensity, fDensityOfLayer, fDepth, fDMSq12, fDMSq23, fDoMatterEffects, fEarthRadius, fInnerRadiusOfLayer, fLayers, fLength, fOuterRadiusOfLayer, fTheta12, fTheta13, fTheta23, fUseTwoFlavours, n, and PrintPMNS().

00270 {
00271   std::cout << " *** Oscillation::PrintParameters() *** " << std::endl;
00272 
00273   std::cout << "   Oscillation Parameters: " << std::endl;
00274   std::cout << "    Flavours = "; if( fUseTwoFlavours ) std::cout << "Two"; 
00275                                   else std::cout << "Three"; std::cout << std::endl;
00276   std::cout << "    Dmsq12  = " << fDMSq12 << " eV^{2} " << std::endl;
00277   std::cout << "    Dmsq23  = " << fDMSq23 << " eV^{2} " << std::endl;
00278   std::cout << "    Theta12 = " << fTheta12*(180.0/M_PI) << " degrees " << std::endl;
00279   std::cout << "    Theta23 = " << fTheta23*(180.0/M_PI) << " degrees " << std::endl;
00280   std::cout << "    Theta13 = " << fTheta13*(180.0/M_PI) << " degrees " << std::endl;
00281   std::cout << "    DeltaCP = " << fDeltaCP*(180.0/M_PI) << " degrees " << std::endl;
00282   std::cout << "   Earth Model: " << std::endl;
00283   std::cout << "    Earth Layers: " << std::endl;
00284   for( int n=0; n<fLayers; n++ ){
00285     std::cout << "     [" << n << "] Radius = " << fInnerRadiusOfLayer[n] << "->" << fOuterRadiusOfLayer[n] << " km, Density=" << fDensityOfLayer[n] << " mol cm^{-3} " << std::endl;
00286   }
00287   std::cout << "    Earth Radius = " << fEarthRadius << " km " << std::endl;
00288   std::cout << "    Detector Depth = " << fDepth << " km " << std::endl;
00289   std::cout << "    Atmospheric Density = " << fAtmosDensity << " mol cm^{-3} " << std::endl;
00290   std::cout << "   Simple Model: " << std::endl;
00291   std::cout << "    Length = " << fLength << " km " << std::endl;
00292   std::cout << "    Density = " << fDensity << " mol cm^{-3} " << std::endl;  
00293   std::cout << "   Matter Effects: " << std::endl;
00294   std::cout << "    On/Off = " << fDoMatterEffects << std::endl;
00295 
00296   this->PrintPMNS();
00297 
00298   return;
00299 }   

void Oscillation::PrintPMNS (  ) 

Definition at line 301 of file Oscillation.cxx.

References Instance(), and PrintPMNS().

Referenced by PrintParameters(), and PrintPMNS().

00302 {
00303   std::cout << " *** Oscillation::PrintPMNS() *** " << std::endl;
00304 
00305   OscillationCalculator::Instance()->PrintPMNS();
00306 
00307   return;
00308 }

void Oscillation::PropagateThroughEarth ( Int_t  ipdg,
Double_t  energy,
Double_t  coszen,
Double_t  height 
)

Definition at line 342 of file Oscillation.cxx.

References fAtmosDensity, fDensityOfLayer, fDepth, fEarthRadius, fInnerRadiusOfLayer, fLayers, fOuterRadiusOfLayer, Instance(), n, and PdgToNu().

Referenced by RunPropagator().

00343 {    
00344   // reset propagator
00345   OscillationCalculator::Instance()->ResetWithNewFlavour( this->PdgToNu(ipdg) );
00346     
00347   // input parameters
00348   Double_t cosZenith = coszen;
00349   Double_t sinZenith = sqrt( 1.0 - cosZenith*cosZenith );
00350   
00351   Double_t detectorRadius = fEarthRadius - fDepth;
00352   Double_t productionHeight = height;
00353   Double_t impactRadius = detectorRadius*sinZenith;
00354 
00355   // neutrino or anti-neutrino
00356   Int_t Anti = (ipdg>=0)?+1:-1;
00357 
00358   // calculate distance travelled through each layer
00359   Int_t nprop = 0;
00360   Double_t* nuDistance = new Double_t[2*fLayers+1];
00361   Double_t* nuDensity = new Double_t[2*fLayers+1];
00362  
00363   Double_t r2 = 0.0;  
00364   Double_t r1 = 0.0;
00365   Double_t b  = impactRadius;
00366   Double_t L  = 0.0;
00367 
00368   // (1) atmosphere
00369   r2 = fEarthRadius+productionHeight;
00370   r1 = fEarthRadius;
00371 
00372   L = 0.0;
00373   if( r2>b ) L += sqrt(r2*r2-b*b);
00374   if( r1>b ) L -= sqrt(r1*r1-b*b);
00375   
00376   if( L>0.0 ){
00377     nuDistance[nprop] = L;
00378     nuDensity[nprop]  = fAtmosDensity;
00379     nprop++;
00380   }
00381 
00382   // neutrinos above horizon
00383   if( cosZenith>0.0 ){   
00384 
00385     // propagation into earth
00386     for( Int_t n=fLayers-1; n>=0; n-- ){
00387       r2 = fOuterRadiusOfLayer[n];
00388       r1 = fInnerRadiusOfLayer[n];
00389 
00390       if( r2>detectorRadius ){
00391         if( r1<detectorRadius ){
00392           r1 = detectorRadius;
00393         }
00394 
00395         L = 0.0;
00396         if( r2>b ) L += sqrt(r2*r2-b*b);
00397         if( r1>b ) L -= sqrt(r1*r1-b*b);
00398 
00399         if( L>0.0 ){
00400           nuDistance[nprop] = L;
00401           nuDensity[nprop]  = fDensityOfLayer[n];
00402           nprop++;
00403         }
00404       }
00405     }
00406   }
00407 
00408   // neutrinos below horizon
00409   else{
00410   
00411     // propagation towards centre of earth
00412     for( Int_t n=fLayers-1; n>=0; n-- ){
00413       r2 = fOuterRadiusOfLayer[n];
00414       r1 = fInnerRadiusOfLayer[n];
00415 
00416       L = 0.0;
00417       if( r2>b ) L += sqrt(r2*r2-b*b);
00418       if( r1>b ) L -= sqrt(r1*r1-b*b);
00419 
00420       if( L>0.0 ){
00421         nuDistance[nprop] = L;
00422         nuDensity[nprop]  = fDensityOfLayer[n];
00423         nprop++;
00424       }
00425     }
00426 
00427     // propagation away from centre of earth
00428     for( Int_t n=0; n<fLayers; n++ ){
00429       r2 = fOuterRadiusOfLayer[n];
00430       r1 = fInnerRadiusOfLayer[n];
00431 
00432       if( r1<detectorRadius ){
00433         if( r2>detectorRadius ){
00434           r2 = detectorRadius;
00435         }
00436     
00437         L = 0.0;
00438         if( r2>b ) L += sqrt(r2*r2-b*b);
00439         if( r1>b ) L -= sqrt(r1*r1-b*b);
00440       
00441         if( L>0.0 ){
00442           if( nprop>0
00443            && nuDensity[nprop-1] == fDensityOfLayer[n] ){
00444             nuDistance[nprop-1] += L;
00445           }
00446           else{
00447             nuDistance[nprop] = L;
00448             nuDensity[nprop]  = fDensityOfLayer[n];
00449             nprop++;
00450           }
00451         }
00452       }
00453     }
00454   }
00455 
00456   // propagate through matter
00457   for( Int_t n=0; n<nprop; n++ ){
00458     Double_t length  = nuDistance[n];
00459     Double_t density = nuDensity[n];
00460 
00461     OscillationCalculator::Instance()->PropMatter( length, energy, density, Anti );
00462   }
00463 
00464   delete [] nuDistance;
00465   delete [] nuDensity;
00466 
00467   return;
00468 }

void Oscillation::PropagateThroughVacuum ( Int_t  ipdg,
Double_t  energy,
Double_t  coszen,
Double_t  height 
)

Definition at line 470 of file Oscillation.cxx.

References Instance(), PdgToNu(), and PropagationLengthThroughEarth().

Referenced by RunPropagator().

00471 {
00472   // reset propagator
00473   OscillationCalculator::Instance()->ResetWithNewFlavour( this->PdgToNu(ipdg) );
00474   
00475   // calculate total length
00476   Double_t length = PropagationLengthThroughEarth( coszen, height );
00477 
00478   // neutrino or anti-neutrino
00479   Int_t anti = (ipdg>=0)?+1:-1;
00480 
00481   // run propagator
00482   OscillationCalculator::Instance()->PropVacuum( length, energy, anti );
00483   
00484   return;
00485 }

Double_t Oscillation::PropagationLengthThroughEarth ( Double_t  coszen,
Double_t  height 
)

Definition at line 319 of file Oscillation.cxx.

References fDepth, fEarthRadius, and MuELoss::R.

Referenced by OscProb(), PropagateThroughVacuum(), and SimpleOscProb().

00320 {
00321   Double_t H = height;
00322   Double_t D = fDepth;
00323   Double_t R = fEarthRadius;
00324 
00325   Double_t L = - (R-D)*coszen
00326                 + sqrt( (R-D)*(R-D)*coszen*coszen + (H+D)*(2.0*R+H-D) );
00327   return L;
00328 }

void Oscillation::RunPropagator ( Int_t  ipdg,
Double_t  energy,
Double_t  coszen,
Double_t  height 
)

Definition at line 330 of file Oscillation.cxx.

References fDoMatterEffects, PropagateThroughEarth(), and PropagateThroughVacuum().

00331 {
00332   if( fDoMatterEffects ){
00333     this->PropagateThroughEarth( ipdg, energy, coszen, height );
00334   }
00335   else{
00336     this->PropagateThroughVacuum( ipdg, energy, coszen, height );
00337   }
00338 
00339   return;
00340 }

void Oscillation::RunPropagator ( Int_t  ipdg,
Double_t  energy 
)

Definition at line 506 of file Oscillation.cxx.

References fLength, and RunPropagator().

00507 {
00508   return RunPropagator( ipdg, energy, fLength );
00509 }

void Oscillation::RunPropagator ( Int_t  ipdg,
Double_t  energy,
Double_t  length 
)

Definition at line 487 of file Oscillation.cxx.

References fDensity, fDoMatterEffects, Instance(), and PdgToNu().

Referenced by OscProb(), and RunPropagator().

00488 {
00489   // reset propagator
00490   OscillationCalculator::Instance()->ResetWithNewFlavour( this->PdgToNu(ipdg) );
00491 
00492   // neutrino or anti-neutrino
00493   Int_t anti = (ipdg>=0)?+1:-1;
00494 
00495   // run propagator
00496   if( fDoMatterEffects ){
00497     OscillationCalculator::Instance()->PropMatter( length, energy, fDensity, anti );
00498   }
00499   else{
00500     OscillationCalculator::Instance()->PropVacuum( length, energy, anti );
00501   }
00502 
00503   return;
00504 }

void OscFit::Oscillation::SetDeltaCP ( Double_t  d  )  [inline]

Definition at line 63 of file Oscillation.h.

References fDeltaCP, and SetPMNS().

Referenced by SetParams().

00063 { fDeltaCP = d; SetPMNS(); }

void OscFit::Oscillation::SetDensity ( Double_t  d  )  [inline]

Definition at line 76 of file Oscillation.h.

References fDensity.

00076 { fDensity = d; }

void OscFit::Oscillation::SetDetectorDepth ( Double_t  d  )  [inline]

Definition at line 80 of file Oscillation.h.

References fDepth.

00080 { fDepth = d; }

void OscFit::Oscillation::SetDMSq12 ( Double_t  d  )  [inline]

Definition at line 48 of file Oscillation.h.

References fDMSq12, and SetPMNS().

Referenced by SetParams().

00048 { fDMSq12 = d; SetPMNS(); }

void OscFit::Oscillation::SetDMSq23 ( Double_t  d  )  [inline]

Definition at line 51 of file Oscillation.h.

References fDMSq23, and SetPMNS().

Referenced by SetParams().

00051 { fDMSq23 = d; SetPMNS(); }

void Oscillation::SetParams ( GridPoint params  ) 

Definition at line 75 of file Oscillation.cxx.

References OscFit::GridPoint::GetDeltaCP(), OscFit::GridPoint::GetDMSq12(), OscFit::GridPoint::GetDMSq23(), OscFit::GridPoint::GetTheta12(), OscFit::GridPoint::GetTheta13(), OscFit::GridPoint::GetTheta23(), SetDeltaCP(), SetDMSq12(), SetDMSq23(), SetPMNS(), SetTheta12(), SetTheta13(), and SetTheta23().

Referenced by OscProb().

00076 {
00077   if( params==0 ) return;
00078 
00079   this->SetDMSq12  ( params->GetDMSq12()  );
00080   this->SetDMSq23  ( params->GetDMSq23()  );
00081   this->SetTheta12 ( params->GetTheta12() );
00082   this->SetTheta23 ( params->GetTheta23() );
00083   this->SetTheta13 ( params->GetTheta13() );
00084   this->SetDeltaCP ( params->GetDeltaCP() );
00085 
00086   SetPMNS();
00087 
00088   return;
00089 }

void Oscillation::SetPMNS (  )  [private]
void OscFit::Oscillation::SetPropagationLength ( Double_t  d  )  [inline]

Definition at line 84 of file Oscillation.h.

References fLength.

00084 { fLength = d; }

void OscFit::Oscillation::SetSinSq2Theta12 ( Double_t  d  )  [inline]

Definition at line 66 of file Oscillation.h.

References fTheta12, InvSinSq2Theta(), and SetPMNS().

00066 { fTheta12 = InvSinSq2Theta(d); SetPMNS(); }

void OscFit::Oscillation::SetSinSq2Theta13 ( Double_t  d  )  [inline]

Definition at line 72 of file Oscillation.h.

References fTheta13, InvSinSq2Theta(), and SetPMNS().

00072 { fTheta13 = InvSinSq2Theta(d); SetPMNS(); }

void OscFit::Oscillation::SetSinSq2Theta23 ( Double_t  d  )  [inline]

Definition at line 69 of file Oscillation.h.

References fTheta23, InvSinSq2Theta(), and SetPMNS().

00069 { fTheta23 = InvSinSq2Theta(d); SetPMNS(); }

void OscFit::Oscillation::SetTheta12 ( Double_t  d  )  [inline]

Definition at line 54 of file Oscillation.h.

References fTheta12, and SetPMNS().

Referenced by SetParams().

00054 { fTheta12 = d; SetPMNS(); }

void OscFit::Oscillation::SetTheta13 ( Double_t  d  )  [inline]

Definition at line 60 of file Oscillation.h.

References fTheta13, and SetPMNS().

Referenced by SetParams().

00060 { fTheta13 = d; SetPMNS(); }

void OscFit::Oscillation::SetTheta23 ( Double_t  d  )  [inline]

Definition at line 57 of file Oscillation.h.

References fTheta23, and SetPMNS().

Referenced by SetParams().

00057 { fTheta23 = d; SetPMNS(); }

Double_t Oscillation::SimpleOscProb ( Int_t  ipdg,
Int_t  jpdg,
Double_t  energy 
)

Definition at line 596 of file Oscillation.cxx.

References fLength, and SimpleOscProb().

00597 {
00598   return SimpleOscProb( ipdg, jpdg, energy, fLength );
00599 }

Double_t Oscillation::SimpleOscProb ( Int_t  ipdg,
Int_t  jpdg,
Double_t  energy,
Double_t  length 
)

Definition at line 601 of file Oscillation.cxx.

References fDMSq23, and fTheta23.

00602 { 
00603   if( ( ipdg>0 && jpdg<0 ) 
00604    || ( ipdg<0 && jpdg>0 ) ){
00605     return 0.0;
00606   }
00607 
00608   if( energy<=0 ){
00609     return 0.0;
00610   }
00611 
00612   if( length<=0 ){
00613     if( ipdg==jpdg ) return 1.0;
00614     else             return 0.0;
00615   }
00616  
00617   if( fabs(ipdg)==12 
00618    || fabs(jpdg)==12 ){
00619     if( fabs(ipdg)==12
00620      && fabs(jpdg)==12 ) return 1.0;
00621     else                 return 0.0;
00622   }
00623 
00624   if( fabs(ipdg)==14 ){
00625     Double_t pOsc = pow(sin(2.0*fTheta23),2.0)
00626                   * pow(sin(1.267*fDMSq23*length/energy),2.0);
00627     if( fabs(jpdg)==16 ) return pOsc;
00628     else                 return 1.0-pOsc;
00629   }
00630 
00631   return 0.0;
00632 }

Double_t Oscillation::SimpleOscProb ( Int_t  ipdg,
Int_t  jpdg,
Double_t  energy,
Double_t  coszen,
Double_t  height 
)

Definition at line 589 of file Oscillation.cxx.

References PropagationLengthThroughEarth().

Referenced by OscProb(), and SimpleOscProb().

00590 {
00591   Double_t length = PropagationLengthThroughEarth( coszen, height );
00592 
00593   return SimpleOscProb( ipdg, jpdg, energy, length );
00594 }

Double_t Oscillation::SinSq2Theta ( Double_t  d  )  [private]

Definition at line 91 of file Oscillation.cxx.

Referenced by GetSinSq2Theta12(), GetSinSq2Theta13(), and GetSinSq2Theta23().

00092 {
00093   Double_t SinTheta = sin( 2.0*theta );
00094   return SinTheta*SinTheta;
00095 }

void OscFit::Oscillation::ThreeFlavours (  )  [inline]

Definition at line 24 of file Oscillation.h.

References fUseTwoFlavours.

Referenced by UseThreeFlavours(), and UseTwoFlavours().

00024 { fUseTwoFlavours = 0; }

void OscFit::Oscillation::TwoFlavours (  )  [inline]

Definition at line 23 of file Oscillation.h.

References fUseTwoFlavours.

Referenced by UseThreeFlavours(), and UseTwoFlavours().

00023 { fUseTwoFlavours = 1; }

void Oscillation::UseFastPropagator ( Bool_t  yesno = 1  ) 

Definition at line 70 of file Oscillation.cxx.

References Instance(), and UseFastPropagator().

Referenced by UseFastPropagator().

00071 {
00072   OscillationCalculator::Instance()->UseFastPropagator(yesno);
00073 }

void OscFit::Oscillation::UseThreeFlavours ( Bool_t  yesno = 1  )  [inline]

Definition at line 30 of file Oscillation.h.

References ThreeFlavours(), and TwoFlavours().

00030                                               {
00031       if( yesno ) ThreeFlavours(); else TwoFlavours();
00032     }

void OscFit::Oscillation::UseTwoFlavours ( Bool_t  yesno = 1  )  [inline]

Definition at line 26 of file Oscillation.h.

References ThreeFlavours(), and TwoFlavours().

00026                                             {
00027       if( yesno ) TwoFlavours(); else ThreeFlavours();
00028     }

Bool_t OscFit::Oscillation::UsingThreeFlavours (  )  [inline]

Definition at line 45 of file Oscillation.h.

References fUseTwoFlavours.

00045 { return !fUseTwoFlavours;  }

Bool_t OscFit::Oscillation::UsingTwoFlavours (  )  [inline]

Definition at line 44 of file Oscillation.h.

References fUseTwoFlavours.

00044 { return  fUseTwoFlavours;  }


Member Data Documentation

Definition at line 155 of file Oscillation.h.

Referenced by Oscillation(), PrintParameters(), and PropagateThroughEarth().

Double_t OscFit::Oscillation::fDeltaCP [private]

Definition at line 145 of file Oscillation.h.

Referenced by GetDeltaCP(), Oscillation(), PrintParameters(), SetDeltaCP(), and SetPMNS().

Double_t OscFit::Oscillation::fDensity [private]

Definition at line 151 of file Oscillation.h.

Referenced by Oscillation(), PrintParameters(), PropagateThroughEarth(), and ~Oscillation().

Double_t OscFit::Oscillation::fDepth [private]
Double_t OscFit::Oscillation::fDMSq12 [private]

Definition at line 140 of file Oscillation.h.

Referenced by GetDMSq12(), Oscillation(), PrintParameters(), SetDMSq12(), and SetPMNS().

Double_t OscFit::Oscillation::fDMSq23 [private]

Definition at line 149 of file Oscillation.h.

Referenced by Oscillation(), PrintParameters(), PropagateThroughEarth(), and ~Oscillation().

Definition at line 148 of file Oscillation.h.

Referenced by Oscillation(), PrintParameters(), and PropagateThroughEarth().

Double_t OscFit::Oscillation::fLength [private]

Definition at line 150 of file Oscillation.h.

Referenced by Oscillation(), PrintParameters(), PropagateThroughEarth(), and ~Oscillation().

Double_t OscFit::Oscillation::fTheta12 [private]
Double_t OscFit::Oscillation::fTheta13 [private]
Double_t OscFit::Oscillation::fTheta23 [private]

The documentation for this class was generated from the following files:

Generated on 19 Jan 2018 for loon by  doxygen 1.6.1