OscFit Namespace Reference

Classes

class  ArgonData
class  AtmosData
class  Binning
class  BinningScheme
class  Configuration
class  Data
class  DataInterface
class  Event
class  EventCalculator
class  ExternalData
class  ExternalDataInterface
class  GridPoint
class  Histogram
class  Interface
class  NueData
class  Oscillation
class  OscillationCalculator
class  Parameters
class  ProductionHeight
class  Spectrum
class  Template
class  TemplateCalculator
class  TemplateGrid
class  TemplateIO
class  TemplateMaker
class  TemplateMap
class  TemplateReader
class  TemplatesForBeamData
class  TemplateWriter
class  ThreeFlavourFitter
class  TwoFlavourFitter
class  Fitter
class  TemplateArray

Typedefs

typedef enum OscFit::EExperiment Experiment_t
typedef enum OscFit::ESource Source_t
typedef enum OscFit::ESample Sample_t
typedef enum OscFit::EFlavour Flavour_t
typedef enum OscFit::ECharge Charge_t
typedef enum OscFit::ESystematic Systematic_t
typedef enum OscFit::EShift Shift_t
typedef enum OscFit::ERun Run_t
typedef enum OscFit::ERunType RunType_t
typedef enum OscFit::EContainment Containment_t
typedef enum OscFit::EResolution Resolution_t
typedef enum OscFit::ETopology Topology_t
typedef enum OscFit::EProtonTag ProtonTag_t
typedef enum OscFit::EElectronTag ElectronTag_t
typedef enum OscFit::EBinning Binning_t
typedef enum OscFit::EBinningScheme BinningScheme_t
typedef enum OscFit::EInterpolation Interpolation_t
typedef enum OscFit::EDmsqBasis DmsqBasis_t
typedef enum OscFit::EExternal External_t
typedef enum OscFit::EOscType OscType_t
typedef enum OscFit::EFileType FileType_t
typedef enum OscFit::EAnalysis Analysis_t
typedef enum OscFit::EInteraction Interaction_t
typedef enum OscFit::EBin Bin_t
typedef enum OscFit::ESpectrum Spectrum_t

Enumerations

enum  EExperiment { kUnknownExperiment = -1, kMINOS = 0, kLBNE = 1 }
enum  ESource { kUnknownData = -1, kAtmosData = 0, kBeamData = 1, kNumSources = 2 }
enum  ESample {
  kUnknown = -1, kData = 0, kCV = 1, kRock = 2,
  kCosmic = 3, kNumSamples = 4, kUnknown = -1, kData = 0,
  kCV = 1, kRock = 2, kCVTau = 3, kRockTau = 4,
  kNumSamples = 4
}
enum  EFlavour {
  kUnknownFlavour = -1, kNC = 0, kNue = 1, kNumu = 2,
  kNutau = 3, kNumFlavours = 4, kNoFlavour = 0
}
enum  ECharge {
  kUnknownCharge = -1, kAmbig = 0, kNu = 1, kNuBar = 2,
  kAny = 3, kNumCharges = 4, kNegative = kNu, kPositive = kNuBar,
  kNoCharge = 0, kAnyCharge = 3, kNoCharge = 0, kNegative = kNu,
  kPositive = kNuBar
}
enum  ESystematic {
  kUnknownSystematic = -1, kCentre = 0, kNCbkg = 1, kShwEn = 2,
  kTrkEn = 3, kTrkEnExit = 4, kSpec = 5, kZenith = 6,
  kNueNCbkg = 7, kNueEnergy = 8, kNumSystematics = 9, kMuonEnergy = kTrkEn,
  kMuonEnergyExit = kTrkEnExit, kHadronEnergy = kShwEn, kElectronEnergy = kNueEnergy, kNumuBkg = kNCbkg,
  kNueBkg = kNueNCbkg, kCentre = 0, kNCbkg = 1, kShwEn = 2,
  kTrkEn = 3, kNumSystematics = 9
}
enum  EShift {
  kNoShift = 0, kMinus2 = 1, kMinus1 = 2, kPlus1 = 3,
  kPlus2 = 4, kNumShifts = 5, kNoShift = 0, kMinus2 = 1,
  kMinus1 = 2, kPlus1 = 3, kPlus2 = 4, kNumShifts = 5
}
enum  ERun {
  kUnknownRun = -1, kAtmos = 0, kBeam = 1, kNeutrino = 2,
  kAntiNeutrino = 3, kFirstRun = 4, kRunI = 4, kRunIHE = 5,
  kRunII = 6, kRunIII = 7, kRunIVFHC = 8, kRunIV = 9,
  kRunV = 10, kRunVI = 11, kRunVII = 12, kRunVIII = 13,
  kRunIX = 14, kRunX = 15, kRunXI = 16, kRunXII = 17,
  kRunXIII = 18, kNumRuns = 19, kNoRun = -1, kRunI = 4,
  kRunIHE = 5, kRunII = 6, kRunIII = 7, kRunIVFHC = 8,
  kRunIV = 9, kRunV = 10, kRunVI = 11, kRunVII = 12,
  kRunVIII = 13, kRunIX = 14, kRunX = 15, kNumRuns = 19
}
enum  ERunType {
  kUnknownRunType = -1, kAtNu = 0, kFHC = 1, kRHC = 2,
  kNumRunTypes = 3, kBeamOff = -1, kFHC = 1, kRHC = 2
}
enum  EContainment {
  kNull = -1, kContainedVertex = 0, kFullyContained = 1, kPartiallyContained = 2,
  kRockMuon = 3, kUpStop = 4, kUpThrough = 5, kInnerEdge = 6,
  kOuterEdge = 7, kFrontPlane = 8, kNumContainments = 9
}
enum  EResolution {
  kUnknownRes = -1, kLoRes = 0, kResBin0 = 1, kResBin1 = 2,
  kResBin2 = 3, kResBin3 = 4, kResBin4 = 5, kHiRes = 6,
  kResBin5 = 7, kResBin6 = 8, kResBin7 = 9, kResBin8 = 10,
  kResBin9 = 11, kNumResBins = 12, kNoRes = kHiRes
}
enum  ETopology {
  kNothing = -1, kVanilla = 0, kSingle = 1, kMulti = 2,
  kQuasiElastic = 3, kNumTopologies = 4
}
enum  EProtonTag {
  kUnknownProtonTag = -1, kNoProton = 0, kProton = 1, kIgnoreProton = 2,
  kNumProtonTags = 3
}
enum  EElectronTag {
  kUnknownElectronTag = -1, kNoElectron = 0, kElectron = 1, kIgnoreElectron = 2,
  kNumElectronTags = 3
}
enum  EBinning {
  kUnknownBinning = -1, kSingleBin = 0, kBeamCC = 1, kBeamNUE = 2,
  kBeamRAF = 3, kBeamHiRes = 4, kBeamCCMinosPlus = 5, kAtmosSingleBin = 9,
  kAtmosLogLE = 10, kAtmosEnergy = 11, kAtmosAngle = 12, kAtmosAngleLoRes = 13,
  kAtmosAngleHiRes = 14, kAtmos2D = 15, kAtmos2DLoRes = 16, kAtmos2DHiRes = 17
}
enum  EBinningScheme {
  kUnknownScheme = -1, kScheme0 = 0, kScheme1 = 1, kScheme1A = 2,
  kScheme2 = 3, kScheme2A = 4, kCounterForMINOS = 100, kCounterForLBNE = 101
}
enum  EInterpolation { kLinear = 0, kCubic = 1, kSpline = 2 }
enum  EDmsqBasis { kSimple = 0, kDmsq31 = 1, kDmsq32 = 2, kDmsqAve = 3 }
enum  EExternal { kUnknownExternal = -1, kMinosNue = 0, kNumExternals = 1 }
enum  EOscType {
  kUnknownOsc = -1, kNoOsc = 0, kNumu2Nue = 1, kNumu2Nutau = 2,
  kNue2Nutau = 3, kNonOsc = 4, kNumOscTypes = 5
}
enum  EFileType { kText = 0, kRoot = 1, kHurraySomethingOtherThanRoot = 2 }
enum  EAnalysis {
  kCCByRes = 100, kCCFull = 101, kCCPartial = 102, kCCMid = 103,
  kCCLow = 104, kCCLow2 = 105, kRHCFull = 200, kRHCPartial = 201,
  kNUBARFull = 300, kNUBARPartial = 301, kCC2010 = kCCFull, kNUBAR2010 = kNUBARFull,
  kNUBAR2011 = kNUBARFull, kRHC2011 = kRHCFull, kCC2012 = kCCPartial, kNUBAR2012 = kNUBARPartial,
  kRHC2012 = kRHCPartial, kRAF_All = 1000, kRAF_Front = 1001, kRAF_Outer = 1002,
  kRAF_Inner = 1003, kRAF_Gap = 1004, kRAF_GapEdge = 1005, kRAF_Back = 1006,
  kVanilla = 0, kCCByResOld = 99, kCCByRes = 100, kCCFull = 101,
  kCCPartial = 102, kCCMid = 103, kCCLow = 104, kRHCFull = 200,
  kRHCPartial = 201, kNUBARFull = 300, kNUBARPartial = 301, kCC2010 = kCCFull,
  kNUBAR2010 = kNUBARFull, kNUBAR2011 = kNUBARFull, kRHC2011 = kRHCFull, kCC2012 = kCCPartial,
  kNUBAR2012 = kNUBARPartial, kRHC2012 = kRHCPartial, kRAF_All = 1000, kRAF_Front = 1001,
  kRAF_Outer = 1002, kRAF_Inner = 1003, kRAF_Gap = 1004, kRAF_GapEdge = 1005,
  kRAF_Back = 1006
}
enum  EAnalysis {
  kCCByRes = 100, kCCFull = 101, kCCPartial = 102, kCCMid = 103,
  kCCLow = 104, kCCLow2 = 105, kRHCFull = 200, kRHCPartial = 201,
  kNUBARFull = 300, kNUBARPartial = 301, kCC2010 = kCCFull, kNUBAR2010 = kNUBARFull,
  kNUBAR2011 = kNUBARFull, kRHC2011 = kRHCFull, kCC2012 = kCCPartial, kNUBAR2012 = kNUBARPartial,
  kRHC2012 = kRHCPartial, kRAF_All = 1000, kRAF_Front = 1001, kRAF_Outer = 1002,
  kRAF_Inner = 1003, kRAF_Gap = 1004, kRAF_GapEdge = 1005, kRAF_Back = 1006,
  kVanilla = 0, kCCByResOld = 99, kCCByRes = 100, kCCFull = 101,
  kCCPartial = 102, kCCMid = 103, kCCLow = 104, kRHCFull = 200,
  kRHCPartial = 201, kNUBARFull = 300, kNUBARPartial = 301, kCC2010 = kCCFull,
  kNUBAR2010 = kNUBARFull, kNUBAR2011 = kNUBARFull, kRHC2011 = kRHCFull, kCC2012 = kCCPartial,
  kNUBAR2012 = kNUBARPartial, kRHC2012 = kRHCPartial, kRAF_All = 1000, kRAF_Front = 1001,
  kRAF_Outer = 1002, kRAF_Inner = 1003, kRAF_Gap = 1004, kRAF_GapEdge = 1005,
  kRAF_Back = 1006
}
enum  ERunType {
  kUnknownRunType = -1, kAtNu = 0, kFHC = 1, kRHC = 2,
  kNumRunTypes = 3, kBeamOff = -1, kFHC = 1, kRHC = 2
}
enum  ERun {
  kUnknownRun = -1, kAtmos = 0, kBeam = 1, kNeutrino = 2,
  kAntiNeutrino = 3, kFirstRun = 4, kRunI = 4, kRunIHE = 5,
  kRunII = 6, kRunIII = 7, kRunIVFHC = 8, kRunIV = 9,
  kRunV = 10, kRunVI = 11, kRunVII = 12, kRunVIII = 13,
  kRunIX = 14, kRunX = 15, kRunXI = 16, kRunXII = 17,
  kRunXIII = 18, kNumRuns = 19, kNoRun = -1, kRunI = 4,
  kRunIHE = 5, kRunII = 6, kRunIII = 7, kRunIVFHC = 8,
  kRunIV = 9, kRunV = 10, kRunVI = 11, kRunVII = 12,
  kRunVIII = 13, kRunIX = 14, kRunX = 15, kNumRuns = 19
}
enum  ESample {
  kUnknown = -1, kData = 0, kCV = 1, kRock = 2,
  kCosmic = 3, kNumSamples = 4, kUnknown = -1, kData = 0,
  kCV = 1, kRock = 2, kCVTau = 3, kRockTau = 4,
  kNumSamples = 4
}
enum  EInteraction {
  kNull = -1, kCCnu = 0, kCCnubar = 1, kNC = 0,
  kNumInteractions = 3
}
enum  ESystematic {
  kUnknownSystematic = -1, kCentre = 0, kNCbkg = 1, kShwEn = 2,
  kTrkEn = 3, kTrkEnExit = 4, kSpec = 5, kZenith = 6,
  kNueNCbkg = 7, kNueEnergy = 8, kNumSystematics = 9, kMuonEnergy = kTrkEn,
  kMuonEnergyExit = kTrkEnExit, kHadronEnergy = kShwEn, kElectronEnergy = kNueEnergy, kNumuBkg = kNCbkg,
  kNueBkg = kNueNCbkg, kCentre = 0, kNCbkg = 1, kShwEn = 2,
  kTrkEn = 3, kNumSystematics = 9
}
enum  EShift {
  kNoShift = 0, kMinus2 = 1, kMinus1 = 2, kPlus1 = 3,
  kPlus2 = 4, kNumShifts = 5, kNoShift = 0, kMinus2 = 1,
  kMinus1 = 2, kPlus1 = 3, kPlus2 = 4, kNumShifts = 5
}
enum  EBin {
  kNoBin = -1, kResBin0 = 1, kResBin1 = 2, kResBin2 = 3,
  kResBin3 = 4, kResBin4 = 5, kOppositeSign = 5, kRAF = 6,
  kNumBins = 7
}
enum  ECharge {
  kUnknownCharge = -1, kAmbig = 0, kNu = 1, kNuBar = 2,
  kAny = 3, kNumCharges = 4, kNegative = kNu, kPositive = kNuBar,
  kNoCharge = 0, kAnyCharge = 3, kNoCharge = 0, kNegative = kNu,
  kPositive = kNuBar
}
enum  ESpectrum { kFlat = 0, kInterpolated = 1, kSpline = 2 }

Functions

