NueExtrapHelper Class Reference

#include <NueExtrapHelper.h>

Inheritance diagram for NueExtrapHelper:
NueExtrapolationJB NueFNHelper NueMatrixHelper SysFileGen

List of all members.

Public Member Functions

 NueExtrapHelper ()
 NueExtrapHelper (Int_t nx, Double_t lx, Double_t ux, Int_t ny=0, Double_t ly=0, Double_t uy=0)
 NueExtrapHelper (Int_t nx, Double_t *xbins, Int_t ny=0, Double_t *ybins=0)
virtual ~NueExtrapHelper ()
void SetChains (TChain *, TChain *, Double_t, Double_t)
virtual void AddNueSystematic (NueSystematic *nueSys)
virtual void MakeHelpers (Selection::Selection_t)
virtual void WriteFile (std::string)

Protected Member Functions

void Init ()
Bool_t PassBasicCuts ()
Bool_t PassCuts (NueRecord *nr, Selection::Selection_t sel)
Bool_t PassCuts (Selection::Selection_t)
void SetUpNueAnaChain (TChain *)
void SetUpNueMiniChain (TChain *)
Double_t GetNueEnergy (NueRecord *, Selection::Selection_t)
Double_t GetNueEnergy (Selection::Selection_t)

Protected Attributes

Int_t fNXBins
Double_t * fXBins
Int_t fNYBins
Double_t * fYBins
TChain * fNearChain
TChain * fFarChain
Double_t fNearPOT
Double_t fFarPOT
Selection::Selection_t fCurSel
NueRecordfRecord
NueMinifMini

Detailed Description

Definition at line 14 of file NueExtrapHelper.h.


Constructor & Destructor Documentation

NueExtrapHelper::NueExtrapHelper (  ) 

Definition at line 7 of file NueExtrapHelper.cxx.

References Init().

00007                                  :
00008   fNXBins(0),fXBins(0),fNYBins(0),fYBins(0),fRecord(0),fMini(0)
00009 {
00010   this->Init();
00011 }

NueExtrapHelper::NueExtrapHelper ( Int_t  nx,
Double_t  lx,
Double_t  ux,
Int_t  ny = 0,
Double_t  ly = 0,
Double_t  uy = 0 
)

Definition at line 13 of file NueExtrapHelper.cxx.

References fNXBins, fNYBins, fXBins, fYBins, and Init().

00014                                                                    :
00015   fNXBins(nx),fXBins(0),fNYBins(ny),fYBins(0),fRecord(0),fMini(0)
00016 {
00017   fXBins = new Double_t[fNXBins+1];
00018   Float_t bwidth = (ux-lx)/float(fNXBins);
00019   for(int i=0;i<fNXBins+1;i++) fXBins[i] = lx + float(i)*bwidth;
00020   if(fNYBins>0) {
00021     fYBins = new Double_t[fNYBins+1];
00022     bwidth = (uy-ly)/float(fNYBins);
00023     for(int i=0;i<fNYBins+1;i++) fYBins[i] = ly + float(i)*bwidth;
00024   }
00025   this->Init();
00026 }

NueExtrapHelper::NueExtrapHelper ( Int_t  nx,
Double_t *  xbins,
Int_t  ny = 0,
Double_t *  ybins = 0 
)

Definition at line 28 of file NueExtrapHelper.cxx.

References Init().

00029                                                        :
00030   fNXBins(nx),fXBins(x),fNYBins(ny),fYBins(y),fRecord(0),fMini(0)
00031 {
00032   this->Init();
00033 }

NueExtrapHelper::~NueExtrapHelper (  )  [virtual]

Definition at line 44 of file NueExtrapHelper.cxx.

References fXBins, and fYBins.

00045 {
00046   delete [] fXBins;
00047   delete [] fYBins;
00048 }


Member Function Documentation

void NueExtrapHelper::AddNueSystematic ( NueSystematic nueSys  )  [virtual]

Reimplemented in NueExtrapolationJB, NueFNHelper, and NueMatrixHelper.

