=
{{
"count",
"", Binning::Simple(3,0,3),
kCounting},
{
"mucosth",
"cos#theta", Binning::Simple(50,-1,1),
kPrimTrkCosth},
{
"vtxx",
"X (cm)", Binning::Simple(50,-200,200),
kSlcVtxX},
{
"vtxy",
"Y (cm)", Binning::Simple(50,-200,200),
kSlcVtxY},
{
"vtxz",
"Z (cm)", Binning::Simple(50,0,500),
kSlcVtxZ},
{
"mulen",
"Primary Track Length", Binning::Simple(50,0,200),
kPrimTrkLen},
{
"mucrtdist",
"Primary Track Distance to CRT hit", Binning::Simple(50,0,100),
kPrimTrkCRTdist},
{
"CRTangle",
"CRT Track Angle", Binning::Simple(20,0,1),
kCRTTrkAngle},
{
"CRTHitTime",
"CRT Hit Time", Binning::Simple(20,0,100),
kCRTTrkTime},
{
"CRTHitDist",
"CRT Hit Distance", Binning::Simple(20,0,100),
kCRTHitDist},
{
"muonprimtrkp",
"Primary Track Momentum", Binning::Simple(24,0,2),
kPrimaryMuonTrkP},
{
"muonprimtrklen",
"Primary Track Lenght", Binning::Simple(18,40,400),
kPrimaryMuonTrkLen},
{
"nuscore",
"Pandora Nu Score", Binning::Simple(25,0,1),
kNuScore},
}
const Var kCounting_scale([](const caf::SRSliceProxy *slc){double count=6e20/3.08823e19;return count;})
const Var kCRTTrkAngle([](const caf::SRSliceProxy *slc) -> double{float crttrkangle(-5.f);if(kPrimaryMuonTrkIdx(slc) >=0){int ptrkid=kPrimaryMuonTrkIdx(slc);const caf::SRTrackProxy &ptrk=slc->reco.trk[ptrkid];crttrkangle=ptrk.crttrack.angle;}return crttrkangle;})
const Cut kNuScore([](const caf::SRSliceProxy *slc){return(!isnan(slc->nu_score)&&slc->nu_score > 0.4);})
const Var kCRTTrkTime([](const caf::SRSliceProxy *slc) -> double{float crttrktime(-5.f);if(kPrimaryMuonTrkIdx(slc) >=0){int ptrkid=kPrimaryMuonTrkIdx(slc);const caf::SRTrackProxy &ptrk=slc->reco.trk[ptrkid];crttrktime=ptrk.crthit.hit.time;}return crttrktime;})
const Var kPrimTrkCRTdist([](const caf::SRSliceProxy *slc){int muIdx=kPrimMuonIdx(slc);if(muIdx< 0) return-5.;return(double) slc->reco.trk[muIdx].crthit.distance;})
const Var kPrimaryMuonTrkLen([](const caf::SRSliceProxy *slc) -> double{float ptrklen(-5.f);if(kPrimaryMuonTrkIdx(slc) >=0){int ptrkid=kPrimaryMuonTrkIdx(slc);const caf::SRTrackProxy &ptrk=slc->reco.trk[ptrkid];ptrklen=ptrk.len;}return ptrklen;})
const Var kPrimTrkCosth([](const caf::SRSliceProxy *slc) -> double{int muIdx=kPrimMuonIdx(slc);if(muIdx< 0) return-5.;return(double) slc->reco.trk[muIdx].costh;})
const Var kPrimaryMuonTrkP([](const caf::SRSliceProxy *slc){float recop(-5.f);bool contained(false);if(kPrimaryMuonTrkIdx(slc) >=0){auto const &ptrk=slc->reco.trk.at(kPrimaryMuonTrkIdx(slc));contained=((-199.15+10)< ptrk.end.x &&ptrk.end.x< (199.15-10)&&(-200.+10)< ptrk.end.y &&ptrk.end.y< (200.-10)&&(0.0+10)< ptrk.end.z &&ptrk.end.z< (500.-50));if(contained) recop=ptrk.rangeP.p_muon;else recop=ptrk.mcsP.fwdP_muon;}return recop;})
const Var kSlcVtxX([](const caf::SRSliceProxy *slc) -> double{return slc->slc.vertex.x;})
const Var kPrimTrkLen([](const caf::SRSliceProxy *slc) -> double{double len=-5.0;if(slc->reco.ntrk > 0){int muIdx=(int) kPrimMuonIdx(slc);if(muIdx >=0){len=slc->reco.trk[muIdx].len;}}return len;})
const Var kSlcVtxZ([](const caf::SRSliceProxy *slc) -> double{return slc->slc.vertex.z;})
const Var kCRTHitDist([](const caf::SRSliceProxy *slc) -> double{float crttrkdist(-5.f);if(kPrimaryMuonTrkIdx(slc) >=0){int ptrkid=kPrimaryMuonTrkIdx(slc);const caf::SRTrackProxy &ptrk=slc->reco.trk[ptrkid];crttrkdist=ptrk.crthit.distance;}return crttrkdist;})
const Var kSlcVtxY([](const caf::SRSliceProxy *slc) -> double{return slc->slc.vertex.y;})