void Interpolate (Double_t x, Double_t &w_m2, Double_t &w_m1, Double_t &w_0, Double_t &w_p1, Double_t &w_p2)
void InterpolateLinear (Double_t x, Double_t &w_m2, Double_t &w_m1, Double_t &w_0, Double_t &w_p1, Double_t &w_p2)
void InterpolateCubic (Double_t x, Double_t &w_m2, Double_t &w_m1, Double_t &w_0, Double_t &w_p1, Double_t &w_p2)
void InterpolateNew (Double_t y_m2, Double_t y_m1, Double_t y_0, Double_t y_p1, Double_t y_p2, Double_t x, Double_t &y)
void InterpolateOld (Double_t y_m2, Double_t y_m1, Double_t y_0, Double_t y_p1, Double_t y_p2, Double_t x, Double_t &y)
Double_t CalcLikelihood (Template *tempExpected, Template *tempObserved)
Double_t CalcDeltaLikelihood (Double_t Exp, Double_t Obs)
Double_t CalcSimpleLikelihood (Double_t Exp, Double_t Obs)
Double_t CalcModifiedLikelihood (Double_t x, Double_t Obs)
const char * AsString (Experiment_t experiment)
const char * AsString (Source_t source)
const char * AsString (Run_t run)
const char * AsString (Sample_t sample)
const char * AsString (Flavour_t flavour)
const char * AsString (Charge_t charge)
const char * AsString (Systematic_t systematic)
const char * AsString (Shift_t shift)
const char * AsString (Containment_t containment)
const char * AsString (Resolution_t resolution)
const char * AsString (Topology_t topology)
const char * AsString (ProtonTag_t proton)
const char * AsString (ElectronTag_t electron)
const char * AsString (Binning_t binning)
const char * AsString (BinningScheme_t scheme)
const char * AsString (Interpolation_t interpolation)
const char * AsString (RunType_t runtype)
const char * AsString (DmsqBasis_t basis)
const char * AsString (External_t external)
const char * AsString (OscType_t osctype)
const char * AsString (FileType_t filetype)
Int_t GetNumOscTypes ()
OscType_t GetOscType (Int_t iosc)
Int_t GetNumSources ()
Source_t GetSource (Int_t isource)
Int_t GetFirstRun ()
Int_t GetNumRuns ()
Run_t GetRun (Int_t irun)
Int_t GetNumRunTypes ()
RunType_t GetRunType (Int_t iruntype)
Int_t GetNumSamples ()
Sample_t GetSample (Int_t isample)
Int_t GetNumFlavours ()
Flavour_t GetFlavour (Int_t iflavour)
Int_t GetNumCharges ()
Charge_t GetCharge (Int_t icharge)
Int_t GetNumSystematics ()
Systematic_t GetSystematic (Int_t isystematic)
Int_t GetNumShifts ()
Shift_t GetShift (Int_t ishift)
Int_t GetNumContainments ()
Containment_t GetContainment (Int_t icontainment)
Int_t GetNumResBins ()
Resolution_t GetResBin (Int_t iresbin)
Int_t GetNumTopologies ()
Topology_t GetTopology (Int_t itopology)
Int_t GetNumProtonTags ()
ProtonTag_t GetProtonTag (Int_t iproton)
Int_t GetNumElectronTags ()
ElectronTag_t GetElectronTag (Int_t ielectron)
Int_t GetNumExternals ()
External_t GetExternal (Int_t iexternal)
Run_t GetRunPeriod (RunType_t runtype)
RunType_t GetRunType (Run_t run)
Resolution_t GetResolutionType (Resolution_t res)
Containment_t GetContainmentType (Containment_t containment)
Source_t GetSource (Run_t run)
Source_t GetSource (RunType_t runtype)
Bool_t IsMINOSPlus (Run_t run)
Int_t GetPDG (Flavour_t flavour, Charge_t charge)
Int_t OscillateForward (Int_t ipdg, OscType_t osctype)
Int_t OscillateBackward (Int_t ipdg, OscType_t osctype)
Int_t Nue2Nutau (Int_t ipdg)
Int_t Numu2Nutau (Int_t ipdg)
Int_t Nutau2Nue (Int_t ipdg)
Int_t Nutau2Numu (Int_t ipdg)
Int_t Numu2Nue (Int_t ipdg)
Int_t Nue2Numu (Int_t ipdg)
Double_t PropagationDistance ()
Double_t DetectorDepth ()
Double_t Syst_Beam_Numu_Norm ()
Double_t Syst_Beam_Numu_NCBkg ()
Double_t Syst_Beam_Numu_TrkEn ()
Double_t Syst_Beam_Numu_TrkEn_Exit ()
Double_t Syst_Beam_Numu_ShwEn ()
Double_t Syst_Beam_Nue_Norm ()
Double_t Syst_Beam_Nue_NCBkg ()
Double_t Syst_Beam_Nue_Energy ()
Double_t Syst_Atmos_CV_Norm ()
Double_t Syst_Atmos_CV_UpDnRatio ()
Double_t Syst_Atmos_CV_NumuChgRatio ()
Double_t Syst_Atmos_CV_NueChgRatio ()
Double_t Syst_Atmos_CV_NCRatio ()
Double_t Syst_Atmos_CV_FlavRatio ()
Double_t Syst_Atmos_CV_Spec_Numu ()
Double_t Syst_Atmos_CV_Spec_NumuBar ()
Double_t Syst_Atmos_CV_Spec_Nue ()
Double_t Syst_Atmos_CV_Spec_NueBar ()
Double_t Syst_Atmos_Rock_Norm ()
Double_t Syst_Atmos_Rock_ChgRatio ()
Double_t Syst_Atmos_Rock_Spec_Nu ()
Double_t Syst_Atmos_Rock_Spec_NuBar ()
Double_t Syst_Atmos_Numu_TrkEn ()
Double_t Syst_Atmos_Numu_TrkEn_Exit ()
Double_t Syst_Atmos_Numu_ShwEn ()
Double_t Syst_Atmos_Nue_Energy ()
Double_t DMSq12 ()
Double_t DMSq23 ()
Double_t Theta12 ()
Double_t Theta23 ()
Double_t Theta13 ()
Double_t DeltaCP ()
Double_t Sinsq12 ()
Double_t Sinsq23 ()
Double_t Sinsq13 ()
double FlatProdHeight ()
double MeanPionProdHeight (double CosZen, double Energy)
double MeanMuonProdHeight (double CosZen, double Energy)
double ChooseX (double BoverA)
double MuonPdfA (double CosZen, double Energy)
double MuonPdfB (double CosZen, double Energy)
double PionPdfA (double CosZen, double)
double PionPdfB (double CosZen, double)
double PDFRndmPionProdHeight (double CosZen, double Energy)
double PDFRndmMuonProdHeight (double CosZen, double Energy)
double PDFMeanPionProdHeight (double CosZen, double Energy)
double PDFMeanMuonProdHeight (double CosZen, double Energy)
TH1D * SwitchToLogBinning (TH1D *hist)
TH1D * DivideHistograms (TH1D *hist1, TH1D *hist2)
TH1D * GetProjectedHistogram (TH2D *hist, Double_t lowerE, Double_t upperE)
TH1D * GetDisplayHistogramForCV (TH2D *hist, Double_t lowerE, Double_t upperE)
TH1D * GetDisplayHistogramForCV (TH1D *hist)
TH1D * GetDisplayHistogramForRock (TH1D *hist)
TH1D * FillEmptyErrors (TH1D *hist)
Double_t GetDensity (TH2D *hist, Double_t Ereco, Double_t Etrue)
TH1D * GetRecoSpectrum (TH2D *hist)
TH1D * GetTrueSpectrum (TH2D *hist)
TH1D * CalculateRatio (TH1D *hist1, TH1D *hist2)
TH1D * GetWeightedSpectrum (TH1D *hist)
TH1D * GetWeightedSpectrumWithoutErrors (TH1D *hist)
TH1D * GetWeightedSpectrumWithErrors (TH1D *hist)
TH1D * GetRAFSpectrum (TH1D *hist, OscFit::Analysis_t AnaType)
TH1D * GetCombinedRAFSpectrum (TH1D *hist)
TH1D * ConvertToDisplayBinning (TH1D *hist, OscFit::Analysis_t AnaType)
TH1D * ConvertToSquashedBinning (TH1D *hist, OscFit::Analysis_t AnaType)
void DrawAxes (TH1D *hist, OscFit::Analysis_t AnaType)
TH1D * GetDisplaySpectrumForData (TH1D *hist, OscFit::Analysis_t AnaType)
TH1D * GetDisplaySpectrumForMC (TH1D *hist, OscFit::Analysis_t AnaType, Int_t ColType)
TH1D * GetDisplaySpectrumForBkg (TH1D *hist, OscFit::Analysis_t AnaType, Int_t ColType)
TH1D * GetDisplaySpectrumForNoOsc (TH1D *hist, OscFit::Analysis_t AnaType)
TH1D * GetDisplaySpectrumForOsc (TH1D *hist, OscFit::Analysis_t AnaType)
TH1D * GetDisplaySpectrumForNCBkg (TH1D *hist, OscFit::Analysis_t AnaType)
TH1D * FormatForData (TH1D *hist)
TH1D * FormatForMC (TH1D *hist, Int_t ColType)
TH1D * FormatForBkg (TH1D *hist, Int_t ColType)
const char * AsString (Analysis_t analysis)
const char * AsString (Interaction_t interaction)
const char * AsString (Bin_t bin)
Charge_t GetChargeSign (Run_t, Bin_t bin)
Int_t GetRunNumber (Run_t run)
Int_t GetSampleNumber (Sample_t sample)
Int_t GetNumInteractions ()
Int_t GetInteractionNumber (Interaction_t interaction)
Interaction_t GetInteraction (Int_t interaction)
Int_t GetSystematicNumber (Systematic_t syst)
Int_t GetShiftNumber (Shift_t shift)
Int_t GetNumBins ()
Int_t GetBinNumber (Bin_t bin)
Bin_t GetBin (Int_t ibin)
Bin_t GetBin (const char *bin)
Int_t GetFirstResBin ()
Int_t GetLastResBin ()
Int_t GetFirstCorrectSignBin ()
Int_t GetLastCorrectSignBin ()
Int_t GetFirstOppositeSignBin ()
Int_t GetLastOppositeSignBin ()
Int_t GetFirstFiducialBin ()
Int_t GetLastFiducialBin ()
Int_t GetFirstRockBin ()
Int_t GetLastRockBin ()
Int_t GetID (Int_t n, Run_t run, Sample_t sample, Interaction_t interaction, Systematic_t systematic, Shift_t shift)
Double_t GetNormError ()

Typedef Documentation


Enumeration Type Documentation

Enumerator:
kCCByRes 
kCCFull 
kCCPartial 
kCCMid 
kCCLow 
kCCLow2 
kRHCFull 
kRHCPartial 
kNUBARFull 
kNUBARPartial 
kCC2010 
kNUBAR2010 
kNUBAR2011 
kRHC2011 
kCC2012 
kNUBAR2012 
kRHC2012 
kRAF_All 
kRAF_Front 
kRAF_Outer 
kRAF_Inner 
kRAF_Gap 
kRAF_GapEdge 
kRAF_Back 
kVanilla 
kCCByResOld 
kCCByRes 
kCCFull 
kCCPartial 
kCCMid 
kCCLow 
kRHCFull 
kRHCPartial 
kNUBARFull 
kNUBARPartial 
kCC2010 
kNUBAR2010 
kNUBAR2011 
kRHC2011 
kCC2012 
kNUBAR2012 
kRHC2012 
kRAF_All 
kRAF_Front 
kRAF_Outer 
kRAF_Inner 
kRAF_Gap 
kRAF_GapEdge 
kRAF_Back 

Definition at line 8 of file twoflavours/OscFit.h.

00008                           {
00009      kVanilla      = -1,
00010      kCCByResOld   = 99,
00011      kCCByRes      = 100,
00012      kCCFull       = 101,
00013      kCCPartial    = 102,
00014      kCCMid        = 103,
00015      kCCLow        = 104,
00016      kRHCFull      = 200,
00017      kRHCPartial   = 201,
00018      kNUBARFull    = 300,
00019      kNUBARPartial = 301,
00020      kCC2010       = kCCFull,
00021      kNUBAR2010    = kNUBARFull,
00022      kNUBAR2011    = kNUBARFull,
00023      kRHC2011      = kRHCFull,
00024      kCC2012       = kCCPartial,
00025      kNUBAR2012    = kNUBARPartial,
00026      kRHC2012      = kRHCPartial,
00027      kRAF_All      = 1000,
00028      kRAF_Front    = 1001,
00029      kRAF_Outer    = 1002,
00030      kRAF_Inner    = 1003,
00031      kRAF_Gap      = 1004,
00032      kRAF_GapEdge  = 1005,
00033      kRAF_Back     = 1006
00034    } Analysis_t;

Enumerator:
kCCByRes 
kCCFull 
kCCPartial 
kCCMid 
kCCLow 
kCCLow2 
kRHCFull 
kRHCPartial 
kNUBARFull 
kNUBARPartial 
kCC2010 
kNUBAR2010 
kNUBAR2011 
kRHC2011 
kCC2012 
kNUBAR2012 
kRHC2012 
kRAF_All 
kRAF_Front 
kRAF_Outer 
kRAF_Inner 
kRAF_Gap 
kRAF_GapEdge 
kRAF_Back 
kVanilla 
kCCByResOld 
kCCByRes 
kCCFull 
kCCPartial 
kCCMid 
kCCLow 
kRHCFull 
kRHCPartial 
kNUBARFull 
kNUBARPartial 
kCC2010 
kNUBAR2010 
kNUBAR2011 
kRHC2011 
kCC2012 
kNUBAR2012 
kRHC2012 
kRAF_All 
kRAF_Front 
kRAF_Outer 
kRAF_Inner 
kRAF_Gap 
kRAF_GapEdge 
kRAF_Back 

Definition at line 237 of file OscFit.h.

00237                           {
00238      kCCByRes      = 100,
00239      kCCFull       = 101,
00240      kCCPartial    = 102,
00241      kCCMid        = 103,
00242      kCCLow        = 104,
00243      kCCLow2       = 105,
00244      kRHCFull      = 200,
00245      kRHCPartial   = 201,
00246      kNUBARFull    = 300,
00247      kNUBARPartial = 301,
00248      kCC2010       = kCCFull,
00249      kNUBAR2010    = kNUBARFull,
00250      kNUBAR2011    = kNUBARFull,
00251      kRHC2011      = kRHCFull,
00252      kCC2012       = kCCPartial,
00253      kNUBAR2012    = kNUBARPartial,
00254      kRHC2012      = kRHCPartial,
00255      kRAF_All      = 1000,
00256      kRAF_Front    = 1001,
00257      kRAF_Outer    = 1002,
00258      kRAF_Inner    = 1003,
00259      kRAF_Gap      = 1004,
00260      kRAF_GapEdge  = 1005,
00261      kRAF_Back     = 1006
00262    } Analysis_t;

Enumerator:
kNoBin 
kResBin0 
kResBin1 
kResBin2 
kResBin3 
kResBin4 
kOppositeSign 
kRAF 
kNumBins 

Definition at line 94 of file twoflavours/OscFit.h.

00094                      {
00095      kNoBin    = -1,
00096      kResBin0  = 0,
00097      kResBin1  = 1,
00098      kResBin2  = 2,
00099      kResBin3  = 3,
00100      kResBin4  = 4,
00101      kOppositeSign = 5,
00102      kRAF      = 6,
00103      kNumBins  = 7
00104    } Bin_t;

Enumerator:
kUnknownBinning 
kSingleBin 
kBeamCC 
kBeamNUE 
kBeamRAF 
kBeamHiRes 
kBeamCCMinosPlus 
kAtmosSingleBin 
kAtmosLogLE 
kAtmosEnergy 
kAtmosAngle 
kAtmosAngleLoRes 
kAtmosAngleHiRes 
kAtmos2D 
kAtmos2DLoRes 
kAtmos2DHiRes 

Definition at line 172 of file OscFit.h.

00172                          {
00173      kUnknownBinning    = -1,
00174      kSingleBin         = 0,
00175      kBeamCC            = 1,
00176      kBeamNUE           = 2,
00177      kBeamRAF           = 3,
00178      kBeamHiRes         = 4,
00179      kBeamCCMinosPlus   = 5,
00180      kAtmosSingleBin    = 9,
00181      kAtmosLogLE        = 10,
00182      kAtmosEnergy       = 11,  
00183      kAtmosAngle        = 12,  
00184      kAtmosAngleLoRes   = 13,  
00185      kAtmosAngleHiRes   = 14,  
00186      kAtmos2D           = 15, 
00187      kAtmos2DLoRes      = 16, 
00188      kAtmos2DHiRes      = 17  
00189    } Binning_t;

Enumerator:
kUnknownScheme 
kScheme0 
kScheme1 
kScheme1A 
kScheme2 
kScheme2A 
kCounterForMINOS 
kCounterForLBNE 

Definition at line 191 of file OscFit.h.

00191                                {
00192      kUnknownScheme   = -1,
00193      kScheme0         = 0,
00194      kScheme1         = 1,
00195      kScheme1A        = 2,
00196      kScheme2         = 3,
00197      kScheme2A        = 4,
00198      kCounterForMINOS = 100,
00199      kCounterForLBNE  = 101
00200    } BinningScheme_t;

Enumerator:
kUnknownCharge 
kAmbig 
kNu 
kNuBar 
kAny 
kNumCharges 
kNegative 
kPositive 
kNoCharge 
kAnyCharge 
kNoCharge 
kNegative 
kPositive 

Definition at line 106 of file twoflavours/OscFit.h.

00106                         {
00107      kNoCharge = -1,
00108      kNegative = 0,
00109      kPositive = 1
00110    } Charge_t;

Enumerator:
kUnknownCharge 
kAmbig 
kNu 
kNuBar 
kAny 
kNumCharges 
kNegative 
kPositive 
kNoCharge 
kAnyCharge 
kNoCharge 
kNegative 
kPositive 

Definition at line 40 of file OscFit.h.

00040                         {
00041      kUnknownCharge = -1,
00042      kAmbig         = 0,
00043      kNu            = 1,
00044      kNuBar         = 2,
00045      kAny           = 3,
00046      kNumCharges    = 4,
00047      kNegative      = kNu,
00048      kPositive      = kNuBar,
00049      kNoCharge      = 0,
00050      kAnyCharge     = 3
00051    } Charge_t;

Enumerator:
kNull 
kContainedVertex 
kFullyContained 
kPartiallyContained 
kRockMuon 
kUpStop 
kUpThrough 
kInnerEdge 
kOuterEdge 
kFrontPlane 
kNumContainments 

Definition at line 115 of file OscFit.h.

00115                              {
00116      kNull               = -1, 
00117      kContainedVertex    = 0,
00118      kFullyContained     = 1,      
00119      kPartiallyContained = 2,
00120      kRockMuon           = 3,    
00121      kUpStop             = 4,      
00122      kUpThrough          = 5,
00123      kInnerEdge          = 6,
00124      kOuterEdge          = 7,
00125      kFrontPlane         = 8,
00126      kNumContainments    = 9 
00127    } Containment_t;

Enumerator:
kSimple 
kDmsq31 
kDmsq32 
kDmsqAve 

Definition at line 208 of file OscFit.h.

00208                            {
00209      kSimple        = 0,
00210      kDmsq31        = 1,
00211      kDmsq32        = 2,
00212      kDmsqAve       = 3
00213    } DmsqBasis_t;

Enumerator:
kUnknownElectronTag 
kNoElectron 
kElectron 
kIgnoreElectron 
kNumElectronTags 

Definition at line 164 of file OscFit.h.

00164                              {
00165      kUnknownElectronTag = -1,
00166      kNoElectron         = 0,
00167      kElectron           = 1,
00168      kIgnoreElectron     = 2,
00169      kNumElectronTags    = 3
00170    } ElectronTag_t;

Enumerator:
kUnknownExperiment 
kMINOS 
kLBNE 

Definition at line 8 of file OscFit.h.

00008                             {
00009      kUnknownExperiment = -1,
00010      kMINOS = 0,
00011      kLBNE  = 1
00012    } Experiment_t;

Enumerator:
kUnknownExternal 
kMinosNue 
kNumExternals 

Definition at line 215 of file OscFit.h.

00215                           {
00216      kUnknownExternal = -1,
00217      kMinosNue        = 0,
00218      kNumExternals    = 1
00219    } External_t;

Enumerator:
kText 
kRoot 
kHurraySomethingOtherThanRoot 

Definition at line 231 of file OscFit.h.

00231                           {
00232      kText = 0,    
00233      kRoot = 1,    
00234      kHurraySomethingOtherThanRoot = 2
00235    } FileType_t;

Enumerator:
kUnknownFlavour 
kNC 
kNue 
kNumu 
kNutau 
kNumFlavours 
kNoFlavour 

Definition at line 30 of file OscFit.h.

00030                          {
00031      kUnknownFlavour = -1,
00032      kNC             = 0,
00033      kNue            = 1,
00034      kNumu           = 2,
00035      kNutau          = 3,
00036      kNumFlavours    = 4,
00037      kNoFlavour      = 0
00038    } Flavour_t;

Enumerator:
kNull 
kCCnu 
kCCnubar 
kNC 
kNumInteractions 

Definition at line 69 of file twoflavours/OscFit.h.

00069                              {
00070      kNull     = -1,
00071      kCCnu     = 0,
00072      kCCnubar  = 1,
00073      kNC       = 2,
00074      kNumInteractions = 3
00075    } Interaction_t;

Enumerator:
kLinear 
kCubic 
kSpline 

Definition at line 202 of file OscFit.h.

00202                                {
00203      kLinear = 0,
00204      kCubic  = 1,
00205      kSpline = 2
00206    } Interpolation_t;

Enumerator:
kUnknownOsc 
kNoOsc 
kNumu2Nue 
kNumu2Nutau 
kNue2Nutau 
kNonOsc 
kNumOscTypes 

Definition at line 221 of file OscFit.h.

00221                          {
00222      kUnknownOsc     = -1,
00223      kNoOsc          = 0,
00224      kNumu2Nue       = 1,
00225      kNumu2Nutau     = 2,
00226      kNue2Nutau      = 3,
00227      kNonOsc         = 4,
00228      kNumOscTypes    = 5
00229    } OscType_t;

