86 <<
"WARNING: This cut used sandbox variables which no longer exist. Aborting." 238 for (unsigned int i=0; i<sr->vtx.elastic.fuzzyk.nshwlid; ++i){
239 if (sr->vtx.elastic.fuzzyk.png[i].shwlid.lid.ismuon == 1){
255 sr->
mc.
nu[0].vtx.Z() < 0 ||
256 sr->
mc.
nu[0].vtx.Z() > 1650)
269 if (binary[0] == 1)
return false;
271 for (
int i=0;
i<13; ++
i){
273 if (binary[
i] == 0 && binary[
i+1] == 1){
274 if (gap)
return false;
284 if (sr->
mc.
nnu == 0)
return false;
290 if (binary[0] == 1)
return false;
291 int FirstActiveDB = 0;
292 for (
int i=0;
i<14; ++
i){
293 if (binary[
i] == 0 && binary[
i+1] == 1){
300 int nspace = 1 + 2*FirstActiveDB;
301 double start = nspace*0.45 + 32*(6.61+0.0379)*2*FirstActiveDB;
303 bool isUpStreamOfStart = sr->
mc.
nu[0].vtx.z <
start;
304 return isUpStreamOfStart;
caf::Proxy< size_t > npng
caf::Proxy< unsigned int > nshwlid
T max(const caf::Proxy< T > &a, T b)
const Cut kTruthContainedND([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(fabs(sr->mc.nu[0].vtx.X()) > 200|| fabs(sr->mc.nu[0].vtx.Y()) > 200|| sr->mc.nu[0].vtx.Z()< 0|| sr->mc.nu[0].vtx.Z() > 1650) return false;return true;})
const Cut kAngVar([](const caf::SRProxy *sr){std::cout<< "\n\n\n"<< "WARNING: This cut used sandbox variables which no longer exist. Aborting."<< std::endl;abort();return false;})
bool operator()(const caf::SRProxy *sr) const
caf::Proxy< caf::SRFuzzyK > fuzzyk
Far Detector at Ash River.
Cuts and Vars for the 2020 FD DiF Study.
bool operator()(const caf::SRProxy *sr) const
caf::Proxy< std::vector< caf::SRTrack > > tracks
const Cut kCrudeCCSel([](const caf::SRProxy *sr){if(sr->trk.kalman.ntracks==0) return false;return sr->trk.kalman.tracks[0].len > 200;})
Extremely crude CC selection, only for use in some old demos.
fvar< T > fabs(const fvar< T > &x)
caf::Proxy< size_t > ntracks
caf::Proxy< caf::SRHeader > hdr
const Cut kEnter([](const caf::SRProxy *sr){return(sr->slc.boxmin.Z()< 100 && sr->slc.boxmax.Z()< 800);})
2 di-block era Entering-type event selector
caf::Proxy< caf::SRContain > contain
Proxy for caf::StandardRecord.
const Cut kNueIsMuon([](const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.nshwlid > 0){for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.nshwlid;++i){if(sr->vtx.elastic.fuzzyk.png[i].shwlid.lid.ismuon==1){return false;}}return true;}return false;})
caf::Proxy< std::vector< caf::SRNeutrino > > nu
const Cut kXYContainment([](const caf::SRProxy *sr){return(sr->slc.boxmin.X() >-700 && sr->slc.boxmin.Y() >-700 && sr->slc.boxmax.X()< 700 && sr->slc.boxmax.Y()< 660);})
XY containment in 2 di-block era based on slice box coordinates.
caf::Proxy< short int > nnu
caf::Proxy< int > cosfwdcell
caf::Proxy< int > cosbakcell
const Cut kIsFarDet([](const caf::SRProxy *sr){return sr->hdr.det==caf::kFARDET;})
caf::Proxy< caf::SRCosRej > cosrej
caf::Proxy< caf::SRVector3D > boxmin
caf::Proxy< caf::SRElastic > elastic
const Cut kExit([](const caf::SRProxy *sr){return(sr->slc.boxmin.Z() > 100 && sr->slc.boxmax.Z() > 800);})
2 di-block era Exiting-type event selector
caf::Proxy< std::vector< caf::SRFuzzyKProng > > png
Proxy for caf::SRShowerLID.
caf::Proxy< unsigned int > nhit
const Cut kInTime([](const caf::SRProxy *sr){return(sr->slc.meantime >=208000 && sr->slc.meantime<=236000);})
Cut events that are not in time 208us - 236us.
Proxy for caf::SRVector3D.
const Cut kContained([](const caf::SRProxy *sr){return(sr->slc.boxmin.Z() > 100 && sr->slc.boxmax.Z()< 800);})
2 di-block era contained-type event selector
caf::Proxy< caf::SRTrackBranch > trk
const Cut kNueNDCont([](const caf::SRProxy *sr){bool cut=false;if(!sr->vtx.elastic.IsValid) return cut;if(sr->vtx.elastic.fuzzyk.npng==0) return cut;if(sr->vtx.elastic.fuzzyk.nshwlid==0) return cut;if(sr->slc.nhit< 20) return cut;if(std::min(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.X(), sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.X())< -180.0) return cut;if(std::max(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.X(), sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.X()) > 180.0) return cut;if(std::min(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.Y(), sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Y())< -180.0) return cut;if(std::max(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.Y(), sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Y()) > 180.0) return cut;if(std::min(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.Z(), sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Z())< 25.0) return cut;if(std::max(sr->vtx.elastic.fuzzyk.png[0].shwlid.start.Z(), sr->vtx.elastic.fuzzyk.png[0].shwlid.stop.Z()) > 1225.0) return cut;if(sr->vtx.elastic.vtx.X()< -140.0) return cut;if(sr->vtx.elastic.vtx.X() > 140.0) return cut;if(sr->vtx.elastic.vtx.Y()< -140.0) return cut;if(sr->vtx.elastic.vtx.Y() > 140.0) return cut;if(sr->vtx.elastic.vtx.Z()< 100.0) return cut;if(sr->vtx.elastic.vtx.Z() > 550.0) return cut;if(sr->vtx.elastic.fuzzyk.png[sr->vtx.elastic.fuzzyk.longestidx].len > 600.0) return cut;if(sr->slc.calE > 5.0) return cut;if(sr->vtx.elastic.fuzzyk.png[sr->vtx.elastic.fuzzyk.longestidx].shwlid.gap > 150.0) return cut;cut=true;return cut;})
const Cut kFDContainNue([](const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.nshwlid<=0) return false;const caf::SRShowerLIDProxy &shwlid=sr->vtx.elastic.fuzzyk.png[0].shwlid;const caf::SRVector3DProxy &start=shwlid.start;const caf::SRVector3DProxy &stop=shwlid.stop;return(std::min(start.X(), stop.X()) >-725 && std::max(start.X(), stop.X())< +725 && std::min(start.Y(), stop.Y()) >-725 && std::max(start.Y(), stop.Y())< +725 && std::min(start.Z(), stop.Z()) > 50 && std::max(start.Z(), stop.Z())< 5910);})
const Cut kUCCosmicRej([](const caf::SRProxy *sr){return(sr->sel.cosrej.anglekal > 0.5 && sr->sel.cosrej.numuunconttunedpid > 0.55);})
numu group selection: see NumuCuts.h
const Cut kPassesPresel(PassesPreselFunc)
Does this event pass the nue preselection?
caf::Proxy< caf::SRTrackBase > discrete
caf::Proxy< caf::SRLem > lem
caf::Proxy< unsigned int > longestidx
caf::Proxy< int > kalbakcell
caf::Proxy< caf::SRTruthBranch > mc
caf::Proxy< int > kalfwdcell
const Cut kCleanup([](const caf::SRProxy *sr){return(sr->slc.nhit > 20 && sr->trk.cosmic.tracks[0].view==2);})
2 di-block era cleanup before applying other cuts
caf::Proxy< float > numuunconttunedpid
const Cut kNDContainNue([](const caf::SRProxy *sr){if(sr->vtx.elastic.fuzzyk.nshwlid<=0) return false;const caf::SRShowerLIDProxy &shwlid=sr->vtx.elastic.fuzzyk.png[0].shwlid;const caf::SRVector3DProxy &start=shwlid.start;const caf::SRVector3DProxy &stop=shwlid.stop;return(std::min(start.X(), stop.X()) >-150 && std::max(start.X(), stop.X())< +150 && std::min(start.Y(), stop.Y()) >-150 && std::max(start.Y(), stop.Y())< +150 && std::min(start.Z(), stop.Z()) > 50 && std::max(start.Z(), stop.Z())< 1230);})
caf::Proxy< caf::SRKalman > kalman
caf::Proxy< bool > IsValid
caf::Proxy< caf::SRSlice > slc
const Cut kIsSingleGap([](const caf::SRProxy *sr){ if(sr->hdr.det!=caf::kFARDET) return false;std::bitset< 14 > binary(sr->hdr.dibmask);if(binary[0]==1) return false;bool gap=false;for(int i=0;i< 13;++i){if(binary[i]==0 &&binary[i+1]==1){if(gap) return false;gap=true;}}return gap;})
caf::Proxy< float > meantime
caf::Proxy< caf::SRTrackBase > cosmic
caf::Proxy< float > anglekal
caf::Proxy< caf::SRVector3D > vtx
const Cut kIsNeutrinoInUpstreamDeadDBSingleGap([](const caf::SRProxy *sr){if(sr->mc.nnu==0) return false;if(sr->hdr.det!=caf::kFARDET) return false;std::bitset< 14 > binary(sr->hdr.dibmask);if(binary[0]==1) return false;int FirstActiveDB=0;for(int i=0;i< 14;++i){if(binary[i]==0 &&binary[i+1]==1){FirstActiveDB=i+1;}} int nspace=1+2 *FirstActiveDB;double start=nspace *0.45+32 *(6.61+0.0379)*2 *FirstActiveDB;bool isUpStreamOfStart=sr->mc.nu[0].vtx.z< start;return isUpStreamOfStart;})
const Cut kThroughGoing([](const caf::SRProxy *sr){return(sr->slc.boxmin.Z()< 100 && sr->slc.boxmax.Z() > 800);})
2 di-block era through-going-type event selector
caf::Proxy< std::vector< caf::SRKalmanTrack > > tracks
caf::Proxy< caf::SRIDBranch > sel
T min(const caf::Proxy< T > &a, T b)
Template for Cut and SpillCut.
caf::Proxy< caf::SRVertexBranch > vtx
bool PassesPreselFunc(const caf::SRProxy *sr)
Helper for kPassesPresel.
caf::Proxy< size_t > ntracks
caf::Proxy< caf::SRVector3D > boxmax