NuMMRun Class Reference

#include <NuMMRun.h>

Inheritance diagram for NuMMRun:
FarOverNearFit FarOverNearFitLED FarOverNearFitPQ MakeSterilePred MakeSterilePred_Interpolated NuMMRunCC2010 NuMMRunCC2010New NuMMRunCCTutorial NuMMRunCPT NuMMRunCPTSyst NuMMRunNC2010 NuMMRunNDOsc NuMMRunNoChargeCut NuMMRunNSINu NuMMRunNSINubar NuMMRunNuBar NuMMRunPRL NuMMRunSterile NuMMRunTemplates NuSterileRunFC RockRunCPT

List of all members.

Public Member Functions

 NuMMRun ()
 NuMMRun (NuMMHelperPRL *helper, NuHistInterpolator *ndData, NuHistInterpolator *fdData)
virtual ~NuMMRun ()
virtual Double_t ComparePredWithData (const NuMMParameters &pars)=0
void ConfigForOscillations ()
void ConfigForDecay ()
void ConfigForDecoherence ()
void ConfigForNonStandard ()
void ConfigForNonStandardPrime ()
void ConfigFor3Flavour ()
virtual void ConfigForDisappearanceModel (int mod)
virtual void ConfigForFakeDataStudy ()
virtual std::vector< TH1D > WriteFDPredHistos (const NuMMParameters &pars) const =0
virtual void ShowerEnergyShifter (NuHistInterpolator *showerEnergyShifter)
virtual NuMatrixSpectrum TrueComponents (const NuMMParameters &pars, Sample::Sample_t s) const
 Return the individual true energy prediction of the far detector sub sample s with oscillation parameters described in pars. Default implementation just drops an error.
std::auto_ptr< NuMatrixMakeFDPrediction (const NuMMParameters &pars)
virtual void QuietModeOn ()
virtual void QuietModeOff ()
virtual void SetMaximumEnergy (Double_t energy)
 Sets the maximum energy to compare histograms up to.
virtual void SetMinimumEnergy (Double_t energy)
 Sets the minimum energy to compare histograms up to.
virtual void SetJessFile (TFile *jessFile)
virtual void DisableJessMode ()
void SetTitle (TString title)
TString GetTitle () const
void SetName (TString name)
TString GetName () const
virtual void ResetNDData (const NuMatrix &nddata)
 Replace the ND data used in extrapolation.
virtual void ResetFDData (const NuMatrix &fddata)
 Replace the FD data used in extrapolation.
virtual std::auto_ptr< NuMatrixGetNDData (void) const
 Returns the ND data used in extrapolation.
virtual std::auto_ptr< NuMatrixGetFDData (void) const
 Return the FD data used in extrapolation.

Protected Member Functions

virtual Double_t StatsLikelihood (const TH1D *fdPred, const TH1D *fdData) const
virtual NuMatrixinternalMakeFDPrediction (const NuMMParameters &pars)

Protected Attributes

Bool_t fFakeDataStudy
Int_t fQuietMode
Double_t fNDFidMass
Double_t fFDFidMass
Int_t fDisappearanceModel
NuHistInterpolatorfNDData
NuHistInterpolatorfFDData
NuHistInterpolatorfShowerEnergyShifter
NuMMHelperPRLfHelper
TFile * fJessFile
Bool_t fConstrainEnergy
Bool_t fConstrainEnergyMin
Double_t fMaximumEnergy
Double_t fMinimumEnergy
TString fTitle
TString fName

Detailed Description

Definition at line 40 of file NuMMRun.h.


Constructor & Destructor Documentation

NuMMRun::NuMMRun (  ) 

Definition at line 22 of file NuMMRun.cxx.

References NuCuts::FiducialMass(), SimFlag::kData, Detector::kFar, NuCuts::kJJE1, and Detector::kNear.

00023   : fFakeDataStudy(false),
00024     fQuietMode(0),
00025     fDisappearanceModel(0),
00026     fJessFile(0),
00027     fConstrainEnergy(false),
00028     fConstrainEnergyMin(false),
00029     fMaximumEnergy(0.0),
00030     fMinimumEnergy(0.0)
00031 //    fMaximumBin(0)
00032 {
00033   NuCuts nuCuts;
00034   fNDFidMass = nuCuts.FiducialMass(Detector::kNear,
00035                                    SimFlag::kData,
00036                                    NuCuts::kJJE1);
00037   fFDFidMass = nuCuts.FiducialMass(Detector::kFar,
00038                                    SimFlag::kData,
00039                                    NuCuts::kJJE1);
00040 }