Definition at line 75 of file NueExtrapHelper.cxx.

00076 {
00077 }

Double_t NueExtrapHelper::GetNueEnergy ( Selection::Selection_t  sel  )  [protected]

Definition at line 188 of file NueExtrapHelper.cxx.

References fRecord, and GetNueEnergy().

00189 {
00190   return this->GetNueEnergy(fRecord, sel);
00191 }

Double_t NueExtrapHelper::GetNueEnergy ( NueRecord nRecord,
Selection::Selection_t  sel 
) [protected]

Definition at line 193 of file NueExtrapHelper.cxx.

References Selection::kCC, ANtpTrackInfoNue::phCCGeV, ANtpShowerInfoNue::phCCGeV, ANtpEventInfoNue::phNueGeV, NueRecord::srevent, NueRecord::srshower, and NueRecord::srtrack.

Referenced by NueExtrapolationJB::BuildAppTrueHistExact(), GetNueEnergy(), NueMatrixHelper::MakeANANUEPlots(), NueExtrapolationJB::MakeDataHistograms(), NueFNHelper::MakeHelpers(), and NueExtrapolationJB::PrepareExtrapHistograms().

00194 {
00195   double ntupleEnergy = nRecord->srevent.phNueGeV;
00196   if(sel != Selection::kCC){
00197     return ntupleEnergy;
00198   }
00199   else{
00200    Double_t recoE = 0.0;
00201    if(nRecord->srtrack.phCCGeV > 0) recoE += nRecord->srtrack.phCCGeV;
00202    if(nRecord->srshower.phCCGeV > 0) recoE += nRecord->srshower.phCCGeV;
00203    return recoE;
00204   }
00205 
00206   // Killed by above at present
00207   Double_t fracDiff = 0;
00208   Double_t corEnergy = ntupleEnergy;
00209   if(fracDiff+1!=0) corEnergy /= (fracDiff+1);
00210   return corEnergy;
00211 }

void NueExtrapHelper::Init ( void   )  [protected]

Definition at line 35 of file NueExtrapHelper.cxx.

References fCurSel, fFarChain, fFarPOT, fNearChain, fNearPOT, and Selection::kUnknown.

Referenced by SysFileGen::Initialize(), NueExtrapolationJB::Initialize(), and NueExtrapHelper().

00036 {
00037   fNearChain = NULL;
00038   fFarChain = NULL;
00039   fNearPOT = 0.;
00040   fFarPOT = 0.; 
00041   fCurSel = Selection::kUnknown;
00042 }

void NueExtrapHelper::MakeHelpers ( Selection::Selection_t  sel  )  [virtual]

Reimplemented in NueFNHelper.

Definition at line 79 of file NueExtrapHelper.cxx.

References fCurSel.

00080 {
00081   fCurSel = sel;
00082 }

Bool_t NueExtrapHelper::PassBasicCuts (  )  [protected]

Definition at line 50 of file NueExtrapHelper.cxx.

References NueRecord::anainfo, fRecord, VldContext::GetDetector(), NueHeader::GetEventNo(), RecRecordImp< T >::GetHeader(), RecHeader::GetVldContext(), AnalysisInfoNue::inFiducialVolume, AnalysisInfoNue::isFullyContained, Detector::kNear, ANtpTrackInfo::planes, NueRecord::srtrack, and ANtpTrackInfoNue::trklikePlanes.

00051 {
00052   if(fRecord->GetHeader().GetEventNo()<0) return false;
00053   if(fRecord->anainfo.inFiducialVolume!=1) return false;
00054   if(fRecord->srtrack.planes>=25) return false;  
00055   if(fRecord->srtrack.trklikePlanes>=18) return false;
00056   //if(fRecord->srevent.phMeu>150) return false;
00057   //if(TMath::Max(fRecord->srtrack.pulseHeight,
00058   //    fRecord->srshower.pulseHeight)<5000) return false;  
00059   if(fRecord->GetHeader().GetVldContext().GetDetector()==Detector::kNear && 
00060      fRecord->anainfo.isFullyContained==-2) return true;
00061   if(fRecord->anainfo.isFullyContained!=1) return false;
00062   return true;
00063 }

