GhostSample Class Reference

#include <GhostSample.h>

List of all members.

Public Member Functions

 GhostSample (TString)
 GhostSample (TString, GhostInputs *)
 ~GhostSample ()
void SetSampleType (Int_t sample)
void SetNumDistributions (Int_t dis)
void SetNumResolutionBins (Int_t res)
void SetNum2DSystematics (Int_t systs)
void SetNum1DSystematics (Int_t systs)
void SetNumDm2Bins (Int_t dm2bins)
void SetDm2Limits (Double_t dm2min, Double_t dm2max)
void SetDataPoT (Double_t pot)
void SetNewDataPoT (Double_t pot)
void SetNumFitBins (Int_t fitbins)
void SetFitBinning (Double_t *fittingbinning)
void SetConstantFitBinning (Bool_t flag=0)
void FinaliseSample ()
void Add2DCentralFile (Char_t *filename, Int_t detrock_label, Int_t dis_label, Int_t res_label, Char_t *hist_max, Char_t *hist_min)
void Add2DSystematicFile (Char_t *filename, Int_t detrock_label, Int_t dis_label, Int_t res_label, Char_t *maxhist_p2, Char_t *maxhist_p1, Char_t *maxhist_m1, Char_t *maxhist_m2, Char_t *minhist_p2, Char_t *minhist_p1, Char_t *minhist_m1, Char_t *minhist_m2)
void Add2D_1D_SystematicFile (Char_t *filename, Int_t detrock_label, Int_t dis_label, Int_t res_label, Char_t *maxhist_p2, Char_t *maxhist_p1, Char_t *maxhist_m1, Char_t *maxhist_m2, Char_t *minhist_p2, Char_t *minhist_p1, Char_t *minhist_m1, Char_t *minhist_m2)
void Add2DSystematicFile (Int_t detrock_label, Int_t dis_label, Int_t res_label, Int_t null)
void Add2DBackgroundFile (Char_t *filename, Int_t detrock_label, Int_t dis_label, Int_t res_label, Char_t *hist_max, Char_t *hist_min)
void Add2DTauBackgroundFile (Char_t *filename, Int_t detrock_label, Int_t dis_label, Int_t res_label, Char_t *hist_max, Char_t *hist_min)
void Add2DCentralFile (Char_t *filename, Int_t dis_label, Int_t res_label, Char_t *hist_central)
void Add2DSystematicFile (Char_t *filename, Int_t dis_label, Int_t res_label, Char_t *hist_p2, Char_t *hist_p1, Char_t *hist_m1, Char_t *hist_m2)
void Add1DCentralFile (Char_t *filename, Int_t detrock_label, Int_t dis_label, Int_t res_label, Char_t *hist_central)
void Add1DSystematicFile (Char_t *filename, Int_t detrock_label, Int_t dis_label, Int_t res_label, Char_t *hist_p2, Char_t *hist_p1, Char_t *hist_m1, Char_t *hist_m2)
void Add1DSystematicFile (Int_t dis_label, Int_t res_label, Int_t null)
void Add2DBackgroundFile (Char_t *filename, Int_t dis_label, Int_t res_label, Char_t *hist_2D)
void Add2DTauBackgroundFile (Char_t *filename, Int_t dis_label, Int_t res_label, Char_t *hist_2D)
void Add2DMicroDST (Char_t *filename, Int_t dis_label, TString ntuplename)
void Add2DTauMicroDST (Char_t *filename, Int_t dis_label, TString ntuplename)
void SetOutputFilename (TString outputfile)
void MakeOscillatedSpectra ()
void MakeOscillatedSpectraBinCentre ()
void MakeNeutralCurrentSpectra ()
void InterpolateOscillatedSpectra (Bool_t tau, Double_t, Double_t, TH1D *, TH2D *, ArrayTH1D *)
void InterpolateOscillatedSpectra (Bool_t tau, Double_t, Double_t, Double_t, TH1D *, TH2D *, ArrayTH1D *)
void Pause ()
void GetSpectrum (Double_t sin2, Double_t dm2, Double_t cc_det, Double_t cc_rock, Double_t nc_scale, Double_t numubar_scale, Double_t *systscale2d, Double_t *systscale1d, vector< vector< ArrayTH1D * > > &ret_object, TFile *fOutputFile, TString label, Double_t mu2=0)
void GetSpectrum (Double_t sin2, Double_t dm2, Double_t cc_det, Double_t cc_rock, Double_t nc_scale, Double_t numubar_scale, Double_t *systscale2d, Double_t *systscale1d, vector< vector< ArrayTH1D * > > &ret_object, Bool_t write_flag, Double_t mu2=0)
TH1D * GetSpectrum (Double_t sin2, Double_t dm2, Int_t rock_det, Int_t dis, Int_t res)

Private Member Functions

void MakeVectorContainers ()
void OscillateExtrapolatedTemplate (TH2D *, vector< TH2D * >, TH2D *, TH2D *, TH1D *, Bool_t)
void FillHistogramsFromDST (TChain *, Int_t)
void InterpMin (ArrayTH1D *hist, vector< vector< vector< vector< ArrayTH1D * > > > >, Double_t shift_ns, Int_t dis_index, Int_t res_index, Int_t syst_index)
void ResetPredictionVectors ()
void InitialisePredictionVectors ()
void MakeOscillatedHistogramBinCentre (TH2D *, TH2D *, TH1D *, Bool_t)

Private Attributes

GhostInputsgGhostInputs
Bool_t fContainer
TString fSampleName
TString fOutputFilename
Int_t fNDis
Int_t fNResBins
Int_t fNum2DSysts
Int_t fNum1DSysts
Int_t fNumDm2Bins
Double_t fDm2Min
Double_t fDm2Max
Double_t * fEdgesEFittingBinsArray
Int_t fNumFittingBins
Double_t fMaxEnergy
Bool_t fArrayHistsFlag
Bool_t fVectorContainerFlag
Int_t fSampleType
Bool_t ccPreSelected
Bool_t ccSelected
Bool_t ncPreSelected
Bool_t ncSelected
Bool_t rockPreSelected
Bool_t rockSelected
Float_t energy
Float_t neuEnMC
Int_t iaction
Float_t resolution
Int_t charge
Int_t inu
Int_t binNumber
Int_t resBin
TH1D * hDm2Array
TH2D * hOscillated2D
TH1D * hOscillated1D
vector< TFile * > vFile
vector< TChain * > vMicroDSTTree
vector< TChain * > v2DTauMicroDSTTree
vector< vector< Int_t > > v2DSystCounter2D
vector< Int_t > v2DSystCounter
vector< vector< Int_t > > v2D_1D_SystCounter2D
vector< Int_t > v2D_1D_SystCounter
vector< vector< Int_t > > v1DSystCounter2D
vector< Int_t > v1DSystCounter
vector< Double_t > vDataPoT
vector< Double_t > vNewDataPoT
vector< vector< vector< vector
< TH2D * > > > > 
v2DNuMuTemplates4D
vector< vector< vector< TH2D * > > > v2DNuMuTemplates3D
vector< vector< TH2D * > > v2DNuMuTemplates2D
vector< TH2D * > v2DNuMuTemplates1D
vector< vector< vector< vector
< vector< TH1D * > > > > > 
v1DTemplates5D
vector< vector< vector< vector
< TH1D * > > > > 
v1DTemplates4D
vector< vector< vector< TH1D * > > > v1DTemplates3D
vector< vector< TH1D * > > v1DTemplates2D
vector< TH1D * > v1DTemplates1D
vector< vector< vector< TH2D * > > > v2DNuMuBarTemplates3D
vector< vector< TH2D * > > v2DNuMuBarTemplates2D
vector< TH2D * > v2DNuMuBarTemplates1D
vector< vector< vector< TH2D * > > > v2DNuTauTemplates3D
vector< vector< TH2D * > > v2DNuTauTemplates2D
vector< TH2D * > v2DNuTauTemplates1D
vector< vector< vector< vector
< vector< TH2D * > > > > > 
v2DOscillatedTemplatesSin2Max5D
vector< vector< vector< vector
< TH2D * > > > > 
v2DOscillatedTemplatesSin2Max4D
vector< vector< vector< TH2D * > > > v2DOscillatedTemplatesSin2Max3D
vector< vector< TH2D * > > v2DOscillatedTemplatesSin2Max2D
vector< TH2D * > v2DOscillatedTemplatesSin2Max1D
vector< vector< vector< vector
< vector< TH1D * > > > > > 
v2DOscillatedTemplatesSin2Min5D
vector< vector< vector< vector
< TH1D * > > > > 
v2DOscillatedTemplatesSin2Min4D
vector< vector< vector< TH1D * > > > v2DOscillatedTemplatesSin2Min3D
vector< vector< TH1D * > > v2DOscillatedTemplatesSin2Min2D
vector< TH1D * > v2DOscillatedTemplatesSin2Min1D
vector< vector< vector< vector
< TH2D * > > > > 
v2DBkgOscillatedTemplatesSin2Max4D
vector< vector< vector< TH2D * > > > v2DBkgOscillatedTemplatesSin2Max3D
vector< vector< TH2D * > > v2DBkgOscillatedTemplatesSin2Max2D
vector< TH2D * > v2DBkgOscillatedTemplatesSin2Max1D
vector< vector< vector< vector
< TH1D * > > > > 
v2DBkgOscillatedTemplatesSin2Min4D
vector< vector< vector< TH1D * > > > v2DBkgOscillatedTemplatesSin2Min3D
vector< vector< TH1D * > > v2DBkgOscillatedTemplatesSin2Min2D
vector< TH1D * > v2DBkgOscillatedTemplatesSin2Min1D
vector< vector< vector< vector
< TH2D * > > > > 
v2DTauOscillatedTemplatesSin2Max4D
vector< vector< vector< TH2D * > > > v2DTauOscillatedTemplatesSin2Max3D
vector< vector< TH2D * > > v2DTauOscillatedTemplatesSin2Max2D
vector< TH2D * > v2DTauOscillatedTemplatesSin2Max1D
vector< vector< vector< vector
< TH1D * > > > > 
v2DTauOscillatedTemplatesSin2Min4D
vector< vector< vector< TH1D * > > > v2DTauOscillatedTemplatesSin2Min3D
vector< vector< TH1D * > > v2DTauOscillatedTemplatesSin2Min2D
vector< TH1D * > v2DTauOscillatedTemplatesSin2Min1D
vector< vector< vector< vector
< vector< TH2D * > > > > > 
v2D_1D_OscillatedTemplatesSin2Max5D
vector< vector< vector< vector
< TH2D * > > > > 
v2D_1D_OscillatedTemplatesSin2Max4D
vector< vector< vector< TH2D * > > > v2D_1D_OscillatedTemplatesSin2Max3D
vector< vector< TH2D * > > v2D_1D_OscillatedTemplatesSin2Max2D
vector< TH2D * > v2D_1D_OscillatedTemplatesSin2Max1D
vector< vector< vector< vector
< vector< TH1D * > > > > > 
v2D_1D_OscillatedTemplatesSin2Min5D
vector< vector< vector< vector
< TH1D * > > > > 
v2D_1D_OscillatedTemplatesSin2Min4D
vector< vector< vector< TH1D * > > > v2D_1D_OscillatedTemplatesSin2Min3D
vector< vector< TH1D * > > v2D_1D_OscillatedTemplatesSin2Min2D
vector< TH1D * > v2D_1D_OscillatedTemplatesSin2Min1D
vector< vector< vector< vector
< vector< ArrayTH1D * > > > > > 
v2DNewPredSpectrum5D
vector< vector< vector< vector
< ArrayTH1D * > > > > 
v2DNewPredSpectrum4D
vector< vector< vector
< ArrayTH1D * > > > 
v2DNewPredSpectrum3D
vector< vector< ArrayTH1D * > > v2DNewPredSpectrum2D
vector< ArrayTH1D * > v2DNewPredSpectrum1D
vector< vector< vector< vector
< vector< ArrayTH1D * > > > > > 
v2D_1D_NewPredSpectrum5D
vector< vector< vector< vector
< ArrayTH1D * > > > > 
v2D_1D_NewPredSpectrum4D
vector< vector< vector
< ArrayTH1D * > > > 
v2D_1D_NewPredSpectrum3D
vector< vector< ArrayTH1D * > > v2D_1D_NewPredSpectrum2D
vector< ArrayTH1D * > v2D_1D_NewPredSpectrum1D
vector< vector< vector< vector
< vector< ArrayTH1D * > > > > > 
v1DNewPredSpectrum5D
vector< vector< vector< vector
< ArrayTH1D * > > > > 
v1DNewPredSpectrum4D
vector< vector< vector
< ArrayTH1D * > > > 
v1DNewPredSpectrum3D
vector< vector< ArrayTH1D * > > v1DNewPredSpectrum2D
vector< ArrayTH1D * > v1DNewPredSpectrum1D
vector< vector< vector< vector
< ArrayTH1D * > > > > 
v2DBkgNewPredSpectrum4D
vector< vector< vector
< ArrayTH1D * > > > 
v2DBkgNewPredSpectrum3D
vector< vector< ArrayTH1D * > > v2DBkgNewPredSpectrum2D
vector< ArrayTH1D * > v2DBkgNewPredSpectrum1D
vector< vector< vector< vector
< ArrayTH1D * > > > > 
v2DTauNewPredSpectrum4D
vector< vector< vector
< ArrayTH1D * > > > 
v2DTauNewPredSpectrum3D
vector< vector< ArrayTH1D * > > v2DTauNewPredSpectrum2D
vector< ArrayTH1D * > v2DTauNewPredSpectrum1D
vector< vector< vector< TH2D * > > > vDSTOscillatedHistograms_CCNuMu3D
vector< vector< TH2D * > > vDSTOscillatedHistograms_CCNuMu2D
vector< TH2D * > vDSTOscillatedHistograms_CCNuMu1D
vector< vector< vector< TH2D * > > > vDSTOscillatedHistograms_CCNuMuBar3D
vector< vector< TH2D * > > vDSTOscillatedHistograms_CCNuMuBar2D
vector< TH2D * > vDSTOscillatedHistograms_CCNuMuBar1D
vector< vector< vector< TH2D * > > > vDSTOscillatedHistograms_CCNuTau3D
vector< vector< TH2D * > > vDSTOscillatedHistograms_CCNuTau2D
vector< TH2D * > vDSTOscillatedHistograms_CCNuTau1D
vector< vector< TH2D * > > vDSTUnoscillatedHistograms_CCNuMu2D
vector< TH2D * > vDSTUnoscillatedHistograms_CCNuMu1D
vector< vector< TH2D * > > vDSTUnoscillatedHistograms_CCNuMuBar2D
vector< TH2D * > vDSTUnoscillatedHistograms_CCNuMuBar1D
vector< vector< TH2D * > > vDSTUnoscillatedHistograms_CCNuTau2D
vector< TH2D * > vDSTUnoscillatedHistograms_CCNuTau1D
TH2D * hTesting

Friends

class GhostFakeData
class GhostFramework
class GhostRAFCombine
class GhostMerge

Detailed Description

Definition at line 44 of file GhostSample.h.


Constructor & Destructor Documentation

GhostSample::GhostSample ( TString  name  ) 

Definition at line 41 of file GhostSample.cxx.

References fSampleName, Msg::kInfo, MSG, v1DTemplates1D, v1DTemplates2D, v1DTemplates3D, v1DTemplates4D, v2DNuMuBarTemplates1D, v2DNuMuBarTemplates2D, v2DNuMuBarTemplates3D, v2DNuMuTemplates1D, v2DNuMuTemplates2D, v2DNuMuTemplates3D, v2DNuMuTemplates4D, v2DNuTauTemplates1D, v2DNuTauTemplates2D, and v2DNuTauTemplates3D.

00041                                      : 
00042   fContainer(false),
00043   fSampleName("Default"),
00044   fNDis(-999),
00045   fNum2DSysts(-999),
00046   fNum1DSysts(-999),
00047   fNumDm2Bins(100),
00048   fDm2Min(1.975e-3),
00049   fDm2Max(3.975e-3),
00050   fNumFittingBins(43),
00051   fMaxEnergy(100),
00052   fArrayHistsFlag(1),
00053   fVectorContainerFlag(0),
00054   fSampleType(-1),
00055   energy(-999.9),
00056   neuEnMC(-999.9),
00057   iaction(-999),
00058   resolution(-999.9),  
00059   charge(-999),
00060   inu(-999),
00061   binNumber(-1)
00062 {
00063   fSampleName = name;
00064   MSG("GhostSample",Msg::kInfo) << " *-* GhostSample::" << fSampleName.Data() << " *-* " << endl;
00065 
00066   v2DNuMuTemplates4D.clear(); v1DTemplates4D.clear();
00067   v2DNuMuTemplates3D.clear(); v1DTemplates3D.clear();
00068   v2DNuMuTemplates2D.clear(); v1DTemplates2D.clear();
00069   v2DNuMuTemplates1D.clear(); v1DTemplates1D.clear();
00070 
00071   v2DNuMuBarTemplates3D.clear(); v2DNuMuBarTemplates2D.clear(); v2DNuMuBarTemplates1D.clear();
00072   v2DNuTauTemplates3D.clear(); v2DNuTauTemplates2D.clear(); v2DNuTauTemplates1D.clear();
00073 }

GhostSample::GhostSample ( TString  name,
GhostInputs inputs 
)

Definition at line 75 of file GhostSample.cxx.

References GhostInputs::fArrayHistsFlag, fArrayHistsFlag, fDm2Max, GhostInputs::fDm2Max, GhostInputs::fDm2Min, fDm2Min, fNum1DSysts, GhostInputs::fNum1DSysts, GhostInputs::fNum2DSysts, fNum2DSysts, fNumDm2Bins, GhostInputs::fNumDm2BinsOverall, fSampleName, fVectorContainerFlag, gGhostInputs, Msg::kInfo, MSG, v1DTemplates1D, v1DTemplates2D, v1DTemplates3D, v1DTemplates4D, v2DNuMuBarTemplates1D, v2DNuMuBarTemplates2D, v2DNuMuBarTemplates3D, v2DNuMuTemplates1D, v2DNuMuTemplates2D, v2DNuMuTemplates3D, v2DNuMuTemplates4D, v2DNuTauTemplates1D, v2DNuTauTemplates2D, and v2DNuTauTemplates3D.

00075                                                          :
00076   fContainer(false),
00077   fSampleName("Default"),
00078   fNDis(-999),
00079   fNum2DSysts(-999),
00080   fNum1DSysts(-999),
00081   fNumDm2Bins(100),
00082   fDm2Min(1.975e-3),
00083   fDm2Max(3.975e-3),
00084   fNumFittingBins(43),
00085   fMaxEnergy(100),
00086   fArrayHistsFlag(1),
00087   fVectorContainerFlag(1),
00088   fSampleType(-1),
00089   energy(-999.9),
00090   neuEnMC(-999.9),
00091   iaction(-999),
00092   resolution(-999.9),
00093   charge(-999),
00094   inu(-999),
00095   binNumber(-1)
00096 {
00097   fSampleName = name;
00098   MSG("GhostSample",Msg::kInfo) << " *-* GhostSample::" << fSampleName.Data() << " *-* " << endl;
00099 
00100   v2DNuMuTemplates4D.clear(); v1DTemplates4D.clear();
00101   v2DNuMuTemplates3D.clear(); v1DTemplates3D.clear();
00102   v2DNuMuTemplates2D.clear(); v1DTemplates2D.clear();
00103   v2DNuMuTemplates1D.clear(); v1DTemplates1D.clear();
00104   v2DNuMuBarTemplates3D.clear(); v2DNuMuBarTemplates2D.clear(); v2DNuMuBarTemplates1D.clear();
00105   v2DNuTauTemplates3D.clear(); v2DNuTauTemplates2D.clear(); v2DNuTauTemplates1D.clear();
00106 
00107   gGhostInputs = inputs;
00108 
00109   //Fill variables from input flag
00110   fVectorContainerFlag = true;
00111   fNum2DSysts = inputs->fNum2DSysts;
00112   fNum1DSysts = inputs->fNum1DSysts;
00113   fArrayHistsFlag = inputs->fArrayHistsFlag;
00114   fDm2Min = inputs->fDm2Min;
00115   fDm2Max = inputs->fDm2Max;
00116   fNumDm2Bins = inputs->fNumDm2BinsOverall; //Either gets set by hand, or reads from inputs as OVERALL (parallel)
00117 }

GhostSample::~GhostSample (  ) 

Definition at line 119 of file GhostSample.cxx.

References fSampleName, Msg::kInfo, MSG, size, v1DNewPredSpectrum5D, v1DTemplates5D, v2D_1D_NewPredSpectrum5D, v2D_1D_OscillatedTemplatesSin2Max5D, v2D_1D_OscillatedTemplatesSin2Min5D, v2DBkgNewPredSpectrum4D, v2DBkgOscillatedTemplatesSin2Max4D, v2DBkgOscillatedTemplatesSin2Min4D, v2DNewPredSpectrum5D, v2DNuMuBarTemplates3D, v2DNuMuTemplates4D, v2DNuTauTemplates3D, v2DOscillatedTemplatesSin2Max5D, v2DOscillatedTemplatesSin2Min5D, v2DTauMicroDSTTree, v2DTauNewPredSpectrum4D, v2DTauOscillatedTemplatesSin2Max4D, v2DTauOscillatedTemplatesSin2Min4D, vFile, and vMicroDSTTree.

