ExtrapHists2D Class Reference

#include <ExtrapHists2D.h>

List of all members.

Public Member Functions

 ExtrapHists2D (std::string)
 ~ExtrapHists2D ()
void SetRecoBins (int n, double *edges)
void SetPIDBins (int n, double *edges)
void SetTrueBins (int n, double *edges)
void SetPOT (double p)
void AddPID (std::string pid)
void InitializeHists ()
int GetRecoBins ()
int GetPIDBins ()
int GetTrueBins ()
double GetPOT ()

Public Attributes

TDirectory * fDirectory
TH2D * TrueVsReco_Fid
TH2D * TrueVsReco_Fid_NuMuCC
TH2D * TrueVsReco_Fid_NuMuBarCC
TH2D * TrueVsReco_CClike
TH2D * TrueVsReco_CClike_Pos
TH2D * TrueVsReco_CClike_Neg
TH2D * TrueVsReco_CClike_NuMuCC
TH2D * TrueVsReco_CClike_Pos_NuMuBarCC
TH2D * TrueVsReco_CClike_Neg_NuMuCC
TH1D * Reco_CClike
TH1D * Reco_CClike_Pos
TH1D * Reco_CClike_Neg
TH2D * TrueVsReco_Fid_NueCC
TH2D * TrueVsReco_Fid_NuTauCC
TH1D * True_Fid_NueCC
TH1D * True_Fid_NuTauCC
TH2D * TrueVsReco_Fid_NueBarCC
TH2D * TrueVsReco_Fid_NuTauBarCC
TH1D * True_Fid_NueBarCC
TH1D * True_Fid_NuTauBarCC
map< string, TH3D * > TrueVsRecoVsPID_NC
map< string, TH3D * > TrueVsRecoVsPID_NuMuToNuMu
map< string, TH3D * > TrueVsRecoVsPID_BNueToNuMu
map< string, TH3D * > TrueVsRecoVsPID_BNueToBNue
map< string, TH3D * > TrueVsRecoVsPID_NuMuToNue
map< string, TH3D * > TrueVsRecoVsPID_NuMuToNuTau
map< string, TH3D * > TrueVsRecoVsPID_BNueToNuTau
map< string, TH3D * > TrueVsRecoVsPID_NC_NoOscNue
map< string, TH3D * > TrueVsRecoVsPID_NC_NoOscNuMu
map< string, TH3D * > TrueVsRecoVsPID_NC_NoOscNueBar
map< string, TH3D * > TrueVsRecoVsPID_NC_NoOscNuMuBar

Private Attributes

int nReco
int nTrue
int nPID
vector< double > RecoEdges
vector< double > PIDEdges
vector< double > TrueEdges
vector< std::string > PIDlist
double POT

Detailed Description

Definition at line 14 of file ExtrapHists2D.h.


Constructor & Destructor Documentation

ExtrapHists2D::ExtrapHists2D ( std::string  name  ) 

Definition at line 3 of file ExtrapHists2D.cxx.

References fDirectory, nPID, nReco, nTrue, PIDEdges, RecoEdges, and TrueEdges.

00004 {
00005   fDirectory = new TDirectory(name.c_str(),name.c_str());
00006   
00007   int i;
00008   
00009   nReco = 100;
00010   for(i=0;i<nReco+1;i++)
00011   {
00012     RecoEdges.push_back(i*1.);
00013   }
00014   nTrue = 1200;
00015   for(i=0;i<nTrue+1;i++)
00016   {
00017     TrueEdges.push_back(i*0.1);
00018   }
00019   nPID = 20;
00020   for(i=0;i<nPID+1;i++)
00021   {
00022     PIDEdges.push_back(i*0.05);
00023   }
00024 }

ExtrapHists2D::~ExtrapHists2D (  ) 

Definition at line 26 of file ExtrapHists2D.cxx.

00027 {
00028 }


Member Function Documentation

void ExtrapHists2D::AddPID ( std::string  pid  ) 