Enumerator:
kUnknownProtonTag 
kNoProton 
kProton 
kIgnoreProton 
kNumProtonTags 

Definition at line 156 of file OscFit.h.

00156                            {
00157      kUnknownProtonTag = -1,
00158      kNoProton         = 0,
00159      kProton           = 1,
00160      kIgnoreProton     = 2,
00161      kNumProtonTags    = 3
00162    } ProtonTag_t;

Enumerator:
kUnknownRes 
kLoRes 
kResBin0 
kResBin1 
kResBin2 
kResBin3 
kResBin4 
kHiRes 
kResBin5 
kResBin6 
kResBin7 
kResBin8 
kResBin9 
kNumResBins 
kNoRes 

Definition at line 129 of file OscFit.h.

00129                             {
00130      kUnknownRes  = -1,
00131      kLoRes       = 0,
00132      kResBin0     = 1,
00133      kResBin1     = 2,
00134      kResBin2     = 3,
00135      kResBin3     = 4,
00136      kResBin4     = 5,
00137      kHiRes       = 6,
00138      kResBin5     = 7,
00139      kResBin6     = 8,
00140      kResBin7     = 9,
00141      kResBin8     = 10,
00142      kResBin9     = 11,
00143      kNumResBins  = 12,
00144      kNoRes       = kHiRes
00145    } Resolution_t;

Enumerator:
kUnknownRun 
kAtmos 
kBeam 
kNeutrino 
kAntiNeutrino 
kFirstRun 
kRunI 
kRunIHE 
kRunII 
kRunIII 
kRunIVFHC 
kRunIV 
kRunV 
kRunVI 
kRunVII 
kRunVIII 
kRunIX 
kRunX 
kRunXI 
kRunXII 
kRunXIII 
kNumRuns 
kNoRun 
kRunI 
kRunIHE 
kRunII 
kRunIII 
kRunIVFHC 
kRunIV 
kRunV 
kRunVI 
kRunVII 
kRunVIII 
kRunIX 
kRunX 
kNumRuns 

Definition at line 42 of file twoflavours/OscFit.h.

00042                      {
00043      kNoRun    = -1,
00044      kRunI     = 0,
00045      kRunIHE   = 1,
00046      kRunII    = 2,
00047      kRunIII   = 3,
00048      kRunIVFHC = 4,
00049      kRunIV    = 5,
00050      kRunV     = 6,
00051      kRunVI    = 7,
00052      kRunVII   = 8,
00053      kRunVIII  = 9,
00054      kRunIX    = 10,
00055      kRunX     = 11,
00056      kNumRuns  = 12 
00057    } Run_t;

Enumerator:
kUnknownRun 
kAtmos 
kBeam 
kNeutrino 
kAntiNeutrino 
kFirstRun 
kRunI 
kRunIHE 
kRunII 
kRunIII 
kRunIVFHC 
kRunIV 
kRunV 
kRunVI 
kRunVII 
kRunVIII 
kRunIX 
kRunX 
kRunXI 
kRunXII 
kRunXIII 
kNumRuns 
kNoRun 
kRunI 
kRunIHE 
kRunII 
kRunIII 
kRunIVFHC 
kRunIV 
kRunV 
kRunVI 
kRunVII 
kRunVIII 
kRunIX 
kRunX 
kNumRuns 

Definition at line 82 of file OscFit.h.

00082                      {
00083      kUnknownRun   = -1,
00084      kAtmos        = 0,
00085      kBeam         = 1,
00086      kNeutrino     = 2,
00087      kAntiNeutrino = 3,
00088      kFirstRun     = 4,
00089      kRunI         = 4,
00090      kRunIHE       = 5,
00091      kRunII        = 6,
00092      kRunIII       = 7,
00093      kRunIVFHC     = 8,
00094      kRunIV        = 9,
00095      kRunV         = 10,
00096      kRunVI        = 11,
00097      kRunVII       = 12,
00098      kRunVIII      = 13,
00099      kRunIX        = 14,
00100      kRunX         = 15,
00101      kRunXI        = 16,
00102      kRunXII       = 17,
00103      kRunXIII      = 18,
00104      kNumRuns      = 19
00105    } Run_t;

Enumerator:
kUnknownRunType 
kAtNu 
kFHC 
kRHC 
kNumRunTypes 
kBeamOff 
kFHC 
kRHC 

Definition at line 36 of file twoflavours/OscFit.h.

00036                          {
00037      kBeamOff = -1,
00038      kFHC     = 0,
00039      kRHC     = 1
00040    } RunType_t;

Enumerator:
kUnknownRunType 
kAtNu 
kFHC 
kRHC 
kNumRunTypes 
kBeamOff 
kFHC 
kRHC 

Definition at line 107 of file OscFit.h.

00107                          {
00108      kUnknownRunType = -1,
00109      kAtNu           = 0,
00110      kFHC            = 1,
00111      kRHC            = 2,
00112      kNumRunTypes    = 3
00113    } RunType_t;

Enumerator:
kUnknown 
kData 
kCV 
kRock 
kCosmic 
kNumSamples 
kUnknown 
kData 
kCV 
kRock 
kCVTau 
kRockTau 
kNumSamples 

Definition at line 59 of file twoflavours/OscFit.h.

00059                         {
00060      kUnknown  = -1,
00061      kData     = 0,
00062      kCV       = 1,
00063      kRock     = 2,
00064      kCVTau    = 3,
00065      kRockTau  = 4,
00066      kNumSamples = 5
00067    } Sample_t;

Enumerator:
kUnknown 
kData 
kCV 
kRock 
kCosmic 
kNumSamples 
kUnknown 
kData 
kCV 
kRock 
kCVTau 
kRockTau 
kNumSamples 

Definition at line 21 of file OscFit.h.

00021                         {
00022      kUnknown    = -1,
00023      kData       = 0,
00024      kCV         = 1,
00025      kRock       = 2,
00026      kCosmic     = 3,
00027      kNumSamples = 4
00028    } Sample_t;

Enumerator:
kNoShift 
kMinus2 
kMinus1 
kPlus1 
kPlus2 
kNumShifts 
kNoShift 
kMinus2 
kMinus1 
kPlus1 
kPlus2 
kNumShifts 

Definition at line 85 of file twoflavours/OscFit.h.

00085                        {
00086      kNoShift = -1,
00087      kMinus2  = 0,
00088      kMinus1  = 1,
00089      kPlus1   = 2,
00090      kPlus2   = 3,
00091      kNumShifts = 4
00092    } Shift_t;

Enumerator:
kNoShift 
kMinus2 
kMinus1 
kPlus1 
kPlus2 
kNumShifts 
kNoShift 
kMinus2 
kMinus1 
kPlus1 
kPlus2 
kNumShifts 

Definition at line 73 of file OscFit.h.

00073                        {
00074      kNoShift      = 0,
00075      kMinus2       = 1,
00076      kMinus1       = 2,
00077      kPlus1        = 3,
00078      kPlus2        = 4,
00079      kNumShifts    = 5
00080    } Shift_t;

Enumerator:
kUnknownData 
kAtmosData 
kBeamData 
kNumSources 

Definition at line 14 of file OscFit.h.

00014                         {
00015      kUnknownData = -1,
00016      kAtmosData   = 0,
00017      kBeamData    = 1,
00018      kNumSources  = 2
00019    } Source_t;

Enumerator:
kFlat 
kInterpolated 
kSpline 

Definition at line 112 of file twoflavours/OscFit.h.

00112                           {
00113      kFlat = 0,
00114      kInterpolated = 1,
00115      kSpline = 2
00116    } Spectrum_t;

Enumerator:
kUnknownSystematic 
kCentre 
kNCbkg 
kShwEn 
kTrkEn 
kTrkEnExit 
kSpec 
kZenith 
kNueNCbkg 
kNueEnergy 
kNumSystematics 
kMuonEnergy 
kMuonEnergyExit 
kHadronEnergy 
kElectronEnergy 
kNumuBkg 
kNueBkg 
kCentre 
kNCbkg 
kShwEn 
kTrkEn 
kNumSystematics 

Definition at line 77 of file twoflavours/OscFit.h.

00077                             {
00078      kCentre    = -1,
00079      kNCbkg     = 0,
00080      kShwEn     = 1,
00081      kTrkEn     = 2,
00082      kNumSystematics = 3
00083    } Systematic_t;

Enumerator:
kUnknownSystematic 
kCentre 
kNCbkg 
kShwEn 
kTrkEn 
kTrkEnExit 
kSpec 
kZenith 
kNueNCbkg 
kNueEnergy 
kNumSystematics 
kMuonEnergy 
kMuonEnergyExit 
kHadronEnergy 
kElectronEnergy 
kNumuBkg 
kNueBkg 
kCentre 
kNCbkg 
kShwEn 
kTrkEn 
kNumSystematics 

Definition at line 53 of file OscFit.h.

00053                             {
00054      kUnknownSystematic = -1,
00055      kCentre            = 0,
00056      kNCbkg             = 1,
00057      kShwEn             = 2,
00058      kTrkEn             = 3,
00059      kTrkEnExit         = 4,
00060      kSpec              = 5,
00061      kZenith            = 6,
00062      kNueNCbkg          = 7,
00063      kNueEnergy         = 8,
00064      kNumSystematics    = 9,
00065      kMuonEnergy        = kTrkEn,
00066      kMuonEnergyExit    = kTrkEnExit,
00067      kHadronEnergy      = kShwEn,
00068      kElectronEnergy    = kNueEnergy,
00069      kNumuBkg           = kNCbkg,
00070      kNueBkg            = kNueNCbkg
00071    } Systematic_t;

Enumerator:
kNothing 
kVanilla 
kSingle 
kMulti 
kQuasiElastic 
kNumTopologies 

Definition at line 147 of file OscFit.h.

00147                           {
00148      kNothing       = -1,
00149      kVanilla       = 0,  
00150      kSingle        = 1,  
00151      kMulti         = 2,  
00152      kQuasiElastic  = 3,
00153      kNumTopologies = 4
00154    } Topology_t;


Function Documentation

const char * OscFit::AsString ( Bin_t  bin  ) 
const char * OscFit::AsString ( Interaction_t  interaction  ) 
const char * OscFit::AsString ( Analysis_t  analysis  ) 
const char * OscFit::AsString ( FileType_t  filetype  ) 
const char * OscFit::AsString ( OscType_t  osctype  ) 
const char * OscFit::AsString ( External_t  external  ) 
const char * OscFit::AsString ( DmsqBasis_t  basis  ) 
const char * OscFit::AsString ( RunType_t  runtype  ) 

Definition at line 24 of file twoflavours/OscFit.cxx.

References kBeamOff, kFHC, and kRHC.

00025   {
00026     switch( runtype ){
00027       case kBeamOff:       return "unknown";
00028       case kFHC:           return "fhc";
00029       case kRHC:           return "rhc";
00030       default:             return "unknown";
00031     }
00032   }

const char * OscFit::AsString ( Interpolation_t  interpolation  ) 
const char * OscFit::AsString ( BinningScheme_t  scheme  ) 
const char * OscFit::AsString ( Binning_t  binning  ) 
const char * OscFit::AsString ( ElectronTag_t  electron  ) 
const char * OscFit::AsString ( ProtonTag_t  proton  ) 
const char * OscFit::AsString ( Topology_t  topology  ) 
const char * OscFit::AsString ( Resolution_t  resolution  ) 
const char * OscFit::AsString ( Containment_t  containment  ) 
const char * OscFit::AsString ( Shift_t  shift  ) 

Definition at line 89 of file twoflavours/OscFit.cxx.

References kMinus1, kMinus2, kNoShift, kPlus1, and kPlus2.

00090   {
00091     switch( shift ){
00092       case kMinus2:        return "m2";
00093       case kMinus1:        return "m1";
00094       case kNoShift:       return "noshift";
00095       case kPlus1:         return "p1";
00096       case kPlus2:         return "p2";
00097       default:             return "unknown";
00098     }
00099   }

const char * OscFit::AsString ( Systematic_t  systematic  ) 

Definition at line 78 of file twoflavours/OscFit.cxx.

References kCentre, kNCbkg, kShwEn, and kTrkEn.

00079   {
00080     switch( systematic ){
00081       case kCentre:        return "centre";
00082       case kNCbkg:         return "ncbkg";
00083       case kShwEn:         return "shwenergy";
00084       case kTrkEn:         return "trkenergy";
00085       default:             return "unknown";
00086     }
00087   }

const char * OscFit::AsString ( Charge_t  charge  ) 

Definition at line 116 of file twoflavours/OscFit.cxx.

References kNegative, kNoCharge, and kPositive.

00117   {
00118     switch( charge ){
00119       case kNoCharge:      return "unknown";
00120       case kNegative:      return "negative";
00121       case kPositive:      return "positive";
00122       default:             return "unknown";
00123     }
00124   }

const char * OscFit::AsString ( Flavour_t  flavour  ) 
const char * OscFit::AsString ( Sample_t  sample  ) 

Definition at line 54 of file twoflavours/OscFit.cxx.

References kCV, kCVTau, kData, kRock, kRockTau, and kUnknown.

00055   {
00056     switch( sample ){
00057       case kUnknown:       return "unknown";
00058       case kData:          return "data";
00059       case kCV:            return "cv";
00060       case kRock:          return "rock";
00061       case kCVTau:         return "cvtau";
00062       case kRockTau:       return "rocktau";
00063       default:             return "unknown";
00064     }
00065   }

const char * OscFit::AsString ( Run_t  run  ) 

Definition at line 34 of file twoflavours/OscFit.cxx.

References kNoRun, kRunI, kRunIHE, kRunII, kRunIII, kRunIV, kRunIVFHC, kRunIX, kRunV, kRunVI, kRunVII, kRunVIII, and kRunX.

00035   {
00036     switch( run ){
00037       case kNoRun:         return "unknown";
00038       case kRunI:          return "run01";
00039       case kRunIHE:        return "run01phe";
00040       case kRunII:         return "run02";
00041       case kRunIII:        return "run03";
00042       case kRunIVFHC:      return "run04fhc";
00043       case kRunIV:         return "run04";
00044       case kRunV:          return "run05";
00045       case kRunVI:         return "run06";
00046       case kRunVII:        return "run07";
00047       case kRunVIII:       return "run08";
00048       case kRunIX:         return "run09";
00049       case kRunX:          return "run10";
00050       default:             return "unknown";
00051     }
00052   }

const char * OscFit::AsString ( Source_t  source  ) 
const char * OscFit::AsString ( Experiment_t  experiment  ) 

Referenced by OscFit::TemplateMaker::AddData(), OscFit::TemplateWriter::AddToFile(), OscFit::TemplateMaker::BuildFakeAtmosData(), OscFit::TemplateMaker::BuildFakeBeamData(), OscFit::TemplateMaker::BuildFakeData(), OscFit::TemplateMaker::BuildTemplates(), OscFit::TemplatesForBeamData::BuildTemplates(), OscFit::TemplatesForBeamData::BuildTemplatesCC2010(), OscFit::TemplateMaker::BuildTemplatesCC2010(), OscFit::TemplatesForBeamData::BuildTemplatesCC2012(), OscFit::TemplateMaker::BuildTemplatesCC2012(), OscFit::TemplatesForBeamData::BuildTemplatesMINOSPlus(), OscFit::TemplatesForBeamData::BuildTemplatesRAF2010(), OscFit::BinningScheme::CheckBinning(), OscFit::Interface::Fill(), OscFit::TemplateIO::GetLabelForReco(), OscFit::TemplateIO::GetLabelForTruth(), OscFit::TemplatesForBeamData::LoadCachedOscWeights(), OscFit::DataInterface::LoadData(), OscFit::DataInterface::MakeData(), OscFit::TwoFlavourFitter::PrintExpt(), OscFit::ThreeFlavourFitter::PrintExpt(), OscFit::Template::PrintHistograms(), OscFit::TemplateMap::PrintTemplateNumbers(), OscFit::TemplateArray::PrintTemplates(), OscFit::TemplateMap::PrintTemplates(), OscFit::BinningScheme::ReadBinningScheme(), OscFit::Template::ReadHistograms(), OscFit::TemplateMap::ReadTemplate(), OscFit::Configuration::ScaleData(), OscFit::Configuration::SetBinningScheme(), OscFit::Configuration::SetInterpolation(), OscFit::Configuration::UseData(), OscFit::TemplateWriter::WriteFakeData(), OscFit::Template::WriteHistograms(), and OscFit::TemplateMap::WriteTemplate().

Double_t OscFit::CalcDeltaLikelihood ( Double_t  Exp,
Double_t  Obs 
)
Double_t OscFit::CalcLikelihood ( Template *  tempExpected,
Template *  tempObserved 
)
Double_t OscFit::CalcModifiedLikelihood ( Double_t  x,
Double_t  Obs 
)
Double_t OscFit::CalcSimpleLikelihood ( Double_t  Exp,
Double_t  Obs 
)
TH1D * OscFit::CalculateRatio ( TH1D *  hist1,
TH1D *  hist2 
)

Definition at line 86 of file TemplateTools.cxx.

00087   {
00088     // sanity check
00089     if( hist1==0 || hist2==0 ) return 0;
00090 
00091     // generate name
00092     TString histName = hist1->GetName(); histName.Append("_Ratio");
00093 
00094     // make new histogram
00095     TAxis* Axis = hist1->GetXaxis(); 
00096     Int_t numBins = Axis->GetNbins();
00097     const Double_t* binEdges = Axis->GetXbins()->GetArray();  
00098     TString Title = Axis->GetTitle();
00099 
00100     TH1D* histNew = new TH1D(histName.Data(),"",numBins,binEdges);
00101     histNew->GetXaxis()->SetTitle( Title.Data() );
00102     histNew->GetYaxis()->SetTitle(" Ratio to Unoscillated "); 
00103     histNew->GetXaxis()->CenterTitle();
00104     histNew->GetYaxis()->CenterTitle();
00105 
00106     histNew->SetLineWidth( hist1->GetLineWidth() ); 
00107     histNew->SetLineColor( hist1->GetLineColor() );
00108     histNew->GetXaxis()->SetNdivisions( hist2->GetXaxis()->GetNdivisions() );
00109     histNew->GetXaxis()->SetTitleOffset( hist2->GetXaxis()->GetTitleOffset() );
00110     histNew->GetYaxis()->SetTitleOffset( hist2->GetYaxis()->GetTitleOffset() );
00111 
00112     for( Int_t i=0; i<hist1->GetXaxis()->GetNbins(); i++ ){
00113       Double_t binContent1 = hist1->GetBinContent( i+1 );
00114       Double_t binContent2 = hist2->GetBinContent( i+1 );
00115       Double_t binError1 = hist1->GetBinError( i+1 );
00116      
00117       Double_t ratio = 0.0; if( binContent2>0.0 ) ratio = binContent1/binContent2;
00118       Double_t error = 0.0; if( binContent2>0.0 ) error = binError1/binContent2;
00119 
00120       histNew->SetBinContent( i+1, ratio );
00121       histNew->SetBinError( i+1, error );
00122     }
00123 
00124     histNew->SetMinimum(0.0);
00125     histNew->SetMaximum(2.25);
00126 
00127     return histNew;
00128   }