Bool_t NueExtrapHelper::PassCuts ( Selection::Selection_t  sel  )  [protected]

Definition at line 70 of file NueExtrapHelper.cxx.

References fRecord, and PassCuts().

00071 {
00072   return PassCuts(fRecord, sel);
00073 }

Bool_t NueExtrapHelper::PassCuts ( NueRecord nr,
Selection::Selection_t  sel 
) [protected]
void NueExtrapHelper::SetChains ( TChain *  nearChain,
TChain *  farChain,
Double_t  nearPOT,
Double_t  farPOT 
)

Definition at line 88 of file NueExtrapHelper.cxx.

References fFarChain, fFarPOT, fNearChain, fNearPOT, and SetUpNueAnaChain().

00090 {
00091   fNearChain = nearChain;
00092   fFarChain = farChain;
00093   SetUpNueAnaChain(fNearChain);
00094   SetUpNueAnaChain(fFarChain);
00095   fNearPOT = nearPOT;
00096   fFarPOT = farPOT;
00097 }

void NueExtrapHelper::SetUpNueAnaChain ( TChain *  chain  )  [protected]

Definition at line 105 of file NueExtrapHelper.cxx.

References fRecord.

Referenced by NueExtrapolationJB::AddChain(), NueExtrapolationJB::LoadFiles(), and SetChains().