Definition at line 76 of file ExtrapHists2D.cxx.

References PIDlist.

Referenced by ExtrapHistsGen::InitializeHistograms(), and ExtrapFileGen::InitializeHistograms().

00077 {
00078   PIDlist.push_back(pid);
00079   
00080   return;
00081 }

int ExtrapHists2D::GetPIDBins (  )  [inline]

Definition at line 69 of file ExtrapHists2D.h.

References nPID.

Referenced by ExtrapHistsGen::FinalizeHistograms().

00069 { return nPID; };

double ExtrapHists2D::GetPOT ( void   )  [inline]

Definition at line 71 of file ExtrapHists2D.h.

Referenced by ExtrapHistsGen::WriteToFile().

00071 { return POT; };

int ExtrapHists2D::GetRecoBins (  )  [inline]

Definition at line 68 of file ExtrapHists2D.h.

References nReco.

Referenced by ExtrapHistsGen::FinalizeHistograms().

00068 { return nReco; };

int ExtrapHists2D::GetTrueBins (  )  [inline]

Definition at line 70 of file ExtrapHists2D.h.

References nTrue.

Referenced by ExtrapHistsGen::FinalizeHistograms().

00070 { return nTrue; };

void ExtrapHists2D::InitializeHists (  ) 

Definition at line 82 of file ExtrapHists2D.cxx.

References Form(), nPID, nReco, nTrue, PIDEdges, PIDlist, Reco_CClike, Reco_CClike_Neg, Reco_CClike_Pos, RecoEdges, True_Fid_NueBarCC, True_Fid_NueCC, True_Fid_NuTauBarCC, True_Fid_NuTauCC, TrueEdges, TrueVsReco_CClike, TrueVsReco_CClike_Neg, TrueVsReco_CClike_Neg_NuMuCC, TrueVsReco_CClike_NuMuCC, TrueVsReco_CClike_Pos, TrueVsReco_CClike_Pos_NuMuBarCC, TrueVsReco_Fid, TrueVsReco_Fid_NueBarCC, TrueVsReco_Fid_NueCC, TrueVsReco_Fid_NuMuBarCC, TrueVsReco_Fid_NuMuCC, TrueVsReco_Fid_NuTauBarCC, TrueVsReco_Fid_NuTauCC, TrueVsRecoVsPID_BNueToBNue, TrueVsRecoVsPID_BNueToNuMu, TrueVsRecoVsPID_BNueToNuTau, TrueVsRecoVsPID_NC, TrueVsRecoVsPID_NC_NoOscNue, TrueVsRecoVsPID_NC_NoOscNueBar, TrueVsRecoVsPID_NC_NoOscNuMu, TrueVsRecoVsPID_NC_NoOscNuMuBar, TrueVsRecoVsPID_NuMuToNue, TrueVsRecoVsPID_NuMuToNuMu, and TrueVsRecoVsPID_NuMuToNuTau.

Referenced by ExtrapHistsGen::InitializeHistograms(), and ExtrapFileGen::InitializeHistograms().