double OscFit::ChooseX ( double  BoverA  ) 
TH1D * OscFit::ConvertToDisplayBinning ( TH1D *  hist,
OscFit::Analysis_t  AnaType 
)

Definition at line 506 of file TemplateTools.cxx.

References kCCByRes, kCCByResOld, kCCFull, kCCLow, kCCMid, kCCPartial, kNUBARFull, kNUBARPartial, kRAF_All, kRAF_Back, kRAF_Front, kRAF_Gap, kRAF_GapEdge, kRAF_Inner, kRAF_Outer, kRHCFull, and kRHCPartial.

Referenced by GetDisplaySpectrumForBkg(), GetDisplaySpectrumForData(), and GetDisplaySpectrumForMC().

00507   {
00508     // sanity check
00509     if( hist==0 ) return 0;
00510 
00511     // generate name
00512     TString histName = hist->GetName(); histName.Append("_Display");
00513   
00514     // binning for display histogram
00515     // -----------------------------
00516     // Many possible binning schemes...
00517 
00518     Int_t numBins = 0;
00519     Double_t* binEdges = 0;
00520 
00521     
00522     // Resolution Binning (Old)
00523     if( AnaType==OscFit::kCCByResOld ){
00524       numBins = 18;
00525       binEdges = new Double_t[numBins+1];
00526       binEdges[0] = 0;
00527       binEdges[1] = 1.25;
00528       binEdges[2] = 2.25;
00529       binEdges[3] = 3.25;
00530       binEdges[4] = 4.25;
00531       binEdges[5] = 5.25;
00532       binEdges[6] = 6.25;
00533       binEdges[7] = 7.25;
00534       binEdges[8] = 8.25;
00535       binEdges[9] = 9.25;
00536       binEdges[10] = 10.25;
00537       binEdges[11] = 11.25;
00538       binEdges[12] = 12.25;
00539       binEdges[13] = 13.25;
00540       binEdges[14] = 14.25;
00541       binEdges[15] = 15.25;
00542       binEdges[16] = 16.25;
00543       binEdges[17] = 17.25;
00544       binEdges[18] = 18.25;
00545     }  
00546 
00547     // Resolution Binning
00548     if( AnaType==OscFit::kCCByRes ){
00549       numBins = 18;
00550       binEdges = new Double_t[numBins+1];
00551       binEdges[0] = 0;
00552       binEdges[1] = 1.00;
00553       binEdges[2] = 2.00;
00554       binEdges[3] = 3.00;
00555       binEdges[4] = 4.00;
00556       binEdges[5] = 5.00;
00557       binEdges[6] = 6.00;
00558       binEdges[7] = 7.00;
00559       binEdges[8] = 8.00;
00560       binEdges[9] = 9.00;
00561       binEdges[10] = 10.00;
00562       binEdges[11] = 11.00;
00563       binEdges[12] = 12.00;
00564       binEdges[13] = 13.00;
00565       binEdges[14] = 14.00;
00566       binEdges[15] = 15.00;
00567       binEdges[16] = 16.00;
00568       binEdges[17] = 17.00;
00569       binEdges[18] = 18.00;
00570     }
00571 
00572     // CC Analysis Binning Scheme (Mid)
00573     if( AnaType==OscFit::kCCMid ){
00574       numBins = 24;
00575       binEdges = new Double_t[numBins+1];
00576       binEdges[0]  =  0;
00577       binEdges[1]  =  0.5;
00578       binEdges[2]  =  1.0;
00579       binEdges[3]  =  1.5;
00580       binEdges[4]  =  2.0;
00581       binEdges[5]  =  2.5;
00582       binEdges[6]  =  3.0;
00583       binEdges[7]  =  3.5;
00584       binEdges[8]  =  4.0;
00585       binEdges[9]  =  4.5;
00586       binEdges[10] =  5.0;
00587       binEdges[11] =  5.5;
00588       binEdges[12] =  6.0;
00589       binEdges[13] =  6.5;
00590       binEdges[14] =  7.0;
00591       binEdges[15] =  7.5;
00592       binEdges[16] =  8.0;
00593       binEdges[17] =  8.5;
00594       binEdges[18] =  9.0;
00595       binEdges[19] =  9.75;
00596       binEdges[20] = 10.5;
00597       binEdges[21] = 11.25;
00598       binEdges[22] = 12.0;
00599       binEdges[23] = 13.0;
00600       binEdges[24] = 14.0;
00601     }
00602 
00603     // CC Analysis Binning Scheme (Full)
00604     if( AnaType==OscFit::kCCFull ){
00605       numBins = 42;
00606       binEdges = new Double_t[numBins+1];
00607       binEdges[0] = 0;
00608       binEdges[1] = 0.5;
00609       binEdges[2] = 0.75;
00610       binEdges[3] = 1;
00611       binEdges[4] = 1.25;
00612       binEdges[5] = 1.5;
00613       binEdges[6] = 1.75;
00614       binEdges[7] = 2;
00615       binEdges[8] = 2.25;
00616       binEdges[9] = 2.5;
00617       binEdges[10] = 2.75;
00618       binEdges[11] = 3;
00619       binEdges[12] = 3.25;
00620       binEdges[13] = 3.5;
00621       binEdges[14] = 3.75;
00622       binEdges[15] = 4;
00623       binEdges[16] = 4.25;
00624       binEdges[17] = 4.5;
00625       binEdges[18] = 4.75;
00626       binEdges[19] = 5;
00627       binEdges[20] = 5.5;
00628       binEdges[21] = 6;
00629       binEdges[22] = 6.5;
00630       binEdges[23] = 7;
00631       binEdges[24] = 7.5;
00632       binEdges[25] = 8;
00633       binEdges[26] = 8.5;
00634       binEdges[27] = 9;
00635       binEdges[28] = 9.5;
00636       binEdges[29] = 10;
00637       binEdges[30] = 11;
00638       binEdges[31] = 12;
00639       binEdges[32] = 13;
00640       binEdges[33] = 14;
00641       binEdges[34] = 15;
00642       binEdges[35] = 16;
00643       binEdges[36] = 17;
00644       binEdges[37] = 18;
00645       binEdges[38] = 19;
00646       binEdges[39] = 20;
00647       binEdges[40] = 30;
00648       binEdges[41] = 50;
00649       binEdges[42] = 200;
00650     }
00651 
00652     // CC Analysis Binning Scheme (Partial)
00653     if( AnaType==OscFit::kCCPartial ){
00654       numBins = 41;
00655       binEdges = new Double_t[numBins+1];
00656       binEdges[0] = 0;
00657       binEdges[1] = 0.5;
00658       binEdges[2] = 0.75;
00659       binEdges[3] = 1;
00660       binEdges[4] = 1.25;
00661       binEdges[5] = 1.5;
00662       binEdges[6] = 1.75;
00663       binEdges[7] = 2;
00664       binEdges[8] = 2.25;
00665       binEdges[9] = 2.5;
00666       binEdges[10] = 2.75;
00667       binEdges[11] = 3;
00668       binEdges[12] = 3.25;
00669       binEdges[13] = 3.5;
00670       binEdges[14] = 3.75;
00671       binEdges[15] = 4;
00672       binEdges[16] = 4.25;
00673       binEdges[17] = 4.5;
00674       binEdges[18] = 4.75;
00675       binEdges[19] = 5;
00676       binEdges[20] = 5.5;
00677       binEdges[21] = 6;
00678       binEdges[22] = 6.5;
00679       binEdges[23] = 7;
00680       binEdges[24] = 7.5;
00681       binEdges[25] = 8;
00682       binEdges[26] = 8.5;
00683       binEdges[27] = 9;
00684       binEdges[28] = 9.5;
00685       binEdges[29] = 10;
00686       binEdges[30] = 11;
00687       binEdges[31] = 12;
00688       binEdges[32] = 13;
00689       binEdges[33] = 14;
00690       binEdges[34] = 15;
00691       binEdges[35] = 16;
00692       binEdges[36] = 17;
00693       binEdges[37] = 18;
00694       binEdges[38] = 19;
00695       binEdges[39] = 20;
00696       binEdges[40] = 30;
00697       binEdges[41] = 50;
00698     }
00699 
00700     // CC Analysis Binning Scheme (Low)
00701     if( AnaType==OscFit::kCCLow ){
00702       numBins = 33;
00703       binEdges = new Double_t[numBins+1];
00704       binEdges[0] = 0;
00705       binEdges[1] = 0.5;
00706       binEdges[2] = 0.75;
00707       binEdges[3] = 1;
00708       binEdges[4] = 1.25;
00709       binEdges[5] = 1.5;
00710       binEdges[6] = 1.75;
00711       binEdges[7] = 2;
00712       binEdges[8] = 2.25;
00713       binEdges[9] = 2.5;
00714       binEdges[10] = 2.75;
00715       binEdges[11] = 3;
00716       binEdges[12] = 3.25;
00717       binEdges[13] = 3.5;
00718       binEdges[14] = 3.75;
00719       binEdges[15] = 4;
00720       binEdges[16] = 4.25;
00721       binEdges[17] = 4.5;
00722       binEdges[18] = 4.75;
00723       binEdges[19] = 5;
00724       binEdges[20] = 5.5;
00725       binEdges[21] = 6;
00726       binEdges[22] = 6.5;
00727       binEdges[23] = 7;
00728       binEdges[24] = 7.5;
00729       binEdges[25] = 8;
00730       binEdges[26] = 8.5;
00731       binEdges[27] = 9;
00732       binEdges[28] = 9.5;
00733       binEdges[29] = 10;
00734       binEdges[30] = 10.5;
00735       binEdges[31] = 11;
00736       binEdges[32] = 11.5;
00737       binEdges[33] = 12.0;
00738     }
00739 
00740     // RHC Analysis Binning Scheme (Full)
00741     if( AnaType==OscFit::kRHCFull ){
00742       numBins = 14;
00743       binEdges = new Double_t[numBins+1];
00744       binEdges[0] = 0;
00745       binEdges[1] = 1.0;
00746       binEdges[2] = 2.0;
00747       binEdges[3] = 3.0;
00748       binEdges[4] = 4.0;
00749       binEdges[5] = 5.0;
00750       binEdges[6] = 6.0;
00751       binEdges[7] = 7.0;
00752       binEdges[8] = 8.0;
00753       binEdges[9] = 9.0;
00754       binEdges[10] = 10.0;
00755       binEdges[11] = 20.0;
00756       binEdges[12] = 30.0;
00757       binEdges[13] = 50.0;
00758       binEdges[14] = 200.0;
00759     }
00760 
00761     // RHC Analysis Binning Scheme (Partial)
00762     if( AnaType==OscFit::kRHCPartial ){
00763       numBins = 13;
00764       binEdges = new Double_t[numBins+1];
00765       binEdges[0] = 0;
00766       binEdges[1] = 1.0;
00767       binEdges[2] = 2.0;
00768       binEdges[3] = 3.0;
00769       binEdges[4] = 4.0;
00770       binEdges[5] = 5.0;
00771       binEdges[6] = 6.0;
00772       binEdges[7] = 7.0;
00773       binEdges[8] = 8.0;
00774       binEdges[9] = 9.0;
00775       binEdges[10] = 10.0;
00776       binEdges[11] = 11.0;
00777       binEdges[12] = 12.0;
00778       binEdges[13] = 14.0;
00779     }
00780 
00781     // NuMuBar Analysis Binning Scheme
00782     if( AnaType==OscFit::kNUBARFull ){
00783       numBins = 15;
00784       binEdges = new Double_t[numBins+1];
00785       binEdges[0] = 0;
00786       binEdges[1] = 2.0;
00787       binEdges[2] = 4.0;
00788       binEdges[3] = 6.0;
00789       binEdges[4] = 8.0;
00790       binEdges[5] = 10.0;
00791       binEdges[6] = 12.0;
00792       binEdges[7] = 14.0;
00793       binEdges[8] = 16.0;
00794       binEdges[9] = 18.0;
00795       binEdges[10] = 20.0;
00796       binEdges[11] = 25.0;
00797       binEdges[12] = 30.0;
00798       binEdges[13] = 40.0;
00799       binEdges[14] = 50.0;
00800       binEdges[15] = 200.0;
00801     }   
00802 
00803     // NuMuBar Analysis Binning Scheme
00804     if( AnaType==OscFit::kNUBARPartial ){
00805       numBins = 11;
00806       binEdges = new Double_t[numBins+1];
00807       binEdges[0] = 0;
00808       binEdges[1] = 2.0;
00809       binEdges[2] = 4.0;
00810       binEdges[3] = 6.0;
00811       binEdges[4] = 8.0;
00812       binEdges[5] = 10.0;
00813       binEdges[6] = 12.0;
00814       binEdges[7] = 14.0;
00815       binEdges[8] = 16.0;
00816       binEdges[9] = 18.0;
00817       binEdges[10] = 20.0;
00818       binEdges[11] = 25.0;
00819     }
00820 
00821     // RAF Analysis Binning Scheme
00822     if( ( AnaType==OscFit::kRAF_All
00823        || AnaType==OscFit::kRAF_Front 
00824        || AnaType==OscFit::kRAF_Outer
00825        || AnaType==OscFit::kRAF_Inner 
00826        || AnaType==OscFit::kRAF_Gap
00827        || AnaType==OscFit::kRAF_GapEdge
00828        || AnaType==OscFit::kRAF_Back )
00829      && hist->GetXaxis()->GetNbins()!=123 ){
00830       numBins = 7;
00831       binEdges = new Double_t[numBins+1];
00832       binEdges[0] =   0.0;
00833       binEdges[1] =   1.0;
00834       binEdges[2] =   2.0;
00835       binEdges[3] =   3.0;
00836       binEdges[4] =   4.0;
00837       binEdges[5] =   6.0;
00838       binEdges[6] =   9.0;
00839       binEdges[7] =  15.0;
00840     }
00841 
00842 
00843     // sanity check
00844     if( numBins<=0 || binEdges==0 ) return 0;
00845 
00846     // build new histogram 
00847     TString TitleX = hist->GetXaxis()->GetTitle();
00848     TString TitleY = hist->GetYaxis()->GetTitle();
00849 
00850     TH1D* histNew = new TH1D(histName.Data(),"",numBins,binEdges);
00851     histNew->GetXaxis()->SetTitle( TitleX.Data() );
00852     histNew->GetYaxis()->SetTitle( TitleY.Data() );
00853     histNew->GetXaxis()->SetTitleOffset(1.1);
00854     histNew->GetYaxis()->SetTitleOffset(1.1);
00855     histNew->GetXaxis()->CenterTitle();
00856     histNew->GetYaxis()->CenterTitle();
00857 
00858     for( Int_t i=0; i<hist->GetXaxis()->GetNbins(); i++ ){
00859       Double_t binCenter = hist->GetXaxis()->GetBinCenter(i+1);
00860       Double_t binContent = hist->GetBinContent(i+1);
00861       histNew->Fill( binCenter, binContent );
00862     }
00863 
00864     delete [] binEdges;
00865 
00866     return histNew;
00867   }

TH1D * OscFit::ConvertToSquashedBinning ( TH1D *  hist,
OscFit::Analysis_t  AnaType 
)

Definition at line 869 of file TemplateTools.cxx.

References kCCByRes, kCCByResOld, kCCFull, kCCLow, kCCMid, kCCPartial, kNUBARFull, kNUBARPartial, kRAF_All, kRAF_Back, kRAF_Front, kRAF_Gap, kRAF_GapEdge, kRAF_Inner, kRAF_Outer, kRHCFull, and kRHCPartial.

Referenced by GetDisplaySpectrumForBkg(), GetDisplaySpectrumForData(), and GetDisplaySpectrumForMC().

