Classes | Functions | Variables
VarsAndCuts.h File Reference
#include "CAFAna/Cuts/Cuts.h"
#include "CAFAna/Cuts/SpillCuts.h"
#include "CAFAna/Cuts/TimingCuts.h"
#include "CAFAna/Cuts/NumuCuts.h"
#include "CAFAna/Core/Loaders.h"
#include "CAFAna/Core/SpectrumLoader.h"
#include "CAFAna/Core/Spectrum.h"
#include "CAFAna/Core/ReweightableSpectrum.h"
#include "CAFAna/Vars/Vars.h"
#include "CAFAna/Analysis/Calcs.h"
#include "CAFAna/Analysis/Plots.h"
#include "StandardRecord/Proxy/SRProxy.h"
#include "TStyle.h"
#include "TCanvas.h"
#include "TGraph.h"
#include "TGraphAsymmErrors.h"
#include "TFile.h"
#include "TH1.h"
#include "TH2.h"
#include "TLegend.h"
#include "TLatex.h"
#include "TProfile.h"
#include "TTimeStamp.h"
#include "TPaveLabel.h"

Go to the source code of this file.

Classes

struct  Plot
 ====================================================================== /// More...
 
struct  Dataset
 

Functions

const SpillVar kSpillTime ([](const caf::SRSpillProxy *spill){return spill->spilltimesec;})
 
const SpillVar kPOTe15 ([](const caf::SRSpillProxy *spill){return spill->spillpot/1e15;})
 
const SpillVar kPOTe12 ([](const caf::SRSpillProxy *spill){return spill->spillpot/1e12;})
 
SpillCut kHasBatches ([](const caf::SRSpillProxy *spill){return spill->intx.size() > 0 &&spill->inty.size() > 0;})
 
SpillVar getBatchPOT (unsigned int iBatch)
 
SpillCut getYearAndMonth (unsigned int iYear, unsigned int iMonth)
 
const Var kSpillPOT ([](const caf::SRProxy *sr){return sr->spill.spillpot/1e12;})
 
const Var kSliceTime ([](const caf::SRProxy *sr){return sr->slc.meantime/1000;})
 
Cut getBatch (unsigned int iBatch)
 ====================================================================== /// More...
 

Variables

const Var kTime = SIMPLEVAR(hdr.unixtime)
 
const Var kYear = SIMPLEVAR(hdr.year)
 
const Var kMonth = SIMPLEVAR(hdr.month)
 

Function Documentation

Cut getBatch ( unsigned int  iBatch)

====================================================================== ///

Definition at line 96 of file VarsAndCuts.h.

References ana::bins, plot_validation_datamc::fname, label, caf::Proxy< caf::SRSlice >::meantime, caf::Proxy< caf::StandardRecord >::slc, string, and PandAna.Demos.tute_pid_validation::var.

97 {
98  const Cut kInBatch([iBatch](const caf::SRProxy *sr)
99  {
100  return sr->slc.meantime > 218.0e3 + (10./6)*iBatch*1.e3
101  && sr->slc.meantime < 218.0e3 + (10./6)*(iBatch+1)*1.e3;
102  });
103 
104  return kInBatch;
105 }
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
caf::StandardRecord * sr
caf::Proxy< caf::SRSlice > slc
Definition: SRProxy.h:2142
caf::Proxy< float > meantime
Definition: SRProxy.h:1311
SpillVar getBatchPOT ( unsigned int  iBatch)

Definition at line 58 of file VarsAndCuts.h.

References caf::Proxy< caf::SRSpill >::intx, and caf::Proxy< caf::SRSpill >::inty.

59 {
60  SpillVar kBatchInt([iBatch](const caf::SRSpillProxy* spill)
61  {
62  if(iBatch >= spill->intx.size()) return -1.0;
63  if(iBatch >= spill->inty.size()) return -1.0;
64 
65  return 0.5*(spill->intx[iBatch] + spill->inty[iBatch]);
66  });
67 
68  return kBatchInt;
69 }
caf::Proxy< std::vector< float > > inty
Definition: SRProxy.h:1373
caf::Proxy< std::vector< float > > intx
Definition: SRProxy.h:1372
Proxy for caf::SRSpill.
Definition: SRProxy.h:1346
Template for Var and SpillVar.
SpillCut getYearAndMonth ( unsigned int  iYear,
unsigned int  iMonth 
)

Definition at line 71 of file VarsAndCuts.h.

References febshutoff_auto::day, ana::kSliceTime, ana::kSpillPOT, caf::Proxy< caf::SRSlice >::meantime, caf::Proxy< caf::StandardRecord >::slc, caf::Proxy< caf::StandardRecord >::spill, caf::Proxy< caf::SRSpill >::spillpot, caf::Proxy< caf::SRSpill >::spilltimesec, sr, and Munits::year.

Referenced by drawIntensityEffect_2019(), drawLongTerm(), drawLongTerm_2019(), drawVsPOT(), and getStabilitySpectra().

72 {
73  SpillCut kYandM([iYear, iMonth](const caf::SRSpillProxy* spill)
74  {
75  TTimeStamp spilltime(spill->spilltimesec);
76  unsigned int year, month, day;
77  spilltime.GetDate(kFALSE, 0, &year, &month, &day);
78  return (year == iYear && month == iMonth);
79  });
80 
81  return kYandM;
82 };
caf::Proxy< long unsigned int > spilltimesec
Definition: SRProxy.h:1409
Print the time of each NuMI spill, or another specified trigger type. This is intended for use by Eli...
Proxy for caf::SRSpill.
Definition: SRProxy.h:1346
Template for Cut and SpillCut.
Definition: Cut.h:15
static constexpr Double_t year
Definition: Munits.h:185
SpillCut kHasBatches ( [] (const caf::SRSpillProxy *spill){return spill->intx.size() > 0 &&spill->inty.size() > 0;}  )
const SpillVar kPOTe12 ( [] (const caf::SRSpillProxy *spill){return spill->spillpot/1e12;}  )
const SpillVar kPOTe15 ( [] (const caf::SRSpillProxy *spill){return spill->spillpot/1e15;}  )
const Var kSliceTime ( [] (const caf::SRProxy *sr){return sr->slc.meantime/1000;}  )
const Var kSpillPOT ( [] (const caf::SRProxy *sr){return sr->spill.spillpot/1e12;}  )
const SpillVar kSpillTime ( [] (const caf::SRSpillProxy *spill){return spill->spilltimesec;}  )

Variable Documentation

const Var kMonth = SIMPLEVAR(hdr.month)
const Var kTime = SIMPLEVAR(hdr.unixtime)
const Var kYear = SIMPLEVAR(hdr.year)