32 if (tmp > y_val) y_val =
tmp;
34 float dist_to_top = 765 - y_val;
45 if (tmp < y_val) y_val =
tmp;
47 float dist_to_bot = y_val + 749;
58 if (tmp < z_val) z_val =
tmp;
70 if (tmp > z_val) z_val =
tmp;
82 if (tmp < x_val) x_val =
tmp;
84 float dist_to_west = x_val + 758;
95 if (tmp > x_val) x_val =
tmp;
97 float dist_to_east = 765 - x_val;
caf::Proxy< caf::SRCVNResult > cvnloosepreselptp
caf::Proxy< size_t > npng
caf::Proxy< caf::SRFuzzyK > fuzzyk
Cuts and Vars for the 2020 FD DiF Study.
const Cut kApplySecondAnalysisMask([](const caf::SRProxy *sr){if(sr->hdr.det!=caf::kFARDET) return true; std::bitset< 14 > binary(sr->hdr.dibmask);std::pair< int, int > planesA=calcFirstLastLivePlane(sr->slc.firstplane, binary);std::pair< int, int > planesB=calcFirstLastLivePlane(sr->slc.lastplane, binary);if((planesA.first!=planesB.first)||(planesA.second!=planesB.second)) return false;return((planesA.second-planesA.first+1)/64 >=4);})
const Cut kNue2020PID([](const caf::SRProxy *sr){if(kIsRHC(sr)) return kNue2020PIDRHC(sr);else return kNue2020PIDFHC(sr);})
caf::Proxy< caf::SRHeader > hdr
Proxy for caf::StandardRecord.
const Cut kSingleSlice([](const caf::SRProxy *sr){return(sr->hdr.subevt< 2);})
const Var kdistEast([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid||!(sr->vtx.elastic.fuzzyk.png.size() >0)) return(float)-5;float x_val=sr->vtx.elastic.vtx.x;for(unsigned int pngID=0;pngID< sr->vtx.elastic.fuzzyk.png.size();pngID++){float tmp=sr->vtx.elastic.fuzzyk.png[pngID].shwlid.stop.x;if(tmp > x_val) x_val=tmp;}float dist_to_east=765-x_val;return dist_to_east;})
const Cut kLooseCVNeCut([](const caf::SRProxy *sr){return sr->sel.cvnloosepreselptp.nueid > 0.3;})
const Cut kDiFPreselectionCut
_Var< caf::SRProxy > Var
Representation of a variable to be retrieved from a caf::StandardRecord object.
const Var kdistBottom([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid||!(sr->vtx.elastic.fuzzyk.png.size() >0)) return(float)-5;float y_val=sr->vtx.elastic.vtx.y;for(unsigned int pngID=0;pngID< sr->vtx.elastic.fuzzyk.png.size();pngID++){float tmp=sr->vtx.elastic.fuzzyk.png[pngID].shwlid.stop.y;if(tmp< y_val) y_val=tmp;}float dist_to_bot=y_val+749;return dist_to_bot;})
caf::Proxy< caf::SRElastic > elastic
caf::Proxy< std::vector< caf::SRFuzzyKProng > > png
const Cut kCosRejVeto([](const caf::SRProxy *sr){return sr->sel.veto.keep &&kIsFarDet(sr);})
const Cut kNue2020CoreBasicEventCut
caf::Proxy< float > nueid
const Var kdistFront([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid||!(sr->vtx.elastic.fuzzyk.png.size() >0)) return(float)-5;float z_val=sr->vtx.elastic.vtx.z;for(unsigned int pngID=0;pngID< sr->vtx.elastic.fuzzyk.png.size();pngID++){float tmp=sr->vtx.elastic.fuzzyk.png[pngID].shwlid.stop.z;if(tmp< z_val) z_val=tmp;}return z_val;})
const Cut kDiFSelectionCut
_Cut< caf::SRProxy > Cut
Representation of a cut (selection) to be applied to a caf::StandardRecord object.
const Cut kDiFContainment
caf::Proxy< bool > IsValid
const Var kdistBack([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid||!(sr->vtx.elastic.fuzzyk.png.size() >0)) return(float)-5;float z_val=sr->vtx.elastic.vtx.z;for(unsigned int pngID=0;pngID< sr->vtx.elastic.fuzzyk.png.size();pngID++){float tmp=sr->vtx.elastic.fuzzyk.png[pngID].shwlid.stop.z;if(tmp > z_val) z_val=tmp;}return 5962-z_val;})
caf::Proxy< caf::SRVector3D > vtx
caf::Proxy< caf::SRIDBranch > sel
Template for Cut and SpillCut.
caf::Proxy< caf::SRVertexBranch > vtx
const Var kdistWest([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid||!(sr->vtx.elastic.fuzzyk.png.size() >0)) return(float)-5;float x_val=sr->vtx.elastic.vtx.x;for(unsigned int pngID=0;pngID< sr->vtx.elastic.fuzzyk.png.size();pngID++){float tmp=sr->vtx.elastic.fuzzyk.png[pngID].shwlid.stop.x;if(tmp< x_val) x_val=tmp;}float dist_to_west=x_val+758;return dist_to_west;})
const Cut kDiFBasicQuality([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;if(sr->vtx.elastic.fuzzyk.npng==0) return false;return(kApplySecondAnalysisMask(sr)&&kCosRejVeto(sr));})
const Var kdistTop([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid||!(sr->vtx.elastic.fuzzyk.png.size() >0)) return(float)-5;float y_val=sr->vtx.elastic.vtx.y;for(unsigned int pngID=0;pngID< sr->vtx.elastic.fuzzyk.png.size();pngID++){float tmp=sr->vtx.elastic.fuzzyk.png[pngID].shwlid.stop.y;if(tmp > y_val) y_val=tmp;}float dist_to_top=765-y_val;return dist_to_top;})