00870   {
00871     // sanity check
00872     if( hist==0 ) return 0;
00873 
00874     // generate name
00875     TString histName = hist->GetName(); histName.Append("_Squashed");
00876   
00877     // binning for squashed display histogram
00878     // --------------------------------------
00879     // Many possible binning schemes...
00880 
00881     Int_t numBins = 0;
00882     Int_t numDivisions = 0;
00883     Double_t* x = 0;
00884     Double_t* xc = 0;
00885 
00886     // Resolution Binning Scheme (Old)
00887     if( AnaType==OscFit::kCCByResOld
00888      && hist->GetXaxis()->GetNbins()==18 ){
00889       numBins = 18;
00890       numDivisions = 1800;
00891       x = new Double_t[numBins+1];
00892       xc = new Double_t[numBins+1];
00893       x[0] = 0;      xc[0] = 0; 
00894       x[1] = 1.25;   xc[1] = 1.25;
00895       x[2] = 2.25;   xc[2] = 2.25;
00896       x[3] = 3.25;   xc[3] = 3.25;
00897       x[4] = 4.25;   xc[4] = 4.25; 
00898       x[5] = 5.25;   xc[5] = 5.25; 
00899       x[6] = 6.25;   xc[6] = 6.25;
00900       x[7] = 7.25;   xc[7] = 7.25;
00901       x[8] = 8.25;   xc[8] = 8.25;
00902       x[9] = 9.25;   xc[9] = 9.25; 
00903       x[10] = 10.25; xc[10] = 10.25;
00904       x[11] = 11.25; xc[11] = 11.25;
00905       x[12] = 12.25; xc[12] = 12.25;
00906       x[13] = 13.25; xc[13] = 13.25;
00907       x[14] = 14.25; xc[14] = 14.25;
00908       x[15] = 15.25; xc[15] = 15.25;
00909       x[16] = 16.25; xc[16] = 16.25;
00910       x[17] = 17.25; xc[17] = 17.25;
00911       x[18] = 18.25; xc[18] = 18.25;
00912     } 
00913 
00914     // Resolution Binning Scheme
00915     if( AnaType==OscFit::kCCByRes
00916      && hist->GetXaxis()->GetNbins()==18 ){
00917       numBins = 18;
00918       numDivisions = 1800;
00919       x = new Double_t[numBins+1];
00920       xc = new Double_t[numBins+1];
00921       x[0] = 0;      xc[0] = 0; 
00922       x[1] = 1.00;   xc[1] = 1.00;
00923       x[2] = 2.00;   xc[2] = 2.00;
00924       x[3] = 3.00;   xc[3] = 3.00;
00925       x[4] = 4.00;   xc[4] = 4.00; 
00926       x[5] = 5.00;   xc[5] = 5.00; 
00927       x[6] = 6.00;   xc[6] = 6.00;
00928       x[7] = 7.00;   xc[7] = 7.00;
00929       x[8] = 8.00;   xc[8] = 8.00;
00930       x[9] = 9.00;   xc[9] = 9.00; 
00931       x[10] = 10.00; xc[10] = 10.00;
00932       x[11] = 11.00; xc[11] = 11.00;
00933       x[12] = 12.00; xc[12] = 12.00;
00934       x[13] = 13.00; xc[13] = 13.00;
00935       x[14] = 14.00; xc[14] = 14.00;
00936       x[15] = 15.00; xc[15] = 15.00;
00937       x[16] = 16.00; xc[16] = 16.00;
00938       x[17] = 17.00; xc[17] = 17.00;
00939       x[18] = 18.00; xc[18] = 18.00;
00940     }
00941 
00942     // CC Analysis Binning Scheme (Mid)
00943     if( AnaType==OscFit::kCCMid 
00944      && hist->GetXaxis()->GetNbins()==24 ){
00945       numBins = 24;
00946       numDivisions = 2800;
00947       x = new Double_t[numBins+1];
00948       xc = new Double_t[numBins+1];
00949       x[0]  =  0.0;  xc[0]  =  0.0;  
00950       x[1]  =  0.5;  xc[1]  =  0.5;
00951       x[2]  =  1.0;  xc[2]  =  1.0;
00952       x[3]  =  1.5;  xc[3]  =  1.5;
00953       x[4]  =  2.0;  xc[4]  =  2.0;
00954       x[5]  =  2.5;  xc[5]  =  2.5;
00955       x[6]  =  3.0;  xc[6]  =  3.0;
00956       x[7]  =  3.5;  xc[7]  =  3.5;
00957       x[8]  =  4.0;  xc[8]  =  4.0;
00958       x[9]  =  4.5;  xc[9]  =  4.5;
00959       x[10] =  5.0;  xc[10] =  5.0;
00960       x[11] =  5.5;  xc[11] =  5.5;
00961       x[12] =  6.0;  xc[12] =  6.0;
00962       x[13] =  6.5;  xc[13] =  6.5;
00963       x[14] =  7.0;  xc[14] =  7.0;
00964       x[15] =  7.5;  xc[15] =  7.5;
00965       x[16] =  8.0;  xc[16] =  8.0;   
00966       x[17] =  8.5;  xc[17] =  8.5;   
00967       x[18] =  9.0;  xc[18] =  9.0;
00968       x[19] =  9.75; xc[19] =  9.75;
00969       x[20] = 10.5;  xc[20] = 10.5;
00970       x[21] = 11.25; xc[21] = 11.25;
00971       x[22] = 12.0;  xc[22] = 12.0;
00972       x[23] = 13.0;  xc[23] = 13.0;
00973       x[24] = 14.0;  xc[24] = 14.0;
00974     }
00975 
00976     // CC Analysis Binning Scheme (Full)
00977     if( AnaType==OscFit::kCCFull
00978      && hist->GetXaxis()->GetNbins()==42 ){
00979       numBins = 42;
00980       numDivisions = 4400;
00981       x = new Double_t[numBins+1];
00982       xc = new Double_t[numBins+1];
00983       x[0] = 0;     xc[0] = 0;
00984       x[1] = 0.5;   xc[1] = 0.5;
00985       x[2] = 0.75;  xc[2] = 0.75;
00986       x[3] = 1;     xc[3] = 1;
00987       x[4] = 1.25;  xc[4] = 1.25;
00988       x[5] = 1.5;   xc[5] = 1.5;
00989       x[6] = 1.75;  xc[6] = 1.75;
00990       x[7] = 2;     xc[7] = 2;
00991       x[8] = 2.25;  xc[8] = 2.25;
00992       x[9] = 2.5;   xc[9] = 2.5;
00993       x[10] = 2.75; xc[10] = 2.75;
00994       x[11] = 3;    xc[11] = 3;
00995       x[12] = 3.25; xc[12] = 3.25;
00996       x[13] = 3.5;  xc[13] = 3.5;
00997       x[14] = 3.75; xc[14] = 3.75;
00998       x[15] = 4;    xc[15] = 4;
00999       x[16] = 4.25; xc[16] = 4.25;
01000       x[17] = 4.5;  xc[17] = 4.5;
01001       x[18] = 4.75; xc[18] = 4.75;
01002       x[19] = 5;    xc[19] = 5;
01003       x[20] = 5.5;  xc[20] = 5.5;
01004       x[21] = 6;    xc[21] = 6;
01005       x[22] = 6.5;  xc[22] = 6.5;
01006       x[23] = 7;    xc[23] = 7;
01007       x[24] = 7.5;  xc[24] = 7.5;
01008       x[25] = 8;    xc[25] = 8;
01009       x[26] = 8.5;  xc[26] = 8.5;
01010       x[27] = 9;    xc[27] = 9;
01011       x[28] = 9.5;  xc[28] = 9.5;
01012       x[29] = 10;   xc[29] = 10;
01013       x[30] = 11;   xc[30] = 10.5;
01014       x[31] = 12;   xc[31] = 11;
01015       x[32] = 13;   xc[32] = 11.5;
01016       x[33] = 14;   xc[33] = 12;
01017       x[34] = 15;   xc[34] = 12.5;
01018       x[35] = 16;   xc[35] = 13;
01019       x[36] = 17;   xc[36] = 13.5;
01020       x[37] = 18;   xc[37] = 14;
01021       x[38] = 19;   xc[38] = 14.5;
01022       x[39] = 20;   xc[39] = 15;
01023       x[40] = 30;   xc[40] = 17;
01024       x[41] = 50;   xc[41] = 19;
01025       x[42] = 200;  xc[42] = 22;
01026     }
01027 
01028     // CC Analysis Binning Scheme (Partial)
01029     if( AnaType==OscFit::kCCPartial
01030      && hist->GetXaxis()->GetNbins()==41 ){
01031       numBins = 41;
01032       numDivisions = 3800;
01033       x = new Double_t[numBins+1];
01034       xc = new Double_t[numBins+1];
01035       x[0] = 0;     xc[0] = 0;
01036       x[1] = 0.5;   xc[1] = 0.5;
01037       x[2] = 0.75;  xc[2] = 0.75;
01038       x[3] = 1;     xc[3] = 1;
01039       x[4] = 1.25;  xc[4] = 1.25;
01040       x[5] = 1.5;   xc[5] = 1.5;
01041       x[6] = 1.75;  xc[6] = 1.75;
01042       x[7] = 2;     xc[7] = 2;
01043       x[8] = 2.25;  xc[8] = 2.25;
01044       x[9] = 2.5;   xc[9] = 2.5;
01045       x[10] = 2.75; xc[10] = 2.75;
01046       x[11] = 3;    xc[11] = 3;
01047       x[12] = 3.25; xc[12] = 3.25;
01048       x[13] = 3.5;  xc[13] = 3.5;
01049       x[14] = 3.75; xc[14] = 3.75;
01050       x[15] = 4;    xc[15] = 4;
01051       x[16] = 4.25; xc[16] = 4.25;
01052       x[17] = 4.5;  xc[17] = 4.5;
01053       x[18] = 4.75; xc[18] = 4.75;
01054       x[19] = 5;    xc[19] = 5;
01055       x[20] = 5.5;  xc[20] = 5.5;
01056       x[21] = 6;    xc[21] = 6;
01057       x[22] = 6.5;  xc[22] = 6.5;
01058       x[23] = 7;    xc[23] = 7;
01059       x[24] = 7.5;  xc[24] = 7.5;
01060       x[25] = 8;    xc[25] = 8;
01061       x[26] = 8.5;  xc[26] = 8.5;
01062       x[27] = 9;    xc[27] = 9;
01063       x[28] = 9.5;  xc[28] = 9.5;
01064       x[29] = 10;   xc[29] = 10;
01065       x[30] = 11;   xc[30] = 10.5;
01066       x[31] = 12;   xc[31] = 11;
01067       x[32] = 13;   xc[32] = 11.5;
01068       x[33] = 14;   xc[33] = 12;
01069       x[34] = 15;   xc[34] = 12.5;
01070       x[35] = 16;   xc[35] = 13;
01071       x[36] = 17;   xc[36] = 13.5;
01072       x[37] = 18;   xc[37] = 14;
01073       x[38] = 19;   xc[38] = 14.5;
01074       x[39] = 20;   xc[39] = 15;
01075       x[40] = 30;   xc[40] = 17;
01076       x[41] = 50;   xc[41] = 19;
01077     }
01078 
01079     // CC Analysis Binning Scheme (Low)
01080     if( AnaType==OscFit::kCCLow
01081      && hist->GetXaxis()->GetNbins()==33 ){
01082       numBins = 33;
01083       numDivisions = 2400;
01084       x = new Double_t[numBins+1];
01085       xc = new Double_t[numBins+1];
01086       x[0] = 0;     xc[0] = 0;
01087       x[1] = 0.5;   xc[1] = 0.5;
01088       x[2] = 0.75;  xc[2] = 0.75;
01089       x[3] = 1;     xc[3] = 1;
01090       x[4] = 1.25;  xc[4] = 1.25;
01091       x[5] = 1.5;   xc[5] = 1.5;
01092       x[6] = 1.75;  xc[6] = 1.75;
01093       x[7] = 2;     xc[7] = 2;
01094       x[8] = 2.25;  xc[8] = 2.25;
01095       x[9] = 2.5;   xc[9] = 2.5;
01096       x[10] = 2.75; xc[10] = 2.75;
01097       x[11] = 3;    xc[11] = 3;
01098       x[12] = 3.25; xc[12] = 3.25;
01099       x[13] = 3.5;  xc[13] = 3.5;
01100       x[14] = 3.75; xc[14] = 3.75;
01101       x[15] = 4;    xc[15] = 4;
01102       x[16] = 4.25; xc[16] = 4.25;
01103       x[17] = 4.5;  xc[17] = 4.5;
01104       x[18] = 4.75; xc[18] = 4.75;
01105       x[19] = 5;    xc[19] = 5;
01106       x[20] = 5.5;  xc[20] = 5.5;
01107       x[21] = 6;    xc[21] = 6;
01108       x[22] = 6.5;  xc[22] = 6.5;
01109       x[23] = 7;    xc[23] = 7;
01110       x[24] = 7.5;  xc[24] = 7.5;
01111       x[25] = 8;    xc[25] = 8;
01112       x[26] = 8.5;  xc[26] = 8.5;
01113       x[27] = 9;    xc[27] = 9;
01114       x[28] = 9.5;  xc[28] = 9.5;
01115       x[29] = 10;   xc[29] = 10;
01116       x[30] = 10.5; xc[30] = 10.5;
01117       x[31] = 11;   xc[31] = 11;
01118       x[32] = 11.5; xc[32] = 11.5;
01119       x[33] = 12;   xc[33] = 12;
01120     }
01121 
01122     // RHC Analysis Binning Scheme (Full)
01123     if( AnaType==OscFit::kRHCFull
01124      && hist->GetXaxis()->GetNbins()==14 ){
01125       numBins = 14;
01126       numDivisions = 1600;
01127       x = new Double_t[numBins+1];
01128       xc = new Double_t[numBins+1];
01129       x[0] = 0.0;     xc[0] = 0.0;
01130       x[1] = 1.0;     xc[1] = 1.0;
01131       x[2] = 2.0;     xc[2] = 2.0;
01132       x[3] = 3.0;     xc[3] = 3.0;
01133       x[4] = 4.0;     xc[4] = 4.0;
01134       x[5] = 5.0;     xc[5] = 5.0;
01135       x[6] = 6.0;     xc[6] = 6.0;
01136       x[7] = 7.0;     xc[7] = 7.0;
01137       x[8] = 8.0;     xc[8] = 8.0;
01138       x[9] = 9.0;     xc[9] = 9.0;
01139       x[10] = 10.0;   xc[10] = 10.0;
01140       x[11] = 20.0;   xc[11] = 11.0;
01141       x[12] = 30.0;   xc[12] = 12.0;
01142       x[13] = 50.0;   xc[13] = 14.0;
01143       x[14] = 200.0;  xc[14] = 16.0;
01144     }
01145   
01146     // RHC Analysis Binning Scheme (Partial)
01147     if( AnaType==OscFit::kRHCPartial
01148      && hist->GetXaxis()->GetNbins()==13 ){
01149       numBins = 13;
01150       numDivisions = 2800;
01151       x = new Double_t[numBins+1];
01152       xc = new Double_t[numBins+1];
01153       x[0] = 0.0;     xc[0] = 0.0;
01154       x[1] = 1.0;     xc[1] = 1.0;
01155       x[2] = 2.0;     xc[2] = 2.0;
01156       x[3] = 3.0;     xc[3] = 3.0;
01157       x[4] = 4.0;     xc[4] = 4.0;
01158       x[5] = 5.0;     xc[5] = 5.0;
01159       x[6] = 6.0;     xc[6] = 6.0;
01160       x[7] = 7.0;     xc[7] = 7.0;
01161       x[8] = 8.0;     xc[8] = 8.0;
01162       x[9] = 9.0;     xc[9] = 9.0;
01163       x[10] = 10.0;   xc[10] = 10.0;
01164       x[11] = 11.0;   xc[11] = 11.0;
01165       x[12] = 12.0;   xc[12] = 12.0;
01166       x[13] = 14.0;   xc[13] = 14.0;
01167     }
01168 
01169     // NuMuBar Analysis Binning Scheme (Full)
01170     if( AnaType==OscFit::kNUBARFull
01171      && hist->GetXaxis()->GetNbins()==15 ){
01172       numBins = 15;
01173       numDivisions = 3200;
01174       x = new Double_t[numBins+1];
01175       xc = new Double_t[numBins+1];
01176       x[0] = 0.0;     xc[0] = 0.0;
01177       x[1] = 2.0;     xc[1] = 1.0;
01178       x[2] = 4.0;     xc[2] = 2.0;
01179       x[3] = 6.0;     xc[3] = 3.0;
01180       x[4] = 8.0;     xc[4] = 4.0;
01181       x[5] = 10.0;    xc[5] = 5.0;
01182       x[6] = 12.0;    xc[6] = 6.0;
01183       x[7] = 14.0;    xc[7] = 7.0;
01184       x[8] = 16.0;    xc[8] = 8.0;
01185       x[9] = 18.0;    xc[9] = 9.0;
01186       x[10] = 20.0;   xc[10] = 10.0;
01187       x[11] = 25.0;   xc[11] = 11.0;
01188       x[12] = 30.0;   xc[12] = 12.0;
01189       x[13] = 40.0;   xc[13] = 13.0;
01190       x[14] = 50.0;   xc[14] = 14.0;
01191       x[15] = 200.0;  xc[15] = 16.0;
01192     } 
01193 
01194     // NuMuBar Analysis Binning Scheme (Partial)
01195     if( AnaType==OscFit::kNUBARPartial
01196      && hist->GetXaxis()->GetNbins()==11 ){
01197       numBins = 11;
01198       numDivisions = 2400;
01199       x = new Double_t[numBins+1];
01200       xc = new Double_t[numBins+1];
01201       x[0] = 0.0;     xc[0] = 0.0;
01202       x[1] = 2.0;     xc[1] = 1.0;
01203       x[2] = 4.0;     xc[2] = 2.0;
01204       x[3] = 6.0;     xc[3] = 3.0;
01205       x[4] = 8.0;     xc[4] = 4.0;
01206       x[5] = 10.0;    xc[5] = 5.0;
01207       x[6] = 12.0;    xc[6] = 6.0;
01208       x[7] = 14.0;    xc[7] = 7.0;
01209       x[8] = 16.0;    xc[8] = 8.0;
01210       x[9] = 18.0;    xc[9] = 9.0;
01211       x[10] = 20.0;   xc[10] = 10.0;
01212       x[11] = 25.0;   xc[11] = 12.0;
01213     }
01214 
01215     // RAF analysis Binning Scheme
01216     if( ( AnaType==OscFit::kRAF_All
01217        || AnaType==OscFit::kRAF_Front 
01218        || AnaType==OscFit::kRAF_Outer
01219        || AnaType==OscFit::kRAF_Inner 
01220        || AnaType==OscFit::kRAF_Gap
01221        || AnaType==OscFit::kRAF_GapEdge
01222        || AnaType==OscFit::kRAF_Back )
01223      && hist->GetXaxis()->GetNbins()==7 ){
01224       numBins = 7;
01225       numDivisions = 1800; 
01226       x = new Double_t[numBins+1];
01227       xc = new Double_t[numBins+1];
01228       x[0] =   0.0;   xc[0] = 0.0;
01229       x[1] =   1.0;   xc[1] = 1.0;
01230       x[2] =   2.0;   xc[2] = 2.0;
01231       x[3] =   3.0;   xc[3] = 3.0;
01232       x[4] =   4.0;   xc[4] = 4.0;
01233       x[5] =   6.0;   xc[5] = 6.0;
01234       x[6] =   9.0;   xc[6] = 7.5;
01235       x[7] =  15.0;   xc[7] = 9.0;
01236     }
01237 
01238     // sanity check
01239     if( numBins<=0 || xc==0 ) return 0;
01240 
01241     // build new histogram    
01242     TString TitleX = hist->GetXaxis()->GetTitle();
01243     TString TitleY = hist->GetYaxis()->GetTitle();
01244     
01245     TH1D* histNew = new TH1D(histName.Data(),"",numBins,xc); 
01246     histNew->GetXaxis()->SetTitle( TitleX.Data() );
01247     histNew->GetYaxis()->SetTitle( TitleY.Data() );
01248     histNew->GetXaxis()->SetTitleOffset(1.1);
01249     histNew->GetYaxis()->SetTitleOffset(1.1);
01250     histNew->GetXaxis()->SetLabelOffset(999.9);
01251     histNew->GetXaxis()->SetNdivisions(numDivisions);  // SETNDIVISIONS
01252     histNew->GetXaxis()->CenterTitle();
01253     histNew->GetYaxis()->CenterTitle();
01254 
01255     for( Int_t i=0; i<hist->GetXaxis()->GetNbins(); i++ ){
01256       Double_t binContent = hist->GetBinContent(i+1);
01257       Double_t binError   = hist->GetBinError( i+1 );
01258       histNew->SetBinContent( i+1, binContent );
01259       histNew->SetBinError( i+1, binError );
01260     } 
01261 
01262     delete [] x;
01263     delete [] xc;
01264 
01265     return histNew;
01266   }

