getCosmicList.C
Go to the documentation of this file.
1 #include "CAFAna/Cuts/Cuts.h"
11 
12 using namespace ana;
13 
15 {
16  // files
17  const std::string fd_data = "prod_sumrestricteddecaf_R17-03-01-prod3reco.k_fd_numi_fhc_full_v1_goodruns_numu_sa_2017";
18 
19  // cuts
20  const Cut kNumuCosmicRejSA(
21  [](const caf::SRProxy* sr)
22  { return ( sr->sel.cosrej.anglekal > 0.5 &&
23  sr->sel.cosrej.numuSAcontpid > 0.535 &&
24  //sr->sel.cosrej.numucontpid > 0.535 &&
25  sr->slc.nhit < 400);
26  }
27  );
28 
29  const Cut kNumuFDSA = kNumuQuality && kNumuContainFD && kNumuNCRej && kNumuCosmicRejSA;
30 
31  // Vars
32 
33  const Var kIsSA(
34  [kNumuFDSA](const caf::SRProxy *sr)
35  {
36  return kNumuFDSA(sr);
37  });
38 
39  const Var kIsA17(
40  [kNumuCutFD2017](const caf::SRProxy *sr)
41  {
42  return kNumuCutFD2017(sr);
43  });
44 
45  const Var kCCESA = SIMPLEVAR(energy.numu.trkccE);
46 
47 
48  MakeTextListFile(fd_data, { (kNumuFDSA || kNumuCutFD2017) && kInTimingSideband}, {"CosmicList.txt"} , {&kIsSA, &kIsA17, &kHadEFrac, &kCCE, &kCCESA}, &kStandardSpillCuts);
49 
50 } // End of function
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Cut kNumuCutFD2017
Definition: NumuCuts2017.h:39
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
void getCosmicList()
Definition: getCosmicList.C:14
const Cut kNumuContainFD([](const caf::SRProxy *sr){ std::pair< int, int > planes=calcFirstLastLivePlane(sr->slc.firstplane, std::bitset< 14 >(sr->hdr.dibmask));int planestofront=sr->slc.firstplane-planes.first;int planestoback=planes.second-sr->slc.lastplane;return( sr->slc.ncellsfromedge > 1 &&planestofront > 1 &&planestoback > 1 &&sr->sel.contain.kalfwdcell > 10 &&sr->sel.contain.kalbakcell > 10 &&sr->sel.contain.cosfwdcell > 0 &&sr->sel.contain.cosbakcell > 0);})
Definition: NumuCuts.h:20
caf::Proxy< caf::SRCosRej > cosrej
Definition: SRProxy.h:1252
const Cut kInTimingSideband([](const caf::SRProxy *sr){if(sr->spill.run > util::kLastBadTimingRun) return(kInTimingSideband_before(sr)|| kInTimingSideband_after(sr));else return(kInTimingSideband_before(sr)|| kInTimingSideband_afterA(sr)|| kInTimingSideband_afterB(sr));}, [](const caf::SRSpillProxy *spill){if(spill->run > util::kLastBadTimingRun) return(kInTimingSideband_before.Livetime(spill)+ kInTimingSideband_after.Livetime(spill));else return(kInTimingSideband_before.Livetime(spill)+ kInTimingSideband_afterA.Livetime(spill)+ kInTimingSideband_afterB.Livetime(spill));}, [](const caf::SRSpillProxy *spill){return 0;})
Definition: TimingCuts.h:12
void MakeTextListFile(const std::string &wildcard, const std::vector< Cut > &cut, const std::vector< std::string > &output, const std::vector< const Var * > &floatVars, const std::vector< const Var * > &intVars, const SpillCut *spillCut)
Make a file listing all the events passing the specified cut.
Definition: EventList.cxx:193
caf::Proxy< unsigned int > nhit
Definition: SRProxy.h:1315
const Var kHadEFrac
Definition: NumuVars.h:24
const Var kCCE
Definition: NumuVars.h:21
double energy
Definition: plottest35.C:25
caf::StandardRecord * sr
const Cut kNumuNCRej([](const caf::SRProxy *sr){return(sr->sel.remid.pid >0.75);})
Definition: NumuCuts.h:24
caf::Proxy< caf::SRSlice > slc
Definition: SRProxy.h:2142
#define SIMPLEVAR(CAFNAME)
For Vars where literally all you need is a single CAF variable.
Definition: Var.h:88
caf::Proxy< float > anglekal
Definition: SRProxy.h:859
const SpillCut kStandardSpillCuts
Apply this unless you&#39;re doing something special.
Definition: SpillCuts.h:49
caf::Proxy< caf::SRIDBranch > sel
Definition: SRProxy.h:2141
const Cut kNumuQuality
Definition: NumuCuts.h:18
enum BeamMode string