NuMMRun::NuMMRun ( NuMMHelperPRL helper,
NuHistInterpolator ndData,
NuHistInterpolator fdData 
)

Definition at line 43 of file NuMMRun.cxx.

References fFDData, fFDFidMass, fHelper, NuCuts::FiducialMass(), fNDData, fNDFidMass, SimFlag::kData, Detector::kFar, NuCuts::kJJE1, and Detector::kNear.

00046   : fFakeDataStudy(false),
00047     fQuietMode(0),
00048     fDisappearanceModel(0),
00049     fJessFile(0)
00050 {
00051   NuCuts nuCuts;
00052   fNDFidMass = nuCuts.FiducialMass(Detector::kNear,
00053                                    SimFlag::kData,
00054                                    NuCuts::kJJE1);
00055   fFDFidMass = nuCuts.FiducialMass(Detector::kFar,
00056                                    SimFlag::kData,
00057                                    NuCuts::kJJE1);
00058   fHelper = helper;
00059   fNDData = ndData;
00060   fFDData = fdData;
00061 }

NuMMRun::~NuMMRun (  )  [virtual]

Definition at line 64 of file NuMMRun.cxx.

References fJessFile.

00065 {
00066   if(fJessFile) fJessFile->Close();
00067 }


Member Function Documentation

virtual Double_t NuMMRun::ComparePredWithData ( const NuMMParameters pars  )  [pure virtual]
void NuMMRun::ConfigFor3Flavour (  )  [inline]

Definition at line 55 of file NuMMRun.h.

References ConfigForDisappearanceModel().

void NuMMRun::ConfigForDecay (  )  [inline]

Definition at line 51 of file NuMMRun.h.

References ConfigForDisappearanceModel().

void NuMMRun::ConfigForDecoherence (  )  [inline]

Definition at line 52 of file NuMMRun.h.

References ConfigForDisappearanceModel().

void NuMMRun::ConfigForDisappearanceModel ( int  mod  )  [virtual]

Definition at line 70 of file NuMMRun.cxx.

References fDisappearanceModel.

Referenced by ConfigFor3Flavour(), ConfigForDecay(), ConfigForDecoherence(), ConfigForNonStandard(), ConfigForNonStandardPrime(), and ConfigForOscillations().

00071 {
00072   assert(model == 0 || model == 1 || model == 2 || model == 3 || model == 4 || model == 5);
00073   fDisappearanceModel = model;
00074 }

virtual void NuMMRun::ConfigForFakeDataStudy (  )  [inline, virtual]

Definition at line 58 of file NuMMRun.h.

References fFakeDataStudy.

00058 {fFakeDataStudy=true;}

void NuMMRun::ConfigForNonStandard (  )  [inline]
void NuMMRun::ConfigForNonStandardPrime (  )  [inline]

Definition at line 54 of file NuMMRun.h.

References ConfigForDisappearanceModel().

void NuMMRun::ConfigForOscillations (  )  [inline]

Definition at line 50 of file NuMMRun.h.

References ConfigForDisappearanceModel().

void NuMMRun::DisableJessMode (  )  [virtual]

Definition at line 123 of file NuMMRun.cxx.

References fJessFile.

00124 {
00125   if(fJessFile) fJessFile->Close();
00126   fJessFile = 0;
00127 }

std::auto_ptr< NuMatrix > NuMMRun::GetFDData ( void   )  const [virtual]

Return the FD data used in extrapolation.

Reimplemented in NuMMRunFC, NuMMRunFCNSINu, NuMMRunFCNSINubar, NuMMRunLED, and NuSterileRunFC.

Definition at line 166 of file NuMMRun.cxx.

References Msg::kFatal, and MSG.

Referenced by NuFCRunInfo::NuFCRunInfo(), and NuFCRunInfo::SetRun().

00167 {
00168   MSG("NuMMRun",Msg::kFatal) << "Do not support FD Data retrieval in this NuMMRun instance!" << endl;  
00169   assert(0);
00170   // Return *something* so that the compiler doesn't complain
00171   return auto_ptr<NuMatrix>(new NuMatrixSpectrum);
00172 }

TString NuMMRun::GetName ( void   )  const [inline]

Definition at line 97 of file NuMMRun.h.

References fName.

00097 {return fName;}

std::auto_ptr< NuMatrix > NuMMRun::GetNDData ( void   )  const [virtual]

Returns the ND data used in extrapolation.