00083 {
00084   double *redges = new double[nReco+1];
00085   double *tedges = new double[nTrue+1];
00086   double *pedges = new double[nPID+1];
00087   int i;
00088   for(i=0;i<nReco+1;i++)
00089   {
00090     redges[i] = RecoEdges.at(i);
00091   }
00092   for(i=0;i<nTrue+1;i++)
00093   {
00094     tedges[i] = TrueEdges.at(i);
00095   }
00096   for(i=0;i<nPID+1;i++)
00097   {
00098     pedges[i] = PIDEdges.at(i);
00099   }
00100   
00101   unsigned int np = PIDlist.size();
00102   unsigned int j;
00103   
00104   TrueVsReco_Fid = new TH2D("TrueVsReco_Fid","",nReco,redges,nTrue,tedges);
00105   TrueVsReco_Fid_NuMuCC = new TH2D("TrueVsReco_Fid_NuMuCC","",nReco,redges,nTrue,tedges);
00106   TrueVsReco_Fid_NuMuBarCC = new TH2D("TrueVsReco_Fid_NuMuBarCC","",nReco,redges,nTrue,tedges);
00107   TrueVsReco_CClike = new TH2D("TrueVsReco_CClike","",nReco,redges,nTrue,tedges);
00108   TrueVsReco_CClike_Pos = new TH2D("TrueVsReco_CClike_Pos","",nReco,redges,nTrue,tedges);
00109   TrueVsReco_CClike_Neg = new TH2D("TrueVsReco_CClike_Neg","",nReco,redges,nTrue,tedges);
00110   TrueVsReco_CClike_NuMuCC = new TH2D("TrueVsReco_CClike_NuMuCC","",nReco,redges,nTrue,tedges);
00111   TrueVsReco_CClike_Pos_NuMuBarCC = new TH2D("TrueVsReco_CClike_Pos_NuMuBarCC","",nReco,redges,nTrue,tedges);
00112   TrueVsReco_CClike_Neg_NuMuCC = new TH2D("TrueVsReco_CClike_Neg_NuMuCC","",nReco,redges,nTrue,tedges);
00113   Reco_CClike = new TH1D("Reco_CClike","",nReco,redges);
00114   Reco_CClike_Pos = new TH1D("Reco_CClike_Pos","",nReco,redges);
00115   Reco_CClike_Neg = new TH1D("Reco_CClike_Neg","",nReco,redges);
00116   
00117   TrueVsReco_Fid_NueCC = new TH2D("TrueVsReco_Fid_NueCC","",nReco,redges,nTrue,tedges);
00118   TrueVsReco_Fid_NuTauCC = new TH2D("TrueVsReco_Fid_NuTauCC","",nReco,redges,nTrue,tedges);
00119   True_Fid_NueCC = new TH1D("True_Fid_NueCC","",nTrue,tedges);
00120   True_Fid_NuTauCC = new TH1D("True_Fid_NuTauCC","",nTrue,tedges);
00121   TrueVsReco_Fid_NueBarCC = new TH2D("TrueVsReco_Fid_NueBarCC","",nReco,redges,nTrue,tedges);
00122   TrueVsReco_Fid_NuTauBarCC = new TH2D("TrueVsReco_Fid_NuTauBarCC","",nReco,redges,nTrue,tedges);
00123   True_Fid_NueBarCC = new TH1D("True_Fid_NueBarCC","",nTrue,tedges);
00124   True_Fid_NuTauBarCC = new TH1D("True_Fid_NuTauBarCC","",nTrue,tedges);
00125   
00126   for(j=0;j<np;j++)
00127   {
00128     TrueVsRecoVsPID_NC[PIDlist[j]] = new TH3D(Form("TrueVsRecoVs%s_NC",PIDlist[j].c_str()),"",nPID,pedges,nReco,redges,nTrue,tedges);
00129     TrueVsRecoVsPID_NuMuToNuMu[PIDlist[j]] = new TH3D(Form("TrueVsRecoVs%s_NuMuToNuMu",PIDlist[j].c_str()),"",nPID,pedges,nReco,redges,nTrue,tedges);
00130     TrueVsRecoVsPID_BNueToNuMu[PIDlist[j]] = new TH3D(Form("TrueVsRecoVs%s_BNueToNuMu",PIDlist[j].c_str()),"",nPID,pedges,nReco,redges,nTrue,tedges);
00131     TrueVsRecoVsPID_BNueToBNue[PIDlist[j]] = new TH3D(Form("TrueVsRecoVs%s_BNueToBNue",PIDlist[j].c_str()),"",nPID,pedges,nReco,redges,nTrue,tedges);
00132     TrueVsRecoVsPID_NuMuToNue[PIDlist[j]] = new TH3D(Form("TrueVsRecoVs%s_NuMuToNue",PIDlist[j].c_str()),"",nPID,pedges,nReco,redges,nTrue,tedges);
00133     TrueVsRecoVsPID_NuMuToNuTau[PIDlist[j]] = new TH3D(Form("TrueVsRecoVs%s_NuMuToNuTau",PIDlist[j].c_str()),"",nPID,pedges,nReco,redges,nTrue,tedges);
00134     TrueVsRecoVsPID_BNueToNuTau[PIDlist[j]] = new TH3D(Form("TrueVsRecoVs%s_BNueToNuTau",PIDlist[j].c_str()),"",nPID,pedges,nReco,redges,nTrue,tedges);
00135     
00136     TrueVsRecoVsPID_NC_NoOscNue[PIDlist[j]] = new TH3D(Form("TrueVsRecoVs%s_NC_NoOscNue",PIDlist[j].c_str()),"",nPID,pedges,nReco,redges,nTrue,tedges);
00137     TrueVsRecoVsPID_NC_NoOscNuMu[PIDlist[j]] = new TH3D(Form("TrueVsRecoVs%s_NC_NoOscNuMu",PIDlist[j].c_str()),"",nPID,pedges,nReco,redges,nTrue,tedges);
00138     TrueVsRecoVsPID_NC_NoOscNueBar[PIDlist[j]] = new TH3D(Form("TrueVsRecoVs%s_NC_NoOscNueBar",PIDlist[j].c_str()),"",nPID,pedges,nReco,redges,nTrue,tedges);
00139     TrueVsRecoVsPID_NC_NoOscNuMuBar[PIDlist[j]] = new TH3D(Form("TrueVsRecoVs%s_NC_NoOscNuMuBar",PIDlist[j].c_str()),"",nPID,pedges,nReco,redges,nTrue,tedges);
00140   }
00141   
00142   TrueVsReco_Fid->Sumw2();
00143   TrueVsReco_Fid_NuMuCC->Sumw2();
00144   TrueVsReco_Fid_NuMuBarCC->Sumw2();
00145   TrueVsReco_CClike->Sumw2();
00146   TrueVsReco_CClike_Pos->Sumw2();
00147   TrueVsReco_CClike_Neg->Sumw2();
00148   TrueVsReco_CClike_NuMuCC->Sumw2();
00149   TrueVsReco_CClike_Pos_NuMuBarCC->Sumw2();
00150   TrueVsReco_CClike_Neg_NuMuCC->Sumw2();
00151   Reco_CClike->Sumw2();
00152   Reco_CClike_Pos->Sumw2();
00153   Reco_CClike_Neg->Sumw2();
00154   TrueVsReco_Fid_NueCC->Sumw2();
00155   TrueVsReco_Fid_NuTauCC->Sumw2();
00156   True_Fid_NueCC->Sumw2();
00157   True_Fid_NuTauCC->Sumw2();
00158   TrueVsReco_Fid_NueBarCC->Sumw2();
00159   TrueVsReco_Fid_NuTauBarCC->Sumw2();
00160   True_Fid_NueBarCC->Sumw2();
00161   True_Fid_NuTauBarCC->Sumw2();
00162   for(j=0;j<np;j++)
00163   {
00164     TrueVsRecoVsPID_NC[PIDlist[j]]->Sumw2();
00165     TrueVsRecoVsPID_NuMuToNuMu[PIDlist[j]]->Sumw2();
00166     TrueVsRecoVsPID_BNueToNuMu[PIDlist[j]]->Sumw2();
00167     TrueVsRecoVsPID_BNueToBNue[PIDlist[j]]->Sumw2();
00168     TrueVsRecoVsPID_NuMuToNue[PIDlist[j]]->Sumw2();
00169     TrueVsRecoVsPID_NuMuToNuTau[PIDlist[j]]->Sumw2();
00170     TrueVsRecoVsPID_BNueToNuTau[PIDlist[j]]->Sumw2();
00171     TrueVsRecoVsPID_NC_NoOscNue[PIDlist[j]]->Sumw2();
00172     TrueVsRecoVsPID_NC_NoOscNuMu[PIDlist[j]]->Sumw2();
00173     TrueVsRecoVsPID_NC_NoOscNueBar[PIDlist[j]]->Sumw2();
00174     TrueVsRecoVsPID_NC_NoOscNuMuBar[PIDlist[j]]->Sumw2();
00175   }
00176   
00177   delete [] redges;
00178   delete [] tedges;
00179   delete [] pedges;
00180   
00181   return;
00182 }

