SterileSpecComp Class Reference

#include <SterileSpecComp.h>

List of all members.

Public Types

enum  whichOscType {
  kTrueNC, kNuMu, kBeamNue, kAppNue,
  kAppNuTau
}

Public Member Functions

 SterileSpecComp ()
virtual ~SterileSpecComp ()
void LoadGenericHelpers (TH2D *hTrueNC, TH2D *hNuMu, TH2D *hBeamNue, TH2D *hAppNue, TH2D *hAppNuTau)
void UseDm241 (bool YesorNo)
TH1D * CreateSpectrumComponent (NuMMParameters pars, whichOscType OscType, Double_t baseline)

Public Attributes

TH2D * TrueNC
TH2D * NuMu
TH2D * BeamNue
TH2D * AppNue
TH2D * AppNuTau
TH2D * oscDummy
bool use41

Private Member Functions

 ClassDef (SterileSpecComp, 0)

Detailed Description

Definition at line 17 of file SterileSpecComp.h.


Member Enumeration Documentation

Enumerator:
kTrueNC 
kNuMu 
kBeamNue 
kAppNue 
kAppNuTau 

Definition at line 20 of file SterileSpecComp.h.


Constructor & Destructor Documentation

SterileSpecComp::SterileSpecComp (  ) 

Definition at line 23 of file SterileSpecComp.cxx.

00024 {
00025   use41 = false;
00026 }

SterileSpecComp::~SterileSpecComp (  )  [virtual]

Definition at line 28 of file SterileSpecComp.cxx.

00029 {
00030 
00031 }


Member Function Documentation

SterileSpecComp::ClassDef ( SterileSpecComp  ,
 
) [private]
TH1D * SterileSpecComp::CreateSpectrumComponent ( NuMMParameters  pars,
whichOscType  OscType,
Double_t  baseline 
)

Definition at line 42 of file SterileSpecComp.cxx.

References AppNue, AppNuTau, BeamNue, NuMMParameters::Delta1(), NuMMParameters::Delta2(), NuMMParameters::Delta3(), NuMMParameters::Dm2(), NuMMParameters::Dm221(), NuMMParameters::Dm243(), NuOscProb::FourFlavourDisappearanceWeight(), NuOscProb::FourFlavourNuESurvivalProbability(), NuOscProb::FourFlavourNuMuToNuEProbability(), NuOscProb::FourFlavourNuMuToNuSProbability(), NuOscProb::FourFlavourNuMuToNuTauProbability(), k1267, kAppNue, kAppNuTau, kBeamNue, Munits::km, kNuMu, kTrueNC, NuMu, oscDummy, NuMMParameters::Theta12(), NuMMParameters::Theta13(), NuMMParameters::Theta14(), NuMMParameters::Theta23(), NuMMParameters::Theta24(), NuMMParameters::Theta34(), TrueNC, and use41.

Referenced by SterileSpec::CreateTotalSpectrum().

