Functions
angle.C File Reference
#include "CAFAna/Cuts/Cuts.h"
#include "CAFAna/Analysis/Plots.h"
#include "CAFAna/Core/SpectrumLoaderMockData.h"
#include "CAFAna/Prediction/PredictionNoExtrap.h"
#include "CAFAna/Experiment/SingleSampleExperiment.h"
#include "CAFAna/Core/Spectrum.h"
#include "CAFAna/Core/SpectrumLoader.h"
#include "CAFAna/Vars/Vars.h"
#include "StandardRecord/Proxy/SRProxy.h"
#include "TCanvas.h"
#include "TH2.h"
#include "TH1.h"
#include "TFitResultPtr.h"
#include "TLegend.h"
#include "ncpi0Bins.h"
#include "ncpi0Cuts.h"
#include "ncpi0Vars.h"

Go to the source code of this file.

Functions

void angle ()
 

Function Documentation

void angle ( )

Definition at line 39 of file angle.C.

References ana::BeamAnglebins, om::cout, allTimeWatchdog::endl, ana::SpectrumLoader::Go(), ana::kIsPreSel, ana::kIsSignal01L, ana::kNpCVN1gammaID(), ana::kNpCVN2gammaID(), ana::kRecoPi0BeamAngle(), ana::kTrueBeamTheta, confusionMatrixTree::out, ana::Spectrum::SaveTo(), and string.

41 {
42 
43 const std::string MC = "dataset_def_name_newest_snapshot prod_caf_R17-03-01-prod3reco.d_nd_genie_nonswap_fhc_nova_v08_full_v1";
44 
45 
46 SpectrumLoader mcloader(MC);
47 
48 Spectrum angle("Reco #theta_{beam} [Deg.]", BeamAnglebins, mcloader,kRecoPi0BeamAngle , kIsSignal01L && kIsPreSel && kNpCVN1gammaID && kNpCVN2gammaID);
49 
50 Spectrum angletrue("True #theta_{beam} [Deg.]", BeamAnglebins, mcloader, kTrueBeamTheta , kIsSignal01L && kIsPreSel && kNpCVN1gammaID && kNpCVN2gammaID);
51 
52 mcloader.Go();
53 
54 TFile *out = new TFile("1d_angledistributions.root","RECREATE");
55 
56  angle.SaveTo(out->mkdir("angle"));
57  angletrue.SaveTo(out->mkdir("angletrue"));
58 
59 
60  std::cout<<"\nOutput saved to " << out->GetName()<<std::endl;
61  out->Close();
62 
63  return;
64 
65 }
void angle()
Definition: angle.C:39
const Var kRecoPi0BeamAngle([](const caf::SRProxy *sr) ->float{if(sr->vtx.nelastic==0) return-1000.0f;if(sr->mc.nnu==0) return-1000.0f;assert(sr->mc.nnu==1);if(sr->mc.nu[0].prim.size()==0) return-1000.0f;if(sr->vtx.elastic[0].fuzzyk.npng==0) return-1000.0f;if(sr->vtx.elastic[0].fuzzyk.npng >2) return-1000.0f;if(sr->vtx.elastic[0].fuzzyk.nshwlid==0) return-1000.0f;TVector3 beamDirND=NuMIBeamDirection(caf::kNEARDET);TVector3 dir1, dir2, prongdir;float beamtheta=-1000.0f;float theta=-1000.0f;if(sr->vtx.elastic[0].fuzzyk.npng==2){dir1=sr->vtx.elastic[0].fuzzyk.png[0].shwlid.dir;dir2=sr->vtx.elastic[0].fuzzyk.png[1].shwlid.dir;prongdir=dir1+dir2;beamtheta=prongdir.Angle(beamDirND);theta=beamtheta *360./(2 *TMath::Pi());}return theta;})
const Var kTrueBeamTheta
Definition: ncpi0Vars.h:684
const Cut kIsSignal01L
FIDUCIAL OPTIMIZATION ANALYSIS 2 PRONG TOTAL PRESELECTION CUTS///.
Definition: ncpi0Cuts.h:1092
const Binning BeamAnglebins
Definition: ncpi0Bins.h:47
Representation of a spectrum in any variable, with associated POT.
Definition: Spectrum.h:40
const Cut kNpCVN2gammaID([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return false;if(sr->vtx.elastic[0].fuzzyk.npng==0) return false;double prPID=sr->vtx.elastic[0].fuzzyk.png[1].cvnpart.photonid;if(prPID >=0.9) return true;return false;})
const Cut kNpCVN1gammaID([](const caf::SRProxy *sr){if(sr->vtx.nelastic==0) return false;if(sr->vtx.elastic[0].fuzzyk.npng==0) return false;double prPID=sr->vtx.elastic[0].fuzzyk.png[0].cvnpart.photonid;if(prPID >=0.7) return true;return false;})
const Cut kIsPreSel
Definition: ncpi0Cuts.h:1099
OStream cout
Definition: OStream.cxx:6
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
enum BeamMode string