void ExtrapHists2D::SetPIDBins ( int  n,
double *  edges 
)

Definition at line 57 of file ExtrapHists2D.cxx.

References nPID, and PIDEdges.

Referenced by ExtrapHistsGen::InitializeHistograms(), and ExtrapFileGen::InitializeHistograms().

00058 {
00059   int i;
00060   
00061   nPID = n;
00062   
00063   PIDEdges.clear();
00064   for(i=0;i<nPID+1;i++)
00065   {
00066     PIDEdges.push_back(edges[i]);
00067   }
00068   
00069   return;
00070 }

void ExtrapHists2D::SetPOT ( double  p  ) 

Definition at line 71 of file ExtrapHists2D.cxx.

Referenced by ExtrapHistsGen::FillHistograms().

00072 {
00073   POT = p;
00074   return;
00075 }

void ExtrapHists2D::SetRecoBins ( int  n,
double *  edges 
)

Definition at line 29 of file ExtrapHists2D.cxx.

References nReco, and RecoEdges.

Referenced by ExtrapHistsGen::InitializeHistograms(), and ExtrapFileGen::InitializeHistograms().

00030 {
00031   int i;
00032   
00033   nReco = n;
00034   
00035   RecoEdges.clear();
00036   for(i=0;i<nReco+1;i++)
00037   {
00038     RecoEdges.push_back(edges[i]);
00039   }
00040   
00041   return;
00042 }

