Functions | Variables
tutCAFMacro.C File Reference

Go to the source code of this file.


gSystem Load ("$SRT_PUBLIC_CONTEXT/lib/Linux2.6-GCC-debug/")
tree Draw ("slc.nhit")
tree SetBranchAddress ("rec",&rec)
 for (int i=0;i< tree->GetEntries();++i)
myAwesomeHist Draw ()


TFile * file = new TFile("/nova/data/mc/S13-06-18/genie/nd/nd_r0000001_s01_S13-06-18_v1_genie_1000_fhc_20121129_181943.sim.caf.root", "READ")
TTree * tree = file->Get("recTree")
TCanvas * can1 = new TCanvas("nameOfCanvas", "Tree::Draw()")
caf::StandardRecordrec = 0
TH1F * myAwesomeHist = new TH1F("myHist", ";Awesome Variable; Number of Slices", 100, 0, 100)
TCanvas * can2 = new TCanvas("name", "Awesome Analysis")

Function Documentation

tree Draw ( "slc.nhit"  )

Referenced by cosnumi_plot(), ana::PredictionInterp::DebugPlot(), Canvas.Canvas::draw(), canMan::drawOverlay(), drawSensitivity(), energyResolution(), example_plot(), extract_hadnucleus_xsec(), FD_Data_PosComp(), FD_DataOnly_PosComp(), hA_basic_analysis(), main(), cmf::PlotUtilities::Make1DPlot(), MakeCanvas(), MakeCanvasForData(), MakeCanvasForSim(), MakeComparisonPlots(), MakeComparisonPlotsWithRatio(), makeHadEFrac2DPlot(), MakeNuEnergyPlots(), MakeOverlayCanvas(), MakePlots(), MakeSplitCans(), multiverse_efficiency_plot(), multiverse_macro(), NuMu2020_MakePIDPlots(), DataMCPair::OverlayDataMCSyst(), plot_3NDvsFD(), plot_3NDvsFD_FHC(), plot_3NDvsFD_RHC(), plot_cont_expfriends(), plot_datamc_ND_numu(), plot_datamc_ND_numu_REW(), plot_ehade_quantbound(), plot_hits1(), plot_ND_numu_NOMvsREW(), plot_NDvsFD_REW(), plot_NDvsFD_weights(), plot_NDvsFD_weights_FHC(), plot_NDvsFD_weights_RHC(), plot_nueFD_Signal_REWvsNOM(), plot_nueFD_Signal_REWvsNOM_FHC(), plot_nueFD_Signal_REWvsNOM_pTExtrap_FHC(), plot_nueFD_Signal_REWvsNOM_pTExtrap_RHC(), plot_nueFD_Signal_REWvsNOM_RHC(), plot_quantbound_twosamples(), plot_quantile_boundaries_2020(), plot_quantile_boundaries_twosamples_2020(), plotContProf(), PlotMCOnly(), PlotMultiverse(), PlotPreSelectionPlots(), PlotSelectionPlots(), Plotting_Data2DataComp(), PositionComparison(), evd::PlotView::PrintTag(), evd::MCTrueView::PrintTag(), ProducePlots(), RatioPlot(), Save1DContour(), ana::FluxReweight::SavePlots(), starPlot(), test_newloader(), test_sam(), test_sam_project(), test_stanfit_dummy(), and test_stanfit_systpulls().

fBaryonPT2pdf Draw ( )
for ( int  i = 0; i< tree->GetEntries(); ++i)

Definition at line 27 of file tutCAFMacro.C.

References MECModelEnuComparisons::i, caf::SRSlice::nhit, demo1::nhit, and caf::StandardRecord::slc.

28  {
29  // Get an entry from the tree, this copies it's information to the rec pointer
30  tree->GetEntry(i);
31  // Get a variable from the tree, this is mostly unnecessary, could just refer to rec->slc.nhit everywhere
32  int nhit = rec->slc.nhit;
33  // Do my awesome analysis
34  float myAwesomeVar = nhit * 5.3;
36  // Add my variable to the histogram
37  myAwesomeHist->Fill(myAwesomeVar);
38  }
caf::StandardRecord * rec
Definition: tutCAFMacro.C:20
TH1F * myAwesomeHist
Definition: tutCAFMacro.C:24
unsigned int nhit
number of hits
Definition: SRSlice.h:22
TTree * tree
Definition: tutCAFMacro.C:14
SRSlice slc
Slice branch: nhit, extents, time, etc.
gSystem Load ( "$SRT_PUBLIC_CONTEXT/lib/Linux2.6-GCC-debug/"  )
tree SetBranchAddress ( "rec"  ,

Variable Documentation

TCanvas* can1 = new TCanvas("nameOfCanvas", "Tree::Draw()")

Definition at line 16 of file tutCAFMacro.C.

Referenced by diffapdhv(), and plotapdhv().

TCanvas* can2 = new TCanvas("name", "Awesome Analysis")

Definition at line 40 of file tutCAFMacro.C.

Referenced by diffapdhv(), and plotapdhv().

TFile* file = new TFile("/nova/data/mc/S13-06-18/genie/nd/nd_r0000001_s01_S13-06-18_v1_genie_1000_fhc_20121129_181943.sim.caf.root", "READ")

Definition at line 11 of file tutCAFMacro.C.

TH1F* myAwesomeHist = new TH1F("myHist", ";Awesome Variable; Number of Slices", 100, 0, 100)

Definition at line 24 of file tutCAFMacro.C.

TTree* tree = file->Get("recTree")

Definition at line 14 of file tutCAFMacro.C.