Reimplemented in NuMMRunFC, NuMMRunFCNSINu, NuMMRunFCNSINubar, NuMMRunLED, and NuSterileRunFC.

Definition at line 156 of file NuMMRun.cxx.

References Msg::kFatal, and MSG.

Referenced by NuFCRunInfo::BuildNDSummary(), and NuFCExperimentGenerator::GenerateND().

00157 {
00158   MSG("NuMMRun",Msg::kFatal) << "Do not support ND Data retrieval in this NuMMRun instance!" << endl;
00159   assert(0);
00160   // Return *something* so that the compiler doesn't complain
00161   return auto_ptr<NuMatrix>(new NuMatrixSpectrum);
00162 }

TString NuMMRun::GetTitle (  )  const [inline]

Definition at line 95 of file NuMMRun.h.

References fTitle.

00095 {return fTitle;}

NuMatrix * NuMMRun::internalMakeFDPrediction ( const NuMMParameters pars  )  [protected, virtual]

The internal version of MakeFDPrediction. This is the actual virtual instance - we have this strange setup in order to get around the limitation of not being able to use covariant return types in a combination with auto_ptr's. We can either ignore the problem (leading to inevitable leaking of the histograms by the user) or do it this better, but slightly more internally complicated way.

Reimplemented in NuMMRunNuBar.

Definition at line 176 of file NuMMRun.cxx.

References Msg::kFatal, and MSG.

Referenced by MakeFDPrediction().

00177 {
00178   MSG("NuMMRun",Msg::kFatal) << "Do not support NuMatrix prediction retrieval in this NuMMRun instance!" << endl;  
00179   assert(0);
00180   return 0;
00181 }

std::auto_ptr<NuMatrix> NuMMRun::MakeFDPrediction ( const NuMMParameters pars  )  [inline]

Makes a FD prediction and returns the single NuMatrix object. This is deliberately not virtual: See internalMakeFDPrediction comments.

Reimplemented in NuMMRunNuBar.

Definition at line 71 of file NuMMRun.h.

References internalMakeFDPrediction().

Referenced by NuFCRunner::ProcessPredictions().

00071                                                                      {
00072     // See the internalMakeFDPrediction declaration for a brief explanation of this
00073     return std::auto_ptr<NuMatrix>(internalMakeFDPrediction(pars));
00074   };

virtual void NuMMRun::QuietModeOff (  )  [inline, virtual]

Definition at line 77 of file NuMMRun.h.

References fQuietMode.

00077 {fQuietMode = 0;}

virtual void NuMMRun::QuietModeOn (  )  [inline, virtual]
void NuMMRun::ResetFDData ( const NuMatrix fddata  )  [virtual]

Replace the FD data used in extrapolation.

Reimplemented in NuMMRunFC, NuMMRunFCNSINu, NuMMRunFCNSINubar, NuMMRunLED, and NuSterileRunFC.

Definition at line 140 of file NuMMRun.cxx.

References Msg::kFatal, and MSG.

Referenced by NuFCRunner::GenerateExperiment().

00141 {
00142   MSG("NuMMRun",Msg::kFatal) << "Do not support FD Data replacement in this NuMMRun instance!" << endl;  
00143 }

void NuMMRun::ResetNDData ( const NuMatrix nddata  )  [virtual]

Replace the ND data used in extrapolation.

Reimplemented in NuMMRunFC, NuMMRunFCNSINu, NuMMRunFCNSINubar, NuMMRunLED, and NuSterileRunFC.

Definition at line 132 of file NuMMRun.cxx.

References Msg::kFatal, and MSG.

Referenced by NuFCRunInfo::BuildFDSummaries(), NuFCRunInfo::BuildNDSummary(), NuFCRunInfo::BuildSampleWeights(), and NuFCRunner::GenerateExperiment().

00133 {
00134   MSG("NuMMRun",Msg::kFatal) << "Do not support ND Data replacement in this NuMMRun instance!" << endl;
00135 }

virtual void NuMMRun::SetJessFile ( TFile *  jessFile  )  [inline, virtual]

Definition at line 91 of file NuMMRun.h.

References fJessFile.

00091 {fJessFile = jessFile;}

virtual void NuMMRun::SetMaximumEnergy ( Double_t  energy  )  [inline, virtual]
virtual void NuMMRun::SetMinimumEnergy ( Double_t  energy  )  [inline, virtual]

Sets the minimum energy to compare histograms up to.

Definition at line 86 of file NuMMRun.h.

References fConstrainEnergyMin, and fMinimumEnergy.