void ExtrapHists2D::SetTrueBins ( int  n,
double *  edges 
)

Definition at line 43 of file ExtrapHists2D.cxx.

References nTrue, and TrueEdges.

Referenced by ExtrapHistsGen::InitializeHistograms(), and ExtrapFileGen::InitializeHistograms().

00044 {
00045   int i;
00046   
00047   nTrue = n;
00048   
00049   TrueEdges.clear();
00050   for(i=0;i<nTrue+1;i++)
00051   {
00052     TrueEdges.push_back(edges[i]);
00053   }
00054   
00055   return;
00056 }


Member Data Documentation

int ExtrapHists2D::nPID [private]

Definition at line 77 of file ExtrapHists2D.h.

Referenced by ExtrapHists2D(), GetPIDBins(), InitializeHists(), and SetPIDBins().

int ExtrapHists2D::nReco [private]

Definition at line 71 of file ExtrapHists2D.h.

Referenced by ExtrapHists2D(), GetRecoBins(), InitializeHists(), and SetRecoBins().

int ExtrapHists2D::nTrue [private]

Definition at line 76 of file ExtrapHists2D.h.

Referenced by ExtrapHists2D(), GetTrueBins(), InitializeHists(), and SetTrueBins().

vector<double> ExtrapHists2D::PIDEdges [private]

Definition at line 80 of file ExtrapHists2D.h.

Referenced by ExtrapHists2D(), InitializeHists(), and SetPIDBins().

vector<std::string> ExtrapHists2D::PIDlist [private]

Definition at line 83 of file ExtrapHists2D.h.

Referenced by AddPID(), and InitializeHists().

double ExtrapHists2D::POT [private]

Definition at line 85 of file ExtrapHists2D.h.

vector<double> ExtrapHists2D::RecoEdges [private]

Definition at line 79 of file ExtrapHists2D.h.

Referenced by ExtrapHists2D(), InitializeHists(), and SetRecoBins().

vector<double> ExtrapHists2D::TrueEdges [private]

Definition at line 81 of file ExtrapHists2D.h.

Referenced by ExtrapHists2D(), InitializeHists(), and SetTrueBins().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1