Double_t OscFit::DeltaCP (  ) 
Double_t OscFit::DetectorDepth (  ) 
TH1D * OscFit::DivideHistograms ( TH1D *  hist1,
TH1D *  hist2 
)
Double_t OscFit::DMSq12 (  ) 
Double_t OscFit::DMSq23 (  ) 
void OscFit::DrawAxes ( TH1D *  hist,
OscFit::Analysis_t  AnaType 
)

Definition at line 1268 of file TemplateTools.cxx.

References kCCByRes, kCCByResOld, kCCFull, kCCLow, kCCMid, kCCPartial, kNUBARFull, kNUBARPartial, kRAF_All, kRAF_Back, kRAF_Front, kRAF_Gap, kRAF_GapEdge, kRAF_Inner, kRAF_Outer, kRHCFull, kRHCPartial, and n.

01269   {
01270     if( hist==0 ) return;
01271 
01272     // make old axes go away
01273     hist->GetXaxis()->SetLabelOffset(999.9);
01274 
01275     // Many possible binning schemes...
01276     Int_t entries = 0;
01277     Double_t* x = 0;
01278     const Char_t** c = 0;
01279 
01280     // Resolution Binning Scheme
01281     if( AnaType==OscFit::kCCByResOld 
01282      || AnaType==OscFit::kCCByRes ){
01283       entries = 10;
01284       Double_t xtemp[10] = { 0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0 };
01285       const Char_t* ctemp[11] = { "0", "2", "4", "6", "8", "10", "12", "14", "16", "18" };
01286 
01287       x = new Double_t[entries];
01288       c = new const Char_t*[entries];
01289 
01290       for( Int_t n=0; n<entries; n++ ){
01291         x[n] = xtemp[n];
01292         c[n] = ctemp[n];
01293       }
01294     }
01295 
01296     // CC Analysis Binning Scheme (Mid)
01297     if( AnaType==OscFit::kCCMid ){
01298       entries = 8;
01299       Double_t xtemp[8] = { 0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0 }; 
01300       const Char_t* ctemp[8] = { "0", "2", "4", "6", "8", "10", "12", "14" };
01301    
01302       x = new Double_t[entries];
01303       c = new const Char_t*[entries];
01304 
01305       for( Int_t n=0; n<entries; n++ ){
01306         x[n] = xtemp[n];
01307         c[n] = ctemp[n];
01308       }
01309     }   
01310 
01311     // CC Analysis Binning Scheme (Full)
01312     if( AnaType==OscFit::kCCFull ){
01313       entries = 11;
01314       Double_t xtemp[11] = { 0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.5, 15.0, 17.0, 19.0, 22.0 }; 
01315       const Char_t* ctemp[11] = { "0", "2", "4", "6", "8", "10", "15", "20", "30", "50", "200" };
01316    
01317       x = new Double_t[entries];
01318       c = new const Char_t*[entries];
01319 
01320       for( Int_t n=0; n<entries; n++ ){
01321         x[n] = xtemp[n];
01322         c[n] = ctemp[n];
01323       }
01324     }   
01325 
01326     // CC Analysis Binning Scheme (Partial)
01327     if( AnaType==OscFit::kCCPartial ){
01328       entries = 10;
01329       Double_t xtemp[10] = { 0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.5, 15.0, 17.0, 19.0 }; 
01330       const Char_t* ctemp[10] = { "0", "2", "4", "6", "8", "10", "15", "20", "30", "50" };
01331    
01332       x = new Double_t[entries];
01333       c = new const Char_t*[entries];
01334 
01335       for( Int_t n=0; n<entries; n++ ){
01336         x[n] = xtemp[n];
01337         c[n] = ctemp[n];
01338       }
01339     }
01340  
01341     // CC Analysis Binning Scheme (Low)
01342     if( AnaType==OscFit::kCCLow ){
01343       entries = 7;
01344       Double_t xtemp[7] = { 0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0 }; 
01345       const Char_t* ctemp[7] = { "0", "2", "4", "6", "8", "10", "12" };
01346    
01347       x = new Double_t[entries];
01348       c = new const Char_t*[entries];
01349 
01350       for( Int_t n=0; n<entries; n++ ){
01351         x[n] = xtemp[n];
01352         c[n] = ctemp[n];
01353       }
01354     }
01355 
01356     // RHC Analysis Binning Scheme (Full)
01357     if( AnaType==OscFit::kRHCFull ){
01358       entries = 9;
01359       Double_t xtemp[9] = { 0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0 }; 
01360       const Char_t* ctemp[9] = { "0", "2", "4", "6", "8", "10", "30", "50", "200" };
01361 
01362       x = new Double_t[entries];
01363       c = new const Char_t*[entries];
01364 
01365       for( Int_t n=0; n<entries; n++ ){
01366         x[n] = xtemp[n];
01367         c[n] = ctemp[n];
01368       }
01369     }
01370 
01371     // RHC Analysis Binning Scheme (Partial)
01372     if( AnaType==OscFit::kRHCPartial ){
01373       entries = 8;
01374       Double_t xtemp[8] = { 0.0, 2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0 }; 
01375       const Char_t* ctemp[8] = { "0", "2", "4", "6", "8", "10", "12", "14" };
01376 
01377       x = new Double_t[entries];
01378       c = new const Char_t*[entries];
01379 
01380       for( Int_t n=0; n<entries; n++ ){
01381         x[n] = xtemp[n];
01382         c[n] = ctemp[n];
01383       }
01384     }
01385 
01386     // NuMuBar Analysis Binning Scheme (Full)
01387     if( AnaType==OscFit::kNUBARFull ){
01388       entries = 8;
01389       Double_t xtemp[8] = { 0.0, 2.5, 5.0, 7.5, 10.0, 12.0, 14.0, 16.0 }; 
01390       const Char_t* ctemp[8] = { "0", "5", "10", "15", "20", "30", "50", "200" };
01391 
01392       x = new Double_t[entries];
01393       c = new const Char_t*[entries];
01394 
01395       for( Int_t n=0; n<entries; n++ ){
01396         x[n] = xtemp[n];
01397         c[n] = ctemp[n];
01398       }
01399     }
01400 
01401     // NuMuBar Analysis Binning Scheme (Partial)
01402     if( AnaType==OscFit::kNUBARPartial ){
01403       entries = 6;
01404       Double_t xtemp[6] = { 0.0, 2.5, 5.0, 7.5, 10.0, 12.0 }; 
01405       const Char_t* ctemp[6] = { "0", "5", "10", "15", "20", "25" };
01406 
01407       x = new Double_t[entries];
01408       c = new const Char_t*[entries];
01409 
01410       for( Int_t n=0; n<entries; n++ ){
01411         x[n] = xtemp[n];
01412         c[n] = ctemp[n];
01413       }
01414     }
01415 
01416     // RAF Analysis Binning Scheme
01417     if( AnaType==OscFit::kRAF_All
01418      || AnaType==OscFit::kRAF_Front 
01419      || AnaType==OscFit::kRAF_Outer
01420      || AnaType==OscFit::kRAF_Inner 
01421      || AnaType==OscFit::kRAF_Gap
01422      || AnaType==OscFit::kRAF_GapEdge
01423      || AnaType==OscFit::kRAF_Back ){
01424       entries = 6;
01425       Double_t xtemp[6] = { 0.0, 2.0, 4.0, 6.0, 7.5, 9.0 }; 
01426       const Char_t* ctemp[6] = { "0", "2", "4", "6", "9", "15" };
01427 
01428       x = new Double_t[entries];
01429       c = new const Char_t*[entries];
01430 
01431       for( Int_t n=0; n<entries; n++ ){
01432         x[n] = xtemp[n];
01433         c[n] = ctemp[n];
01434       }
01435     }
01436 
01437     // sanity check
01438     if( x==0 || c==0 ) return;
01439 
01440     // Now draw the labels
01441     TLatex p;
01442     p.SetTextSize( hist->GetXaxis()->GetLabelSize() );
01443     p.SetTextFont( hist->GetXaxis()->GetLabelFont() );
01444     p.SetTextAlign(23);
01445 
01446     Double_t ymin = hist->GetMinimum();
01447     Double_t ymax = hist->GetMaximum();
01448     Double_t ypos = ymin - 0.025*(ymax-ymin);
01449 
01450     for( Int_t i=0; i<entries; i++ ) {
01451       p.DrawText( x[i], ypos, c[i] );
01452     }
01453 
01454     delete [] x;
01455     delete [] c;
01456 
01457     return;
01458   }

TH1D * OscFit::FillEmptyErrors ( TH1D *  hist  ) 
double OscFit::FlatProdHeight (  ) 
TH1D * OscFit::FormatForBkg ( TH1D *  hist,
Int_t  ColType 
)

Definition at line 1530 of file TemplateTools.cxx.

Referenced by GetDisplaySpectrumForBkg().

01531   {
01532     if( hist ){
01533       hist->SetLineColor(ColType);
01534       hist->SetLineWidth(2);
01535       hist->SetFillColor(ColType);
01536       hist->SetFillStyle(3004);
01537       hist->SetMinimum(0.0);
01538     }
01539 
01540     return hist;
01541   }

TH1D * OscFit::FormatForData ( TH1D *  hist  ) 

Definition at line 1505 of file TemplateTools.cxx.

Referenced by GetDisplaySpectrumForData().

01506   {
01507     if( hist ){
01508       hist->SetMarkerStyle(20);
01509       hist->SetMarkerColor(kBlack);
01510       hist->SetMarkerSize(1.2);
01511       hist->SetLineColor(kBlack);
01512       hist->SetLineWidth(2);
01513       hist->SetMinimum(0.0);
01514     }
01515 
01516     return hist;
01517   }

TH1D * OscFit::FormatForMC ( TH1D *  hist,
Int_t  ColType 
)

Definition at line 1519 of file TemplateTools.cxx.

Referenced by GetDisplaySpectrumForMC().

01520   {
01521     if( hist ){
01522       hist->SetLineColor(ColType);
01523       hist->SetLineWidth(3);
01524       hist->SetMinimum(0.0);
01525     }
01526 
01527     return hist;
01528   }

Bin_t OscFit::GetBin ( const char *  bin  ) 
Bin_t OscFit::GetBin ( Int_t  ibin  ) 
Int_t OscFit::GetBinNumber ( Bin_t  bin  ) 
Charge_t OscFit::GetCharge ( Int_t  icharge  ) 
Charge_t OscFit::GetChargeSign ( Run_t  ,
Bin_t  bin 
)
TH1D * OscFit::GetCombinedRAFSpectrum ( TH1D *  hist  ) 

Definition at line 370 of file TemplateTools.cxx.

References n.

Referenced by GetRAFSpectrum().

00371   {
00372     // sanity check
00373     if( hist==0 
00374      || hist->GetXaxis()->GetNbins()!=123 ) return 0;
00375 
00376     // generate name
00377     TString fineName   = hist->GetName(); fineName.Append("_FineBinning");
00378     TString coarseName = hist->GetName(); coarseName.Append("_CoarseBinning");
00379     TString outputName = hist->GetName(); outputName.Append("_Combined");
00380 
00381     // fine binning schemes
00382     Int_t fineBins = 28;
00383     Double_t* fineEdges = new Double_t[fineBins+1];
00384     fineEdges[0]  = 0.0;
00385     fineEdges[1]  = 0.75;
00386     fineEdges[2]  = 1.00;
00387     fineEdges[3]  = 1.25;
00388     fineEdges[4]  = 1.50;
00389     fineEdges[5]  = 1.75;
00390     fineEdges[6]  = 2.00;
00391     fineEdges[7]  = 2.25;
00392     fineEdges[8]  = 2.50;
00393     fineEdges[9]  = 2.75;
00394     fineEdges[10] = 3.00;
00395     fineEdges[11] = 3.25;
00396     fineEdges[12] = 3.50;
00397     fineEdges[13] = 3.75;
00398     fineEdges[14] = 4.0;
00399     fineEdges[15] = 4.5;
00400     fineEdges[16] = 5.0;
00401     fineEdges[17] = 5.5;
00402     fineEdges[18] = 6.0;
00403     fineEdges[19] = 7.0;
00404     fineEdges[20] = 8.0;
00405     fineEdges[21] = 9.0;
00406     fineEdges[22] = 10.0;
00407     fineEdges[23] = 15.0;
00408     fineEdges[24] = 20.0;
00409     fineEdges[25] = 25.0;
00410     fineEdges[26] = 30.0;
00411     fineEdges[27] = 45.0;
00412     fineEdges[28] = 200.0;
00413 
00414     // coarse binning scheme
00415     Int_t coarseBins = 9;
00416     Double_t* coarseEdges = new Double_t[coarseBins+1];
00417     coarseEdges[0] =   0.0;
00418     coarseEdges[1] =   1.0;
00419     coarseEdges[2] =   1.5;
00420     coarseEdges[3] =   2.0;
00421     coarseEdges[4] =   3.0;
00422     coarseEdges[5] =   4.0;
00423     coarseEdges[6] =   6.0;
00424     coarseEdges[7] =   9.0;
00425     coarseEdges[8] =  15.0;
00426     coarseEdges[9] = 200.0;
00427 
00428     // build new histograms
00429     TString TitleX = hist->GetXaxis()->GetTitle();
00430     TString TitleY = hist->GetYaxis()->GetTitle();
00431 
00432     TH1D* histFine = new TH1D(fineName.Data(),"",fineBins,fineEdges);
00433     histFine->GetXaxis()->SetTitle( TitleX.Data() );
00434     histFine->GetYaxis()->SetTitle( TitleY.Data() );
00435     histFine->GetXaxis()->SetTitleOffset(1.1);
00436     histFine->GetYaxis()->SetTitleOffset(1.1);
00437     histFine->GetXaxis()->CenterTitle();
00438     histFine->GetYaxis()->CenterTitle();
00439 
00440     TH1D* histCoarse = new TH1D(coarseName.Data(),"",coarseBins,coarseEdges);
00441     histCoarse->GetXaxis()->SetTitle( TitleX.Data() );
00442     histCoarse->GetYaxis()->SetTitle( TitleY.Data() );
00443     histCoarse->GetXaxis()->SetTitleOffset(1.1);
00444     histCoarse->GetYaxis()->SetTitleOffset(1.1);
00445     histCoarse->GetXaxis()->CenterTitle();
00446     histCoarse->GetYaxis()->CenterTitle();
00447 
00448     TH1D* histCombined = new TH1D(outputName.Data(),"",coarseBins,coarseEdges);
00449     histCombined->GetXaxis()->SetTitle( TitleX.Data() );
00450     histCombined->GetYaxis()->SetTitle( TitleY.Data() );
00451     histCombined->GetXaxis()->SetTitleOffset(1.1);
00452     histCombined->GetYaxis()->SetTitleOffset(1.1);
00453     histCombined->GetXaxis()->CenterTitle();
00454     histCombined->GetYaxis()->CenterTitle();
00455 
00456    
00457     // Front Plane
00458     for( Int_t n=2; n<=29; n++ ){
00459       histFine->AddBinContent(n-1,hist->GetBinContent(n));
00460     }
00461     
00462     // Outer Edge
00463     for( Int_t n=32; n<=59; n++ ){
00464       histFine->AddBinContent(n-31,hist->GetBinContent(n));
00465     }
00466     
00467     // Inner Edge
00468     for( Int_t n=62; n<=89; n++ ){
00469       histFine->AddBinContent(n-61,hist->GetBinContent(n));
00470     }
00471 
00472     // Gap
00473     for( Int_t n=92; n<=100; n++ ){
00474       histCoarse->AddBinContent(n-91,hist->GetBinContent(n));
00475     }
00476     
00477     // Gap Edge 
00478     for( Int_t n=103; n<=111; n++ ){
00479       histCoarse->AddBinContent(n-102,hist->GetBinContent(n));
00480     }
00481     
00482     // Back
00483     for( Int_t n=114; n<=122; n++ ){
00484       histCoarse->AddBinContent(n-113,hist->GetBinContent(n));
00485     }
00486     
00487     // Combined
00488     for( Int_t i=0; i<histFine->GetXaxis()->GetNbins(); i++ ){
00489       Double_t binCenter = histFine->GetXaxis()->GetBinCenter(i+1);
00490       Double_t binContent = histFine->GetBinContent(i+1);
00491       histCombined->Fill( binCenter, binContent );
00492     }
00493 
00494     for( Int_t i=0; i<histCoarse->GetXaxis()->GetNbins(); i++ ){
00495       Double_t binCenter = histCoarse->GetXaxis()->GetBinCenter(i+1);
00496       Double_t binContent = histCoarse->GetBinContent(i+1);
00497       histCombined->Fill( binCenter, binContent );
00498     }
00499 
00500     delete [] fineEdges;
00501     delete [] coarseEdges;
00502 
00503     return histCombined;
00504   }

Containment_t OscFit::GetContainment ( Int_t  icontainment  ) 
Containment_t OscFit::GetContainmentType ( Containment_t  containment  ) 
Double_t OscFit::GetDensity ( TH2D *  hist,
Double_t  Ereco,
Double_t  Etrue 
)

Definition at line 10 of file TemplateTools.cxx.

00011   {
00012     Int_t ireco = hist->GetYaxis()->FindBin(Ereco); // y-axis
00013     Int_t itrue = hist->GetXaxis()->FindBin(Etrue); // x-axis
00014 
00015     /*
00016     Double_t ereco = hist->GetYaxis()->GetBinCenter(ireco);
00017     Double_t etrue = hist->GetXaxis()->GetBinCenter(itrue);
00018     */
00019 
00020     Double_t deltaN = hist->GetBinContent(itrue,ireco);
00021     Double_t deltaE = hist->GetXaxis()->GetBinWidth(itrue);
00022 
00023     return deltaN/deltaE;
00024   }