00106 {
00107   if(!fRecord) fRecord = new NueRecord();
00108   chain->SetBranchAddress("NueRecord",&fRecord);
00109 
00110 //  chain->SetBranchStatus("dtree*", 0);
00111   chain->SetBranchStatus("mcnnv*", 0);
00112   chain->SetBranchStatus("timing*", 0);
00113   chain->SetBranchStatus("cdi*", 0);
00114   chain->SetBranchStatus("mri*", 0);
00115   chain->SetBranchStatus("mri*", 0);
00116   chain->SetBranchStatus("treepid*", 0);
00117   chain->SetBranchStatus("highhit*", 0);
00118   chain->SetBranchStatus("mstvar*", 0);
00119   chain->SetBranchStatus("fracvars*", 0);
00120   chain->SetBranchStatus("shield*", 0);
00121   chain->SetBranchStatus("angcluster*", 0);
00122   chain->SetBranchStatus("shwfit*", 0);
00123   chain->SetBranchStatus("hitcalc*", 0);
00124   chain->SetBranchStatus("anainfo*", 0);
00125   chain->SetBranchStatus("mda*", 0);
00126   chain->SetBranchStatus("srshower*", 0);
00127   chain->SetBranchStatus("srshower.phNueGeV", 1);
00128   chain->SetBranchStatus("srshower.phCCGeV",  1);
00129   chain->SetBranchStatus("srtrack*", 0);
00130   chain->SetBranchStatus("srtrack.begPlane", 1);
00131   chain->SetBranchStatus("srtrack.endPlane*", 1);
00132   chain->SetBranchStatus("srtrack.planes", 1);
00133   chain->SetBranchStatus("srtrack.trklikePlanes", 1);
00134   chain->SetBranchStatus("srtrack.phCCGeV",  1);
00135   chain->SetBranchStatus("srtrack.passedFit",  1);
00136   chain->SetBranchStatus("srtrack.deltaUVVtx",  1);
00137 
00138 
00139   chain->SetBranchStatus("ann*", 0);
00140   chain->SetBranchStatus("ann.pid_30inp", 1);
00141   chain->SetBranchStatus("shi*", 0);
00142   chain->SetBranchStatus("shi.epi0", 1);
00143   chain->SetBranchStatus("shi.emenergy", 1);
00144   chain->SetBranchStatus("bmon*", 0);
00145   chain->SetBranchStatus("bmon.goodBeamMon", 1);
00146   chain->SetBranchStatus("bmon.dt_stnd", 1);
00147   chain->SetBranchStatus("subshowervars*", 0);
00148   chain->SetBranchStatus("subshowervars.pid*", 1);
00149   chain->SetBranchStatus("fluxinfo*", 0);
00150   chain->SetBranchStatus("fluxinfo.tptype", 1);
00151 
00152   chain->SetBranchStatus("mctrue*", 0);
00153   chain->SetBranchStatus("mctrue.interactionType", 1);
00154   chain->SetBranchStatus("mctrue.nu*", 1);
00155   chain->SetBranchStatus("mctrue.fNue*", 1);
00156   chain->SetBranchStatus("mctrue.leptonMom*", 1);
00157   chain->SetBranchStatus("mctrue.emShower*", 1);
00158   chain->SetBranchStatus("mctrue.trueVisible*", 1);
00159   chain->SetBranchStatus("mctrue.hadronic*", 1);
00160   chain->SetBranchStatus("mctrue.atomic*", 1);
00161   chain->SetBranchStatus("mctrue.resonance*", 1);
00162   chain->SetBranchStatus("mctrue.q2", 1);
00163   chain->SetBranchStatus("mctrue.w2", 1);
00164   chain->SetBranchStatus("mctrue.bj*", 1);
00165   chain->SetBranchStatus("mctrue.target*", 1);
00166   chain->SetBranchStatus("mctrue.nonOscNuFlavor*", 1);
00167   chain->SetBranchStatus("mctrue.initialState", 1);
00168                                                                                 
00169   chain->SetBranchStatus("srevent*", 0);
00170   chain->SetBranchStatus("srevent.vtx*", 1);
00171   chain->SetBranchStatus("srevent.vtxM*", 0);
00172   chain->SetBranchStatus("srevent.ph*", 1);
00173   chain->SetBranchStatus("srevent.triggerTime", 1);
00174   chain->SetBranchStatus("srevent.spillType", 1);
00175   chain->SetBranchStatus("srevent.coil*", 1);
00176   chain->SetBranchStatus("srevent.liTime", 1);
00177   chain->SetBranchStatus("srevent.eventTimeMin", 1);
00178   chain->SetBranchStatus("srevent.rcBoundary", 1);
00179   chain->SetBranchStatus("srevent.daveFD*", 1);
00180   chain->SetBranchStatus("fHeader*", 0);
00181   chain->SetBranchStatus("fHeader.fVld*", 1);
00182   chain->SetBranchStatus("fHeader.fRelease", 1);
00183   chain->SetBranchStatus("srevent.tracks",1);
00184   chain->SetBranchStatus("anainfo.abCCPID",1);
00185 
00186 }

void NueExtrapHelper::SetUpNueMiniChain ( TChain *  chain  )  [protected]

Definition at line 99 of file NueExtrapHelper.cxx.

References fMini.

Referenced by NueExtrapolationJB::AddChain(), and NueExtrapolationJB::LoadFiles().

00100 {
00101   if(!fMini) fMini = new NueMini();
00102   chain->SetBranchAddress("NueMini",&fMini);
00103 }

void NueExtrapHelper::WriteFile ( std::string   )  [virtual]

Reimplemented in NueFNHelper, and NueMatrixHelper.

Definition at line 84 of file NueExtrapHelper.cxx.

00085 {
00086 }


Member Data Documentation

TChain* NueExtrapHelper::fFarChain [protected]
Double_t NueExtrapHelper::fFarPOT [protected]
TChain* NueExtrapHelper::fNearChain [protected]
Double_t NueExtrapHelper::fNearPOT [protected]
Int_t NueExtrapHelper::fNXBins [protected]
Int_t NueExtrapHelper::fNYBins [protected]

Definition at line 46 of file NueExtrapHelper.h.

Referenced by NueExtrapHelper().

Double_t* NueExtrapHelper::fXBins [protected]
Double_t* NueExtrapHelper::fYBins [protected]

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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1