5 #include "CAFAna/Core/Binning.h" 8 #include "CAFAna/Core/Var.h" 53 const std::string filenameCosmicsData =
"prod_mrdifcaf_R19-11-18-prod5reco.i_fd_cosmic_rhc_full_v1_goodruns";
54 const std::string filenameCRYMC =
"prod_mrdifcaf_R19-11-18-prod5reco.m_fd_cry_rhc_full_v3";
55 const std::string filenameGENIEFluxswap =
"prod_caf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_fluxswap_rhc_nova_v08_full_v1";
67 if(maxe < sr->vtx.elastic.fuzzyk.png[
i].shwlid.shwE){
85 if(maxe < sr->vtx.elastic.fuzzyk.png[
i].shwlid.shwE){
125 loaderCosmicsData.Go();
127 loaderGENIEFluxswap.
Go();
129 TFile *
file =
new TFile(
"MRDiF_FD_RHC_Step1.root",
"recreate");
131 sShwAngleCorePreselCosmicsData.
SaveTo(file,
"sShwAngleCorePreselCosmicsData");
132 sShwAngleCorePreselCRYMC.
SaveTo(file,
"sShwAngleCorePreselCRYMC");
133 sShwAngleCorePreselGENIEFluxswap.
SaveTo(file,
"sShwAngleCorePreselGENIEFluxswap");
140 sShwAngleCoreCosmicsData.
SaveTo(file,
"sShwAngleCoreCosmicsData");
141 sShwAngleCoreCRYMC.
SaveTo(file,
"sShwAngleCoreCRYMC");
142 sShwAngleCoreGENIEFluxswap.
SaveTo(file,
"sShwAngleCoreGENIEFluxswap");
const Var kShwE([](const caf::SRProxy *sr){double maxe=-99.0;if(!sr->vtx.elastic.IsValid) return-99999.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-99999.0;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;i++){if(maxe< sr->vtx.elastic.fuzzyk.png[i].shwlid.shwE){maxe=sr->vtx.elastic.fuzzyk.png[i].shwlid.shwE;}}return maxe;})
caf::Proxy< caf::SRFuzzyK > fuzzyk
Represent the binning of a Spectrum's x-axis.
Cuts and Vars for the 2020 FD DiF Study.
Proxy for caf::StandardRecord.
void SetSpillCut(const SpillCut &cut)
void MRDiFStudy_RHC_Step1()
const Cut kDiFPreselectionCut
Representation of a spectrum in any variable, with associated POT.
caf::Proxy< caf::SRElastic > elastic
caf::Proxy< std::vector< caf::SRFuzzyKProng > > png
const Cut kDiFSelectionCut
virtual void Go() override
Load all the registered spectra.
void SaveTo(TDirectory *dir, const std::string &name) const
caf::Proxy< bool > IsValid
Collaborates with Spectrum and OscillatableSpectrum to fill spectra from CAF files.
const Cut kInCosmicTimingWindow_FD_MR
const SpillCut kStandardSpillCuts
Apply this unless you're doing something special.
const Var kShwAngle([](const caf::SRProxy *sr){double maxe=-99.0;double cosz=-1.0;if(!sr->vtx.elastic.IsValid) return-99999.0;if(sr->vtx.elastic.fuzzyk.npng< 1) return-99999.0;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.npng;i++){if(maxe< sr->vtx.elastic.fuzzyk.png[i].shwlid.shwE){maxe=sr->vtx.elastic.fuzzyk.png[i].shwlid.shwE;cosz=sr->vtx.elastic.fuzzyk.png[i].shwlid.dir.z;}}return cosz;})
caf::Proxy< caf::SRVertexBranch > vtx
static Binning Simple(int n, double lo, double hi, const std::vector< std::string > &labels={})