TH1D * OscFit::GetDisplayHistogramForCV ( TH1D *  hist  ) 
TH1D * OscFit::GetDisplayHistogramForCV ( TH2D *  hist,
Double_t  lowerE,
Double_t  upperE 
)
TH1D * OscFit::GetDisplayHistogramForRock ( TH1D *  hist  ) 
TH1D * OscFit::GetDisplaySpectrumForBkg ( TH1D *  hist,
OscFit::Analysis_t  AnaType,
Int_t  ColType 
)

Definition at line 1480 of file TemplateTools.cxx.

References ConvertToDisplayBinning(), ConvertToSquashedBinning(), FormatForBkg(), GetRAFSpectrum(), and GetWeightedSpectrumWithoutErrors().

Referenced by GetDisplaySpectrumForNCBkg().

01481   {
01482     TH1D* h0 = GetRAFSpectrum( hist, AnaType );
01483     TH1D* h1 = ConvertToDisplayBinning( h0, AnaType  );
01484     TH1D* h2 = GetWeightedSpectrumWithoutErrors( h1 );
01485     TH1D* h3 = ConvertToSquashedBinning( h2, AnaType );
01486 
01487     return FormatForBkg( h3, ColType );
01488   }

TH1D * OscFit::GetDisplaySpectrumForData ( TH1D *  hist,
OscFit::Analysis_t  AnaType 
)

Definition at line 1460 of file TemplateTools.cxx.

References ConvertToDisplayBinning(), ConvertToSquashedBinning(), FormatForData(), GetRAFSpectrum(), and GetWeightedSpectrumWithErrors().

01461   {
01462     TH1D* h0 = GetRAFSpectrum( hist, AnaType );
01463     TH1D* h1 = ConvertToDisplayBinning( h0, AnaType );
01464     TH1D* h2 = GetWeightedSpectrumWithErrors( h1 );
01465     TH1D* h3 = ConvertToSquashedBinning( h2, AnaType );
01466 
01467     return FormatForData( h3 );
01468   }

TH1D * OscFit::GetDisplaySpectrumForMC ( TH1D *  hist,
OscFit::Analysis_t  AnaType,
Int_t  ColType 
)

Definition at line 1470 of file TemplateTools.cxx.

References ConvertToDisplayBinning(), ConvertToSquashedBinning(), FormatForMC(), GetRAFSpectrum(), and GetWeightedSpectrumWithoutErrors().

Referenced by GetDisplaySpectrumForNoOsc(), and GetDisplaySpectrumForOsc().

01471   {
01472     TH1D* h0 = GetRAFSpectrum( hist, AnaType );
01473     TH1D* h1 = ConvertToDisplayBinning( h0, AnaType );
01474     TH1D* h2 = GetWeightedSpectrumWithoutErrors( h1 );
01475     TH1D* h3 = ConvertToSquashedBinning( h2, AnaType );
01476 
01477     return FormatForMC( h3, ColType );
01478   }

TH1D * OscFit::GetDisplaySpectrumForNCBkg ( TH1D *  hist,
OscFit::Analysis_t  AnaType 
)

Definition at line 1500 of file TemplateTools.cxx.

References GetDisplaySpectrumForBkg().

01501   {
01502     return GetDisplaySpectrumForBkg( hist, AnaType, kBlue );
01503   }

TH1D * OscFit::GetDisplaySpectrumForNoOsc ( TH1D *  hist,
OscFit::Analysis_t  AnaType 
)

Definition at line 1490 of file TemplateTools.cxx.

References GetDisplaySpectrumForMC().

01491   {
01492     return GetDisplaySpectrumForMC( hist, AnaType, kGray+1);
01493   }

TH1D * OscFit::GetDisplaySpectrumForOsc ( TH1D *  hist,
OscFit::Analysis_t  AnaType 
)

Definition at line 1495 of file TemplateTools.cxx.

References GetDisplaySpectrumForMC().

01496   {
01497     return GetDisplaySpectrumForMC( hist, AnaType, kRed );
01498   }

ElectronTag_t OscFit::GetElectronTag ( Int_t  ielectron  ) 
External_t OscFit::GetExternal ( Int_t  iexternal  ) 
Int_t OscFit::GetFirstCorrectSignBin (  ) 
Int_t OscFit::GetFirstFiducialBin (  ) 
Int_t OscFit::GetFirstOppositeSignBin (  ) 
Int_t OscFit::GetFirstResBin (  ) 
Int_t OscFit::GetFirstRockBin (  ) 
Int_t OscFit::GetFirstRun (  ) 
Flavour_t OscFit::GetFlavour ( Int_t  iflavour  ) 
Int_t OscFit::GetID ( Int_t  n,
Run_t  run,
Sample_t  sample,
Interaction_t  interaction,
Systematic_t  systematic,
Shift_t  shift 
)
Interaction_t OscFit::GetInteraction ( Int_t  interaction  ) 
Int_t OscFit::GetInteractionNumber ( Interaction_t  interaction  ) 
Int_t OscFit::GetLastCorrectSignBin (  ) 
Int_t OscFit::GetLastFiducialBin (  ) 
Int_t OscFit::GetLastOppositeSignBin (  ) 
Int_t OscFit::GetLastResBin (  ) 
Int_t OscFit::GetLastRockBin (  ) 
Double_t OscFit::GetNormError (  ) 
Int_t OscFit::GetNumBins (  ) 
Int_t OscFit::GetNumCharges (  ) 
Int_t OscFit::GetNumContainments (  ) 
Int_t OscFit::GetNumElectronTags (  ) 
Int_t OscFit::GetNumExternals (  ) 
Int_t OscFit::GetNumFlavours (  ) 
Int_t OscFit::GetNumInteractions (  ) 
Int_t OscFit::GetNumOscTypes (  ) 
Int_t OscFit::GetNumProtonTags (  ) 
Int_t OscFit::GetNumResBins (  ) 
Int_t OscFit::GetNumRuns (  ) 
Int_t OscFit::GetNumRunTypes (  ) 
Int_t OscFit::GetNumSamples (  ) 
Int_t OscFit::GetNumShifts (  ) 
Int_t OscFit::GetNumSources (  ) 
Int_t OscFit::GetNumSystematics (  ) 
Int_t OscFit::GetNumTopologies (  ) 
OscType_t OscFit::GetOscType ( Int_t  iosc  ) 
Int_t OscFit::GetPDG ( Flavour_t  flavour,
Charge_t  charge 
)
TH1D * OscFit::GetProjectedHistogram ( TH2D *  hist,
Double_t  lowerE,
Double_t  upperE 
)
ProtonTag_t OscFit::GetProtonTag ( Int_t  iproton  ) 
TH1D * OscFit::GetRAFSpectrum ( TH1D *  hist,
OscFit::Analysis_t  AnaType 
)

Definition at line 229 of file TemplateTools.cxx.

References GetCombinedRAFSpectrum(), kRAF_All, kRAF_Back, kRAF_Front, kRAF_Gap, kRAF_GapEdge, kRAF_Inner, kRAF_Outer, and n.

Referenced by GetDisplaySpectrumForBkg(), GetDisplaySpectrumForData(), and GetDisplaySpectrumForMC().

00230   {
00231     // sanity check
00232     if( hist==0 
00233      || hist->GetXaxis()->GetNbins()!=123 ) return hist;
00234 
00235     // get combined spectrum
00236     if( AnaType==OscFit::kRAF_All ) return GetCombinedRAFSpectrum( hist );
00237 
00238     // generate name
00239     TString histName = hist->GetName();
00240 
00241          if( AnaType==OscFit::kRAF_Front   ) histName.Append("_Front");
00242     else if( AnaType==OscFit::kRAF_Outer   ) histName.Append("_Outer");
00243     else if( AnaType==OscFit::kRAF_Inner   ) histName.Append("_Inner");
00244     else if( AnaType==OscFit::kRAF_Gap     ) histName.Append("_Gap");
00245     else if( AnaType==OscFit::kRAF_GapEdge ) histName.Append("_GapEdge");
00246     else if( AnaType==OscFit::kRAF_Back    ) histName.Append("_Back");
00247     else return 0;
00248 
00249     // binning scheme 
00250     Int_t numBins = 0;
00251     Double_t* binEdges = 0;
00252 
00253     if( AnaType==OscFit::kRAF_Front
00254      || AnaType==OscFit::kRAF_Outer
00255      || AnaType==OscFit::kRAF_Inner ) {
00256       numBins = 28;
00257       binEdges = new Double_t[numBins+1];
00258       binEdges[0]  = 0.0;
00259       binEdges[1]  = 0.75;
00260       binEdges[2]  = 1.00;
00261       binEdges[3]  = 1.25;
00262       binEdges[4]  = 1.50;
00263       binEdges[5]  = 1.75;
00264       binEdges[6]  = 2.00;
00265       binEdges[7]  = 2.25;
00266       binEdges[8]  = 2.50;
00267       binEdges[9]  = 2.75;
00268       binEdges[10] = 3.00;
00269       binEdges[11] = 3.25;
00270       binEdges[12] = 3.50;
00271       binEdges[13] = 3.75;
00272       binEdges[14] = 4.0;
00273       binEdges[15] = 4.5;
00274       binEdges[16] = 5.0;
00275       binEdges[17] = 5.5;
00276       binEdges[18] = 6.0;
00277       binEdges[19] = 7.0;
00278       binEdges[20] = 8.0;
00279       binEdges[21] = 9.0;
00280       binEdges[22] = 10.0;
00281       binEdges[23] = 15.0;
00282       binEdges[24] = 20.0;
00283       binEdges[25] = 25.0;
00284       binEdges[26] = 30.0;
00285       binEdges[27] = 45.0;
00286       binEdges[28] = 200.0;
00287     }
00288 
00289     if( AnaType==OscFit::kRAF_Gap
00290      || AnaType==OscFit::kRAF_GapEdge 
00291      || AnaType==OscFit::kRAF_Back ) {
00292       numBins = 9;
00293       binEdges = new Double_t[numBins+1];
00294       binEdges[0] =   0.0;
00295       binEdges[1] =   1.0;
00296       binEdges[2] =   1.5;
00297       binEdges[3] =   2.0;
00298       binEdges[4] =   3.0;
00299       binEdges[5] =   4.0;
00300       binEdges[6] =   6.0;
00301       binEdges[7] =   9.0;
00302       binEdges[8] =  15.0;
00303       binEdges[9] = 200.0;
00304     }
00305 
00306     // sanity check
00307     if( numBins<=0 || binEdges==0 ) return 0;
00308 
00309     // build new histogram 
00310     TString TitleX = hist->GetXaxis()->GetTitle();
00311     TString TitleY = hist->GetYaxis()->GetTitle();
00312 
00313     TH1D* histNew = new TH1D(histName.Data(),"",numBins,binEdges);
00314     histNew->GetXaxis()->SetTitle( TitleX.Data() );
00315     histNew->GetYaxis()->SetTitle( TitleY.Data() );
00316     histNew->GetXaxis()->SetTitleOffset(1.1);
00317     histNew->GetYaxis()->SetTitleOffset(1.1);
00318     histNew->GetXaxis()->CenterTitle();
00319     histNew->GetYaxis()->CenterTitle();
00320 
00321     // Front Plane
00322     if( AnaType==OscFit::kRAF_Front ){
00323       for( Int_t n=2; n<=29; n++ ){
00324         histNew->SetBinContent(n-1,hist->GetBinContent(n));
00325       }
00326     }
00327 
00328     // Outer Edge
00329     if( AnaType==OscFit::kRAF_Outer ){
00330       for( Int_t n=32; n<=59; n++ ){
00331         histNew->SetBinContent(n-31,hist->GetBinContent(n));
00332       }
00333     }
00334   
00335     // Inner Edge
00336     if( AnaType==OscFit::kRAF_Inner ){
00337       for( Int_t n=62; n<=89; n++ ){
00338         histNew->SetBinContent(n-61,hist->GetBinContent(n));
00339       }
00340     }
00341 
00342     // Gap
00343     if( AnaType==OscFit::kRAF_Gap ){
00344       for( Int_t n=92; n<=100; n++ ){
00345         histNew->SetBinContent(n-91,hist->GetBinContent(n));
00346       }
00347     }
00348 
00349 
00350     // Gap Edge
00351     if( AnaType==OscFit::kRAF_GapEdge ){
00352       for( Int_t n=103; n<=111; n++ ){
00353         histNew->SetBinContent(n-102,hist->GetBinContent(n));
00354       }
00355     }
00356 
00357 
00358     // Back
00359     if( AnaType==OscFit::kRAF_Back ){
00360       for( Int_t n=114; n<=122; n++ ){
00361         histNew->SetBinContent(n-113,hist->GetBinContent(n));
00362       }
00363     }
00364 
00365     delete [] binEdges;
00366 
00367     return histNew;
00368   }

TH1D * OscFit::GetRecoSpectrum ( TH2D *  hist  ) 

Definition at line 26 of file TemplateTools.cxx.

00027   {
00028     // sanity check
00029     if( hist==0 ) return 0;
00030 
00031     // generate name
00032     TString histName = hist->GetName(); histName.Append("_RecoEnergy");
00033 
00034     // make new histogram
00035     TAxis* Axis = hist->GetYaxis(); // y-axis: reco energy
00036     Int_t numBins = Axis->GetNbins();
00037     const Double_t* binEdges = Axis->GetXbins()->GetArray();  
00038   
00039     TH1D* hist1D = new TH1D(histName.Data(),"",numBins,binEdges);
00040     hist1D->GetXaxis()->SetTitle("Reco Energy / GeV");
00041     hist1D->GetXaxis()->SetTitleOffset(1.1);
00042     hist1D->GetXaxis()->CenterTitle();
00043     hist1D->SetLineWidth(2);
00044 
00045     for( Int_t ireco=0; ireco<hist->GetYaxis()->GetNbins(); ireco++ ){
00046       Double_t Ereco = hist->GetYaxis()->GetBinCenter( ireco+1 );;
00047       for( Int_t itrue=0; itrue<hist->GetXaxis()->GetNbins(); itrue++ ){
00048         Double_t numEvents = hist->GetBinContent( itrue+1, ireco+1 );
00049         hist1D->Fill( Ereco, numEvents );
00050       }
00051     }
00052 
00053     return hist1D;
00054   }

Resolution_t OscFit::GetResBin ( Int_t  iresbin  ) 
Resolution_t OscFit::GetResolutionType ( Resolution_t  res  ) 
Run_t OscFit::GetRun ( Int_t  irun  ) 
Int_t OscFit::GetRunNumber ( Run_t  run  ) 
Run_t OscFit::GetRunPeriod ( RunType_t  runtype  ) 
RunType_t OscFit::GetRunType ( Run_t  run  ) 

Definition at line 141 of file twoflavours/OscFit.cxx.

References kBeamOff, kFHC, kNoRun, kRHC, kRunI, kRunIHE, kRunII, kRunIII, kRunIV, kRunIVFHC, kRunIX, kRunV, kRunVI, kRunVII, kRunVIII, and kRunX.

00142   {
00143     switch( run ){
00144       case kNoRun:         return kBeamOff;
00145       case kRunI:          return kFHC;
00146       case kRunIHE:        return kFHC;
00147       case kRunII:         return kFHC;
00148       case kRunIII:        return kFHC;
00149       case kRunIVFHC:      return kFHC;
00150       case kRunIV:         return kRHC;
00151       case kRunV:          return kFHC;
00152       case kRunVI:         return kFHC;
00153       case kRunVII:        return kRHC;
00154       case kRunVIII:       return kFHC;
00155       case kRunIX:         return kRHC;
00156       case kRunX:          return kFHC;
00157       default:             return kBeamOff;
00158     }
00159   }

RunType_t OscFit::GetRunType ( Int_t  iruntype  ) 
Sample_t OscFit::GetSample ( Int_t  isample  ) 

Definition at line 223 of file twoflavours/OscFit.cxx.

References kCV, kCVTau, kData, kRock, kRockTau, and kUnknown.

Referenced by OscFit::TemplateMap::BuildTemplates(), OscFit::TemplatesForBeamData::BuildTemplates(), OscFit::TemplateMaker::BuildTemplatesCC2010(), OscFit::TemplateMaker::BuildTemplatesCC2012(), OscFit::TemplateMap::PrintTemplates(), OscFit::TemplateMap::ReadTemplates(), and OscFit::TemplateMap::WriteTemplates().

00224   {
00225     switch( isample ){
00226       case 0:              return kData;
00227       case 1:              return kCV;
00228       case 2:              return kRock;
00229       case 3:              return kCVTau;
00230       case 4:              return kRockTau;
00231       default:             return kUnknown;
00232     }
00233   }

Int_t OscFit::GetSampleNumber ( Sample_t  sample  ) 
Shift_t OscFit::GetShift ( Int_t  ishift  ) 

Definition at line 304 of file twoflavours/OscFit.cxx.

References kMinus1, kMinus2, kNoShift, kPlus1, and kPlus2.

Referenced by OscFit::TemplateMaker::AddData(), OscFit::TemplateMap::BuildTemplates(), OscFit::TemplatesForBeamData::BuildTemplates(), OscFit::TemplateMaker::BuildTemplatesCC2010(), OscFit::TemplateMaker::BuildTemplatesCC2012(), OscFit::TemplateMap::ReadTemplates(), and OscFit::TemplateMap::WriteTemplates().

00305   {
00306     switch( ishift ){
00307       case 0:              return kMinus2;
00308       case 1:              return kMinus1;
00309       case 2:              return kPlus1;
00310       case 3:              return kPlus2;
00311       default:             return kNoShift;
00312     }
00313   }

Int_t OscFit::GetShiftNumber ( Shift_t  shift  ) 
Source_t OscFit::GetSource ( RunType_t  runtype  ) 
Source_t OscFit::GetSource ( Run_t  run  ) 
Source_t OscFit::GetSource ( Int_t  isource  ) 
Systematic_t OscFit::GetSystematic ( Int_t  isystematic  ) 
Int_t OscFit::GetSystematicNumber ( Systematic_t  syst  ) 
Topology_t OscFit::GetTopology ( Int_t  itopology  ) 
TH1D * OscFit::GetTrueSpectrum ( TH2D *  hist  ) 

