5 #include "CAFAna/Core/Binning.h" 8 #include "CAFAna/Core/Var.h" 51 const std::string filenameCosmicsData =
"prod_mrdifcaf_R19-11-18-prod5reco.i_fd_cosmic_fhc_full_v1_goodruns";
52 const std::string filenameCRYMC =
"prod_mrdifcaf_R19-11-18-prod5reco.m_fd_cry_fhc_full_v3";
53 const std::string filenameGENIEFluxswap =
"prod_caf_R19-11-18-prod5reco.f_fd_genie_N1810j0211a_fluxswap_fhc_nova_v08_full_v1";
65 if(maxe < sr->vtx.elastic.fuzzyk.png[
i].shwlid.shwE){
83 if(maxe < sr->vtx.elastic.fuzzyk.png[
i].shwlid.shwE){
123 loaderCosmicsData.Go();
125 loaderGENIEFluxswap.
Go();
127 TFile *
file =
new TFile(
"MRDiF_FD_FHC_Step1_test.root",
"recreate");
129 sShwAngleCorePreselCosmicsData.
SaveTo(file,
"sShwAngleCorePreselCosmicsData");
130 sShwAngleCorePreselCRYMC.
SaveTo(file,
"sShwAngleCorePreselCRYMC");
131 sShwAngleCorePreselGENIEFluxswap.
SaveTo(file,
"sShwAngleCorePreselGENIEFluxswap");
139 sShwAngleCoreCosmicsData.
SaveTo(file,
"sShwAngleCoreCosmicsData");
140 sShwAngleCoreCRYMC.
SaveTo(file,
"sShwAngleCoreCRYMC");
141 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 MRDiFStudy_FHC_Step1()
void SetSpillCut(const SpillCut &cut)
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={})