00086                                                  {
00087     fConstrainEnergyMin = true;
00088     fMinimumEnergy = energy;
00089   }

void NuMMRun::SetName ( TString  name  )  [inline]

Definition at line 96 of file NuMMRun.h.

References fName.

00096 {fName = name;}

void NuMMRun::SetTitle ( TString  title  )  [inline]

Definition at line 94 of file NuMMRun.h.

References fTitle.

00094 {fTitle = title;}

virtual void NuMMRun::ShowerEnergyShifter ( NuHistInterpolator showerEnergyShifter  )  [inline, virtual]

Definition at line 61 of file NuMMRun.h.

References fShowerEnergyShifter.

00062     {fShowerEnergyShifter = showerEnergyShifter;}

Double_t NuMMRun::StatsLikelihood ( const TH1D *  fdPred,
const TH1D *  fdData 
) const [protected, virtual]

Definition at line 77 of file NuMMRun.cxx.

References fConstrainEnergy, fConstrainEnergyMin, fMaximumEnergy, fMinimumEnergy, Msg::kDebug, NuUtilities::LogLikelihood(), and MAXMSG.

Referenced by MakeSterilePred::ComparePredWithData(), NuSterileRunFC::ComparePredWithData(), NuMMRunTransSME::ComparePredWithData(), NuMMRunTransition::ComparePredWithData(), NuMMRunLED::ComparePredWithData(), NuMMRunSterile::ComparePredWithData(), and MakeSterilePred_Interpolated::ComparePredWithData().

00079 {
00080 /*
00081   Bool_t    fConstrainEnergy;
00082   Double_t  fMaximumEnergy;
00083   Int_t     fMaximumBin;*/
00084   Int_t MaximumBin = 0;
00085   Int_t MinimumBin = 1;
00086 
00087   // Are we constraining?
00088   if (fConstrainEnergyMin) {
00089     // Calculate the lower bin
00090     MinimumBin = fdPred->GetXaxis()->FindFixBin(fMinimumEnergy);
00091     MAXMSG("NuMMRun", 5, Msg::kDebug) << "    Calculated lowest bin as "
00092       << MinimumBin << endl;
00093   }
00094 
00095   if (fConstrainEnergy) {
00096     // Calculate the upper bin (not sure why using findfixbin... is this old?)
00097     MaximumBin = fdPred->GetXaxis()->FindFixBin(fMaximumEnergy);
00098     MAXMSG("NuMMRun", 5, Msg::kDebug) << "    Calculated highest bin as "
00099       << MaximumBin << endl;
00100   } else {
00101     // In this case, we are not constraining - use the full range!
00102     MAXMSG("NuMMRun", 5, Msg::kDebug) << "    Not constraining bin comparison" << endl;
00103     MaximumBin = fdPred->GetNbinsX();
00104   }
00105 
00106   Double_t like = 0;
00107 
00108   //Aim to minimise -2lnL. That's what I'm returning.
00109   for (Int_t i=MinimumBin; i<=MaximumBin; ++i){
00110     //Bizarre limits because root histograms are silly
00111     Double_t mnu = fdPred->GetBinContent(i);
00112     Double_t dnu = fdData->GetBinContent(i);
00113 
00114     // Replace the previous Log-likelihood with one that is a bit
00115     // more robust for fringe cases.
00116     like += NuUtilities::LogLikelihood(dnu,mnu);
00117   }
00118   return like;
00119 }

NuMatrixSpectrum NuMMRun::TrueComponents ( const NuMMParameters pars,
Sample::Sample_t  s 
) const [virtual]

Return the individual true energy prediction of the far detector sub sample s with oscillation parameters described in pars. Default implementation just drops an error.

Reimplemented in NuMMRunFC, NuMMRunFCNSINu, NuMMRunFCNSINubar, NuMMRunLED, NuMMRunNSI, NuMMRunNSINu, NuMMRunNSINubar, NuMMRunTransition, and NuMMRunTransSME.

Definition at line 147 of file NuMMRun.cxx.

References Msg::kError, and MSG.

Referenced by NuFCRunInfo::BuildFDSummaries(), NuFCRunInfo::BuildSampleWeights(), and NuFCExperimentFactory::GenerateNewExperiment().

00149 {
00150   MSG("NuMMRun",Msg::kError) << "True Components not implemented!" << endl;
00151   assert(0);
00152 }

virtual std::vector<TH1D> NuMMRun::WriteFDPredHistos ( const NuMMParameters pars  )  const [pure virtual]

Member Data Documentation