Definition at line 56 of file TemplateTools.cxx.

00057   {
00058     // sanity check
00059     if( hist==0 ) return 0;
00060 
00061     // generate name
00062     TString histName = hist->GetName(); histName.Append("_TrueEnergy");
00063 
00064     // make new histogram
00065     TAxis* Axis = hist->GetXaxis(); // x-axis: true energy
00066     Int_t numBins = Axis->GetNbins();
00067     const Double_t* binEdges = Axis->GetXbins()->GetArray();  
00068   
00069     TH1D* hist1D = new TH1D(histName.Data(),"",numBins,binEdges);
00070     hist1D->GetXaxis()->SetTitle("True Energy / GeV");
00071     hist1D->GetXaxis()->SetTitleOffset(1.1);
00072     hist1D->GetXaxis()->CenterTitle();
00073     hist1D->SetLineWidth(2);
00074 
00075     for( Int_t itrue=0; itrue<hist->GetXaxis()->GetNbins(); itrue++ ){
00076       Double_t Etrue = hist->GetXaxis()->GetBinCenter( itrue+1 );
00077       for( Int_t ireco=0; ireco<hist->GetYaxis()->GetNbins(); ireco++ ){
00078         Double_t numEvents = hist->GetBinContent( itrue+1, ireco+1 );
00079         hist1D->Fill( Etrue, numEvents );
00080       }
00081     }
00082 
00083     return hist1D;
00084   }

TH1D * OscFit::GetWeightedSpectrum ( TH1D *  hist  ) 

Definition at line 130 of file TemplateTools.cxx.

Referenced by GetWeightedSpectrumWithErrors(), and GetWeightedSpectrumWithoutErrors().

00131   {
00132     // sanity check
00133     if( hist==0 ) return 0;
00134 
00135     // New Bin Width 
00136     // (i.e. the 'XX' in Events Per XX GeV)
00137     Double_t newBinWidth = 1.0; // Could get bin width from
00138                                 // 2nd bin of histogram
00139     // generate name
00140     TString histName = hist->GetName(); histName.Append("_Weighted");
00141 
00142     // make new histogram
00143     TAxis* Axis = hist->GetXaxis(); 
00144     Int_t numBins = Axis->GetNbins();
00145     const Double_t* binEdges = Axis->GetXbins()->GetArray();  
00146     TString Title = Axis->GetTitle();
00147 
00148     TH1D* histNew = new TH1D(histName.Data(),"",numBins,binEdges);
00149     histNew->GetXaxis()->SetTitle( Title.Data() );
00150     histNew->GetYaxis()->SetTitle(" Events / GeV "); // NEED TO SET PROPERLY !!
00151     histNew->GetXaxis()->SetTitleOffset(1.1);
00152     histNew->GetYaxis()->SetTitleOffset(1.1);
00153     histNew->GetXaxis()->CenterTitle();
00154     histNew->GetYaxis()->CenterTitle();
00155     histNew->SetLineWidth(2);
00156 
00157     for( Int_t i=0; i<hist->GetXaxis()->GetNbins(); i++ ){
00158       Double_t binContent = hist->GetBinContent( i+1 );
00159       Double_t binError = hist->GetBinError( i+1 );
00160       Double_t binWidth = hist->GetXaxis()->GetBinWidth( i+1 );
00161 
00162       histNew->SetBinContent( i+1, binContent/(binWidth/newBinWidth) );
00163       histNew->SetBinError( i+1, binError/(binWidth/newBinWidth) );
00164     }
00165 
00166     return histNew;
00167   }

TH1D * OscFit::GetWeightedSpectrumWithErrors ( TH1D *  hist  ) 

Definition at line 200 of file TemplateTools.cxx.

References GetWeightedSpectrum().

Referenced by GetDisplaySpectrumForData().

00201   {
00202     // sanity check
00203     if( hist==0 ) return 0;
00204 
00205     // generate name
00206     TString histName = hist->GetName(); histName.Append("_WithErrors");
00207 
00208     // make new histogram
00209     TAxis* Axis = hist->GetXaxis(); 
00210     Int_t numBins = Axis->GetNbins();
00211     const Double_t* binEdges = Axis->GetXbins()->GetArray();  
00212     TString Title = Axis->GetTitle();
00213 
00214     TH1D* histNew = new TH1D(histName.Data(),"",numBins,binEdges);
00215     histNew->GetXaxis()->SetTitle( Title.Data() );
00216     histNew->GetXaxis()->SetTitleOffset(1.1);
00217     histNew->GetXaxis()->CenterTitle();
00218     histNew->SetLineWidth(2);
00219 
00220     for( Int_t i=0; i<hist->GetXaxis()->GetNbins(); i++ ){
00221       Double_t binContent = hist->GetBinContent( i+1 );
00222       histNew->SetBinContent( i+1, binContent );
00223       histNew->SetBinError( i+1, sqrt(binContent) );
00224     }
00225 
00226     return GetWeightedSpectrum( histNew );
00227   }

TH1D * OscFit::GetWeightedSpectrumWithoutErrors ( TH1D *  hist  ) 

Definition at line 169 of file TemplateTools.cxx.

References GetWeightedSpectrum().

Referenced by GetDisplaySpectrumForBkg(), and GetDisplaySpectrumForMC().

00170   {
00171     // sanity check
00172     if( hist==0 ) return 0;
00173 
00174     // generate name
00175     TString histName = hist->GetName(); histName.Append("_WithoutErrors");
00176 
00177     // make new histogram
00178     TAxis* Axis = hist->GetXaxis(); 
00179     Int_t numBins = Axis->GetNbins();
00180     const Double_t* binEdges = Axis->GetXbins()->GetArray();  
00181     TString Title = Axis->GetTitle();
00182 
00183     TH1D* histNew = new TH1D(histName.Data(),"",numBins,binEdges);
00184     histNew->GetXaxis()->SetTitle( Title.Data() );
00185     histNew->GetXaxis()->SetTitleOffset(1.1);
00186     histNew->GetXaxis()->CenterTitle();
00187     histNew->SetLineWidth(2);
00188 
00189     for( Int_t i=0; i<hist->GetXaxis()->GetNbins(); i++ ){
00190       Double_t binContent = hist->GetBinContent( i+1 );
00191       Double_t binError = hist->GetBinError( i+1 );
00192 
00193       histNew->SetBinContent( i+1, binContent );
00194       if( binError>0.0 ) histNew->SetBinError( i+1, 0.0 );
00195     }
00196 
00197     return GetWeightedSpectrum( histNew );
00198   }

void OscFit::Interpolate ( Double_t  x,
Double_t &  w_m2,
Double_t &  w_m1,
Double_t &  w_0,
Double_t &  w_p1,
Double_t &  w_p2 
)

Definition at line 7 of file twoflavours/Interpolation.cxx.

References InterpolateLinear().

Referenced by OscFit::TemplateCalculator::GetDeltaExpectation(), and OscFit::TemplateCalculator::GetExpectation().

00008   {
00009     return InterpolateLinear(x, w_m2, w_m1, w_0, w_p1, w_p2);
00010   }

void OscFit::InterpolateCubic ( Double_t  x,
Double_t &  w_m2,
Double_t &  w_m1,
Double_t &  w_0,
Double_t &  w_p1,
Double_t &  w_p2 
)

Definition at line 25 of file twoflavours/Interpolation.cxx.

References n.

Referenced by InterpolateNew().

00026   {
00027     Double_t weight = 1.0;
00028     Double_t dx = 1.0; 
00029 
00030     Double_t fW[5] = {  0.0,  0.0, 0.0,  0.0,  0.0 };
00031     Double_t fX[5] = { -2.0, -1.0, 0.0, +1.0, +2.0 };
00032 
00033     for( Int_t n=-1; n<5; n++ ){
00034       if( ( n==-1 && x<fX[0] )
00035        || ( n==+4 && x>=fX[4] )
00036        || ( n<4 && x>=fX[n] && x<fX[n+1] ) ){
00037 
00038         if( n>=0 && n<=3 
00039          && x>=fX[n] && x<fX[n+1] ){
00040           dx = fabs(fX[n+1]-fX[n]);
00041           weight = dx*dx*dx;
00042           fW[n]   += -weight*(x-fX[n+1])/(fX[n+1]-fX[n]);
00043           fW[n+1] += +weight*(x-fX[n])/(fX[n+1]-fX[n]);
00044         }
00045         
00046         if( n>=1 && n<=4 ){
00047           if( n<=3 ) dx = fabs(x-fX[n+1]);
00048           else dx = fabs(fX[n]-fX[n-1]);
00049           weight = dx*dx*dx; 
00050           fW[n-1] += -weight*(x-fX[n])/(fX[n]-fX[n-1]);
00051           fW[n]   += +weight*(x-fX[n-1])/(fX[n]-fX[n-1]);
00052         }
00053 
00054         if( n>=-1 && n<=2 ) {   
00055           if( n>=0 ) dx = fabs(x-fX[n]);
00056           else dx = fabs(fX[n+2]-fX[n+1]);
00057           weight = dx*dx*dx;
00058           fW[n+1] += -weight*(x-fX[n+2])/(fX[n+2]-fX[n+1]);
00059           fW[n+2] += +weight*(x-fX[n+1])/(fX[n+2]-fX[n+1]);
00060         }
00061       }
00062     }
00063 
00064     weight = 0.0;
00065      
00066     for( Int_t n=0; n<5; n++ ){
00067       weight += fW[n];
00068     }
00069 
00070     if( weight>0.0 ){
00071       for( Int_t n=0; n<5; n++ ){
00072         fW[n] /= weight;
00073       }
00074     }
00075     else{
00076       fW[2] = 1.0;
00077     }
00078 
00079     w_m2 = fW[0];
00080     w_m1 = fW[1];
00081     w_0  = fW[2];
00082     w_p1 = fW[3];
00083     w_p2 = fW[4];
00084 
00085     return;
00086   }

void OscFit::InterpolateLinear ( Double_t  x,
Double_t &  w_m2,
Double_t &  w_m1,
Double_t &  w_0,
Double_t &  w_p1,
Double_t &  w_p2 
)

Definition at line 12 of file twoflavours/Interpolation.cxx.

Referenced by Interpolate().

00013   {
00014     Double_t alpha = 0.5;                  //  alpha = 0
00015 
00016     w_m2 = -0.5*x*alpha/(2.0*alpha+1.0);   //  0.0;        
00017     w_m1 = -0.5*x/(2.0*alpha+1.0);         // -0.5*x;
00018     w_0  = +1.0;                           //  1.0;
00019     w_p1 = +0.5*x/(2.0*alpha+1.0);         // +0.5*x;
00020     w_p2 = +0.5*x*alpha/(2.0*alpha+1.0);   //  0.0;
00021 
00022     return;
00023   }

void OscFit::InterpolateNew ( Double_t  y_m2,
Double_t  y_m1,
Double_t  y_0,
Double_t  y_p1,
Double_t  y_p2,
Double_t  x,
Double_t &  y 
)

Definition at line 88 of file twoflavours/Interpolation.cxx.

References InterpolateCubic().

00089   {
00090     Double_t w_m2 = 0.0;
00091     Double_t w_m1 = 0.0;
00092     Double_t w_0  = 1.0;
00093     Double_t w_p1 = 0.0;
00094     Double_t w_p2 = 0.0;
00095 
00096     InterpolateCubic( x, w_m2, w_m1, w_0, w_p1, w_p2 );
00097 
00098     y = w_m2*y_m2 + w_m1*y_m1 + w_0*y_0 + w_p1*y_p1 + w_p2*y_p2;
00099     
00100     return;
00101   }

void OscFit::InterpolateOld ( Double_t  y_m2,
Double_t  y_m1,
Double_t  y_0,
Double_t  y_p1,
Double_t  y_p2,
Double_t  x,
Double_t &  y 
)

Definition at line 103 of file twoflavours/Interpolation.cxx.

References n.

00104   {
00105     Double_t dx = 1.0; 
00106 
00107     Double_t fX[5] = { -2.0, -1.0, 0.0, +1.0, +2.0 };
00108     Double_t fY[5] = { y_m2, y_m1, y_0, y_p1, y_p2 };
00109 
00110     y  = fY[2];
00111 
00112     for( Int_t n=-1; n<5; n++ ){
00113       if( ( n==-1 && x<fX[0] )
00114        || ( n==+4 && x>=fX[4] )
00115        || ( n<4 && x>=fX[n] && x<fX[n+1] ) ){
00116 
00117         Double_t y_0 = fY[n];
00118         Double_t w_0 = 0.0;
00119         if( n>=0 && n<=3 
00120          && x>=fX[n] && x<fX[n+1] ){
00121           y_0 = (fY[n+1]*(x-fX[n])-fY[n]*(x-fX[n+1]))/(fX[n+1]-fX[n]);
00122           dx = fabs(fX[n+1]-fX[n]);
00123           w_0 = dx*dx*dx;
00124         }
00125         
00126         Double_t y_p = y_0;
00127         Double_t w_p = 0.0;
00128         if( n>=1 && n<=4 ){
00129           y_p = (fY[n]*(x-fX[n-1])-fY[n-1]*(x-fX[n]))/(fX[n]-fX[n-1]);
00130           if( n<=3 ) dx = fabs(x-fX[n+1]);
00131           else dx = fabs(fX[n]-fX[n-1]);
00132           w_p = dx*dx*dx; 
00133         }
00134 
00135         Double_t y_m = y_0;
00136         Double_t w_m = 0.0;
00137         if( n>=-1 && n<=2 ) { 
00138           y_m = (fY[n+2]*(x-fX[n+1])-fY[n+1]*(x-fX[n+2]))/(fX[n+2]-fX[n+1]);
00139           if( n>=0 ) dx = fabs(x-fX[n]);
00140           else dx = fabs(fX[n+2]-fX[n+1]);
00141           w_m = dx*dx*dx;
00142         }
00143 
00144         if( w_m + w_0 + w_p>0.0 ){
00145           y = ( y_m*w_m+y_0*w_0+y_p*w_p ) / ( w_m+w_0+w_p );
00146         }
00147       }
00148     }
00149 
00150     return;
00151   }

Bool_t OscFit::IsMINOSPlus ( Run_t  run  ) 
double OscFit::MeanMuonProdHeight ( double  CosZen,
double  Energy 
)
double OscFit::MeanPionProdHeight ( double  CosZen,
double  Energy 
)
double OscFit::MuonPdfA ( double  CosZen,
double  Energy 
)
double OscFit::MuonPdfB ( double  CosZen,
double  Energy 
)
Int_t OscFit::Nue2Numu ( Int_t  ipdg  ) 
Int_t OscFit::Nue2Nutau ( Int_t  ipdg  ) 
Int_t OscFit::Numu2Nue ( Int_t  ipdg  ) 
Int_t OscFit::Numu2Nutau ( Int_t  ipdg  ) 
Int_t OscFit::Nutau2Nue ( Int_t  ipdg  ) 
Int_t OscFit::Nutau2Numu ( Int_t  ipdg  ) 
Int_t OscFit::OscillateBackward ( Int_t  ipdg,
OscType_t  osctype 
)
Int_t OscFit::OscillateForward ( Int_t  ipdg,
OscType_t  osctype 
)
double OscFit::PDFMeanMuonProdHeight ( double  CosZen,
double  Energy 
)
double OscFit::PDFMeanPionProdHeight ( double  CosZen,
double  Energy 
)
double OscFit::PDFRndmMuonProdHeight ( double  CosZen,
double  Energy 
)
double OscFit::PDFRndmPionProdHeight ( double  CosZen,
double  Energy 
)
double OscFit::PionPdfA ( double  CosZen,
double   
)
double OscFit::PionPdfB ( double  CosZen,
double   
)
Double_t OscFit::PropagationDistance (  ) 
Double_t OscFit::Sinsq12 (  ) 
Double_t OscFit::Sinsq13 (  ) 
Double_t OscFit::Sinsq23 (  ) 
TH1D * OscFit::SwitchToLogBinning ( TH1D *  hist  ) 
Double_t OscFit::Syst_Atmos_CV_FlavRatio (  ) 
Double_t OscFit::Syst_Atmos_CV_NCRatio (  ) 
Double_t OscFit::Syst_Atmos_CV_Norm (  ) 
Double_t OscFit::Syst_Atmos_CV_NueChgRatio (  ) 
Double_t OscFit::Syst_Atmos_CV_NumuChgRatio (  ) 
Double_t OscFit::Syst_Atmos_CV_Spec_Nue (  ) 
Double_t OscFit::Syst_Atmos_CV_Spec_NueBar (  ) 
Double_t OscFit::Syst_Atmos_CV_Spec_Numu (  ) 
Double_t OscFit::Syst_Atmos_CV_Spec_NumuBar (  ) 
Double_t OscFit::Syst_Atmos_CV_UpDnRatio (  ) 
Double_t OscFit::Syst_Atmos_Nue_Energy (  ) 
Double_t OscFit::Syst_Atmos_Numu_ShwEn (  ) 
Double_t OscFit::Syst_Atmos_Numu_TrkEn (  ) 
Double_t OscFit::Syst_Atmos_Numu_TrkEn_Exit (  ) 
Double_t OscFit::Syst_Atmos_Rock_ChgRatio (  ) 
Double_t OscFit::Syst_Atmos_Rock_Norm (  ) 
Double_t OscFit::Syst_Atmos_Rock_Spec_Nu (  ) 
Double_t OscFit::Syst_Atmos_Rock_Spec_NuBar (  ) 
Double_t OscFit::Syst_Beam_Nue_Energy (  ) 
Double_t OscFit::Syst_Beam_Nue_NCBkg (  ) 
Double_t OscFit::Syst_Beam_Nue_Norm (  ) 
Double_t OscFit::Syst_Beam_Numu_NCBkg (  ) 
Double_t OscFit::Syst_Beam_Numu_Norm (  ) 
Double_t OscFit::Syst_Beam_Numu_ShwEn (  ) 
Double_t OscFit::Syst_Beam_Numu_TrkEn (  ) 
Double_t OscFit::Syst_Beam_Numu_TrkEn_Exit (  ) 
Double_t OscFit::Theta12 (  ) 
Double_t OscFit::Theta13 (  ) 
Double_t OscFit::Theta23 (  ) 

Generated on 15 Nov 2018 for loon by  doxygen 1.6.1