00120 {
00121   MSG("GhostSample",Msg::kInfo) << " *-* GhostSample::~GhostSample(" << fSampleName.Data() << ") *-* " << endl;
00122   
00123   for(UInt_t i=0;i<v2DNuMuTemplates4D.size();i++){
00124     for(UInt_t res=0;res<(v2DNuMuTemplates4D.at(i)).size();res++){
00125       for(UInt_t j=0;j<((v2DNuMuTemplates4D.at(i)).at(res)).size();j++){
00126         for(UInt_t k=0;k<(((v2DNuMuTemplates4D.at(i)).at(res)).at(j)).size();k++){
00127           if((((v2DNuMuTemplates4D.at(i)).at(res)).at(j)).size() > 0) delete (((v2DNuMuTemplates4D.at(i)).at(res)).at(j)).at(k);
00128         }
00129       }
00130     }
00131   }
00132   for(UInt_t rd=0;rd<v1DTemplates5D.size();rd++){
00133     for(UInt_t i=0;i<(v1DTemplates5D.at(rd)).size();i++){
00134       for(UInt_t res=0;res<((v1DTemplates5D.at(rd)).at(i)).size();res++){
00135         for(UInt_t j=0;j<(((v1DTemplates5D.at(rd)).at(i)).at(res)).size();j++){
00136           for(UInt_t k=0;k<((((v1DTemplates5D.at(rd)).at(i)).at(res)).at(j)).size();k++){
00137             if(((((v1DTemplates5D.at(rd)).at(i)).at(res)).at(j)).size() > 0) delete ((((v1DTemplates5D.at(rd)).at(i)).at(res)).at(j)).at(k);
00138           }
00139         }
00140       }
00141     }
00142   }
00143   for(UInt_t i=0;i<v2DNuMuBarTemplates3D.size();i++){
00144     for(UInt_t res=0;res<(v2DNuMuBarTemplates3D.at(i)).size();res++){
00145       for(UInt_t j=0;j<((v2DNuMuBarTemplates3D.at(i)).at(res)).size();j++){
00146         delete ((v2DNuMuBarTemplates3D.at(i)).at(res)).at(j);
00147       }
00148     }
00149   }
00150   for(UInt_t i=0;i<v2DNuTauTemplates3D.size();i++){
00151     for(UInt_t res=0;res<(v2DNuTauTemplates3D.at(i)).size();res++){
00152       for(UInt_t j=0;j<((v2DNuTauTemplates3D.at(i)).at(res)).size();j++){
00153         delete ((v2DNuTauTemplates3D.at(i)).at(res)).at(j);
00154       }
00155     }
00156   }
00157   for(UInt_t rd=0;rd<v2DOscillatedTemplatesSin2Max5D.size();rd++){
00158     for(UInt_t i=0;i<(v2DOscillatedTemplatesSin2Max5D.at(rd)).size();i++){
00159       for(UInt_t res=0;res<((v2DOscillatedTemplatesSin2Max5D.at(rd)).at(i)).size();res++){
00160         for(UInt_t j=0;j<(((v2DOscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).size();j++){
00161           for(UInt_t k=0;k<((((v2DOscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).size();k++){
00162             if(((((v2DOscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).size() > 0) delete ((((v2DOscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).at(k);
00163             if(((((v2DOscillatedTemplatesSin2Min5D.at(rd)).at(i)).at(res)).at(j)).size() > 0) delete ((((v2DOscillatedTemplatesSin2Min5D.at(rd)).at(i)).at(res)).at(j)).at(k);
00164           }
00165         }
00166       }
00167     }
00168   }
00169   for(UInt_t rd=0;rd<v2D_1D_OscillatedTemplatesSin2Max5D.size();rd++){
00170     for(UInt_t i=0;i<(v2D_1D_OscillatedTemplatesSin2Max5D.at(rd)).size();i++){
00171       for(UInt_t res=0;res<((v2D_1D_OscillatedTemplatesSin2Max5D.at(rd)).at(i)).size();res++){
00172         for(UInt_t j=1;j<(((v2D_1D_OscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).size();j++){
00173           for(UInt_t k=0;k<((((v2D_1D_OscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).size();k++){
00174             if(((((v2D_1D_OscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).size() > 0) delete ((((v2D_1D_OscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).at(k);
00175             if(((((v2D_1D_OscillatedTemplatesSin2Min5D.at(rd)).at(i)).at(res)).at(j)).size() > 0) delete ((((v2D_1D_OscillatedTemplatesSin2Min5D.at(rd)).at(i)).at(res)).at(j)).at(k);
00176           }
00177         }
00178       }
00179     }
00180   }
00181   for(UInt_t rd=0;rd<v2DBkgOscillatedTemplatesSin2Max4D.size();rd++){
00182     for(UInt_t i=0;i<(v2DBkgOscillatedTemplatesSin2Max4D.at(rd)).size();i++){
00183       for(UInt_t res=0;res<((v2DBkgOscillatedTemplatesSin2Max4D.at(rd)).at(i)).size();res++){
00184         for(UInt_t j=0;j<(((v2DBkgOscillatedTemplatesSin2Max4D.at(rd)).at(i)).at(res)).size();j++){
00185           if((((v2DBkgOscillatedTemplatesSin2Max4D.at(rd)).at(i)).at(res)).size() > 0) delete (((v2DBkgOscillatedTemplatesSin2Max4D.at(rd)).at(i)).at(res)).at(j);
00186           if((((v2DBkgOscillatedTemplatesSin2Max4D.at(rd)).at(i)).at(res)).size() > 0) delete (((v2DBkgOscillatedTemplatesSin2Min4D.at(rd)).at(i)).at(res)).at(j);
00187         }
00188       }
00189     }
00190   }
00191   for(UInt_t rd=0;rd<v2DTauOscillatedTemplatesSin2Max4D.size();rd++){
00192     for(UInt_t i=0;i<(v2DTauOscillatedTemplatesSin2Max4D.at(rd)).size();i++){
00193       for(UInt_t res=0;res<((v2DTauOscillatedTemplatesSin2Max4D.at(rd)).at(i)).size();res++){
00194         for(UInt_t j=0;j<(((v2DTauOscillatedTemplatesSin2Max4D.at(rd)).at(i)).at(res)).size();j++){
00195           if((((v2DTauOscillatedTemplatesSin2Max4D.at(rd)).at(i)).at(res)).size() > 0) delete (((v2DTauOscillatedTemplatesSin2Max4D.at(rd)).at(i)).at(res)).at(j);
00196           if((((v2DTauOscillatedTemplatesSin2Min4D.at(rd)).at(i)).at(res)).size() > 0) delete (((v2DTauOscillatedTemplatesSin2Min4D.at(rd)).at(i)).at(res)).at(j);
00197         }
00198       }
00199     }
00200   }
00201   for(UInt_t rd=0;rd<v2DNewPredSpectrum5D.size();rd++){
00202     for(UInt_t i=0;i<(v2DNewPredSpectrum5D.at(rd)).size();i++){
00203       for(UInt_t res=0;res<((v2DNewPredSpectrum5D.at(rd)).at(i)).size();res++){
00204         for(UInt_t j=0;j<(((v2DNewPredSpectrum5D.at(rd)).at(i)).at(res)).size();j++){
00205           for(UInt_t k=0;k<((((v2DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).size();k++){
00206             if(((((v2DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).size() > 0) delete ((((v2DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).at(k);
00207           }
00208         }
00209       }
00210     }
00211   }
00212   for(UInt_t rd=0;rd<v2D_1D_NewPredSpectrum5D.size();rd++){
00213     for(UInt_t i=0;i<(v2D_1D_NewPredSpectrum5D.at(rd)).size();i++){
00214       for(UInt_t res=0;res<((v2D_1D_NewPredSpectrum5D.at(rd)).at(i)).size();res++){
00215         for(UInt_t j=0;j<(((v2D_1D_NewPredSpectrum5D.at(rd)).at(i)).at(res)).size();j++){
00216           for(UInt_t k=0;k<((((v2D_1D_NewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).size();k++){
00217             if(((((v2D_1D_NewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).size() > 0) delete ((((v2D_1D_NewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).at(k);
00218           }
00219         }
00220       }
00221     }
00222   }
00223   for(UInt_t rd=0;rd<v1DNewPredSpectrum5D.size();rd++){
00224     for(UInt_t i=0;i<(v1DNewPredSpectrum5D.at(rd)).size();i++){
00225       for(UInt_t res=0;res<((v1DNewPredSpectrum5D.at(rd)).at(i)).size();res++){
00226         for(UInt_t j=0;j<(((v1DNewPredSpectrum5D.at(rd)).at(i)).at(res)).size();j++){
00227           for(UInt_t k=0;k<((((v1DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).size();k++){
00228             if(((((v1DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).size() > 0) delete ((((v1DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).at(k);
00229           }
00230         }
00231       }
00232     }
00233   }
00234   for(UInt_t rd=0;rd<v2DBkgNewPredSpectrum4D.size();rd++){
00235     for(UInt_t i=0;i<(v2DBkgNewPredSpectrum4D.at(rd)).size();i++){
00236       for(UInt_t res=0;res<((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).size();res++){
00237         for(UInt_t j=0;j<(((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).size();j++){
00238           if((((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).size() > 0) delete (((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j);
00239         }
00240       }
00241     }
00242   }
00243   for(UInt_t rd=0;rd<v2DTauNewPredSpectrum4D.size();rd++){
00244     for(UInt_t i=0;i<(v2DTauNewPredSpectrum4D.at(rd)).size();i++){
00245       for(UInt_t res=0;res<((v2DTauNewPredSpectrum4D.at(rd)).at(i)).size();res++){
00246         for(UInt_t j=0;j<(((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).size();j++){
00247           if((((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).size() > 0) delete (((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j);
00248         }
00249       }
00250     }
00251   }
00252   for(UInt_t i=0;i<vMicroDSTTree.size();i++){
00253     delete vMicroDSTTree.at(i);
00254   }
00255   for(UInt_t i=0;i<v2DTauMicroDSTTree.size();i++){
00256     delete v2DTauMicroDSTTree.at(i);
00257   }
00258   for(UInt_t i=0;i<vFile.size();i++){
00259     vFile.at(i)->Close();
00260     delete vFile.at(i);
00261   }
00262 }


Member Function Documentation

void GhostSample::Add1DCentralFile ( Char_t *  filename,
Int_t  detrock_label,
Int_t  dis_label,
Int_t  res_label,
Char_t *  hist_central 
) [inline]

Definition at line 176 of file GhostSample.h.

References fNDis, v1DTemplates5D, and vFile.

00176                                                                                                                   {
00177     if(dis_label<0 || dis_label>=fNDis ){cout << " *-* GhostSample::Add1DCentralFile() Inconsistant label, exiting *-*" << endl;return;}
00178     vFile.push_back(new TFile(filename,"read"));
00179     ((((v1DTemplates5D.at(detrock_label)).at(dis_label)).at(res_label)).at(0)).push_back((TH1D*)(vFile.back())->Get(hist_central));
00180     cout << " *-* GhostSample::Add1DCentralFile() File Added for Distribution #" << dis_label << " *-*" << endl;
00181   }

void GhostSample::Add1DSystematicFile ( Int_t  dis_label,
Int_t  res_label,
Int_t  null 
) [inline]

Definition at line 196 of file GhostSample.h.

References v1DSystCounter, v1DSystCounter2D, and v1DTemplates4D.

00196                                                                       {
00197     null = 0;
00198     (((v1DTemplates4D.at(dis_label)).at(res_label)).at((v1DSystCounter2D.at(0)).at(dis_label)+1)).push_back(0);
00199     v1DSystCounter.at(dis_label)++;
00200     cout << " *-* GhostSample::Add1DSystematicFile() placeholder NULL added for Distribution #" << dis_label << " *-*" << endl;
00201   }

void GhostSample::Add1DSystematicFile ( Char_t *  filename,
Int_t  detrock_label,
Int_t  dis_label,
Int_t  res_label,
Char_t *  hist_p2,
Char_t *  hist_p1,
Char_t *  hist_m1,
Char_t *  hist_m2 
) [inline]

Definition at line 183 of file GhostSample.h.

References fNDis, fNResBins, v1DSystCounter2D, v1DTemplates5D, and vFile.

00183                                                                                                                                                                 {
00184     if(dis_label<0 || dis_label>=fNDis ){cout << " *-* GhostSample::AddSystsFile() Inconsistant label, exiting *-*" << endl;return;}
00185     vFile.push_back(new TFile(filename,"read"));
00186     
00187     ((((v1DTemplates5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v1DSystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH1D*)(vFile.back())->Get(hist_p2));
00188     ((((v1DTemplates5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v1DSystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH1D*)(vFile.back())->Get(hist_p1));
00189     ((((v1DTemplates5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v1DSystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH1D*)(vFile.back())->Get(hist_m1));
00190     ((((v1DTemplates5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v1DSystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH1D*)(vFile.back())->Get(hist_m2));
00191     
00192     if(res_label == (fNResBins - 1))(v1DSystCounter2D.at(detrock_label)).at(dis_label)++;
00193     cout << " *-* GhostSample::Add1DSystematicFile() File Added for Distribution #" << dis_label << " *-*" << endl;
00194   }

void GhostSample::Add2D_1D_SystematicFile ( Char_t *  filename,
Int_t  detrock_label,
Int_t  dis_label,
Int_t  res_label,
Char_t *  maxhist_p2,
Char_t *  maxhist_p1,
Char_t *  maxhist_m1,
Char_t *  maxhist_m2,
Char_t *  minhist_p2,
Char_t *  minhist_p1,
Char_t *  minhist_m1,
Char_t *  minhist_m2 
) [inline]

Definition at line 114 of file GhostSample.h.

References fNDis, fNResBins, v2D_1D_OscillatedTemplatesSin2Max5D, v2D_1D_OscillatedTemplatesSin2Min5D, v2D_1D_SystCounter2D, and vFile.

00114                                                                                                                                                                                                                                                             {
00115     if(dis_label<0 || dis_label>=fNDis ){cout << " *-* GhostSample::AddSystsFile() Inconsistant label, exiting *-*" << endl;return;}
00116     vFile.push_back(new TFile(filename,"read"));
00117     ((((v2D_1D_OscillatedTemplatesSin2Max5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2D_1D_SystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH2D*)(vFile.back())->Get(maxhist_p2));
00118     ((((v2D_1D_OscillatedTemplatesSin2Max5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2D_1D_SystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH2D*)(vFile.back())->Get(maxhist_p1));
00119     ((((v2D_1D_OscillatedTemplatesSin2Max5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2D_1D_SystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH2D*)(vFile.back())->Get(maxhist_m1));
00120     ((((v2D_1D_OscillatedTemplatesSin2Max5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2D_1D_SystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH2D*)(vFile.back())->Get(maxhist_m2));
00121     ((((v2D_1D_OscillatedTemplatesSin2Min5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2D_1D_SystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH1D*)(vFile.back())->Get(minhist_p2));
00122     ((((v2D_1D_OscillatedTemplatesSin2Min5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2D_1D_SystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH1D*)(vFile.back())->Get(minhist_p1));
00123     ((((v2D_1D_OscillatedTemplatesSin2Min5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2D_1D_SystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH1D*)(vFile.back())->Get(minhist_m1));
00124     ((((v2D_1D_OscillatedTemplatesSin2Min5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2D_1D_SystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH1D*)(vFile.back())->Get(minhist_m2));
00125 
00126     if(res_label == (fNResBins - 1))(v2D_1D_SystCounter2D.at(detrock_label)).at(dis_label)++;
00127     cout << " *-* GhostSample::Add2DSystematicFile() File Added for Distribution #" << dis_label << " *-*" << endl;
00128   }

void GhostSample::Add2DBackgroundFile ( Char_t *  filename,
Int_t  dis_label,
Int_t  res_label,
Char_t *  hist_2D 
) [inline]

Definition at line 203 of file GhostSample.h.

References v2DNuMuBarTemplates3D, and vFile.

00203                                                                                             {
00204     vFile.push_back(new TFile(filename,"read"));
00205     ((v2DNuMuBarTemplates3D.at(dis_label)).at(res_label)).push_back((TH2D*)(vFile.back())->Get(hist_2D));
00206     cout << " *-* GhostSample::Add2DBackgroundFile() File Added for Distribution #" << dis_label << " *-*" << endl;
00207   }

void GhostSample::Add2DBackgroundFile ( Char_t *  filename,
Int_t  detrock_label,
Int_t  dis_label,
Int_t  res_label,
Char_t *  hist_max,
Char_t *  hist_min 
) [inline]

Definition at line 139 of file GhostSample.h.

References v2DBkgOscillatedTemplatesSin2Max4D, v2DBkgOscillatedTemplatesSin2Min4D, and vFile.

00139                                                                                                                                   {
00140     vFile.push_back(new TFile(filename,"read"));
00141     (((v2DBkgOscillatedTemplatesSin2Max4D.at(detrock_label)).at(dis_label)).at(res_label)).push_back((TH2D*)(vFile.back())->Get(hist_max));
00142     (((v2DBkgOscillatedTemplatesSin2Min4D.at(detrock_label)).at(dis_label)).at(res_label)).push_back((TH1D*)(vFile.back())->Get(hist_min));
00143     cout << " *-* GhostSample::Add2DBackgroundFile() File Added for Distribution #" << dis_label << " *-*" << endl;
00144   }

void GhostSample::Add2DCentralFile ( Char_t *  filename,
Int_t  dis_label,
Int_t  res_label,
Char_t *  hist_central 
) [inline]

Definition at line 155 of file GhostSample.h.

References fNDis, v2DNuMuTemplates4D, and vFile.

00155                                                                                               {
00156     if(dis_label<0 || dis_label>=fNDis ){cout << " *-* GhostSample::Add2DCentralFile() Inconsistant label, exiting *-*" << endl;return;}
00157     vFile.push_back(new TFile(filename,"read"));
00158     (((v2DNuMuTemplates4D.at(dis_label)).at(res_label)).at(0)).push_back((TH2D*)(vFile.back())->Get(hist_central));
00159     cout << " *-* GhostSample::Add2DCentralFile() File Added for Distribution #" << dis_label << " *-*" << endl;
00160   } 

void GhostSample::Add2DCentralFile ( Char_t *  filename,
Int_t  detrock_label,
Int_t  dis_label,
Int_t  res_label,
Char_t *  hist_max,
Char_t *  hist_min 
) [inline]

Definition at line 86 of file GhostSample.h.

References fContainer, fNDis, MakeVectorContainers(), v2D_1D_OscillatedTemplatesSin2Max5D, v2D_1D_OscillatedTemplatesSin2Min5D, v2DOscillatedTemplatesSin2Max5D, v2DOscillatedTemplatesSin2Min5D, and vFile.

00086                                                                                                                                {
00087     if(fContainer==false){ this->MakeVectorContainers(); fContainer=true; cout << "*-* MakeVectorContainers() *-*" << endl; } 
00088     if(dis_label<0 || dis_label>=fNDis ){cout << " *-* GhostSample::Add2DCentralFile() Inconsistant label, exiting *-*" << endl;return;}
00089     vFile.push_back(new TFile(filename,"read"));
00090     ((((v2DOscillatedTemplatesSin2Max5D.at(detrock_label)).at(dis_label)).at(res_label)).at(0)).push_back((TH2D*)(vFile.back())->Get(hist_max));
00091     ((((v2DOscillatedTemplatesSin2Min5D.at(detrock_label)).at(dis_label)).at(res_label)).at(0)).push_back((TH1D*)(vFile.back())->Get(hist_min));
00092 
00093     ((((v2D_1D_OscillatedTemplatesSin2Max5D.at(detrock_label)).at(dis_label)).at(res_label)).at(0)).push_back((TH2D*)(vFile.back())->Get(hist_max));
00094     ((((v2D_1D_OscillatedTemplatesSin2Min5D.at(detrock_label)).at(dis_label)).at(res_label)).at(0)).push_back((TH1D*)(vFile.back())->Get(hist_min));
00095     cout << " *-* GhostSample::Add2DCentralFile() File Added for Distribution #" << dis_label << " *-*" << endl;
00096   }

void GhostSample::Add2DMicroDST ( Char_t *  filename,
Int_t  dis_label,
TString  ntuplename 
) [inline]

Definition at line 215 of file GhostSample.h.

References binNumber, ccPreSelected, ccSelected, charge, energy, iaction, inu, ncPreSelected, ncSelected, neuEnMC, resBin, resolution, rockPreSelected, rockSelected, and vMicroDSTTree.

00215                                                                          {
00216     vMicroDSTTree.push_back(new TChain(ntuplename.Data(),ntuplename.Data()));
00217     vMicroDSTTree.back()->Add(filename);
00218     vMicroDSTTree.back()->SetBranchAddress("nu.ccPreSelected",&ccPreSelected);
00219     vMicroDSTTree.back()->SetBranchAddress("nu.ccSelected",&ccSelected);
00220     vMicroDSTTree.back()->SetBranchAddress("nu.ncPreSelected",&ncPreSelected);
00221     vMicroDSTTree.back()->SetBranchAddress("nu.ncSelected",&ncSelected);
00222     vMicroDSTTree.back()->SetBranchAddress("nu.rockPreSelected",&rockPreSelected);
00223     vMicroDSTTree.back()->SetBranchAddress("nu.rockSelected",&rockSelected);
00224     vMicroDSTTree.back()->SetBranchAddress("nu.energy",&energy);
00225     vMicroDSTTree.back()->SetBranchAddress("nu.neuEnMC",&neuEnMC);
00226     vMicroDSTTree.back()->SetBranchAddress("nu.iaction",&iaction);
00227     vMicroDSTTree.back()->SetBranchAddress("nu.resolution",&resolution);
00228     vMicroDSTTree.back()->SetBranchAddress("nu.charge",&charge);
00229     vMicroDSTTree.back()->SetBranchAddress("nu.inu",&inu);
00230     vMicroDSTTree.back()->SetBranchAddress("nu.binNumber",&binNumber);
00231     vMicroDSTTree.back()->SetBranchAddress("nu.resBin",&resBin);
00232 
00233     cout << " *-* GhostSample::AddMicroDST() MicroDST Added for Distribution #" << dis_label << " *-*" << endl;
00234     cout << " *-* Entries in tree = " << vMicroDSTTree.back()->GetEntries() << " *-* "<< endl;
00235   }

void GhostSample::Add2DSystematicFile ( Char_t *  filename,
Int_t  dis_label,
Int_t  res_label,
Char_t *  hist_p2,
Char_t *  hist_p1,
Char_t *  hist_m1,
Char_t *  hist_m2 
) [inline]

Definition at line 162 of file GhostSample.h.

References fNDis, fNResBins, v2DNuMuTemplates4D, v2DSystCounter2D, and vFile.

00162                                                                                                                                             {
00163     if(dis_label<0 || dis_label>=fNDis ){cout << " *-* GhostSample::AddSystsFile() Inconsistant label, exiting *-*" << endl;return;}
00164     vFile.push_back(new TFile(filename,"read"));
00165 
00166     (((v2DNuMuTemplates4D.at(dis_label)).at(res_label)).at((v2DSystCounter2D.at(0)).at(dis_label)+1)).push_back((TH2D*)(vFile.back())->Get(hist_p2));
00167     (((v2DNuMuTemplates4D.at(dis_label)).at(res_label)).at((v2DSystCounter2D.at(0)).at(dis_label)+1)).push_back((TH2D*)(vFile.back())->Get(hist_p1));
00168     (((v2DNuMuTemplates4D.at(dis_label)).at(res_label)).at((v2DSystCounter2D.at(0)).at(dis_label)+1)).push_back((TH2D*)(vFile.back())->Get(hist_m1));
00169     (((v2DNuMuTemplates4D.at(dis_label)).at(res_label)).at((v2DSystCounter2D.at(0)).at(dis_label)+1)).push_back((TH2D*)(vFile.back())->Get(hist_m2));
00170                                                                 
00171                                                                  
00172     if(res_label == (fNResBins - 1))(v2DSystCounter2D.at(0)).at(dis_label)++;
00173     cout << " *-* GhostSample::Add2DSystematicFile() File Added for Distribution #" << dis_label << " *-*" << endl;
00174   }

void GhostSample::Add2DSystematicFile ( Int_t  detrock_label,
Int_t  dis_label,
Int_t  res_label,
Int_t  null 
) [inline]

Definition at line 130 of file GhostSample.h.

References v2DNuMuTemplates4D, v2DOscillatedTemplatesSin2Max5D, v2DOscillatedTemplatesSin2Min5D, and v2DSystCounter2D.

00130                                                                                           {
00131     null = 0;
00132     ((((v2DOscillatedTemplatesSin2Max5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2DSystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back(0);
00133     ((((v2DOscillatedTemplatesSin2Min5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2DSystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back(0);
00134     (((v2DNuMuTemplates4D.at(dis_label)).at(res_label)).at((v2DSystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back(0);
00135     (v2DSystCounter2D.at(detrock_label)).at(dis_label)++;
00136     cout << " *-* GhostSample::Add2DSystematicFile() placeholder NULL added for Distribution #" << dis_label << " *-*" << endl;
00137   }

void GhostSample::Add2DSystematicFile ( Char_t *  filename,
Int_t  detrock_label,
Int_t  dis_label,
Int_t  res_label,
Char_t *  maxhist_p2,
Char_t *  maxhist_p1,
Char_t *  maxhist_m1,
Char_t *  maxhist_m2,
Char_t *  minhist_p2,
Char_t *  minhist_p1,
Char_t *  minhist_m1,
Char_t *  minhist_m2 
) [inline]

Definition at line 98 of file GhostSample.h.

References fNDis, fNResBins, v2DOscillatedTemplatesSin2Max5D, v2DOscillatedTemplatesSin2Min5D, v2DSystCounter2D, and vFile.

00098                                                                                                                                                                                                                                                         {
00099     if(dis_label<0 || dis_label>=fNDis ){cout << " *-* GhostSample::AddSystsFile() Inconsistant label, exiting *-*" << endl;return;}
00100     vFile.push_back(new TFile(filename,"read"));
00101     ((((v2DOscillatedTemplatesSin2Max5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2DSystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH2D*)(vFile.back())->Get(maxhist_p2));
00102     ((((v2DOscillatedTemplatesSin2Max5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2DSystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH2D*)(vFile.back())->Get(maxhist_p1));
00103     ((((v2DOscillatedTemplatesSin2Max5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2DSystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH2D*)(vFile.back())->Get(maxhist_m1));
00104     ((((v2DOscillatedTemplatesSin2Max5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2DSystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH2D*)(vFile.back())->Get(maxhist_m2));
00105     ((((v2DOscillatedTemplatesSin2Min5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2DSystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH1D*)(vFile.back())->Get(minhist_p2));
00106     ((((v2DOscillatedTemplatesSin2Min5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2DSystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH1D*)(vFile.back())->Get(minhist_p1));
00107     ((((v2DOscillatedTemplatesSin2Min5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2DSystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH1D*)(vFile.back())->Get(minhist_m1));
00108     ((((v2DOscillatedTemplatesSin2Min5D.at(detrock_label)).at(dis_label)).at(res_label)).at((v2DSystCounter2D.at(detrock_label)).at(dis_label)+1)).push_back((TH1D*)(vFile.back())->Get(minhist_m2));
00109 
00110     if(res_label == (fNResBins - 1))(v2DSystCounter2D.at(detrock_label)).at(dis_label)++;
00111     cout << " *-* GhostSample::Add2DSystematicFile() File Added for Distribution #" << dis_label << " *-*" << endl;
00112   }

void GhostSample::Add2DTauBackgroundFile ( Char_t *  filename,
Int_t  dis_label,
Int_t  res_label,
Char_t *  hist_2D 
) [inline]

Definition at line 209 of file GhostSample.h.

References v2DNuTauTemplates3D, and vFile.

00209                                                                                                {
00210     vFile.push_back(new TFile(filename,"read"));
00211     ((v2DNuTauTemplates3D.at(dis_label)).at(res_label)).push_back((TH2D*)(vFile.back())->Get(hist_2D));
00212     cout << " *-* GhostSample::Add2DTauBackgroundFile() File Added for Distribution #" << dis_label << " *-*" << endl;
00213   }

void GhostSample::Add2DTauBackgroundFile ( Char_t *  filename,
Int_t  detrock_label,
Int_t  dis_label,
Int_t  res_label,
Char_t *  hist_max,
Char_t *  hist_min 
) [inline]

Definition at line 146 of file GhostSample.h.

References v2DTauOscillatedTemplatesSin2Max4D, v2DTauOscillatedTemplatesSin2Min4D, and vFile.

00146                                                                                                                                      {
00147     vFile.push_back(new TFile(filename,"read"));
00148     (((v2DTauOscillatedTemplatesSin2Max4D.at(detrock_label)).at(dis_label)).at(res_label)).push_back((TH2D*)(vFile.back())->Get(hist_max));
00149     (((v2DTauOscillatedTemplatesSin2Min4D.at(detrock_label)).at(dis_label)).at(res_label)).push_back((TH1D*)(vFile.back())->Get(hist_min));
00150     cout << " *-* GhostSample::Add2DTauBackgroundFile() File Added for Distribution #" << dis_label << " *-*" << endl;
00151   }

void GhostSample::Add2DTauMicroDST ( Char_t *  filename,
Int_t  dis_label,
TString  ntuplename 
) [inline]

Definition at line 236 of file GhostSample.h.

References binNumber, ccPreSelected, ccSelected, charge, energy, iaction, inu, ncPreSelected, ncSelected, neuEnMC, resBin, resolution, rockPreSelected, rockSelected, and v2DTauMicroDSTTree.

00236                                                                             {
00237     v2DTauMicroDSTTree.push_back(new TChain(ntuplename.Data(),ntuplename.Data()));
00238     v2DTauMicroDSTTree.back()->Add(filename);
00239     v2DTauMicroDSTTree.back()->SetBranchAddress("nu.ccPreSelected",&ccPreSelected);
00240     v2DTauMicroDSTTree.back()->SetBranchAddress("nu.ccSelected",&ccSelected);
00241     v2DTauMicroDSTTree.back()->SetBranchAddress("nu.ncPreSelected",&ncPreSelected);
00242     v2DTauMicroDSTTree.back()->SetBranchAddress("nu.ncSelected",&ncSelected);
00243     v2DTauMicroDSTTree.back()->SetBranchAddress("nu.rockPreSelected",&rockPreSelected);
00244     v2DTauMicroDSTTree.back()->SetBranchAddress("nu.rockSelected",&rockSelected);
00245     v2DTauMicroDSTTree.back()->SetBranchAddress("nu.energy",&energy);
00246     v2DTauMicroDSTTree.back()->SetBranchAddress("nu.neuEnMC",&neuEnMC);
00247     v2DTauMicroDSTTree.back()->SetBranchAddress("nu.iaction",&iaction);
00248     v2DTauMicroDSTTree.back()->SetBranchAddress("nu.resolution",&resolution);
00249     v2DTauMicroDSTTree.back()->SetBranchAddress("nu.charge",&charge);
00250     v2DTauMicroDSTTree.back()->SetBranchAddress("nu.inu",&inu);
00251     v2DTauMicroDSTTree.back()->SetBranchAddress("nu.binNumber",&binNumber);
00252     v2DTauMicroDSTTree.back()->SetBranchAddress("nu.resBin",&resBin);
00253 
00254     cout << " *-* GhostSample::Add2DTauMicroDST() MicroDST Added for Distribution #" << dis_label << " *-*" << endl;
00255     cout << " *-* Entries in tree = " << v2DTauMicroDSTTree.back()->GetEntries() << " *-* "<< endl;
00256   }

void GhostSample::FillHistogramsFromDST ( TChain *  tree,
Int_t  dis 
) [private]

Definition at line 1308 of file GhostSample.cxx.

References binNumber, ccPreSelected, ccSelected, charge, energy, fNResBins, fNumDm2Bins, fSampleType, hDm2Array, iaction, inu, Msg::kDebug, Munits::m, MSG, n, neuEnMC, NuOscProbCalc::OscillationWeight(), GhostUtilities::OscillationWeightMuToTau(), resBin, rockPreSelected, rockSelected, size, vDSTOscillatedHistograms_CCNuMu3D, vDSTOscillatedHistograms_CCNuMuBar3D, vDSTOscillatedHistograms_CCNuTau3D, vDSTUnoscillatedHistograms_CCNuMu2D, vDSTUnoscillatedHistograms_CCNuMuBar2D, and vDSTUnoscillatedHistograms_CCNuTau2D.

Referenced by MakeOscillatedSpectra().

01309 {
01310   MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::FillHistogramsFromDST() *-*" << endl;
01311 
01312  
01313   //(1) Contained Vertex Events: numu CC and numubar CC
01314   for(Int_t m=0;m<tree->GetEntries();m++){
01315     
01316     tree->GetEntry(m);
01317 
01318     Int_t res = 0;                  //Default for no resolution bins
01319     if(fNResBins>1) res = resBin;   //Set to resolution bin of event if fitting in bins of resolution
01320 
01321     //Fill unoscillated histograms here before loop over DM2
01322     if(fSampleType==0 && ccPreSelected==1 && ccSelected==1 && iaction==1 && charge == -1){
01323       if(inu == 14 && (vDSTUnoscillatedHistograms_CCNuMu2D.at(dis)).size() > 0) (vDSTUnoscillatedHistograms_CCNuMu2D.at(dis)).at(res)->Fill(neuEnMC,energy,1.0);
01324       if(inu == -14 && (vDSTUnoscillatedHistograms_CCNuMuBar2D.at(dis)).size() > 0) (vDSTUnoscillatedHistograms_CCNuMuBar2D.at(dis)).at(res)->Fill(neuEnMC,energy,1.0);
01325       if(fabs(inu) == 16 && (vDSTUnoscillatedHistograms_CCNuTau2D.at(dis)).size() > 0) (vDSTUnoscillatedHistograms_CCNuTau2D.at(dis)).at(res)->Fill(neuEnMC,energy,1.0);
01326     }
01327     if(fSampleType==2 && rockPreSelected==1 && rockSelected==1 && iaction==1){
01328       if(fabs(inu) == 14 && (vDSTUnoscillatedHistograms_CCNuMu2D.at(dis)).size() > 0) (vDSTUnoscillatedHistograms_CCNuMu2D.at(dis)).at(res)->Fill(neuEnMC,binNumber,1.0);
01329       if(fabs(inu) == 16 && (vDSTUnoscillatedHistograms_CCNuTau2D.at(dis)).size() > 0) (vDSTUnoscillatedHistograms_CCNuTau2D.at(dis)).at(res)->Fill(neuEnMC,binNumber,1.0);
01330     }
01331     if(fSampleType==3 && ccPreSelected==1 && ccSelected==1 && iaction==1 && charge == 1){ //change
01332       if(inu == 14 && (vDSTUnoscillatedHistograms_CCNuMu2D.at(dis)).size() >0) (vDSTUnoscillatedHistograms_CCNuMu2D.at(dis)).at(res)->Fill(neuEnMC,energy,1.0);
01333       if(inu == -14 && (vDSTUnoscillatedHistograms_CCNuMuBar2D.at(dis)).size() >0) (vDSTUnoscillatedHistograms_CCNuMuBar2D.at(dis)).at(res)->Fill(neuEnMC,energy,1.0);
01334       if(fabs(inu) == 16 && (vDSTUnoscillatedHistograms_CCNuTau2D.at(dis)).size() >0) (vDSTUnoscillatedHistograms_CCNuTau2D.at(dis)).at(res)->Fill(neuEnMC,energy,1.0);
01335     }
01336     
01337     //Oscillation weight for each dst event
01338     for(Int_t n=0;n<fNumDm2Bins;n++){
01339       
01340       Double_t dm2 = hDm2Array->GetXaxis()->GetBinCenter(n+1); 
01341       MSG("GhostSample",Msg::kDebug) << "dm2 = " << dm2 << endl;
01342 
01343       Double_t oscweight = 1.0;          //Default - no oscillations
01344       if(fabs(inu)==16) oscweight = 0.0; //No NC in tau
01345       
01346       if(fabs(inu)==14 && iaction==1){   //true CC numu or CC numubar
01347         if(neuEnMC>0) oscweight = GhostUtilities::OscillationWeight(neuEnMC,dm2,1.0);
01348       }
01349       if(fabs(inu)==16 && iaction==1){   //true CC tau and CC taubar
01350         if(neuEnMC>0) oscweight = GhostUtilities::OscillationWeightMuToTau(neuEnMC,dm2,1.0);
01351       }
01352 
01353       //Event characteristics
01354       MSG("GhostSample",Msg::kDebug) << "inu = " << inu << endl;
01355       MSG("GhostSample",Msg::kDebug) << "iaction = " << iaction << endl;
01356       MSG("GhostSample",Msg::kDebug) << "res = " << res << endl;
01357       MSG("GhostSample",Msg::kDebug) << "charge = " << charge << endl;
01358       MSG("GhostSample",Msg::kDebug) << "neuEnMC = " << neuEnMC << endl;
01359       MSG("GhostSample",Msg::kDebug) << "oscweight = " << oscweight << endl;
01360 
01361      
01362 
01363       //event appropriately oscillated here
01364       //Fill appropriate event type histogram
01365       if(fSampleType==0 && ccPreSelected==1 && ccSelected==1 && iaction==1 && charge == -1){
01366         if(inu == 14 && ((vDSTOscillatedHistograms_CCNuMu3D.at(dis)).at(res)).size() > 0) ((vDSTOscillatedHistograms_CCNuMu3D.at(dis)).at(res)).at(n)->Fill(neuEnMC,energy,oscweight);
01367         if(inu == -14 && ((vDSTOscillatedHistograms_CCNuMuBar3D.at(dis)).at(res)).size() > 0) ((vDSTOscillatedHistograms_CCNuMuBar3D.at(dis)).at(res)).at(n)->Fill(neuEnMC,energy,oscweight);
01368         if(fabs(inu) == 16 && ((vDSTOscillatedHistograms_CCNuTau3D.at(dis)).at(res)).size() > 0) ((vDSTOscillatedHistograms_CCNuTau3D.at(dis)).at(res)).at(n)->Fill(neuEnMC,energy,oscweight);
01369       }
01370       if(fSampleType==2 && rockPreSelected==1 && rockSelected==1 && iaction==1){
01371         if(fabs(inu) == 14 && ((vDSTOscillatedHistograms_CCNuMu3D.at(dis)).at(res)).size() > 0) ((vDSTOscillatedHistograms_CCNuMu3D.at(dis)).at(res)).at(n)->Fill(neuEnMC,binNumber,oscweight);
01372         if(fabs(inu) == 16 && ((vDSTOscillatedHistograms_CCNuTau3D.at(dis)).at(res)).size() >0) ((vDSTOscillatedHistograms_CCNuTau3D.at(dis)).at(res)).at(n)->Fill(neuEnMC,binNumber,oscweight);
01373       }
01374       if(fSampleType==3 && iaction==1 && ccPreSelected==1 && ccSelected==1 && charge == 1){ //change to oscillate PQ with NQ events
01375         if(inu == 14 && ((vDSTOscillatedHistograms_CCNuMu3D.at(dis)).at(res)).size() > 0) ((vDSTOscillatedHistograms_CCNuMu3D.at(dis)).at(res)).at(n)->Fill(neuEnMC,energy,oscweight);
01376         if(inu == -14 && ((vDSTOscillatedHistograms_CCNuMuBar3D.at(dis)).at(res)).size() >0) ((vDSTOscillatedHistograms_CCNuMuBar3D.at(dis)).at(res)).at(n)->Fill(neuEnMC,energy,oscweight);
01377         if(fabs(inu) == 16 && ((vDSTOscillatedHistograms_CCNuTau3D.at(dis)).at(res)).size() >0) ((vDSTOscillatedHistograms_CCNuTau3D.at(dis)).at(res)).at(n)->Fill(neuEnMC,energy,oscweight);
01378       }
01379     }//EO loop over Dm2
01380     if(m%10000==0) cout << " *-* Entry = " << m << " *-*" << endl;
01381   }//EO loop over DST
01382 }

void GhostSample::FinaliseSample (  )  [inline]

Definition at line 81 of file GhostSample.h.

References InitialisePredictionVectors().

00081 { this->InitialisePredictionVectors(); }

TH1D * GhostSample::GetSpectrum ( Double_t  sin2,
Double_t  dm2,
Int_t  rock_det,
Int_t  dis,
Int_t  res 
)

Definition at line 1416 of file GhostSample.cxx.

References ArrayTH1D::Add(), ArrayTH1D::ConvertTH1D(), fArrayHistsFlag, fMaxEnergy, fNumFittingBins, InterpolateOscillatedSpectra(), Msg::kInfo, MSG, size, v2DBkgOscillatedTemplatesSin2Max4D, v2DBkgOscillatedTemplatesSin2Min4D, v2DOscillatedTemplatesSin2Max5D, v2DOscillatedTemplatesSin2Min5D, v2DTauOscillatedTemplatesSin2Max3D, v2DTauOscillatedTemplatesSin2Max4D, and v2DTauOscillatedTemplatesSin2Min4D.

01416                                                                                            {
01417 
01418   MSG("GhostSample",Msg::kInfo) << " *-* GhostSample::GetSpectrum() *-*" << endl;
01419 
01420   //Setup ArrayTH1D to take the output of InterpolateOscillatedSpectra
01421   ArrayTH1D* hArraySpectrum = new ArrayTH1D("hArraySpectrum","hArraySpectrum",fNumFittingBins,0.,fMaxEnergy,fArrayHistsFlag);
01422   ArrayTH1D* hArraySpectrum2 = new ArrayTH1D("hArraySpectrum2","hArraySpectrum2",fNumFittingBins,0.,fMaxEnergy,fArrayHistsFlag);
01423   ArrayTH1D* hArraySpectrum3 = new ArrayTH1D("hArraySpectrum3","hArraySpectrum3",fNumFittingBins,0.,fMaxEnergy,fArrayHistsFlag);
01424 
01425   //Give Interpolate oscillated spectra correct templates
01426   if(((((v2DOscillatedTemplatesSin2Min5D.at(rock_det)).at(dis)).at(res)).at(0)).size()>0){
01427     this->InterpolateOscillatedSpectra(0,sin2,dm2,((((v2DOscillatedTemplatesSin2Min5D.at(rock_det)).at(dis)).at(res)).at(0)).at(0),
01428                                        ((((v2DOscillatedTemplatesSin2Max5D.at(rock_det)).at(dis)).at(res)).at(0)).at(0),
01429                                        hArraySpectrum);
01430   }
01431   for(UInt_t j=0;j<(((v2DBkgOscillatedTemplatesSin2Max4D.at(rock_det)).at(dis)).at(res)).size();j++){
01432     
01433     this->InterpolateOscillatedSpectra(0,sin2,dm2,(((v2DBkgOscillatedTemplatesSin2Min4D.at(rock_det)).at(dis)).at(res)).at(0),
01434                                        (((v2DBkgOscillatedTemplatesSin2Max4D.at(rock_det)).at(dis)).at(res)).at(0),
01435                                        hArraySpectrum2);
01436   }
01437   
01438   //2D tau component
01439   for(UInt_t j=0;j<((v2DTauOscillatedTemplatesSin2Max3D.at(dis)).at(res)).size();j++){
01440     
01441     this->InterpolateOscillatedSpectra(1,sin2,dm2,(((v2DTauOscillatedTemplatesSin2Min4D.at(rock_det)).at(dis)).at(res)).at(0),
01442                                        (((v2DTauOscillatedTemplatesSin2Max4D.at(rock_det)).at(dis)).at(res)).at(0),
01443                                        hArraySpectrum3);
01444   }
01445   hArraySpectrum->Add(hArraySpectrum2,1.0);
01446   hArraySpectrum->Add(hArraySpectrum3,1.0);
01447   TString name("hSpectrum"); name += dis; name.Append("_"); name += res;
01448   TH1D* hSpectrum = hArraySpectrum->ConvertTH1D(name.Data());
01449  
01450   delete hArraySpectrum;
01451   delete hArraySpectrum2;
01452   delete hArraySpectrum3;
01453  
01454   return hSpectrum;
01455 }

void GhostSample::GetSpectrum ( Double_t  sin2,
Double_t  dm2,
Double_t  cc_det,
Double_t  cc_rock,
Double_t  nc_scale,
Double_t  numubar_scale,
Double_t *  systscale2d,
Double_t *  systscale1d,
vector< vector< ArrayTH1D * > > &  ret_object,
Bool_t  write_flag,
Double_t  mu2 = 0 
)

Definition at line 724 of file GhostSample.cxx.

References ArrayTH1D::Add(), ArrayTH1D::Decay(), fArrayHistsFlag, GhostInputs::fFitDecay, GhostInputs::fFitDecoherence, fMaxEnergy, fNDis, fNResBins, fNum1DSysts, fNum2DSysts, fNumFittingBins, fSampleName, fSampleType, gGhostInputs, InterpMin(), InterpolateOscillatedSpectra(), Msg::kDebug, MakeNeutralCurrentSpectra(), MSG, ArrayTH1D::Reset(), ResetPredictionVectors(), ArrayTH1D::Scale(), size, v1DNewPredSpectrum5D, v1DTemplates5D, v2D_1D_NewPredSpectrum5D, v2D_1D_OscillatedTemplatesSin2Max5D, v2D_1D_OscillatedTemplatesSin2Min5D, v2DBkgNewPredSpectrum4D, v2DBkgOscillatedTemplatesSin2Max4D, v2DBkgOscillatedTemplatesSin2Min4D, v2DNewPredSpectrum5D, v2DNuMuBarTemplates3D, v2DNuMuTemplates4D, v2DNuTauTemplates3D, v2DOscillatedTemplatesSin2Max5D, v2DOscillatedTemplatesSin2Min5D, v2DTauNewPredSpectrum4D, v2DTauOscillatedTemplatesSin2Max4D, and v2DTauOscillatedTemplatesSin2Min4D.

00726 {
00727 
00728   MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() *-*" << endl;
00729   MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() Write flag = " << write_flag << " *-*" << endl;
00730 
00731   //gObjectTable->Print();
00732 
00733   TString name;
00734   
00735   //If first time use this vector in GetSpectrum
00736   for(Int_t i=0;i<fNDis;i++){
00737     
00738     if((ret_object.at(i)).size()==0){
00739       for(Int_t res=0;res<fNResBins;res++){
00740         name.Resize(0); name.Append("hData"); name.Append(fSampleName.Data()); name.Append("_"); name += i; name.Append("_"); name += res;
00741         (ret_object.at(i)).push_back(new ArrayTH1D(name.Data(),name.Data(),fNumFittingBins,0.,fMaxEnergy,fArrayHistsFlag));
00742       }
00743     }
00744     if((ret_object.at(i)).size()>0){
00745       for(Int_t res=0;res<fNResBins;res++){
00746         (ret_object.at(i)).at(res)->Reset();
00747       }
00748     }
00749   }
00750   this->ResetPredictionVectors();
00751 
00752   MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::ResetPredictionVectors() *-*" << endl;
00753   
00754   //------------------------------------------------------------------------------------------------------
00755   //Set up NC sample if INPUT template exists
00756   if(((((v1DTemplates5D.at(0)).at(0)).at(0)).at(0)).size()>0 || ((((v1DTemplates5D.at(1)).at(0)).at(0)).at(0)).size()>0){
00757     MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::Making NeutralCurrentSpectra() *-*" << endl;
00758     this->MakeNeutralCurrentSpectra();
00759   }
00760   //------------------------------------------------------------------------------------------------------
00761   //Loop over rock and detector contributions to this sample
00762   for(Int_t rd=0;rd<2;rd++){
00763     
00764     if(rd==0) MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() Detector Contribution *-*" << endl;
00765     if(rd==1) MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() Rock Contribution *-*" << endl;
00766     
00767     //Loop over number of DISTRIBUTIONS in this sample
00768     for(Int_t i=0;i<fNDis;i++){
00769       
00770       //Loop over number of RESOLUTION BINS in this sample
00771       for(Int_t res=0;res<fNResBins;res++){
00772         
00773         //2D CC component
00774         for(Int_t j=0;j<(fNum2DSysts)+1;j++){
00775           for(UInt_t k=0;k<((((v2DOscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).size();k++){
00776            
00777             //Check if template exists before interpolating
00778             if(((((v2DOscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).size() > 0){
00779           
00780               if(!gGhostInputs->fFitDecoherence){
00781                 this->InterpolateOscillatedSpectra(0,sin2,dm2,((((v2DOscillatedTemplatesSin2Min5D.at(rd)).at(i)).at(res)).at(j)).at(k),
00782                                                  ((((v2DOscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).at(k),
00783                                                  ((((v2DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).at(k));
00784               }
00785               else{
00786                 this->InterpolateOscillatedSpectra(0,sin2,dm2,mu2,((((v2DOscillatedTemplatesSin2Min5D.at(rd)).at(i)).at(res)).at(j)).at(k),   
00787                                                  ((((v2DNuMuTemplates4D).at(i)).at(res)).at(j)).at(k),
00788                                                  ((((v2DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).at(k));
00789               }
00790             }
00791           }
00792         }
00793         MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() Interpolated CC templates *-*" << endl;
00794 
00795         //2D CC component for 1D systs
00796         for(Int_t j=0;j<(fNum1DSysts)+1;j++){
00797           for(UInt_t k=0;k<((((v2D_1D_OscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).size();k++){
00798             if(((((v2D_1D_OscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).size() > 0){
00799               
00800               if(!gGhostInputs->fFitDecoherence){
00801                 this->InterpolateOscillatedSpectra(0,sin2,dm2,((((v2D_1D_OscillatedTemplatesSin2Min5D.at(rd)).at(i)).at(res)).at(j)).at(k),
00802                                                  ((((v2D_1D_OscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).at(k),
00803                                                  ((((v2D_1D_NewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).at(k));
00804               }
00805               else{
00806                 this->InterpolateOscillatedSpectra(0,sin2,dm2,mu2,((((v2D_1D_OscillatedTemplatesSin2Min5D.at(rd)).at(i)).at(res)).at(j)).at(k),
00807                                                  (((v2DNuMuTemplates4D.at(i)).at(res)).at(j)).at(k),
00808                                                  ((((v2D_1D_NewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).at(k));
00809               }
00810             }
00811           }
00812         }
00813         
00814         MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() Interpolated CC templates for 1D Systs *-*" << endl;
00815         
00816         //2D bkg component
00817         for(UInt_t j=0;j<(((v2DBkgOscillatedTemplatesSin2Max4D.at(rd)).at(i)).at(res)).size();j++){
00818           
00819           if(!gGhostInputs->fFitDecoherence){
00820             this->InterpolateOscillatedSpectra(0,sin2,dm2,(((v2DBkgOscillatedTemplatesSin2Min4D.at(rd)).at(i)).at(res)).at(j),
00821                                              (((v2DBkgOscillatedTemplatesSin2Max4D.at(rd)).at(i)).at(res)).at(j),
00822                                              (((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j));
00823           }
00824           else{
00825             this->InterpolateOscillatedSpectra(0,sin2,dm2,mu2,(((v2DBkgOscillatedTemplatesSin2Min4D.at(rd)).at(i)).at(res)).at(j),
00826                                              ((v2DNuMuBarTemplates3D.at(i)).at(res)).at(j),
00827                                              (((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j));
00828           }
00829         }
00830         MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() Interpolated CC Background templates *-*" << endl;
00831         
00832         //2D tau component
00833         for(UInt_t j=0;j<(((v2DTauOscillatedTemplatesSin2Max4D.at(rd)).at(i)).at(res)).size();j++){
00834           
00835           if(!gGhostInputs->fFitDecoherence){
00836             this->InterpolateOscillatedSpectra(1,sin2,dm2,(((v2DTauOscillatedTemplatesSin2Min4D.at(rd)).at(i)).at(res)).at(j),
00837                                              (((v2DTauOscillatedTemplatesSin2Max4D.at(rd)).at(i)).at(res)).at(j),
00838                                              (((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j));
00839           }
00840           else{   
00841             this->InterpolateOscillatedSpectra(1,sin2,dm2,mu2,(((v2DTauOscillatedTemplatesSin2Min4D.at(rd)).at(i)).at(res)).at(j),
00842                                              ((v2DNuTauTemplates3D.at(i)).at(res)).at(j),
00843                                              (((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j));
00844           }
00845         }
00846         
00847         MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() Interpolated all Spectra *-*" << endl;
00848         
00849         //------------------------------------------------------------------------------------------------------
00850     
00851         // ADD AND WRITE OUT ALL CONTRIBUTIONS 
00852         // Need to label by sample as all samples will write out to the same file - use sample name
00853         
00854         ArrayTH1D* harraytemp = ((((v2DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(0)).at(0)->CloneArrayHist();
00855         harraytemp->Reset();
00856 
00857         for(Int_t j=0;j<fNum2DSysts+1;j++){
00858           if(j==0){
00859             harraytemp->Add((ArrayTH1D*)((((v2DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(0)).at(0),1.0);
00860           }     
00861           if(j>0){
00862             if(((((v2DOscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).size()>1){
00863               this->InterpMin(harraytemp,v2DNewPredSpectrum5D.at(rd),systscale2d[j-1],i,res,j-1);
00864             }
00865           }
00866         }
00867         for(Int_t j=1;j<fNum1DSysts+1;j++){
00868           if(((((v2D_1D_OscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).size()>1){
00869             this->InterpMin(harraytemp,v2D_1D_NewPredSpectrum5D.at(rd),systscale1d[j-1],i,res,j-1);
00870           }
00871         }
00872 
00873         if(rd==0){
00874           if(fSampleType==0 || fSampleType==2)harraytemp->Scale(1 + cc_det);
00875           if(fSampleType==3)harraytemp->Scale((1.0 + numubar_scale)*(1.0 + cc_det));
00876         }
00877         if(rd==1){
00878           if(fSampleType==0 || fSampleType==2)harraytemp->Scale(1 + cc_rock);
00879           if(fSampleType==3)harraytemp->Scale((1.0 + numubar_scale)*(1.0 + cc_rock));
00880         }
00881         (ret_object.at(i)).at(res)->Add(harraytemp,1.0);
00882         
00883         delete harraytemp;      
00884 
00885         //this->Pause();
00886 
00887         for(UInt_t j=0;j<(((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).size();j++){
00888         
00889           if(rd==0) (((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j)->Scale(1.0 + cc_det);
00890           if(rd==1) (((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j)->Scale(1.0 + cc_rock);
00891           (ret_object.at(i)).at(res)->Add((((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j),1.0);
00892         }
00893 
00894         for(UInt_t j=0;j<(((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).size();j++){
00895           
00896           if(rd==0){
00897             if(fSampleType==0 || fSampleType==2)(((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j)->Scale((1.0 + numubar_scale)*(1.0 + cc_det));
00898             if(fSampleType==3)(((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j)->Scale(1.0 + cc_det);
00899           }
00900           if(rd==1){
00901             if(fSampleType==0 || fSampleType==2)(((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j)->Scale((1.0 + numubar_scale)*(1.0 + cc_rock));
00902             if(fSampleType==3)(((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j)->Scale(1.0 + cc_rock);
00903           }
00904           (ret_object.at(i)).at(res)->Add((((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j),1.0);
00905         }
00906         
00907         MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() Scaled all CC contributions *-*" << endl;
00908         
00909         //Scale 1D contributions and add
00910         if(((((v1DTemplates5D.at(rd)).at(i)).at(0)).at(0)).size()>0){
00911         
00912           ArrayTH1D* temp = new ArrayTH1D("temp","temp",fNumFittingBins,0.,fMaxEnergy,fArrayHistsFlag);
00913           
00914           for(Int_t j=0;j<(this->fNum1DSysts)+1;j++){
00915             
00916             if(j==0 && ((((v1DTemplates5D.at(rd)).at(i)).at(res)).at(j)).size()>0){
00917               temp->Add(((((v1DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).at(0),1.0);
00918             }
00919             if(j>0){
00920               if(((((v1DTemplates5D.at(rd)).at(i)).at(res)).at(j)).size() > 0){
00921                 this->InterpMin(temp,v1DNewPredSpectrum5D.at(rd),systscale1d[j-1],i,res,j-1); //So will interpolate and add if exists
00922               }
00923             }
00924           }
00925           if(rd==0) temp->Scale((1.0 + cc_det)*(1.0 + nc_scale));  
00926           if(rd==1) temp->Scale((1.0 + cc_rock)*(1.0 + nc_scale));
00927           if(gGhostInputs->fFitDecay) temp->Decay(mu2,sin2);
00928           (ret_object.at(i)).at(res)->Add(temp,1.0);
00929           delete temp;
00930           
00931           MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() Scaled all NC contributions *-*" << endl;
00932         }//EO check if NC sample exists
00933       }//EO loop over resolution bins
00934     }//EO loop over distributions
00935   }//EO loop over rock/detector
00936   //gObjectTable->Print();
00937   //this->Pause();
00938 }

void GhostSample::GetSpectrum ( Double_t  sin2,
Double_t  dm2,
Double_t  cc_det,
Double_t  cc_rock,
Double_t  nc_scale,
Double_t  numubar_scale,
Double_t *  systscale2d,
Double_t *  systscale1d,
vector< vector< ArrayTH1D * > > &  ret_object,
TFile *  fOutputFile,
TString  label,
Double_t  mu2 = 0 
)

Definition at line 483 of file GhostSample.cxx.

References ArrayTH1D::Add(), ArrayTH1D::ConvertTH1D(), ArrayTH1D::Decay(), fArrayHistsFlag, GhostInputs::fFitDecay, GhostInputs::fFitDecoherence, fMaxEnergy, fNDis, fNResBins, fNum1DSysts, fNum2DSysts, fNumFittingBins, fSampleName, fSampleType, gGhostInputs, InterpMin(), InterpolateOscillatedSpectra(), Msg::kDebug, Msg::kInfo, MakeNeutralCurrentSpectra(), MSG, ArrayTH1D::Reset(), ResetPredictionVectors(), ArrayTH1D::Scale(), size, v1DNewPredSpectrum5D, v1DTemplates5D, v2D_1D_NewPredSpectrum5D, v2D_1D_OscillatedTemplatesSin2Max5D, v2D_1D_OscillatedTemplatesSin2Min5D, v2DBkgNewPredSpectrum4D, v2DBkgOscillatedTemplatesSin2Max4D, v2DBkgOscillatedTemplatesSin2Min4D, v2DNewPredSpectrum5D, v2DNuMuBarTemplates3D, v2DNuMuTemplates4D, v2DNuTauTemplates3D, v2DOscillatedTemplatesSin2Max5D, v2DOscillatedTemplatesSin2Min5D, v2DTauNewPredSpectrum4D, v2DTauOscillatedTemplatesSin2Max4D, and v2DTauOscillatedTemplatesSin2Min4D.

00485 {
00486 
00487   MSG("GhostSample",Msg::kInfo) << " *-* GhostSample::GetSpectrum() *-*" << endl;
00488   //MSG("GhostSample",Msg::kInfo) << " *-* GhostSample::GetSpectrum() Write flag = " << write_flag << " *-*" << endl;
00489 
00490   TString name;
00491   
00492   //If first time use this vector in GetSpectrum
00493   for(Int_t i=0;i<fNDis;i++){
00494     
00495     if((ret_object.at(i)).size()==0){
00496       for(Int_t res=0;res<fNResBins;res++){
00497         name.Resize(0); name.Append("hData"); name.Append(fSampleName.Data()); name.Append("_"); name += i; name.Append("_"); name += res;
00498         (ret_object.at(i)).push_back(new ArrayTH1D(name.Data(),name.Data(),fNumFittingBins,0.,fMaxEnergy,fArrayHistsFlag));
00499       }
00500     }
00501     if((ret_object.at(i)).size()>0){
00502       for(Int_t res=0;res<fNResBins;res++){
00503         (ret_object.at(i)).at(res)->Reset();
00504       }
00505     }
00506   }
00507   this->ResetPredictionVectors();
00508   
00509   MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::ResetPredictionVectors() *-*" << endl;
00510   
00511   //------------------------------------------------------------------------------------------------------
00512   //Set up NC sample if INPUT template exists
00513   if(((((v1DTemplates5D.at(0)).at(0)).at(0)).at(0)).size()>0 || ((((v1DTemplates5D.at(1)).at(0)).at(0)).at(0)).size()>0){
00514     MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::Making NeutralCurrentSpectra() *-*" << endl;
00515     this->MakeNeutralCurrentSpectra();
00516   }
00517   //------------------------------------------------------------------------------------------------------
00518   //Loop over rock and detector contributions to this sample
00519   for(Int_t rd=0;rd<2;rd++){
00520     
00521     if(rd==0) MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() Detector Contribution *-*" << endl;
00522     if(rd==1) MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() Rock Contribution *-*" << endl;
00523     
00524     //Loop over number of DISTRIBUTIONS in this sample
00525     for(Int_t i=0;i<fNDis;i++){
00526       
00527       //Loop over number of RESOLUTION BINS in this sample
00528       for(Int_t res=0;res<fNResBins;res++){
00529         
00530         //2D CC component
00531         for(Int_t j=0;j<(fNum2DSysts)+1;j++){
00532           for(UInt_t k=0;k<((((v2DOscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).size();k++){
00533            
00534             //Check if template exists before interpolating
00535             if(((((v2DOscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).size() > 0){
00536           
00537               if(!gGhostInputs->fFitDecoherence){
00538                 this->InterpolateOscillatedSpectra(0,sin2,dm2,((((v2DOscillatedTemplatesSin2Min5D.at(rd)).at(i)).at(res)).at(j)).at(k),
00539                                                  ((((v2DOscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).at(k),
00540                                                  ((((v2DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).at(k));
00541               }
00542               else{
00543                 this->InterpolateOscillatedSpectra(0,sin2,dm2,mu2,((((v2DOscillatedTemplatesSin2Min5D.at(rd)).at(i)).at(res)).at(j)).at(k),
00544                                                  (((v2DNuMuTemplates4D.at(i)).at(res)).at(j)).at(k),
00545                                                  ((((v2DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).at(k));
00546               }
00547             }
00548           }
00549         }
00550         MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() Interpolated CC templates *-*" << endl;
00551 
00552         //2D CC component for 1D systs
00553         for(Int_t j=0;j<(fNum1DSysts)+1;j++){
00554           for(UInt_t k=0;k<((((v2D_1D_OscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).size();k++){
00555             if(((((v2D_1D_OscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).size() > 0){
00556               
00557               if(!gGhostInputs->fFitDecoherence){
00558                 this->InterpolateOscillatedSpectra(0,sin2,dm2,((((v2D_1D_OscillatedTemplatesSin2Min5D.at(rd)).at(i)).at(res)).at(j)).at(k),
00559                                                  ((((v2D_1D_OscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).at(k),
00560                                                  ((((v2D_1D_NewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).at(k));
00561               }
00562               else{
00563                 this->InterpolateOscillatedSpectra(0,sin2,dm2,mu2,((((v2D_1D_OscillatedTemplatesSin2Min5D.at(rd)).at(i)).at(res)).at(j)).at(k),
00564                                                  (((v2DNuMuTemplates4D.at(i)).at(res)).at(j)).at(k),
00565                                                  ((((v2D_1D_NewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).at(k));
00566               }
00567             }
00568           }
00569         }
00570         
00571         MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() Interpolated CC templates for 1D Systs *-*" << endl;
00572         
00573         //2D bkg component
00574         for(UInt_t j=0;j<(((v2DBkgOscillatedTemplatesSin2Max4D.at(rd)).at(i)).at(res)).size();j++){
00575           
00576           if(!gGhostInputs->fFitDecoherence){
00577             this->InterpolateOscillatedSpectra(0,sin2,dm2,(((v2DBkgOscillatedTemplatesSin2Min4D.at(rd)).at(i)).at(res)).at(j),
00578                                              (((v2DBkgOscillatedTemplatesSin2Max4D.at(rd)).at(i)).at(res)).at(j),
00579                                              (((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j));
00580           }  
00581           else{
00582             this->InterpolateOscillatedSpectra(0,sin2,dm2,mu2,(((v2DBkgOscillatedTemplatesSin2Min4D.at(rd)).at(i)).at(res)).at(j),
00583                                              ((v2DNuMuBarTemplates3D.at(i)).at(res)).at(j),       
00584                                              (((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j));       
00585           }
00586         }
00587         MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() Interpolated CC Background templates *-*" << endl;
00588         
00589         //2D tau component
00590         for(UInt_t j=0;j<(((v2DTauOscillatedTemplatesSin2Max4D.at(rd)).at(i)).at(res)).size();j++){
00591           
00592           if(!gGhostInputs->fFitDecoherence){
00593             this->InterpolateOscillatedSpectra(1,sin2,dm2,(((v2DTauOscillatedTemplatesSin2Min4D.at(rd)).at(i)).at(res)).at(j),
00594                                              (((v2DTauOscillatedTemplatesSin2Max4D.at(rd)).at(i)).at(res)).at(j),
00595                                              (((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j));
00596           }
00597           else{
00598             this->InterpolateOscillatedSpectra(1,sin2,dm2,mu2,(((v2DTauOscillatedTemplatesSin2Min4D.at(rd)).at(i)).at(res)).at(j),
00599                                              ((v2DNuTauTemplates3D.at(i)).at(res)).at(j),
00600                                              (((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j));
00601           }
00602         }
00603         
00604         MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() Interpolated all Spectra *-*" << endl;
00605         
00606         //------------------------------------------------------------------------------------------------------
00607     
00608         // ADD AND WRITE OUT ALL CONTRIBUTIONS 
00609         // Need to label by sample as all samples will write out to the same file - use sample name
00610         
00611         fOutputFile->cd();
00612         
00613         TString outputname;
00614         outputname.Resize(0); outputname.Append("hCentral_"); outputname.Append(label.Data()); outputname.Append("_"); outputname.Append(fSampleName.Data()); 
00615         outputname.Append("_MC"); outputname += rd; outputname.Append("_Dis"); outputname += i; outputname.Append("_"); outputname += res;
00616         TH1D* htemp;
00617         ArrayTH1D* harraytemp = ((((v2DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(0)).at(0)->CloneArrayHist();
00618         harraytemp->Reset();
00619 
00620         for(Int_t j=0;j<fNum2DSysts+1;j++){
00621           if(j==0){
00622             harraytemp->Add((ArrayTH1D*)((((v2DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(0)).at(0),1.0);
00623           }     
00624           if(j>0){
00625             if(((((v2DOscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).size()>1){
00626               this->InterpMin(harraytemp,v2DNewPredSpectrum5D.at(rd),systscale2d[j-1],i,res,j-1);
00627             }
00628           }
00629         }
00630         for(Int_t j=1;j<fNum1DSysts+1;j++){
00631           if(((((v2D_1D_OscillatedTemplatesSin2Max5D.at(rd)).at(i)).at(res)).at(j)).size()>1){
00632             this->InterpMin(harraytemp,v2D_1D_NewPredSpectrum5D.at(rd),systscale1d[j-1],i,res,j-1);
00633           }
00634         }
00635 
00636         if(rd==0){
00637           if(fSampleType==0 || fSampleType==2)harraytemp->Scale(1 + cc_det);
00638           if(fSampleType==3)harraytemp->Scale((1.0 + numubar_scale)*(1.0 + cc_det));
00639         }
00640         if(rd==1){
00641           if(fSampleType==0 || fSampleType==2)harraytemp->Scale(1 + cc_rock);
00642           if(fSampleType==3)harraytemp->Scale((1.0 + numubar_scale)*(1.0 + cc_rock));
00643         }
00644         (ret_object.at(i)).at(res)->Add(harraytemp,1.0);
00645 
00646         htemp = harraytemp->ConvertTH1D(outputname.Data());
00647         htemp->Write();
00648         delete htemp;
00649         delete harraytemp;      
00650 
00651         //this->Pause();
00652 
00653         for(UInt_t j=0;j<(((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).size();j++){
00654         
00655           outputname.Resize(0); outputname.Append("hTau_"); outputname.Append(label.Data()); outputname.Append("_"); outputname.Append(fSampleName.Data()); 
00656           outputname.Append("_MC"); outputname += rd; outputname.Append("_Dis"); outputname += i; outputname.Append("_"); outputname += res; outputname.Append("_"); outputname += j;
00657           if(rd==0) (((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j)->Scale(1.0 + cc_det);
00658           if(rd==1) (((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j)->Scale(1.0 + cc_rock);
00659           (ret_object.at(i)).at(res)->Add((((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j),1.0);
00660           TH1D* htemp = (((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j)->ConvertTH1D(outputname.Data());
00661           htemp->Write();
00662           delete htemp;
00663         }
00664 
00665         for(UInt_t j=0;j<(((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).size();j++){
00666           
00667           outputname.Resize(0); outputname.Append("hNuMuBar_"); outputname.Append(label.Data()); outputname.Append("_"); outputname.Append(fSampleName.Data()); 
00668           outputname.Append("_MC"); outputname += rd; outputname.Append("_Dis"); outputname += i; outputname.Append("_"); outputname += res; outputname.Append("_"); outputname += j;
00669 
00670           if(rd==0){
00671             if(fSampleType==0 || fSampleType==2)(((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j)->Scale((1.0 + numubar_scale)*(1.0 + cc_det));
00672             if(fSampleType==3)(((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j)->Scale(1.0 + cc_det);
00673           }
00674           if(rd==1){
00675             if(fSampleType==0 || fSampleType==2)(((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j)->Scale((1.0 + numubar_scale)*(1.0 + cc_rock));
00676             if(fSampleType==3)(((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j)->Scale(1.0 + cc_rock);
00677           }
00678           (ret_object.at(i)).at(res)->Add((((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j),1.0);
00679           TH1D* htemp = (((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j)->ConvertTH1D(outputname.Data());
00680           htemp->Write();
00681           delete htemp;
00682         }
00683         
00684         MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() Scaled all CC contributions *-*" << endl;
00685         
00686         //Scale 1D contributions and add
00687         TH1D* htempNC;
00688         ArrayTH1D* temp = new ArrayTH1D("temp","temp",fNumFittingBins,0.,fMaxEnergy,fArrayHistsFlag);
00689         
00690         if(((((v1DTemplates5D.at(rd)).at(i)).at(0)).at(0)).size()>0){
00691           
00692           for(Int_t j=0;j<(this->fNum1DSysts)+1;j++){
00693         
00694             if(j==0 && ((((v1DTemplates5D.at(rd)).at(i)).at(res)).at(j)).size()>0){
00695               temp->Add(((((v1DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).at(0),1.0);
00696             }
00697             if(j>0){
00698               if(((((v1DTemplates5D.at(rd)).at(i)).at(res)).at(j)).size() > 0){
00699                 this->InterpMin(temp,v1DNewPredSpectrum5D.at(rd),systscale1d[j-1],i,res,j-1); //So will interpolate and add if exists
00700               }
00701             }
00702           }
00703           if(rd==0) temp->Scale((1.0 + cc_det)*(1.0 + nc_scale));  
00704           if(rd==1) temp->Scale((1.0 + cc_rock)*(1.0 + nc_scale));
00705           if(gGhostInputs->fFitDecay) temp->Decay(mu2,sin2);
00706           (ret_object.at(i)).at(res)->Add(temp,1.0);
00707           outputname.Resize(0); outputname.Append("hNC"); outputname.Append(label.Data()); outputname.Append("_"); outputname.Append(fSampleName.Data()); 
00708           outputname.Append("_MC"); outputname += rd; outputname.Append("_Dis"); outputname += i; outputname.Append("_"); outputname += res;
00709           
00710           htempNC = (TH1D*)temp->ConvertTH1D(outputname.Data());
00711           htempNC->Write();
00712           delete htempNC;
00713           delete temp;
00714           
00715           MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::GetSpectrum() Scaled all NC contributions *-*" << endl;
00716         }//EO check if NC sample exists
00717       }//EO loop over resolution bins
00718     }//EO loop over distributions
00719   }//EO loop over rock/detector
00720 }

void GhostSample::InitialisePredictionVectors (  )  [private]

Definition at line 423 of file GhostSample.cxx.

References fArrayHistsFlag, fMaxEnergy, fNDis, fNResBins, fNum1DSysts, fNum2DSysts, fNumFittingBins, Msg::kDebug, MSG, size, v1DNewPredSpectrum5D, v1DTemplates5D, v2D_1D_NewPredSpectrum5D, v2DBkgNewPredSpectrum4D, v2DBkgOscillatedTemplatesSin2Max4D, v2DNewPredSpectrum5D, v2DTauNewPredSpectrum4D, and v2DTauOscillatedTemplatesSin2Max4D.

Referenced by FinaliseSample().

00424 {
00425   MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::InitialisePredictionVectors() *-* " << endl;
00426   TString name;
00427   
00428   //Initialise prediction vectors to correct sizes - TOTAL number of 2D systematics, then skip ones not applying
00429   for(Int_t rd=0;rd<2;rd++){
00430     for(Int_t i=0;i<fNDis;i++){
00431       for(Int_t res=0;res<fNResBins;res++){
00432         for(Int_t j=0;j<fNum2DSysts+1;j++){
00433           name.Resize(0); name.Append("hCCPredicted"); name += rd; name.Append("_"); name += i; name.Append("_"); name += res; name.Append("_"); name += j; name.Append("_"); name += 0;
00434           if(j==0) ((((v2DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).push_back(new ArrayTH1D(name.Data(),name.Data(),fNumFittingBins,0.,fMaxEnergy,fArrayHistsFlag));
00435           if(j>0){
00436             for(Int_t k=0;k<4;k++){
00437               name.Resize(0); name.Append("hCCPredicted"); name += rd; name.Append("_"); name += i; name.Append("_"); name += res; name.Append("_");name += j; name.Append("_"); name += k;
00438               ((((v2DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).push_back(new ArrayTH1D(name.Data(),name.Data(),fNumFittingBins,0.,fMaxEnergy,fArrayHistsFlag));
00439             }
00440           }
00441         }
00442         //CC spectra pinned to 1D systematics
00443         for(Int_t j=0;j<fNum1DSysts+1;j++){
00444           name.Resize(0); name.Append("hCC_1D_Predicted"); name += rd; name.Append("_"); name += i; name.Append("_"); name += res; name.Append("_"); name += j; name.Append("_"); name += 0;
00445           if(j==0) ((((v2D_1D_NewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).push_back(new ArrayTH1D(name.Data(),name.Data(),fNumFittingBins,0.,fMaxEnergy,fArrayHistsFlag));
00446           if(j>0){
00447             for(Int_t k=0;k<4;k++){
00448               name.Resize(0); name.Append("hCC_1D_Predicted"); name += rd; name.Append("_"); name += i; name.Append("_"); name += res; name.Append("_");name += j; name.Append("_"); name += k;
00449               ((((v2D_1D_NewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).push_back(new ArrayTH1D(name.Data(),name.Data(),fNumFittingBins,0.,fMaxEnergy,fArrayHistsFlag));
00450             }
00451           }
00452         }
00453         //Initialise prediction vectors to correct sizes - TOTAL number of 1D systematics, then skip ones not applying
00454         for(Int_t j=0;j<fNum1DSysts+1;j++){
00455           name.Resize(0);name.Append("hNCPredicted"); name += rd; name.Append("_"); name += i; name.Append("_"); name += res; name.Append("_"); name += j; name.Append("_"); name += 0;
00456           if(j==0 && ((((v1DTemplates5D.at(rd)).at(i)).at(res)).at(j)).size() > 0 ){
00457             (((v1DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j).push_back(new ArrayTH1D(name.Data(),name.Data(),fNumFittingBins,0.,fMaxEnergy,fArrayHistsFlag));
00458           }
00459           if(j>0){
00460             for(Int_t k=0;k<4;k++){
00461               name.Resize(0); name.Append("hNCPredicted"); name += rd; name.Append("_"); name += i; name.Append("_"); name += res; name.Append("_"); name += j; name.Append("_"); name += k;
00462               (((v1DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j).push_back(new ArrayTH1D(name.Data(),name.Data(),fNumFittingBins,0.,fMaxEnergy,fArrayHistsFlag));
00463             }
00464           }
00465         }
00466         //Initialise background prediction vectors
00467         for(UInt_t j=0;j<(((v2DBkgOscillatedTemplatesSin2Max4D.at(rd)).at(i)).at(res)).size();j++){
00468           name.Resize(0); name.Append("hCCBkgPredicted"); name += rd; name.Append("_"); name += i; name.Append("_"); name += res; name.Append("_"); name += j;
00469           (((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).push_back(new ArrayTH1D(name.Data(),name.Data(),fNumFittingBins,0.,fMaxEnergy,fArrayHistsFlag));
00470         }
00471         for(UInt_t j=0;j<(((v2DTauOscillatedTemplatesSin2Max4D.at(rd)).at(i)).at(res)).size();j++){
00472           name.Resize(0); name.Append("hCCTauPredicted"); name += rd; name.Append("_"); name += i; name.Append("_"); name += res; name.Append("_"); name += j;
00473           (((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).push_back(new ArrayTH1D(name.Data(),name.Data(),fNumFittingBins,0.,fMaxEnergy,fArrayHistsFlag));
00474         }
00475       }//EO res
00476     }//EO distributions
00477   }//EO rock and detector
00478   MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::InitialisePredictionVectors() Completed *-* " << endl;
00479 }

void GhostSample::InterpMin ( ArrayTH1D hist,
vector< vector< vector< vector< ArrayTH1D * > > > >  vinput,
Double_t  shift_ns,
Int_t  dis_index,
Int_t  res_index,
Int_t  syst_index 
) [private]

Definition at line 941 of file GhostSample.cxx.

References ArrayTH1D::Add(), GhostInterpolation::Interpolate(), Msg::kInfo, and MSG.

Referenced by GetSpectrum().

00941                                                                                                                                                                   {
00942 
00943   //MSG("GhostSample",Msg::kInfo) << " *-* GhostSample::InterpMin()  *-*" << endl;
00944   //MSG("GhostSample",Msg::kInfo) << " *-* Interpolating Systematic #" << syst_index << "  *-*" << endl;
00945 
00946   //cout << "shift_ns = " << shift_ns << endl;
00947 
00948   //Set up containers for weights
00949   Double_t weight_m2 = -999.9;
00950   Double_t weight_m1 = -999.9;
00951   Double_t weight_nom = -999.9;
00952   Double_t weight_p1 = -999.9;
00953   Double_t weight_p2 = -999.9;
00954   Double_t* weights = new Double_t[5];
00955     
00956   GhostInterpolation* interpolation = new GhostInterpolation();
00957 
00958   //Gives weights for spectra
00959   interpolation->Interpolate(shift_ns,weight_m2,weight_m1,weight_nom,weight_p1,weight_p2);
00960 
00961   weights[0] = weight_p2;  weights[1] = weight_p1;  weights[2] = weight_m1;  weights[3] = weight_m2;  weights[4] = weight_nom - 1; 
00962 
00963   hist->Add((ArrayTH1D*)(((vinput.at(dis_index)).at(res_index)).at(syst_index+1)).at(0),weights[0]);
00964   hist->Add((ArrayTH1D*)(((vinput.at(dis_index)).at(res_index)).at(syst_index+1)).at(1),weights[1]);
00965   hist->Add((ArrayTH1D*)(((vinput.at(dis_index)).at(res_index)).at(syst_index+1)).at(2),weights[2]);
00966   hist->Add((ArrayTH1D*)(((vinput.at(dis_index)).at(res_index)).at(syst_index+1)).at(3),weights[3]);
00967   hist->Add((ArrayTH1D*)(((vinput.at(dis_index)).at(res_index)).at(0)).at(0),weights[4]);            //nominal case
00968 
00969       
00970   MSG("GhostSample",Msg::kInfo) << "Weights:" << endl;
00971   MSG("GhostSample",Msg::kInfo) << "weights[0] = " << weights[0] << endl;
00972   MSG("GhostSample",Msg::kInfo) << "weights[1] = " << weights[1] << endl;
00973   MSG("GhostSample",Msg::kInfo) << "weights[2] = " << weights[2] << endl;
00974   MSG("GhostSample",Msg::kInfo) << "weights[3] = " << weights[3] << endl;
00975   MSG("GhostSample",Msg::kInfo) << "weights[4] = " << weights[4] << endl;
00976   
00977   delete interpolation;
00978   delete[] weights;
00979   //this->Pause();
00980 }

void GhostSample::InterpolateOscillatedSpectra ( Bool_t  tau,
Double_t  sin2_par,
Double_t  dm2_par,
Double_t  mu2_par,
TH1D *  hSin2Min,
TH2D *  hTruevsReco,
ArrayTH1D pred_hist 
)

Definition at line 1009 of file GhostSample.cxx.

References GhostUtilities::DecayWeight(), NuOscProbCalc::DecayWeightMuToTau(), NuOscProbCalc::DecoherenceWeight(), GhostUtilities::DecoherenceWeightMuToTau(), GhostInputs::fDecoPower, GhostInputs::fFitDecay, gGhostInputs, Msg::kDebug, MSG, ArrayTH1D::Reset(), and ArrayTH1D::SetBinContent().

01010                                                                                                      {
01011   
01012   MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::InterpolateOscillatedSpectra() *-*" << endl; 
01013   
01014   pred_hist->Reset();
01015   Int_t deco_pow = gGhostInputs->fDecoPower;
01016   
01017    //Loop over energy to fill prediction histogram
01018   for(int i=0;i<hTruevsReco->GetYaxis()->GetNbins();i++){
01019 
01020     Double_t MinBinContent = hSin2Min->GetBinContent(i+1);
01021 
01022     Double_t mu2_weight = 0; Double_t mu2_norm = 0;
01023 
01024     if(tau==false&&!gGhostInputs->fFitDecay){
01025       for(int j=TMath::Max(i-1000,0);j<TMath::Min(i+1001,hTruevsReco->GetXaxis()->GetNbins());j++){
01026         Double_t true_e = hTruevsReco->GetXaxis()->GetBinCenter(j+1);
01027         Double_t binwidth = hTruevsReco->GetXaxis()->GetBinWidth(j+1);
01028         mu2_weight += GhostUtilities::DecoherenceWeight(true_e,mu2_par,sin2_par,binwidth,dm2_par,deco_pow)*
01029                       hTruevsReco->GetBinContent(j+1,i+1);
01030         mu2_norm += hTruevsReco->GetBinContent(j+1,i+1);
01031       }
01032     }
01033     else if(tau==true&&!gGhostInputs->fFitDecay){ 
01034       for(int j=TMath::Max(i-1000,0);j<TMath::Min(i+1001,hTruevsReco->GetXaxis()->GetNbins());j++){
01035         Double_t true_e = hTruevsReco->GetXaxis()->GetBinCenter(j+1);
01036         Double_t binwidth = hTruevsReco->GetXaxis()->GetBinWidth(j+1);
01037         mu2_weight += GhostUtilities::DecoherenceWeightMuToTau(true_e,mu2_par,sin2_par,binwidth,dm2_par,deco_pow)*
01038                       hTruevsReco->GetBinContent(j+1,i+1);
01039         mu2_norm += hTruevsReco->GetBinContent(j+1,i+1);
01040       }
01041     }
01042     else if(tau==false&&gGhostInputs->fFitDecay){
01043       for(int j=TMath::Max(i-1000,0);j<TMath::Min(i+1001,hTruevsReco->GetXaxis()->GetNbins());j++){
01044         Double_t true_e = hTruevsReco->GetXaxis()->GetBinCenter(j+1);
01045         Double_t binwidth = hTruevsReco->GetXaxis()->GetBinWidth(j+1);
01046         mu2_weight += GhostUtilities::DecayWeight(true_e,mu2_par,sin2_par,binwidth,dm2_par)*
01047                       hTruevsReco->GetBinContent(j+1,i+1);
01048         mu2_norm += hTruevsReco->GetBinContent(j+1,i+1);
01049       }
01050     }
01051     else if(tau==true&&gGhostInputs->fFitDecay){
01052       for(int j=TMath::Max(i-1000,0);j<TMath::Min(i+1001,hTruevsReco->GetXaxis()->GetNbins());j++){
01053         Double_t true_e = hTruevsReco->GetXaxis()->GetBinCenter(j+1);
01054         Double_t binwidth = hTruevsReco->GetXaxis()->GetBinWidth(j+1);
01055         mu2_weight += GhostUtilities::DecayWeightMuToTau(true_e,mu2_par,sin2_par,binwidth,dm2_par)*
01056                       hTruevsReco->GetBinContent(j+1,i+1);
01057         mu2_norm += hTruevsReco->GetBinContent(j+1,i+1); 
01058       }
01059     }
01060 
01061     if(mu2_norm==0){ mu2_norm = 1.0; mu2_weight = 1.0; }
01062 
01063     pred_hist->SetBinContent(i+1,MinBinContent*mu2_weight/mu2_norm);
01064   }
01065 }

void GhostSample::InterpolateOscillatedSpectra ( Bool_t  tau,
Double_t  sin2_par,
Double_t  dm2_par,
TH1D *  hSin2Min,
TH2D *  hSin2Max,
ArrayTH1D pred_hist 
)

Definition at line 984 of file GhostSample.cxx.

References Msg::kDebug, MSG, GhostUtilities::OscillationScale(), GhostUtilities::OscillationScaleMuToTau(), ArrayTH1D::Reset(), and ArrayTH1D::SetBinContent().

Referenced by GetSpectrum().

00984                                                                                                                                               {
00985 
00986   MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::InterpolateOscillatedSpectra() *-*" << endl;  
00987 
00988   pred_hist->Reset();
00989 
00990   Int_t Dm2IndexPlus1 = hSin2Max->GetXaxis()->FindBin(dm2_par); //More reliable
00991   
00992    //Loop over energy to fill prediction histogram
00993   for(int i=0;i<hSin2Max->GetYaxis()->GetNbins();i++){
00994   
00995     Double_t MaxBinContent = hSin2Max->GetBinContent(Dm2IndexPlus1,i+1);
00996     Double_t MinBinContent = hSin2Min->GetBinContent(i+1);      
00997     
00998     Double_t InterpBinContent = -999.9;
00999     if(tau==false) InterpBinContent = GhostUtilities::OscillationScale(MaxBinContent,MinBinContent,sin2_par);
01000     else if(tau==true) InterpBinContent = GhostUtilities::OscillationScaleMuToTau(MaxBinContent,sin2_par);
01001     else cout << " *** ERROR: NO TEMPLATE TYPE GIVEN TO INTERPOLATEOSCILLATEDSPECTRA *** " << endl;
01002 
01003     pred_hist->SetBinContent(i+1,InterpBinContent);
01004   }
01005 }

void GhostSample::MakeNeutralCurrentSpectra (  ) 

Definition at line 1386 of file GhostSample.cxx.

References fNDis, fNResBins, fNum1DSysts, Msg::kDebug, Munits::m, MSG, size, v1DNewPredSpectrum5D, and v1DTemplates5D.

Referenced by GetSpectrum().

01387 {
01388   MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::MakeNeutralCurrentSpectra() *-*" << endl;
01389 
01390   //Loop over input 1D histograms and rebin into a new container
01391   for(Int_t rd=0;rd<2;rd++){
01392     for(Int_t i=0;i<fNDis;i++){
01393       for(Int_t res=0;res<fNResBins;res++){
01394         for(Int_t j=0;j<fNum1DSysts+1;j++){
01395           for(UInt_t k=0;k<((((v1DTemplates5D.at(rd)).at(i)).at(res)).at(j)).size();k++){
01396             
01397             //If template exists rebin and push back into prediction vector
01398             if(((((v1DTemplates5D.at(rd)).at(i)).at(res)).at(j)).size() > 0){
01399               for(Int_t m=0;m<((((v1DTemplates5D.at(rd)).at(i)).at(res)).at(j)).at(k)->GetXaxis()->GetNbins();m++){
01400                 
01401                 Double_t bin_content = ((((v1DTemplates5D.at(rd)).at(i)).at(res)).at(j)).at(k)->GetBinContent(m+1);
01402                 Double_t reco_enu = ((((v1DTemplates5D.at(rd)).at(i)).at(res)).at(j)).at(k)->GetXaxis()->GetBinCenter(m+1);
01403                 ((((v1DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).at(k)->Fill(reco_enu,bin_content); 
01404               }//EO loop over binning
01405             }//Does it exist
01406           }
01407         }
01408       }
01409     }
01410   }
01411   MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::MakeNeutralCurrentSpectra() Setup NC prediction spectrum vector in fitting binning *-*" << endl;  
01412 }

void GhostSample::MakeOscillatedHistogramBinCentre ( TH2D *  hExtrapolated,
TH2D *  hOscillated2D,
TH1D *  hOscillated1D,
Bool_t  survival 
) [private]

Definition at line 1607 of file GhostSample.cxx.

References fNumDm2Bins, n, NuOscProbCalc::OscillationWeight(), and GhostUtilities::OscillationWeightMuToTau().

Referenced by MakeOscillatedSpectraBinCentre().

01608 {
01609   //Loop over dm2 values and oscillate event at all values, fill appropriate histogram
01610   for(Int_t n=0;n<fNumDm2Bins;n++){
01611     
01612     Double_t dm2 = hOscillated2D->GetXaxis()->GetBinCenter(n+1);
01613     
01614     for(Int_t y=0;y<hExtrapolated->GetYaxis()->GetNbins();y++){
01615       
01616         Double_t bin_content = 0.0;
01617         
01618         for(Int_t x=0;x<hExtrapolated->GetXaxis()->GetNbins();x++){
01619           
01620           //Oscillation probability at this dm2
01621           Double_t prob = 1.0;
01622           Double_t true_e = hExtrapolated->GetXaxis()->GetBinCenter(x+1);
01623           if(survival==1) prob = GhostUtilities::OscillationWeight(true_e,dm2,1.0);
01624           if(survival==0) prob = GhostUtilities::OscillationWeightMuToTau(true_e,dm2,1.0);
01625           
01626           bin_content += (hExtrapolated->GetBinContent(x+1,y+1))*prob;
01627         }
01628         hOscillated2D->SetBinContent(n+1,y+1,bin_content);
01629     }
01630   }
01631   
01632   //Loop over extrapolated histogram to fill 1D unsoscillated prediction
01633   for(Int_t y=0;y<hExtrapolated->GetYaxis()->GetNbins();y++){
01634     for(Int_t x=0;x<hExtrapolated->GetXaxis()->GetNbins();x++){
01635       
01636       Double_t reco_E = hExtrapolated->GetYaxis()->GetBinCenter(y+1);
01637       
01638       Double_t bincontentextrapolated;
01639       bincontentextrapolated = hExtrapolated->GetBinContent(x+1,y+1);
01640       
01641       hOscillated1D->Fill(reco_E,bincontentextrapolated);
01642       
01643     }
01644   }
01645 }

void GhostSample::MakeOscillatedSpectra (  ) 

Definition at line 1069 of file GhostSample.cxx.

References fDm2Max, fDm2Min, fEdgesEFittingBinsArray, FillHistogramsFromDST(), fNDis, fNResBins, fNum2DSysts, fNumDm2Bins, fNumFittingBins, fOutputFilename, fSampleName, hDm2Array, hOscillated1D, hOscillated2D, Msg::kDebug, Msg::kInfo, MSG, OscillateExtrapolatedTemplate(), size, v2DNuMuBarTemplates3D, v2DNuMuTemplates4D, v2DNuTauTemplates3D, v2DTauMicroDSTTree, vDataPoT, vDSTOscillatedHistograms_CCNuMu1D, vDSTOscillatedHistograms_CCNuMu2D, vDSTOscillatedHistograms_CCNuMu3D, vDSTOscillatedHistograms_CCNuMuBar1D, vDSTOscillatedHistograms_CCNuMuBar2D, vDSTOscillatedHistograms_CCNuMuBar3D, vDSTOscillatedHistograms_CCNuTau1D, vDSTOscillatedHistograms_CCNuTau2D, vDSTOscillatedHistograms_CCNuTau3D, vDSTUnoscillatedHistograms_CCNuMu1D, vDSTUnoscillatedHistograms_CCNuMu2D, vDSTUnoscillatedHistograms_CCNuMuBar1D, vDSTUnoscillatedHistograms_CCNuMuBar2D, vDSTUnoscillatedHistograms_CCNuTau1D, vDSTUnoscillatedHistograms_CCNuTau2D, vMicroDSTTree, and vNewDataPoT.

01069                                        {
01070 
01071   MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::MakeOscillatedSpectra() *-*" << endl;
01072   
01073   //Put container percantage calculator here
01074   hDm2Array = new TH1D("hDm2Array","hDm2Array",fNumDm2Bins,fDm2Min,fDm2Max);
01075   
01076   //Set up oscillated histogram containers
01077   TString DSTName;
01078   TString histname;
01079 
01080   for(Int_t i=0;i<fNDis;i++){
01081     for(Int_t j=0;j<fNResBins;j++){
01082       vDSTOscillatedHistograms_CCNuMu2D.push_back(vDSTOscillatedHistograms_CCNuMu1D);
01083       vDSTOscillatedHistograms_CCNuMuBar2D.push_back(vDSTOscillatedHistograms_CCNuMuBar1D);
01084       vDSTOscillatedHistograms_CCNuTau2D.push_back(vDSTOscillatedHistograms_CCNuTau1D);
01085 
01086       vDSTUnoscillatedHistograms_CCNuMu2D.push_back(vDSTUnoscillatedHistograms_CCNuMu1D);
01087       vDSTUnoscillatedHistograms_CCNuMuBar2D.push_back(vDSTUnoscillatedHistograms_CCNuMuBar1D);
01088       vDSTUnoscillatedHistograms_CCNuTau2D.push_back(vDSTUnoscillatedHistograms_CCNuTau1D);
01089 
01090       //Unoscillated
01091       if((((v2DNuMuTemplates4D.at(0)).at(0)).at(0)).size() > 0){
01092         DSTName.Resize(0); DSTName.Append("hNuMuNominalMCUnoscillated_"); DSTName += i; DSTName.Append("_"); DSTName += j; 
01093         (vDSTUnoscillatedHistograms_CCNuMu2D.at(i)).push_back((TH2D*)(((v2DNuMuTemplates4D.at(0)).at(0)).at(0)).at(0)->Clone(DSTName.Data()));
01094         (vDSTUnoscillatedHistograms_CCNuMu2D.at(i)).back()->Reset();
01095       }
01096       if(((v2DNuMuBarTemplates3D.at(0)).at(0)).size() > 0){
01097         DSTName.Resize(0); DSTName.Append("hNuMuBarNominalMCUnoscillated_"); DSTName += i; DSTName.Append("_"); DSTName += j; 
01098         (vDSTUnoscillatedHistograms_CCNuMuBar2D.at(i)).push_back((TH2D*)((v2DNuMuBarTemplates3D.at(0)).at(0)).at(0)->Clone(DSTName.Data()));
01099         (vDSTUnoscillatedHistograms_CCNuMuBar2D.at(i)).back()->Reset();
01100       }
01101       if(((v2DNuTauTemplates3D.at(0)).at(0)).size() > 0){
01102         DSTName.Resize(0); DSTName.Append("hNuTauNominalMCUnoscillated_"); DSTName += i; DSTName.Append("_"); DSTName += j; 
01103         (vDSTUnoscillatedHistograms_CCNuTau2D.at(i)).push_back((TH2D*)((v2DNuTauTemplates3D.at(0)).at(0)).at(0)->Clone(DSTName.Data()));
01104         (vDSTUnoscillatedHistograms_CCNuTau2D.at(i)).back()->Reset();
01105       }
01106     }
01107     vDSTOscillatedHistograms_CCNuMu3D.push_back(vDSTOscillatedHistograms_CCNuMu2D);
01108     vDSTOscillatedHistograms_CCNuMuBar3D.push_back(vDSTOscillatedHistograms_CCNuMu2D);
01109     vDSTOscillatedHistograms_CCNuTau3D.push_back(vDSTOscillatedHistograms_CCNuTau2D);
01110   }
01111 
01112   //Push back real histograms into completed vector
01113   for(Int_t i=0;i<fNDis;i++){
01114     for(Int_t j=0;j<fNResBins;j++){
01115       for(Int_t k=0;k<fNumDm2Bins;k++){
01116         
01117         if((((v2DNuMuTemplates4D.at(0)).at(0)).at(0)).size() > 0){
01118         DSTName.Resize(0); DSTName.Append("hNuMuNominalMCOscillated_"); DSTName += i; DSTName.Append("_"); DSTName += j; DSTName.Append("_");  DSTName += k;
01119         ((vDSTOscillatedHistograms_CCNuMu3D.at(i)).at(j)).push_back((TH2D*)(((v2DNuMuTemplates4D.at(0)).at(0)).at(0)).at(0)->Clone(DSTName.Data()));
01120         ((vDSTOscillatedHistograms_CCNuMu3D.at(i)).at(j)).back()->Reset();
01121         }
01122         if(((v2DNuMuBarTemplates3D.at(0)).at(0)).size() > 0){
01123           DSTName.Resize(0); DSTName.Append("hNuMuBarNominalMCOscillated_"); DSTName += i; DSTName.Append("_"); DSTName += j; DSTName.Append("_");  DSTName += k;
01124           ((vDSTOscillatedHistograms_CCNuMuBar3D.at(i)).at(j)).push_back((TH2D*)((v2DNuMuBarTemplates3D.at(0)).at(0)).at(0)->Clone(DSTName.Data()));
01125           ((vDSTOscillatedHistograms_CCNuMuBar3D.at(i)).at(j)).back()->Reset();
01126         }
01127         if(((v2DNuTauTemplates3D.at(0)).at(0)).size() > 0){
01128           DSTName.Resize(0); DSTName.Append("hNuTauNominalMCOscillated_"); DSTName += i; DSTName.Append("_"); DSTName += j; DSTName.Append("_");  DSTName += k;
01129           ((vDSTOscillatedHistograms_CCNuTau3D.at(i)).at(j)).push_back((TH2D*)((v2DNuTauTemplates3D.at(0)).at(0)).at(0)->Clone(DSTName.Data()));
01130           ((vDSTOscillatedHistograms_CCNuTau3D.at(i)).at(j)).back()->Reset();
01131         }
01132       } 
01133     }
01134   }
01135  
01136   TFile* fOutputFile = new TFile(fOutputFilename.Data(),"recreate");
01137 
01138   for(Int_t i=0;i<fNDis;i++){
01139     
01140     //(1) Contained Vertex Events: numu CC and numubar CC
01141     if(vMicroDSTTree.size() > 0) this->FillHistogramsFromDST(vMicroDSTTree.at(i),i);
01142 
01143     //(2) Contained Vertex events: nutau CC and nutaubar CC
01144     if(v2DTauMicroDSTTree.size() > 0) this->FillHistogramsFromDST(v2DTauMicroDSTTree.at(i),i);
01145 
01146     //Take ratio for each extrapolated histogram
01147     for(Int_t res=0;res<fNResBins;res++){
01148       
01149       //(1) 2D CC NuMu container
01150       for(Int_t j=0;j<fNum2DSysts+1;j++){
01151         for(UInt_t k=0;k<(((v2DNuMuTemplates4D.at(i)).at(res)).at(j)).size();k++){
01152           //Set up histograms
01153           histname.Resize(0); histname.Append("h"); histname.Append(fSampleName.Data()); histname.Append("NuMuOscillatedSin2Max_"); histname += i; histname.Append("_"); histname += res;
01154           histname.Append("_"); histname += j; histname.Append("_"); histname += k;
01155           hOscillated2D = new TH2D(histname.Data(),histname.Data(),fNumDm2Bins,fDm2Min,fDm2Max,fNumFittingBins,fEdgesEFittingBinsArray);
01156           histname.Resize(0); histname.Append("h"); histname.Append(fSampleName.Data()); histname.Append("NuMuOscillatedSin2Min_"); histname += i; histname.Append("_"); histname += res;
01157           histname.Append("_"); histname += j; histname.Append("_"); histname += k;
01158           hOscillated1D = new TH1D(histname.Data(),histname.Data(),fNumFittingBins,fEdgesEFittingBinsArray);
01159           
01160           this->OscillateExtrapolatedTemplate((((v2DNuMuTemplates4D.at(i)).at(res)).at(j)).at(k),(vDSTOscillatedHistograms_CCNuMu3D.at(i)).at(res),(vDSTUnoscillatedHistograms_CCNuMu2D.at(i)).at(res),hOscillated2D,hOscillated1D,0);  //0 for false tau
01161 
01162           cout << "2D Oscillated template integral before scaling = " << hOscillated2D->Integral() << endl;
01163           cout << "1D Oscillated template integral before scaling= " << hOscillated1D->Integral() << endl;
01164           
01165           //Scale histograms
01166           Double_t scale = 1.0;
01167           if(vDataPoT.at(i) > 0) scale = vNewDataPoT.at(i) / vDataPoT.at(i);
01168           hOscillated2D->Scale(scale);
01169           hOscillated1D->Scale(scale);
01170           
01171           //Write out histograms
01172           fOutputFile->cd();
01173           hOscillated2D->Write();
01174           hOscillated1D->Write();
01175           
01176           delete hOscillated2D;
01177           delete hOscillated1D;
01178           
01179         }//EO loop over syst histograms
01180       }//EO loop over number fo systematics
01181 
01182 
01183       //(2) 2D CC NuMuBar container
01184       for(UInt_t j=0;j<((v2DNuMuBarTemplates3D.at(i)).at(res)).size();j++){
01185       
01186         //Set up histograms
01187         histname.Resize(0); histname.Append("h"); histname.Append(fSampleName.Data()); histname.Append("NuMuBarOscillatedSin2Max_");
01188         histname += i; histname.Append("_"); histname += res; histname.Append("_"); histname += j;
01189         hOscillated2D = new TH2D(histname.Data(),histname.Data(),fNumDm2Bins,fDm2Min,fDm2Max,fNumFittingBins,fEdgesEFittingBinsArray);
01190         histname.Resize(0); histname.Append("h"); histname.Append(fSampleName.Data()); histname.Append("NuMuBarOscillatedSin2Min_");
01191         histname += i; histname.Append("_");  histname += res; histname.Append("_"); histname += j;
01192         hOscillated1D = new TH1D(histname.Data(),histname.Data(),fNumFittingBins,fEdgesEFittingBinsArray);
01193   
01194         this->OscillateExtrapolatedTemplate(((v2DNuMuBarTemplates3D.at(i)).at(res)).at(j),(vDSTOscillatedHistograms_CCNuMuBar3D.at(i)).at(res),(vDSTUnoscillatedHistograms_CCNuMuBar2D.at(i)).at(res),hOscillated2D,hOscillated1D,0);
01195         cout << "2D Oscillated template integral before scaling = " << hOscillated2D->Integral() << endl;
01196         cout << "1D Oscillated template integral before scaling= " << hOscillated1D->Integral() << endl;
01197 
01198         //Scale histograms
01199         Double_t scale = 1.0;
01200         if(vDataPoT.at(i) > 0) scale = vNewDataPoT.at(i) / vDataPoT.at(i);
01201         hOscillated2D->Scale(scale);
01202         hOscillated1D->Scale(scale);
01203 
01204         //Write out histograms
01205         fOutputFile->cd();
01206         hOscillated2D->Write();
01207         hOscillated1D->Write();
01208         
01209         delete hOscillated2D;
01210         delete hOscillated1D;
01211         
01212       }
01213       
01214       //(3) 2D CC Tau container
01215       for(UInt_t j=0;j<((v2DNuTauTemplates3D.at(i)).at(res)).size();j++){
01216 
01217         //Set up histograms
01218         histname.Resize(0); histname.Append("h"); histname.Append(fSampleName.Data()); histname.Append("NuTauOscillatedSin2Max_");
01219         histname += i; histname.Append("_"); histname += res; histname.Append("_"); histname += j;
01220         hOscillated2D = new TH2D(histname.Data(),histname.Data(),fNumDm2Bins,fDm2Min,fDm2Max,fNumFittingBins,fEdgesEFittingBinsArray);
01221         histname.Resize(0); histname.Append("h"); histname.Append(fSampleName.Data()); histname.Append("NuTauOscillatedSin2Min_");
01222         histname += i; histname.Append("_"); histname += res; histname.Append("_"); histname += j;
01223         hOscillated1D = new TH1D(histname.Data(),histname.Data(),fNumFittingBins,fEdgesEFittingBinsArray);
01224 
01225         this->OscillateExtrapolatedTemplate(((v2DNuTauTemplates3D.at(i)).at(res)).at(j),(vDSTOscillatedHistograms_CCNuTau3D.at(i)).at(res),(vDSTUnoscillatedHistograms_CCNuTau2D.at(i)).at(res),hOscillated2D,hOscillated1D,1);
01226 
01227         cout << "2D Oscillated template integral before scaling = " << hOscillated2D->Integral() << endl;
01228         cout << "1D Oscillated template integral before scaling= " << hOscillated1D->Integral() << endl;
01229 
01230         //Scale histograms
01231         Double_t scale = 1.0;
01232         if(vDataPoT.at(i) > 0) scale = vNewDataPoT.at(i) / vDataPoT.at(i);
01233         hOscillated2D->Scale(scale);
01234         hOscillated1D->Scale(scale);
01235         
01236         //Write out histograms
01237         fOutputFile->cd();
01238         hOscillated2D->Write();
01239         hOscillated1D->Write();
01240         
01241         delete hOscillated2D;
01242         delete hOscillated1D;
01243         
01244       }//Tau container
01245       
01246     }
01247     MSG("GhostSample",Msg::kInfo) << " *-* Oscillated Extrapolated Spectra for Distribution " << i+1 << "/" << fNDis << " *-*" << endl; 
01248   }//EO loop over distributions  
01249   delete hDm2Array;
01250 }

void GhostSample::MakeOscillatedSpectraBinCentre (  ) 

Definition at line 1475 of file GhostSample.cxx.

References fDm2Max, fDm2Min, fEdgesEFittingBinsArray, fNDis, fNResBins, fNum2DSysts, fNumDm2Bins, fNumFittingBins, fOutputFilename, fSampleName, hOscillated1D, hOscillated2D, Msg::kInfo, MakeOscillatedHistogramBinCentre(), MSG, size, v2DNuMuBarTemplates3D, v2DNuMuTemplates4D, v2DNuTauTemplates3D, vDataPoT, and vNewDataPoT.

01476 {
01477   
01478   MsgFormat percent(".1f"); Double_t percent_done = 0.0; Int_t counter = 0; 
01479   Double_t containersize = fNDis*fNResBins*(1+(fNum2DSysts*4));
01480   
01481   for(Int_t i=0;i<fNDis;i++){
01482     for(Int_t res=0;res<fNResBins;res++){
01483       containersize += ((v2DNuMuBarTemplates3D.at(i)).at(res)).size();
01484     }
01485   }
01486   for(Int_t i=0;i<fNDis;i++){
01487       for(Int_t res=0;res<fNResBins;res++){
01488       containersize += ((v2DNuTauTemplates3D.at(i)).at(res)).size();
01489     }
01490   }
01491 
01492   TH2D* hOscillated2D; TH1D* hOscillated1D; TString histname;
01493   
01494   //Open output file
01495   TFile* fOutputFile = new TFile(fOutputFilename.Data(),"recreate");
01496  
01497   //Loop over containers in turn to oscillate templates
01498   for(Int_t i=0;i<fNDis;i++){
01499     for(Int_t res=0;res<fNResBins;res++){
01500       
01501       //(1) 2D CC container
01502       for(Int_t j=0;j<fNum2DSysts+1;j++){
01503         for(UInt_t k=0;k<(((v2DNuMuTemplates4D.at(i)).at(res)).at(j)).size();k++){
01504         
01505           //Set up histograms
01506           histname.Resize(0); histname.Append("h"); histname.Append(fSampleName.Data()); histname.Append("NuMuOscillatedSin2Max_"); histname += i; histname.Append("_"); histname += res;
01507           histname.Append("_"); histname += j; histname.Append("_"); histname += k;
01508           hOscillated2D = new TH2D(histname.Data(),histname.Data(),fNumDm2Bins,fDm2Min,fDm2Max,fNumFittingBins,fEdgesEFittingBinsArray);
01509           histname.Resize(0); histname.Append("h"); histname.Append(fSampleName.Data()); histname.Append("NuMuOscillatedSin2Min_"); histname += i; histname.Append("_"); histname += res;
01510           histname.Append("_"); histname += j; histname.Append("_"); histname += k;
01511           hOscillated1D = new TH1D(histname.Data(),histname.Data(),fNumFittingBins,fEdgesEFittingBinsArray);
01512 
01513           this->MakeOscillatedHistogramBinCentre((((v2DNuMuTemplates4D.at(i)).at(res)).at(j)).at(k),hOscillated2D,hOscillated1D,1);
01514 
01515           //Scale histograms
01516           Double_t scale = 1.0;
01517           if(vDataPoT.at(i) > 0) scale = vNewDataPoT.at(i) / vDataPoT.at(i);
01518           else cout << "Scaling Factor = 1" << endl;
01519           hOscillated2D->Scale(scale);
01520           hOscillated1D->Scale(scale);
01521 
01522           //Write out histograms
01523           fOutputFile->cd();
01524           hOscillated2D->Write();
01525           hOscillated1D->Write();
01526         
01527           delete hOscillated2D;
01528           delete hOscillated1D;
01529 
01530           counter++; percent_done = 100*(counter/containersize);
01531           MSG("GhostSample",Msg::kInfo) << " *-* " << percent(percent_done) << "% of oscillated spectra templates generated *-*" << endl;
01532         }//EO loop over syst histograms
01533       }
01534     
01535       //(2) 2D CC Bkg container
01536       for(UInt_t j=0;j<((v2DNuMuBarTemplates3D.at(i)).at(res)).size();j++){
01537       
01538         //Set up histograms
01539         histname.Resize(0); histname.Append("h"); histname.Append(fSampleName.Data()); histname.Append("NuMuBarOscillatedSin2Max_");
01540         histname += i; histname.Append("_"); histname += res; histname.Append("_"); histname += j;
01541         hOscillated2D = new TH2D(histname.Data(),histname.Data(),fNumDm2Bins,fDm2Min,fDm2Max,fNumFittingBins,fEdgesEFittingBinsArray);
01542         histname.Resize(0); histname.Append("h"); histname.Append(fSampleName.Data()); histname.Append("NuMuBarOscillatedSin2Min_");
01543         histname += i; histname.Append("_");  histname += res; histname.Append("_"); histname += j;
01544         hOscillated1D = new TH1D(histname.Data(),histname.Data(),fNumFittingBins,fEdgesEFittingBinsArray);
01545       
01546         this->MakeOscillatedHistogramBinCentre(((v2DNuMuBarTemplates3D.at(i)).at(res)).at(j),hOscillated2D,hOscillated1D,1);
01547         
01548         //Scale histograms
01549         Double_t scale = 1.0;
01550         if(vDataPoT.at(i) > 0) scale = vNewDataPoT.at(i) / vDataPoT.at(i);
01551         else cout << "Scaling Factor = 1" << endl;
01552         hOscillated2D->Scale(scale);
01553         hOscillated1D->Scale(scale);
01554 
01555         //Write out histograms
01556         fOutputFile->cd();
01557         hOscillated2D->Write();
01558         hOscillated1D->Write();
01559         
01560         delete hOscillated2D;
01561         delete hOscillated1D;
01562         
01563         counter++; percent_done = 100*(counter/containersize);
01564         MSG("GhostSample",Msg::kInfo) << " *-* " << percent(percent_done) << "% of oscillated spectra templates generated *-*" << endl; 
01565       }
01566       
01567       //(3) 2D CC Tau container
01568       for(UInt_t j=0;j<((v2DNuTauTemplates3D.at(i)).at(res)).size();j++){
01569         
01570         //Set up histograms
01571         histname.Resize(0); histname.Append("h"); histname.Append(fSampleName.Data()); histname.Append("NuTauOscillatedSin2Max_");
01572         histname += i; histname.Append("_"); histname += res; histname.Append("_"); histname += j;
01573         hOscillated2D = new TH2D(histname.Data(),histname.Data(),fNumDm2Bins,fDm2Min,fDm2Max,fNumFittingBins,fEdgesEFittingBinsArray);
01574         histname.Resize(0); histname.Append("h"); histname.Append(fSampleName.Data()); histname.Append("NuTauOscillatedSin2Min_");
01575         histname += i; histname.Append("_"); histname += res; histname.Append("_"); histname += j;
01576         hOscillated1D = new TH1D(histname.Data(),histname.Data(),fNumFittingBins,fEdgesEFittingBinsArray);
01577         
01578         this->MakeOscillatedHistogramBinCentre(((v2DNuTauTemplates3D.at(i)).at(res)).at(j),hOscillated2D,hOscillated1D,0);
01579 
01580         //Scale histograms
01581         Double_t scale = 1.0;
01582         if(vDataPoT.at(i) > 0) scale = vNewDataPoT.at(i) / vDataPoT.at(i);
01583         else cout << "Scaling Factor = 1" << endl;
01584         hOscillated2D->Scale(scale);
01585         hOscillated1D->Scale(scale);
01586 
01587         //Write out histograms
01588         fOutputFile->cd();
01589         hOscillated2D->Write();
01590         hOscillated1D->Write();
01591         
01592         delete hOscillated2D;
01593         delete hOscillated1D;
01594         
01595         counter++; percent_done = 100*(counter/containersize);
01596         MSG("GhostSample",Msg::kInfo) << " *-* " << percent(percent_done) << "% of oscillated spectra templates generated *-*" << endl;
01597       }//Tau container
01598       
01599     }//EO loop over number res bins
01600   }//EO loop over distributions
01601   
01602   delete fOutputFile;
01603 }

void GhostSample::MakeVectorContainers (  )  [private]

Definition at line 266 of file GhostSample.cxx.

References fNDis, fNResBins, fNum1DSysts, fNum2DSysts, Msg::kDebug, MSG, v1DNewPredSpectrum1D, v1DNewPredSpectrum2D, v1DNewPredSpectrum3D, v1DNewPredSpectrum4D, v1DNewPredSpectrum5D, v1DTemplates1D, v1DTemplates2D, v1DTemplates3D, v1DTemplates4D, v1DTemplates5D, v2D_1D_NewPredSpectrum1D, v2D_1D_NewPredSpectrum2D, v2D_1D_NewPredSpectrum3D, v2D_1D_NewPredSpectrum4D, v2D_1D_NewPredSpectrum5D, v2D_1D_OscillatedTemplatesSin2Max1D, v2D_1D_OscillatedTemplatesSin2Max2D, v2D_1D_OscillatedTemplatesSin2Max3D, v2D_1D_OscillatedTemplatesSin2Max4D, v2D_1D_OscillatedTemplatesSin2Max5D, v2D_1D_OscillatedTemplatesSin2Min1D, v2D_1D_OscillatedTemplatesSin2Min2D, v2D_1D_OscillatedTemplatesSin2Min3D, v2D_1D_OscillatedTemplatesSin2Min4D, v2D_1D_OscillatedTemplatesSin2Min5D, v2DBkgNewPredSpectrum1D, v2DBkgNewPredSpectrum2D, v2DBkgNewPredSpectrum3D, v2DBkgNewPredSpectrum4D, v2DBkgOscillatedTemplatesSin2Max1D, v2DBkgOscillatedTemplatesSin2Max2D, v2DBkgOscillatedTemplatesSin2Max3D, v2DBkgOscillatedTemplatesSin2Max4D, v2DBkgOscillatedTemplatesSin2Min1D, v2DBkgOscillatedTemplatesSin2Min2D, v2DBkgOscillatedTemplatesSin2Min3D, v2DBkgOscillatedTemplatesSin2Min4D, v2DNewPredSpectrum1D, v2DNewPredSpectrum2D, v2DNewPredSpectrum3D, v2DNewPredSpectrum4D, v2DNewPredSpectrum5D, v2DNuMuBarTemplates1D, v2DNuMuBarTemplates2D, v2DNuMuBarTemplates3D, v2DNuMuTemplates1D, v2DNuMuTemplates2D, v2DNuMuTemplates3D, v2DNuMuTemplates4D, v2DNuTauTemplates1D, v2DNuTauTemplates2D, v2DNuTauTemplates3D, v2DOscillatedTemplatesSin2Max1D, v2DOscillatedTemplatesSin2Max2D, v2DOscillatedTemplatesSin2Max3D, v2DOscillatedTemplatesSin2Max4D, v2DOscillatedTemplatesSin2Max5D, v2DOscillatedTemplatesSin2Min1D, v2DOscillatedTemplatesSin2Min2D, v2DOscillatedTemplatesSin2Min3D, v2DOscillatedTemplatesSin2Min4D, v2DOscillatedTemplatesSin2Min5D, v2DTauNewPredSpectrum1D, v2DTauNewPredSpectrum2D, v2DTauNewPredSpectrum3D, v2DTauNewPredSpectrum4D, v2DTauOscillatedTemplatesSin2Max1D, v2DTauOscillatedTemplatesSin2Max2D, v2DTauOscillatedTemplatesSin2Max3D, v2DTauOscillatedTemplatesSin2Max4D, v2DTauOscillatedTemplatesSin2Min1D, v2DTauOscillatedTemplatesSin2Min2D, v2DTauOscillatedTemplatesSin2Min3D, and v2DTauOscillatedTemplatesSin2Min4D.

Referenced by Add2DCentralFile(), and SetNum1DSystematics().

00267 {
00268   for(Int_t i=0;i<fNDis;i++){
00269     for(Int_t res=0;res<fNResBins;res++){
00270       for(Int_t j=0;j<fNum2DSysts+1;j++){  //+1 central template
00271         
00272         v2DNuMuTemplates2D.push_back(v2DNuMuTemplates1D);
00273       }
00274       v2DNuMuTemplates3D.push_back(v2DNuMuTemplates2D);
00275       v2DNuMuBarTemplates2D.push_back(v2DNuMuBarTemplates1D);
00276       v2DNuTauTemplates2D.push_back(v2DNuTauTemplates1D);
00277     }
00278     v2DNuMuTemplates4D.push_back(v2DNuMuTemplates3D);
00279     v2DNuMuBarTemplates3D.push_back(v2DNuMuBarTemplates2D);
00280     v2DNuTauTemplates3D.push_back(v2DNuTauTemplates2D);
00281   }
00282   for(Int_t rd=0;rd<2;rd++){
00283     for(Int_t i=0;i<fNDis;i++){
00284       for(Int_t res=0;res<fNResBins;res++){
00285         for(Int_t j=0;j<fNum2DSysts+1;j++){  //+1 central template
00286           
00287           v2DOscillatedTemplatesSin2Max2D.push_back(v2DOscillatedTemplatesSin2Max1D);
00288           v2DOscillatedTemplatesSin2Min2D.push_back(v2DOscillatedTemplatesSin2Min1D);
00289           v2DNewPredSpectrum2D.push_back(v2DNewPredSpectrum1D);
00290         }
00291         v2DOscillatedTemplatesSin2Max3D.push_back(v2DOscillatedTemplatesSin2Max2D);
00292         v2DOscillatedTemplatesSin2Min3D.push_back(v2DOscillatedTemplatesSin2Min2D);
00293         v2DNewPredSpectrum3D.push_back(v2DNewPredSpectrum2D);
00294 
00295         v2DBkgOscillatedTemplatesSin2Max2D.push_back(v2DBkgOscillatedTemplatesSin2Max1D);
00296         v2DBkgOscillatedTemplatesSin2Min2D.push_back(v2DBkgOscillatedTemplatesSin2Min1D);
00297         v2DBkgNewPredSpectrum2D.push_back(v2DBkgNewPredSpectrum1D);
00298 
00299         v2DTauOscillatedTemplatesSin2Max2D.push_back(v2DTauOscillatedTemplatesSin2Max1D);
00300         v2DTauOscillatedTemplatesSin2Min2D.push_back(v2DTauOscillatedTemplatesSin2Min1D);
00301         v2DTauNewPredSpectrum2D.push_back(v2DTauNewPredSpectrum1D);
00302 
00303         for(Int_t j=0;j<fNum1DSysts+1;j++){  //+1 central template
00304           
00305           v1DTemplates2D.push_back(v1DTemplates1D);
00306           v1DNewPredSpectrum2D.push_back(v1DNewPredSpectrum1D);
00307 
00308           v2D_1D_OscillatedTemplatesSin2Max2D.push_back(v2D_1D_OscillatedTemplatesSin2Max1D);
00309           v2D_1D_OscillatedTemplatesSin2Min2D.push_back(v2D_1D_OscillatedTemplatesSin2Min1D);
00310           v2D_1D_NewPredSpectrum2D.push_back(v2D_1D_NewPredSpectrum1D);
00311         }
00312         v1DTemplates3D.push_back(v1DTemplates2D);
00313         v1DNewPredSpectrum3D.push_back(v1DNewPredSpectrum2D);
00314       
00315         v2D_1D_OscillatedTemplatesSin2Max3D.push_back(v2D_1D_OscillatedTemplatesSin2Max2D);
00316         v2D_1D_OscillatedTemplatesSin2Min3D.push_back(v2D_1D_OscillatedTemplatesSin2Min2D);
00317         v2D_1D_NewPredSpectrum3D.push_back(v2D_1D_NewPredSpectrum2D);
00318 
00319       }
00320       v1DTemplates4D.push_back(v1DTemplates3D);
00321       v1DNewPredSpectrum4D.push_back(v1DNewPredSpectrum3D);
00322       
00323       v2DOscillatedTemplatesSin2Max4D.push_back(v2DOscillatedTemplatesSin2Max3D);
00324       v2DOscillatedTemplatesSin2Min4D.push_back(v2DOscillatedTemplatesSin2Min3D);
00325       v2DNewPredSpectrum4D.push_back(v2DNewPredSpectrum3D);
00326 
00327       v2D_1D_OscillatedTemplatesSin2Max4D.push_back(v2D_1D_OscillatedTemplatesSin2Max3D);
00328       v2D_1D_OscillatedTemplatesSin2Min4D.push_back(v2D_1D_OscillatedTemplatesSin2Min3D);
00329       v2D_1D_NewPredSpectrum4D.push_back(v2D_1D_NewPredSpectrum3D);
00330 
00331       v2DBkgOscillatedTemplatesSin2Max3D.push_back(v2DBkgOscillatedTemplatesSin2Max2D);
00332       v2DBkgOscillatedTemplatesSin2Min3D.push_back(v2DBkgOscillatedTemplatesSin2Min2D);
00333       v2DBkgNewPredSpectrum3D.push_back(v2DBkgNewPredSpectrum2D);
00334 
00335       v2DTauOscillatedTemplatesSin2Max3D.push_back(v2DTauOscillatedTemplatesSin2Max2D);
00336       v2DTauOscillatedTemplatesSin2Min3D.push_back(v2DTauOscillatedTemplatesSin2Min2D);
00337       v2DTauNewPredSpectrum3D.push_back(v2DTauNewPredSpectrum2D);
00338     }
00339     v1DTemplates5D.push_back(v1DTemplates4D);
00340     v1DNewPredSpectrum5D.push_back(v1DNewPredSpectrum4D);
00341 
00342     v2DOscillatedTemplatesSin2Max5D.push_back(v2DOscillatedTemplatesSin2Max4D);
00343     v2DOscillatedTemplatesSin2Min5D.push_back(v2DOscillatedTemplatesSin2Min4D);
00344     v2DNewPredSpectrum5D.push_back(v2DNewPredSpectrum4D);
00345 
00346     v2D_1D_OscillatedTemplatesSin2Max5D.push_back(v2D_1D_OscillatedTemplatesSin2Max4D);
00347     v2D_1D_OscillatedTemplatesSin2Min5D.push_back(v2D_1D_OscillatedTemplatesSin2Min4D);
00348     v2D_1D_NewPredSpectrum5D.push_back(v2D_1D_NewPredSpectrum4D);
00349 
00350     v2DBkgOscillatedTemplatesSin2Max4D.push_back(v2DBkgOscillatedTemplatesSin2Max3D);
00351     v2DBkgOscillatedTemplatesSin2Min4D.push_back(v2DBkgOscillatedTemplatesSin2Min3D);
00352     v2DBkgNewPredSpectrum4D.push_back(v2DBkgNewPredSpectrum3D);
00353 
00354     v2DTauOscillatedTemplatesSin2Max4D.push_back(v2DTauOscillatedTemplatesSin2Max3D);
00355     v2DTauOscillatedTemplatesSin2Min4D.push_back(v2DTauOscillatedTemplatesSin2Min3D);
00356     v2DTauNewPredSpectrum4D.push_back(v2DTauNewPredSpectrum3D);
00357   }
00358   MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::MakeVectorContainers() Vectors set up *-* " << endl;
00359 }

void GhostSample::OscillateExtrapolatedTemplate ( TH2D *  hExtrapolated,
vector< TH2D * >  vDSTOscillated,
TH2D *  hDSTUnoscillated,
TH2D *  hOscillated2D,
TH1D *  hOscillated1D,
Bool_t  tau 
) [private]

Definition at line 1254 of file GhostSample.cxx.

References fNumDm2Bins, hDm2Array, n, NuOscProbCalc::OscillationWeight(), and GhostUtilities::OscillationWeightMuToTau().

Referenced by MakeOscillatedSpectra().

01255 {
01256   //Pass vector of oscillated at each dm2 value, for this distribution and resolution bin - independant of systematic index
01257   TH2D* hRatio = (TH2D*)hDSTUnoscillated->Clone();
01258   hRatio->Reset();
01259 
01260   for(Int_t n=0;n<fNumDm2Bins;n++){
01261 
01262     Double_t dm_2 = hDm2Array->GetXaxis()->GetBinCenter(n+1);
01263     hRatio->Reset();
01264 
01265     for(Int_t y=0;y<hExtrapolated->GetYaxis()->GetNbins();y++){
01266 
01267       Double_t reco_E = hExtrapolated->GetYaxis()->GetBinCenter(y+1);
01268 
01269       for(Int_t x=0;x<hExtrapolated->GetXaxis()->GetNbins();x++){
01270 
01271         Double_t true_e = hExtrapolated->GetXaxis()->GetBinCenter(x+1);
01272         
01273         Double_t bincontentnominal; Double_t bincontentoscillatednominal; Double_t bincontentextrapolated;
01274         bincontentnominal = hDSTUnoscillated->GetBinContent(x+1,y+1);
01275         bincontentoscillatednominal = vDSTOscillated.at(n)->GetBinContent(x+1,y+1);
01276         bincontentextrapolated = hExtrapolated->GetBinContent(x+1,y+1);
01277 
01278         Double_t weight = 0.;
01279         if(bincontentnominal>0) weight = bincontentoscillatednominal/bincontentnominal; //oscillate by ratio if events exist
01280         else if(bincontentnominal==0){                                                  //else if no events in bin in dst, oscillate by bin centre
01281           if(tau==false) weight = GhostUtilities::OscillationWeight(true_e,dm_2,1.0);
01282           if(tau==true) weight = GhostUtilities::OscillationWeightMuToTau(true_e,dm_2,1.0);
01283         }                                              
01284         hOscillated2D->Fill(dm_2,reco_E,weight*bincontentextrapolated);
01285         hRatio->Fill(true_e,reco_E,weight);
01286       }
01287     }
01288     if(n%10==0) cout << " *-* Grid Point = " << n << " *-*" << endl;
01289   }
01290   
01291   //Loop over extrapolated histogram to fill 1D unoscillated prediction
01292   for(Int_t y=0;y<hExtrapolated->GetYaxis()->GetNbins();y++){
01293 
01294     Double_t reco_E = hExtrapolated->GetYaxis()->GetBinCenter(y+1);
01295 
01296     for(Int_t x=0;x<hExtrapolated->GetXaxis()->GetNbins();x++){
01297 
01298       Double_t bincontentextrapolated;
01299       bincontentextrapolated = hExtrapolated->GetBinContent(x+1,y+1);
01300 
01301       hOscillated1D->Fill(reco_E,bincontentextrapolated); //* changed to true e
01302 
01303     }
01304   }
01305 }

void GhostSample::Pause (  ) 

Definition at line 1459 of file GhostSample.cxx.

References gSystem().

01460 {
01461   cout << "Press return to continue" << endl;
01462 
01463   int key = 0;
01464   while(1){
01465     gSystem->ProcessEvents();
01466     fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK);
01467     key = getchar();
01468     if(key=='\n') break;
01469     usleep(1000);
01470   }
01471 }

void GhostSample::ResetPredictionVectors (  )  [private]

Definition at line 363 of file GhostSample.cxx.

References Msg::kDebug, MSG, size, v1DNewPredSpectrum5D, v2D_1D_NewPredSpectrum5D, v2DBkgNewPredSpectrum4D, v2DNewPredSpectrum5D, and v2DTauNewPredSpectrum4D.

Referenced by GetSpectrum().

00364 {
00365   MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::ResetPredictionVectors() *-* " << endl;
00366 
00367   for(UInt_t rd=0;rd<v2DNewPredSpectrum5D.size();rd++){
00368     for(UInt_t i=0;i<(v2DNewPredSpectrum5D.at(rd)).size();i++){
00369       for(UInt_t res=0;res<((v2DNewPredSpectrum5D.at(rd)).at(i)).size();res++){
00370         for(UInt_t j=0;j<(((v2DNewPredSpectrum5D.at(rd)).at(i)).at(res)).size();j++){
00371           for(UInt_t k=0;k<((((v2DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).size();k++){
00372             ((((v2DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).at(k)->Reset();
00373           }
00374         }
00375       }
00376     }
00377   }
00378   for(UInt_t rd=0;rd<v2D_1D_NewPredSpectrum5D.size();rd++){
00379     for(UInt_t i=0;i<(v2D_1D_NewPredSpectrum5D.at(rd)).size();i++){
00380       for(UInt_t res=0;res<((v2D_1D_NewPredSpectrum5D.at(rd)).at(i)).size();res++){
00381         for(UInt_t j=0;j<(((v2D_1D_NewPredSpectrum5D.at(rd)).at(i)).at(res)).size();j++){
00382           for(UInt_t k=0;k<((((v2D_1D_NewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).size();k++){
00383             ((((v2D_1D_NewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).at(k)->Reset();
00384           }
00385         }
00386       }
00387     }
00388   }
00389   for(UInt_t rd=0;rd<v1DNewPredSpectrum5D.size();rd++){
00390     for(UInt_t i=0;i<(v1DNewPredSpectrum5D.at(rd)).size();i++){
00391       for(UInt_t res=0;res<((v1DNewPredSpectrum5D.at(rd)).at(i)).size();res++){
00392         for(UInt_t j=0;j<(((v1DNewPredSpectrum5D.at(rd)).at(i)).at(res)).size();j++){
00393           for(UInt_t k=0;k<((((v1DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).size();k++){
00394             ((((v1DNewPredSpectrum5D.at(rd)).at(i)).at(res)).at(j)).at(k)->Reset();;
00395           }
00396         }
00397       }
00398     }
00399   }
00400   for(UInt_t rd=0;rd<v2DBkgNewPredSpectrum4D.size();rd++){
00401     for(UInt_t i=0;i<(v2DBkgNewPredSpectrum4D.at(rd)).size();i++){
00402       for(UInt_t res=0;res<((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).size();res++){
00403         for(UInt_t j=0;j<(((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).size();j++){
00404           (((v2DBkgNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j)->Reset();;
00405         }
00406       }
00407     }
00408   }
00409   for(UInt_t rd=0;rd<v2DTauNewPredSpectrum4D.size();rd++){
00410     for(UInt_t i=0;i<(v2DTauNewPredSpectrum4D.at(rd)).size();i++){
00411       for(UInt_t res=0;res<((v2DTauNewPredSpectrum4D.at(rd)).at(i)).size();res++){
00412         for(UInt_t j=0;j<(((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).size();j++){
00413           (((v2DTauNewPredSpectrum4D.at(rd)).at(i)).at(res)).at(j)->Reset();;
00414         }
00415       }
00416     }
00417   }
00418   MSG("GhostSample",Msg::kDebug) << " *-* GhostSample::ResetPredictionVectors() *-* " << endl;
00419 }

void GhostSample::SetConstantFitBinning ( Bool_t  flag = 0  )  [inline]

Definition at line 80 of file GhostSample.h.

References fArrayHistsFlag.

00080 { fArrayHistsFlag = flag; }

void GhostSample::SetDataPoT ( Double_t  pot  )  [inline]

Definition at line 72 of file GhostSample.h.

References vDataPoT.

00072                                 { vDataPoT.push_back(pot); 
00073                                   cout << " *-* GhostSample::SetDataPoT() PoT for Distribution " << vDataPoT.size() << "; PoT = " <<  vDataPoT.back() << " *-*" << endl; }

void GhostSample::SetDm2Limits ( Double_t  dm2min,
Double_t  dm2max 
) [inline]

Definition at line 70 of file GhostSample.h.

References fDm2Max, and fDm2Min.

00070 { fDm2Min = dm2min; fDm2Max = dm2max; }

void GhostSample::SetFitBinning ( Double_t *  fittingbinning  )  [inline]
void GhostSample::SetNewDataPoT ( Double_t  pot  )  [inline]

Definition at line 75 of file GhostSample.h.

References vNewDataPoT.

00075                                    { vNewDataPoT.push_back(pot); 
00076                                   cout << " *-* GhostSample::SetDSTPoT() PoT for Distribution " << vNewDataPoT.size() << "; PoT = " <<  vNewDataPoT.back() << " *-*" << endl; }

void GhostSample::SetNum1DSystematics ( Int_t  systs  )  [inline]

Definition at line 68 of file GhostSample.h.

References fNum1DSysts, and MakeVectorContainers().

00068 { fNum1DSysts = systs; this->MakeVectorContainers(); }

void GhostSample::SetNum2DSystematics ( Int_t  systs  )  [inline]

Definition at line 67 of file GhostSample.h.

References fNum2DSysts.

00067 { fNum2DSysts = systs; }

void GhostSample::SetNumDistributions ( Int_t  dis  )  [inline]

Definition at line 60 of file GhostSample.h.

References fNDis, v1DSystCounter, v1DSystCounter2D, v2D_1D_SystCounter, v2D_1D_SystCounter2D, v2DSystCounter, and v2DSystCounter2D.

00060                                       { fNDis = dis; 
00061     for(Int_t i=0;i<2;i++) {v2DSystCounter2D.push_back(v2DSystCounter);v1DSystCounter2D.push_back(v1DSystCounter);v2D_1D_SystCounter2D.push_back(v2D_1D_SystCounter); }
00062   for(Int_t i=0;i<fNDis;i++){ 
00063     (v2DSystCounter2D.at(0)).push_back(0); (v2DSystCounter2D.at(1)).push_back(0); (v1DSystCounter2D.at(0)).push_back(0);(v1DSystCounter2D.at(1)).push_back(0);
00064     (v2D_1D_SystCounter2D.at(0)).push_back(0); (v2D_1D_SystCounter2D.at(1)).push_back(0);} 
00065   }

void GhostSample::SetNumDm2Bins ( Int_t  dm2bins  )  [inline]

Definition at line 69 of file GhostSample.h.

References fNumDm2Bins.

00069 { fNumDm2Bins = dm2bins;}

void GhostSample::SetNumFitBins ( Int_t  fitbins  )  [inline]

Definition at line 78 of file GhostSample.h.

References fNumFittingBins.

00078 { fNumFittingBins = fitbins; }

void GhostSample::SetNumResolutionBins ( Int_t  res  )  [inline]

Definition at line 66 of file GhostSample.h.

References fNResBins.

00066 { fNResBins = res; }

void GhostSample::SetOutputFilename ( TString  outputfile  )  [inline]

Definition at line 259 of file GhostSample.h.

References fOutputFilename.

00259 { fOutputFilename = outputfile; }

void GhostSample::SetSampleType ( Int_t  sample  )  [inline]

Definition at line 59 of file GhostSample.h.

References fSampleType.

00059 { fSampleType = sample; } //Make series of 1D spectra to define global RAF binning


Friends And Related Function Documentation

friend class GhostFakeData [friend]

Definition at line 47 of file GhostSample.h.

friend class GhostFramework [friend]

Definition at line 48 of file GhostSample.h.

friend class GhostMerge [friend]

Definition at line 50 of file GhostSample.h.

friend class GhostRAFCombine [friend]

Definition at line 49 of file GhostSample.h.


Member Data Documentation

Int_t GhostSample::binNumber [private]

Definition at line 322 of file GhostSample.h.

Referenced by Add2DMicroDST(), Add2DTauMicroDST(), and FillHistogramsFromDST().

Bool_t GhostSample::ccPreSelected [private]

Definition at line 310 of file GhostSample.h.

Referenced by Add2DMicroDST(), Add2DTauMicroDST(), and FillHistogramsFromDST().

Bool_t GhostSample::ccSelected [private]

Definition at line 311 of file GhostSample.h.

Referenced by Add2DMicroDST(), Add2DTauMicroDST(), and FillHistogramsFromDST().

Int_t GhostSample::charge [private]

Definition at line 320 of file GhostSample.h.

Referenced by Add2DMicroDST(), Add2DTauMicroDST(), and FillHistogramsFromDST().

Float_t GhostSample::energy [private]

Definition at line 316 of file GhostSample.h.

Referenced by Add2DMicroDST(), Add2DTauMicroDST(), and FillHistogramsFromDST().

Bool_t GhostSample::fArrayHistsFlag [private]
Bool_t GhostSample::fContainer [private]

Definition at line 291 of file GhostSample.h.

Referenced by Add2DCentralFile().

Double_t GhostSample::fDm2Max [private]
Double_t GhostSample::fDm2Min [private]
Double_t GhostSample::fMaxEnergy [private]

Definition at line 304 of file GhostSample.h.

Referenced by GetSpectrum(), InitialisePredictionVectors(), and SetFitBinning().

Int_t GhostSample::fNDis [private]
Int_t GhostSample::fNResBins [private]
Int_t GhostSample::fNum1DSysts [private]
Int_t GhostSample::fNum2DSysts [private]
Int_t GhostSample::fNumDm2Bins [private]
TString GhostSample::fOutputFilename [private]
TString GhostSample::fSampleName [private]
Int_t GhostSample::fSampleType [private]

Definition at line 309 of file GhostSample.h.

Referenced by FillHistogramsFromDST(), GetSpectrum(), and SetSampleType().

Definition at line 306 of file GhostSample.h.

Referenced by GhostSample().

Definition at line 288 of file GhostSample.h.

Referenced by GetSpectrum(), GhostSample(), and InterpolateOscillatedSpectra().

TH1D* GhostSample::hDm2Array [private]
TH1D* GhostSample::hOscillated1D [private]

Definition at line 326 of file GhostSample.h.

Referenced by MakeOscillatedSpectra(), and MakeOscillatedSpectraBinCentre().

TH2D* GhostSample::hOscillated2D [private]

Definition at line 325 of file GhostSample.h.

Referenced by MakeOscillatedSpectra(), and MakeOscillatedSpectraBinCentre().

TH2D* GhostSample::hTesting [private]

Definition at line 454 of file GhostSample.h.

Int_t GhostSample::iaction [private]

Definition at line 318 of file GhostSample.h.

Referenced by Add2DMicroDST(), Add2DTauMicroDST(), and FillHistogramsFromDST().

Int_t GhostSample::inu [private]

Definition at line 321 of file GhostSample.h.

Referenced by Add2DMicroDST(), Add2DTauMicroDST(), and FillHistogramsFromDST().

Bool_t GhostSample::ncPreSelected [private]

Definition at line 312 of file GhostSample.h.

Referenced by Add2DMicroDST(), and Add2DTauMicroDST().

Bool_t GhostSample::ncSelected [private]

Definition at line 313 of file GhostSample.h.

Referenced by Add2DMicroDST(), and Add2DTauMicroDST().

Float_t GhostSample::neuEnMC [private]

Definition at line 317 of file GhostSample.h.

Referenced by Add2DMicroDST(), Add2DTauMicroDST(), and FillHistogramsFromDST().

Int_t GhostSample::resBin [private]

Definition at line 323 of file GhostSample.h.

Referenced by Add2DMicroDST(), Add2DTauMicroDST(), and FillHistogramsFromDST().

Float_t GhostSample::resolution [private]

Definition at line 319 of file GhostSample.h.

Referenced by Add2DMicroDST(), and Add2DTauMicroDST().

Bool_t GhostSample::rockPreSelected [private]

Definition at line 314 of file GhostSample.h.

Referenced by Add2DMicroDST(), Add2DTauMicroDST(), and FillHistogramsFromDST().

Bool_t GhostSample::rockSelected [private]

Definition at line 315 of file GhostSample.h.

Referenced by Add2DMicroDST(), Add2DTauMicroDST(), and FillHistogramsFromDST().

Definition at line 420 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 419 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 418 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 417 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 336 of file GhostSample.h.

Referenced by Add1DSystematicFile(), and SetNumDistributions().

Definition at line 335 of file GhostSample.h.

Referenced by Add1DSystematicFile(), and SetNumDistributions().

Definition at line 350 of file GhostSample.h.

Referenced by GhostSample(), and MakeVectorContainers().

Definition at line 349 of file GhostSample.h.

Referenced by GhostSample(), and MakeVectorContainers().

Definition at line 348 of file GhostSample.h.

Referenced by GhostSample(), and MakeVectorContainers().

Definition at line 347 of file GhostSample.h.

Referenced by Add1DSystematicFile(), GhostSample(), and MakeVectorContainers().

Definition at line 414 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 413 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 412 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 411 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 395 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 394 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 393 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 392 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 400 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 399 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 398 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 397 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 334 of file GhostSample.h.

Referenced by SetNumDistributions().

Definition at line 333 of file GhostSample.h.

Referenced by Add2D_1D_SystematicFile(), and SetNumDistributions().

Definition at line 425 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 424 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 423 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 375 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 374 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 373 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 379 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 378 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 377 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 407 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 406 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 405 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 404 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 354 of file GhostSample.h.

Referenced by GhostSample(), and MakeVectorContainers().

Definition at line 353 of file GhostSample.h.

Referenced by GhostSample(), and MakeVectorContainers().

Definition at line 344 of file GhostSample.h.

Referenced by GhostSample(), and MakeVectorContainers().

Definition at line 343 of file GhostSample.h.

Referenced by GhostSample(), and MakeVectorContainers().

Definition at line 342 of file GhostSample.h.

Referenced by GhostSample(), and MakeVectorContainers().

Definition at line 358 of file GhostSample.h.

Referenced by GhostSample(), and MakeVectorContainers().

Definition at line 357 of file GhostSample.h.

Referenced by GhostSample(), and MakeVectorContainers().

Definition at line 365 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 364 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 363 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 362 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 370 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 369 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 368 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 367 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 332 of file GhostSample.h.

Referenced by SetNumDistributions().

Definition at line 331 of file GhostSample.h.

Referenced by Add2DSystematicFile(), and SetNumDistributions().

Definition at line 330 of file GhostSample.h.

Referenced by Add2DTauMicroDST(), MakeOscillatedSpectra(), and ~GhostSample().

Definition at line 430 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 429 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 428 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 384 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 383 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 382 of file GhostSample.h.

Referenced by GetSpectrum(), and MakeVectorContainers().

Definition at line 388 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 387 of file GhostSample.h.

Referenced by MakeVectorContainers().

Definition at line 386 of file GhostSample.h.

Referenced by MakeVectorContainers().

vector<Double_t> GhostSample::vDataPoT [private]

Definition at line 435 of file GhostSample.h.

Referenced by MakeOscillatedSpectra().

Definition at line 434 of file GhostSample.h.

Referenced by MakeOscillatedSpectra().

Definition at line 433 of file GhostSample.h.

Referenced by FillHistogramsFromDST(), and MakeOscillatedSpectra().

Definition at line 439 of file GhostSample.h.

Referenced by MakeOscillatedSpectra().

Definition at line 438 of file GhostSample.h.

Referenced by MakeOscillatedSpectra().

Definition at line 437 of file GhostSample.h.

Referenced by FillHistogramsFromDST(), and MakeOscillatedSpectra().

Definition at line 443 of file GhostSample.h.

Referenced by MakeOscillatedSpectra().

Definition at line 442 of file GhostSample.h.

Referenced by MakeOscillatedSpectra().

Definition at line 441 of file GhostSample.h.

Referenced by FillHistogramsFromDST(), and MakeOscillatedSpectra().

Definition at line 446 of file GhostSample.h.

Referenced by MakeOscillatedSpectra().

Definition at line 445 of file GhostSample.h.

Referenced by FillHistogramsFromDST(), and MakeOscillatedSpectra().

Definition at line 449 of file GhostSample.h.

Referenced by MakeOscillatedSpectra().

Definition at line 448 of file GhostSample.h.

Referenced by FillHistogramsFromDST(), and MakeOscillatedSpectra().

Definition at line 452 of file GhostSample.h.

Referenced by MakeOscillatedSpectra().

Definition at line 451 of file GhostSample.h.

Referenced by FillHistogramsFromDST(), and MakeOscillatedSpectra().

vector<TFile*> GhostSample::vFile [private]
vector<TChain*> GhostSample::vMicroDSTTree [private]

Definition at line 329 of file GhostSample.h.

Referenced by Add2DMicroDST(), MakeOscillatedSpectra(), and ~GhostSample().

vector<Double_t> GhostSample::vNewDataPoT [private]

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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1