Bool_t NuMMRun::fConstrainEnergy [protected]

Definition at line 131 of file NuMMRun.h.

Referenced by SetMaximumEnergy(), and StatsLikelihood().

Bool_t NuMMRun::fConstrainEnergyMin [protected]

Definition at line 132 of file NuMMRun.h.

Referenced by SetMinimumEnergy(), and StatsLikelihood().

Int_t NuMMRun::fDisappearanceModel [protected]
Bool_t NuMMRun::fFakeDataStudy [protected]

Reimplemented in NuMMRunCCTutorial, and RockRunCPT.

Definition at line 125 of file NuMMRun.h.

Referenced by NuMMRunNoChargeCut::MakeFDPred(), NuMMRunPRL::MakeFDPred(), and NuMMRun().

Double_t NuMMRun::fFDFidMass [protected]
TFile* NuMMRun::fJessFile [protected]
Double_t NuMMRun::fMaximumEnergy [protected]

Definition at line 133 of file NuMMRun.h.

Referenced by SetMaximumEnergy(), and StatsLikelihood().

Double_t NuMMRun::fMinimumEnergy [protected]

Definition at line 134 of file NuMMRun.h.

Referenced by SetMinimumEnergy(), and StatsLikelihood().

TString NuMMRun::fName [protected]

Definition at line 137 of file NuMMRun.h.

Referenced by GetName(), and SetName().

Reimplemented in NuMMRunCCTutorial, and RockRunCPT.

Definition at line 124 of file NuMMRun.h.

Referenced by NuMMRunNoChargeCut::MakeFDPred(), NuMMRunPRL::MakeFDPred(), and NuMMRun().

Double_t NuMMRun::fNDFidMass [protected]
Int_t NuMMRun::fQuietMode [protected]

Definition at line 120 of file NuMMRun.h.

Referenced by NuMMRunTransSME::CacheExtrapolation(), NuMMRunTransition::CacheExtrapolation(), NuMMRunCCTutorial::MakeFDPred(), NuMMRunCC2010New::MakeFDPred(), NuMMRunNSINu::MakeFDPred(), NuMMRunNoChargeCut::MakeFDPred(), NuMMRunNC2010::MakeFDPred(), NuMMRunCPT::MakeFDPred(), NuMMRunCC2010::MakeFDPred(), NuMMRunTransSME::MakeFDPred(), NuMMRunCPTSyst::MakeFDPred(), NuMMRunPRL::MakeFDPred(), NuMMRunNDOsc::MakeFDPred(), NuMMRunFCNSINubar::MakeFDPred(), NuMMRunTransition::MakeFDPred(), NuMMRunNSINubar::MakeFDPred(), NuMMRunLED::MakeFDPred(), NuMMRunNSI::MakeFDPred(), NuMMRunFCNSINu::MakeFDPred(), NuMMRunFC::MakeFDPred(), NuMMRunFC::MakeFDPredBackgrounds(), NuMMRunLED::MakeFDPredBackgrounds(), NuMMRunTransition::MakeFDPredNuBar(), NuMMRunTransition::MakeFDPredNuMu(), NuMMRunNuBar::ModifyNDBarData(), NuMMRunNuBar::ModifyNDNuData(), NuMMRunNSI::PreCalcWrongSign(), NuMMRunFC::PreCalcWrongSign(), NuMMRunLED::PreCalcWrongSign(), NuMMRunFCNSINu::PreCalcWrongSign(), NuMMRunFCNSINubar::PreCalcWrongSign(), QuietModeOff(), QuietModeOn(), NuMMRunNuBar::ResetNDBarData(), NuMMRunNuBar::ResetNDNuData(), NuMMRunNSINubar::TrueComponents(), NuMMRunFCNSINu::TrueComponents(), NuMMRunTransition::TrueComponents(), NuMMRunLED::TrueComponents(), NuMMRunFCNSINubar::TrueComponents(), NuMMRunTransSME::TrueComponents(), NuMMRunNSINu::TrueComponents(), NuMMRunNSI::TrueComponents(), NuMMRunFC::TrueComponents(), NuMMRunFCNSINu::WriteFDPredHistos(), NuMMRunLED::WriteFDPredHistos(), NuMMRunFC::WriteFDPredHistos(), NuMMRunFCNSINubar::WriteFDPredHistos(), and NuMMRunNSI::WriteFDPredHistos().

TString NuMMRun::fTitle [protected]

Definition at line 137 of file NuMMRun.h.

Referenced by GetTitle(), and SetTitle().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1