00043 {
00044   oscDummy = 0;
00045 
00046   if(OscType == SterileSpecComp::kTrueNC)   oscDummy = TrueNC;
00047   if(OscType == SterileSpecComp::kNuMu)     oscDummy = NuMu;
00048   if(OscType == SterileSpecComp::kBeamNue)  oscDummy = BeamNue;
00049   if(OscType == SterileSpecComp::kAppNue)   oscDummy = AppNue;
00050   if(OscType == SterileSpecComp::kAppNuTau) oscDummy = AppNuTau;
00051  
00052   TH1D* bintemplate = oscDummy->ProjectionY();
00053   bintemplate->Reset();
00054  
00055   // This will be a TH1D with the correct binning
00056   const double k1267 = 1.26693276;
00057 
00058   // Loop over every true energy bin in the reco vs. true matrices, then loop over every reco energy in that bin                                                 
00059   // to calculate an oscillation weight for that reco energy based on the true energy. 
00060   TAxis *Yaxis = oscDummy->GetYaxis();
00061   TAxis *Xaxis = oscDummy->GetXaxis();
00062 
00063   // NuMMParameters doesnt have Dm241, define Dm243 such that its actually Dm241 being altered.
00064   //41 = 43 + 32 + 21 
00065   //43 = 41 - 32 - 21
00066   Double_t dm243 = 0.0;
00067 
00068   if( use41 == true ){
00069     dm243 = pars.Dm243() - pars.Dm2() - pars.Dm221();
00070   }
00071   else{
00072     dm243 = pars.Dm243();
00073   }
00074 
00075   for(Int_t x = 1; x <= Xaxis->GetNbins(); x++){
00076     Double_t OscWeight = 0.0;
00077     
00078     if(baseline > 0){
00079       
00080       // Default iterations (1 at bin center)
00081       Int_t n_LoverE = 1;
00082       Double_t LoverE[5];
00083       LoverE[0] = Xaxis->GetBinCenter(x);
00084       
00085       // This is averaging oscialltions in true energy bins - Joao has a doc db on this
00086       const Double_t W = Xaxis->GetBinWidth(x);
00087       const Double_t arg = k1267*dm243*W; // half-period of oscillation
00088       Double_t sample = W/2/sqrt(3);
00089 
00090       if(arg!=0) sample = TMath::ACos(TMath::Sin(arg)/arg)/arg*W/2;
00091 
00092       n_LoverE = 2;
00093       Double_t bc = LoverE[0]; // bin center
00094       LoverE[0] = bc - sample;
00095       LoverE[1] = bc + sample;
00096 
00097       const Double_t E = 1.0;
00098 
00099       for(int i = 0; i < n_LoverE; i++){
00100         
00101         // each Osctype has a different probability function
00102         if(OscType == SterileSpecComp::kTrueNC){
00103 
00104           OscWeight += NuOscProbCalc::FourFlavourNuMuToNuSProbability(E, pars.Dm2(), pars.Theta23(), pars.Dm221(), dm243,
00105                                                                         pars.Theta12(), pars.Theta13(), pars.Theta14(), pars.Theta24(),
00106                                                                         pars.Theta34(), pars.Delta1(),  pars.Delta2(), pars.Delta3(), LoverE[i]*Munits::km);
00107         }
00108         if(OscType == SterileSpecComp::kNuMu){
00109 
00110           OscWeight += NuOscProbCalc::FourFlavourDisappearanceWeight(E, pars.Dm2(), pars.Theta23(), pars.Dm221(), dm243, pars.Theta12(),
00111                                                                          pars.Theta13(), pars.Theta14(), pars.Theta24(), pars.Theta34(), pars.Delta1(),
00112                                                                          pars.Delta2(), pars.Delta3(), LoverE[i]*Munits::km);
00113         }
00114         if(OscType == SterileSpecComp::kBeamNue){
00115           
00116           OscWeight += NuOscProbCalc::FourFlavourNuESurvivalProbability(E, pars.Dm2(), pars.Theta23(), pars.Dm221(), dm243, pars.Theta12(),
00117                                                                                pars.Theta13(), pars.Theta14(), pars.Theta24(), pars.Theta34(), pars.Delta1(),
00118                                                                                pars.Delta2(), pars.Delta3(),  LoverE[i]*Munits::km);
00119         }
00120         if(OscType == SterileSpecComp::kAppNue){
00121           
00122           OscWeight += NuOscProbCalc::FourFlavourNuMuToNuEProbability(E, pars.Dm2(), pars.Theta23(), pars.Dm221(), dm243, pars.Theta12(),
00123                                                                             pars.Theta13(), pars.Theta14(), pars.Theta24(), pars.Theta34(), pars.Delta1(),
00124                                                                             pars.Delta2(), pars.Delta3(),  LoverE[i]*Munits::km);
00125         }
00126         if(OscType == SterileSpecComp::kAppNuTau){
00127 
00128           OscWeight += NuOscProbCalc::FourFlavourNuMuToNuTauProbability(E, pars.Dm2(), pars.Theta23(), pars.Dm221(), dm243, pars.Theta12(),
00129                                                                                 pars.Theta13(), pars.Theta14(), pars.Theta24(), pars.Theta34(), pars.Delta1(),
00130                                                                                 pars.Delta2(), pars.Delta3(),  LoverE[i]*Munits::km);
00131         }
00132       }
00133       // Now average this
00134       OscWeight /= n_LoverE;
00135     }
00136     else // if baseline < 0
00137       {
00138         
00139         if(OscType == SterileSpecComp::kTrueNC)   OscWeight = 0.0;
00140         if(OscType == SterileSpecComp::kNuMu)     OscWeight = 1.0;
00141         if(OscType == SterileSpecComp::kBeamNue)  OscWeight = 1.0;
00142         if(OscType == SterileSpecComp::kAppNue)   OscWeight = 0.0;
00143         if(OscType == SterileSpecComp::kAppNuTau) OscWeight = 0.0;
00144       }
00145 
00146     // using the oscillation weight, fill a 1d histogram for each type of event with the oscillated reco energy 
00147     for(Int_t y = 1; y <= Yaxis->GetNbins(); y++){
00148       
00149       Double_t sumWeights = 0;
00150       
00151       if(OscType == SterileSpecComp::kTrueNC){
00152         sumWeights += oscDummy->GetBinContent(x,y)*(1.0-OscWeight);
00153       }
00154       else{
00155         sumWeights += oscDummy->GetBinContent(x,y)*(OscWeight);
00156       }
00157       Double_t currBinContents = bintemplate->GetBinContent( y );
00158       bintemplate->SetBinContent( y, sumWeights + currBinContents);
00159 
00160     }
00161 
00162   }
00163 
00164   return bintemplate;
00165 }

void SterileSpecComp::LoadGenericHelpers ( TH2D *  hTrueNC,
TH2D *  hNuMu,
TH2D *  hBeamNue,
TH2D *  hAppNue,
TH2D *  hAppNuTau 
)

Definition at line 33 of file SterileSpecComp.cxx.

References AppNue, AppNuTau, BeamNue, NuMu, and TrueNC.

Referenced by SterileSpec::CreateTotalSpectrum().

00034 {
00035   TrueNC   = hTrueNC;
00036   NuMu     = hNuMu;
00037   BeamNue  = hBeamNue;
00038   AppNue   = hAppNue;
00039   AppNuTau = hAppNuTau;
00040 }

void SterileSpecComp::UseDm241 ( bool  YesorNo  ) 

Definition at line 167 of file SterileSpecComp.cxx.

References use41.

Referenced by SterileSpec::UseDm241().

00168 {
00169   use41 = YesorNo;
00170 }


Member Data Documentation

Definition at line 33 of file SterileSpecComp.h.

Referenced by CreateSpectrumComponent(), and LoadGenericHelpers().

Definition at line 33 of file SterileSpecComp.h.

Referenced by CreateSpectrumComponent(), and LoadGenericHelpers().

Definition at line 33 of file SterileSpecComp.h.

Referenced by CreateSpectrumComponent(), and LoadGenericHelpers().

Definition at line 33 of file SterileSpecComp.h.

Referenced by CreateSpectrumComponent(), and LoadGenericHelpers().

Definition at line 34 of file SterileSpecComp.h.

Referenced by CreateSpectrumComponent().

Definition at line 33 of file SterileSpecComp.h.

Referenced by CreateSpectrumComponent(), and LoadGenericHelpers().

Definition at line 36 of file SterileSpecComp.h.

Referenced by CreateSpectrumComponent(), and UseDm241().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1