4 #include <TObjString.h> 34 sys_shifts.Shift( face_palm, weight );
37 return kWeightFromShifts;
46 class TrivialPrediction :
public IPrediction
55 axis, cut, shift, wei)
70 static std::unique_ptr<TrivialPrediction>
LoadFrom(TDirectory* dir,
const std::string& name);
94 return std::move(spec);
99 TDirectory*
tmp = gDirectory;
101 dir = dir->mkdir(name.c_str());
104 TObjString(
"TrivialPrediction").Write(
"type", TObject::kOverwrite);
114 dir = dir->GetDirectory(name.c_str());
126 : fAxis(axis), fCut(cut), fWei(wei)
131 std::unique_ptr<IPrediction> Generate(
145 loaders, fAxis, fCut, shiftMC, fWei ) );
155 double scaleFactor = 1)
163 return fScaleFactor * expt.
ChiSq(osc, syst);
177 :
ISyst(shortName, latexName), fSigmaScale(sigmaScale) {};
188 : fID(sInstanceCount++),
198 static unsigned int sInstanceCount;
206 double wgt = 1 + fSigmaScale *
sigma;
219 if ( !isRHC && sr->
mc.
nu[0].pdg == 14 )
return true;
220 else if ( isRHC && sr->
mc.
nu[0].pdg == -14 )
return true;
236 return std::move(
Cut ( [ loQ3, hiQ3, loQ0, hiQ0 ](
const caf::SRProxy * sr )
240 return q3 > loQ3 && q3 < hiQ3 && q0 > loQ0 && q0 < hiQ0;
259 switch( shift_param )
262 norm += shift_sigma * 0.5;
263 if ( norm < 0 ) norm = 0.0;
266 mean_q0 += shift_sigma * 0.025;
269 mean_q3 += shift_sigma * 0.05;
272 sigma_q0 += shift_sigma * 0.015;
273 if ( sigma_q0 < 0.01 ) sigma_q0 = 0.01;
276 sigma_q3 += shift_sigma * 0.02;
277 if ( sigma_q3 < 0.01 ) sigma_q3 = 0.01;
280 corr += shift_sigma * 0.2;
281 if ( corr < -0.99 ) corr = -0.99;
282 else if ( corr > 0.99 ) corr = 0.99;
285 double z =
pow( ( q0 - mean_q0 ) / sigma_q0, 2 ) +
pow( ( q3 - mean_q3 ) / sigma_q3, 2 )
286 - 2 * corr * ( q0 -
mean_q0 ) * ( q3 - mean_q3 ) / ( sigma_q0 *
sigma_q3 );
288 return 1.0 + norm *
exp( -0.5 * z / ( 1 - corr * corr ) );
303 :
ISyst(
"MECGaussEnhSyst" + shift_param_name,
"MEC 2D Gauss Syst " + shift_param_name ),
304 fShiftParam( shift_param )
319 weight *= wgt_shift / wgt_nominal;
401 double expAlpha = 0.3 ;
402 double expLogC = 0.25;
403 double expLogB = 0.01;
405 switch( shift_param )
409 if ( norm < 0 ) norm = 0.0;
413 if ( mean_q0 < 0 ) mean_q0 = 0.0;
417 if ( mean_q3 < 0 ) mean_q0 = 0.0;
421 if ( sigma_q0 < 0.01 ) sigma_q0 = 0.01;
425 if ( sigma_q3 < 0.01 ) sigma_q3 = 0.01;
429 if ( corr < -0.99 ) corr = -0.99;
430 else if ( corr > 0.99 ) corr = 0.99;
434 if ( norm_2 < 0 ) norm_2 = 0.0;
438 if ( mean_q0_2 < 0 ) mean_q0_2=0;
442 if ( mean_q3_2 < 0 ) mean_q3_2 = 0;
446 if ( sigma_q0_2 < 0.01 ) sigma_q0_2 = 0.01;
450 if ( sigma_q3_2 < 0.01 ) sigma_q3_2 = 0.01;
454 if ( corr_2 < -0.99 ) corr_2 = -0.99;
455 if ( corr_2 > 0.99 ) corr_2 = 0.99;
462 expA += shift_sigma * 0.05;
463 if (expA <= 0 ) expA =0.01;
464 if (expA > 1) expA = 1.;
467 expAlpha += shift_sigma * 0.025;
468 if (expAlpha < 0.1) expAlpha = 0.1;
471 expLogC += shift_sigma * 0.01;
474 expLogB += shift_sigma * 0.0025;
477 double z =
pow( ( q0 - mean_q0 ) / sigma_q0, 2 ) +
pow( ( q3 - mean_q3 ) / sigma_q3, 2 )
478 - 2 * corr * ( q0 -
mean_q0 ) * ( q3 - mean_q3 ) / ( sigma_q0 *
sigma_q3 );
480 double z_2 =
pow( ( q0 - mean_q0_2 ) / sigma_q0_2, 2 ) +
pow( ( q3 - mean_q3_2 ) / sigma_q3_2, 2 )
486 double weight= supp * ( baseline
487 + norm *
exp( -0.5 * z / ( 1 - corr * corr ) )
488 + norm_2*
exp( -0.5 * z_2 / ( 1 - corr_2 * corr_2 ) ) ) ;
517 double expAlpha = 0.3 ;
518 double expLogC = 0.25;
519 double expLogB = 0.01;
521 switch( shift_param )
524 norm += shift_sigma * 0.5;
525 if ( norm < 0 ) norm = 0.0;
528 mean_q0 += shift_sigma * 0.025;
529 if ( mean_q0 < 0 ) mean_q0 = 0.0;
532 mean_q3 += shift_sigma * 0.05;
533 if ( mean_q3 < 0 ) mean_q0 = 0.0;
536 sigma_q0 += shift_sigma * 0.015;
537 if ( sigma_q0 < 0.01 ) sigma_q0 = 0.01;
540 sigma_q3 += shift_sigma * 0.02;
541 if ( sigma_q3 < 0.01 ) sigma_q3 = 0.01;
544 corr += shift_sigma * 0.2;
545 if ( corr < -0.99 ) corr = -0.99;
546 else if ( corr > 0.99 ) corr = 0.99;
549 norm_2 += shift_sigma * 2;
550 if ( norm_2 < 0 ) norm_2 = 0.0;
553 mean_q0_2 += shift_sigma * 0.025;
554 if ( mean_q0_2 < 0 ) mean_q0_2=0;
557 mean_q3_2 += shift_sigma * 0.05;
558 if ( mean_q3_2 < 0 ) mean_q3_2 = 0;
561 sigma_q0_2 += shift_sigma * 0.015;
562 if ( sigma_q0_2 < 0.01 ) sigma_q0_2 = 0.01;
565 sigma_q3_2 += shift_sigma * 0.02;
566 if ( sigma_q3_2 < 0.01 ) sigma_q3_2 = 0.01;
569 corr_2 += shift_sigma * 0.2;
570 if ( corr_2 < -0.99 ) corr_2 = -0.99;
571 if ( corr_2 > 0.99 ) corr_2 = 0.99;
574 baseline += shift_sigma*0.05;
578 expA += shift_sigma * 0.05;
579 if (expA <= 0 ) expA =0.01;
580 if (expA > 1) expA = 1.;
583 expAlpha += shift_sigma * 0.025;
584 if (expAlpha < 0.1) expAlpha = 0.1;
587 expLogC += shift_sigma * 0.01;
590 expLogB += shift_sigma * 0.0025;
593 double z =
pow( ( q0 - mean_q0 ) / sigma_q0, 2 ) +
pow( ( q3 - mean_q3 ) / sigma_q3, 2 )
594 - 2 * corr * ( q0 -
mean_q0 ) * ( q3 - mean_q3 ) / ( sigma_q0 *
sigma_q3 );
596 double z_2 =
pow( ( q0 - mean_q0_2 ) / sigma_q0_2, 2 ) +
pow( ( q3 - mean_q3_2 ) / sigma_q3_2, 2 )
602 double weight= supp * ( baseline
603 + norm *
exp( -0.5 * z / ( 1 - corr * corr ) )
604 + norm_2*
exp( -0.5 * z_2 / ( 1 - corr_2 * corr_2 ) ) ) ;
631 double expAlpha = 0.3 ;
632 double expLogC = 0.25;
633 double expLogB = 0.01;
635 switch( shift_param )
638 norm += shift_sigma * 0.5;
639 if ( norm < 0 ) norm = 0.0;
642 mean_q0 += shift_sigma * 0.025;
643 if ( mean_q0 < 0 ) mean_q0 = 0.0;
646 mean_q3 += shift_sigma * 0.05;
647 if ( mean_q3 < 0 ) mean_q0 = 0.0;
650 sigma_q0 += shift_sigma * 0.015;
651 if ( sigma_q0 < 0.01 ) sigma_q0 = 0.01;
654 sigma_q3 += shift_sigma * 0.02;
655 if ( sigma_q3 < 0.01 ) sigma_q3 = 0.01;
658 corr += shift_sigma * 0.2;
659 if ( corr < -0.99 ) corr = -0.99;
660 else if ( corr > 0.99 ) corr = 0.99;
663 norm_2 += shift_sigma * 2;
664 if ( norm_2 < 0 ) norm_2 = 0.0;
667 mean_q0_2 += shift_sigma * 0.025;
668 if ( mean_q0_2 < 0 ) mean_q0_2=0;
671 mean_q3_2 += shift_sigma * 0.05;
672 if ( mean_q3_2 < 0 ) mean_q3_2 = 0;
675 sigma_q0_2 += shift_sigma * 0.015;
676 if ( sigma_q0_2 < 0.01 ) sigma_q0_2 = 0.01;
679 sigma_q3_2 += shift_sigma * 0.02;
680 if ( sigma_q3_2 < 0.01 ) sigma_q3_2 = 0.01;
683 corr_2 += shift_sigma * 0.2;
684 if ( corr_2 < -0.99 ) corr_2 = -0.99;
685 if ( corr_2 > 0.99 ) corr_2 = 0.99;
688 baseline += shift_sigma*0.05;
692 expA += shift_sigma * 0.05;
693 if (expA <= 0 ) expA =0.01;
694 if (expA > 1) expA = 1.;
697 expAlpha += shift_sigma * 0.025;
698 if (expAlpha < 0.1) expAlpha = 0.1;
701 expLogC += shift_sigma * 0.01;
704 expLogB += shift_sigma * 0.0025;
707 double z =
pow( ( q0 - mean_q0 ) / sigma_q0, 2 ) +
pow( ( q3 - mean_q3 ) / sigma_q3, 2 )
708 - 2 * corr * ( q0 -
mean_q0 ) * ( q3 - mean_q3 ) / ( sigma_q0 *
sigma_q3 );
710 double z_2 =
pow( ( q0 - mean_q0_2 ) / sigma_q0_2, 2 ) +
pow( ( q3 - mean_q3_2 ) / sigma_q3_2, 2 )
716 double weight= supp * ( baseline
717 + norm *
exp( -0.5 * z / ( 1 - corr * corr ) )
718 + norm_2*
exp( -0.5 * z_2 / ( 1 - corr_2 * corr_2 ) ) ) ;
727 const std::map< std::string , MECDoubleGaussEnhParam >
DoubleGaussMap{
740 {
"MECDoubleGaussEnhSystBaseline",
kBaseline},
754 {
"MECDoubleGaussEnhSystUPBaseline",
kBaseline},
768 {
"MECDoubleGaussEnhSystDOWNBaseline",
kBaseline},
770 {
"MECDoubleGaussEnhSystExpA",
kExpA},
771 {
"MECDoubleGaussEnhSystExpAlpha",
kExpAlpha},
772 {
"MECDoubleGaussEnhSystLogisticC",
kLogisticC},
773 {
"MECDoubleGaussEnhSystLogisticBeta",kLogisticBeta},
864 double expAlpha = 0.3 ;
865 double expLogC = 0.25;
866 double expLogB = 0.01;
870 switch( shifted_param )
874 if ( norm < 0 ) norm = 0.0;
879 if ( mean_q0 < 0 ) mean_q0 = 0.0;
884 if ( mean_q3 < 0 ) mean_q3 = 0.0;
889 if ( sigma_q0 < 0.001 ) sigma_q0 = 0.001;
894 if ( sigma_q3 < 0.001 ) sigma_q3 = 0.001;
899 if ( corr < -0.99 ) corr = -0.99;
900 else if ( corr > 0.99 ) corr = 0.99;
905 if ( norm_2 < 0 ) norm_2 = 0.0;
910 if ( mean_q0_2 < 0 ) mean_q0_2 = 0.0;
915 if ( mean_q3_2 < 0 ) mean_q3_2 = 0.0;
920 if ( sigma_q0_2 < 0.001 ) sigma_q0_2 = 0.001;
925 if ( sigma_q3_2 < 0.001 ) sigma_q3_2 = 0.001;
930 if ( corr_2 < -0.99 ) corr_2 = -0.99;
931 if ( corr_2 > 0.99 ) corr_2 = 0.99;
940 expA += shift_sigma * 0.05;
941 if (expA <= 0 ) expA = 0.01;
942 if (expA > 1) expA = 1.;
946 expAlpha += shift_sigma * 0.025;
947 if (expAlpha < 0.001) expAlpha = 0.001;
951 expLogC += shift_sigma * 0.01;
955 expLogB += shift_sigma * 0.0025;
965 if ( sr->
mc.
nnu < 1)
return 1.0;
976 if ( sr->
mc.
nnu < 1)
return 1.0;
987 if ( sr->
mc.
nnu < 1)
return 1.0;
1000 :
ISyst(
"MECDoubleGaussEnhSyst" + shift_param_name,
"MEC 2D Gauss Syst " + shift_param_name ),
1001 fShiftParam( shift_param )
1006 if ( sr->
mc.
nnu < 1)
return;
1014 weight *= wgt_shift / wgt_nominal;
1015 if (wgt_nominal <= 0 ) weight = 0;
1029 :
ISyst(
"MECDoubleGaussEnhSystUP" + shift_param_name,
"MEC 2D Gauss Syst (up)" + shift_param_name ),
1030 fShiftParam( shift_param )
1035 if ( sr->
mc.
nnu < 1)
return;
1043 weight *= wgt_shift / wgt_nominal;
1044 if (wgt_nominal <= 0 ) weight = 0;
1056 :
ISyst(
"MECDoubleGaussEnhSystDOWN" + shift_param_name,
"MEC 2D Gauss Syst (down)" + shift_param_name ),
1057 fShiftParam( shift_param )
1062 if ( sr->
mc.
nnu < 1)
return;
1070 weight *= wgt_shift / wgt_nominal;
1071 if (wgt_nominal <= 0 ) weight = 0;
1090 switch( shift_param )
1093 A += shift_sigma * 0.1;
1094 if ( A < 0 ) A = 0.0;
1096 case kMinosResSuppQ0 :
1097 Q0 += shift_sigma * 0.03;
1098 if ( Q0 < 0.01 ) Q0 = 0.01;
1101 double supp = A / ( 1 +
exp( 1 -
sqrt( Q2 ) / Q0 ) );
1102 if ( supp > 1 ) supp = 1.0;
1118 :
ISyst(
"MinosResSuppSyst" + shift_param_name,
"MINOS RES Supp Syst " + shift_param_name ),
1119 fShiftParam( shift_param )
1131 weight *= wgt_shift / wgt_nominal;
1144 double weight = 1.0;
1148 if ( sr->
mc.
nu[0].rwgt.genie.size() <= rwgt::fReweightMaCCRES - 1 )
1150 if ( sr->
mc.
nu[0].isvtxcont )
1151 throw std::runtime_error(
"kWeightPionDeuteriumTune: Cannot do MA CCRES rescaling without GENIE reweights available." );
1157 const double correctionInSigma = ( 1.12 - 0.94 ) / 0.2;
1158 weight *= 1. + correctionInSigma * ( sr->
mc.
nu[0].rwgt.genie[rwgt::fReweightMaCCRES].minus1sigma - 1. );
1166 if ( sr->
mc.
nu[0].npiminus + sr->
mc.
nu[0].npiplus + sr->
mc.
nu[0].npizero == 1 )
caf::Proxy< caf::SRCVNResult > cvnloosepreselptp
const Cut kIsNumuCC(CCFlavSel(14, 14))
Select CC .
MinosResSuppSyst(const MinosResSuppParam &shift_param, const std::string &shift_param_name)
TrivialPrediction(const Spectrum &spec)
Cuts and Vars for the 2020 FD DiF Study.
const MECDoubleGaussEnhParam fShiftParam
MECDoubleGaussEnhSystDOWN(const MECDoubleGaussEnhParam &shift_param, const std::string &shift_param_name)
double Q2(const Interaction *const i)
const Var kMECDoubleGaussEnhDOWN([](const caf::SRProxy *sr){if(sr->mc.nnu< 1) return 1.0;if(!(sr->mc.nu[0].iscc)||sr->mc.nu[0].mode!=caf::kMEC) return 1.0;double q0=kTrueQ0(sr);double q3=kTrueQ3(sr);double Q2=kTrueQ2(sr);return CalcMECDoubleGaussEnhDOWN(q0, q3, Q2, kGauss2DNorm_1, 0);})
virtual double ChiSq(osc::IOscCalcAdjustable *osc, const SystShifts &syst=SystShifts::Nominal()) const override
Simple record of shifts applied to systematic parameters.
double ChiSq(osc::IOscCalcAdjustable *osc, const SystShifts &syst=SystShifts::Nominal()) const override
Proxy for caf::StandardRecord.
Collection of SpectrumLoaders for many configurations.
General interface to oscillation calculators.
caf::Proxy< std::vector< caf::SRNeutrino > > nu
std::vector< double > Spectrum
double CalcMECDoubleGaussEnhShiftedParam(std::string shift_param, double shift_sigma, const GaussParams initialParams)
caf::Proxy< short int > nnu
MECDoubleGaussEnhSyst(const MECDoubleGaussEnhParam &shift_param, const std::string &shift_param_name)
const Var kMECGaussEnh([](const caf::SRProxy *sr){if(!kIsNumuCC(sr)||sr->mc.nu[0].mode!=caf::kMEC) return 1.0;double q0=kTrueQ0(sr);double q3=kTrueQ3(sr);return CalcMECGaussEnh(q0, q3, kGauss2DNorm, 0);})
static SystShifts Nominal()
Encapsulate code to systematically shift a caf::SRProxy.
const Var kMinosResSupp([](const caf::SRProxy *sr){if(!kIsNumuCC(sr)||sr->mc.nu[0].mode!=kIsRes(sr)||sr->mc.nu[0].tgtA==1) return 1.0;double Q2=kTrueQ2(sr);return CalcMinosResSupp(Q2, kMinosResSuppNorm, 0);})
_Var< caf::SRProxy > Var
Representation of a variable to be retrieved from a caf::StandardRecord object.
Representation of a spectrum in any variable, with associated POT.
void Shift(double sigma, caf::SRProxy *sr, double &weight) const override
Perform the systematic shift.
Spectrum PredictComponent(osc::IOscCalc *calc, Flavors::Flavors_t flav, Current::Current_t curr, Sign::Sign_t sign) const override
const XML_Char const XML_Char * data
const Var kMECDoubleGaussEnhUP([](const caf::SRProxy *sr){if(sr->mc.nnu< 1) return 1.0;if(!(sr->mc.nu[0].iscc)||sr->mc.nu[0].mode!=caf::kMEC) return 1.0;double q0=kTrueQ0(sr);double q3=kTrueQ3(sr);double Q2=kTrueQ2(sr);return CalcMECDoubleGaussEnhUP(q0, q3, Q2, kGauss2DNorm_1, 0);})
double CalcMECGaussEnh(const double q0, const double q3, const MECGaussEnhParam shift_param, const double shift_sigma)
void Shift(double sigma, caf::SRProxy *sr, double &weight) const override
Perform the systematic shift.
void SaveTo(TDirectory *dir, const std::string &name) const override
Charged-current interactions.
double CalcMinosResSupp(const double Q2, const MinosResSuppParam shift_param, const double shift_sigma)
void Shift(double sigma, caf::SRProxy *sr, double &weight) const override
Perform the systematic shift.
static std::unique_ptr< Spectrum > LoadFrom(TDirectory *dir, const std::string &name)
CompNormSyst(const Cut &selCut, double sigmaScale=1.0)
const Cut kNumu2020NDxsec
void Shift(double sigma, caf::SRProxy *sr, double &weight) const override
Perform the systematic shift.
Cut Q3Q0CutFactory(float loQ3, float hiQ3, float loQ0, float hiQ0)
MECDoubleGaussEnhSystUP(const MECDoubleGaussEnhParam &shift_param, const std::string &shift_param_name)
fvar< T > exp(const fvar< T > &x)
double CalcMECDoubleGaussEnh(const double q0, const double q3, const double Q2, const MECDoubleGaussEnhParam shift_param, const double shift_sigma, const GaussParams initialParams)
_Cut< caf::SRProxy > Cut
Representation of a cut (selection) to be applied to a caf::StandardRecord object.
Spectrum Predict(osc::IOscCalc *calc) const override
void SaveTo(TDirectory *dir, const std::string &name) const
caf::Proxy< caf::SRRemid > remid
std::unique_ptr< IPrediction > Generate(Loaders &loaders, const SystShifts &shiftMC=kNoShift) const override
static unsigned int sInstanceCount
void SetSigmaScale(double sc)
double CalcMECDoubleGaussEnhUP(const double q0, const double q3, const double Q2, const MECDoubleGaussEnhParam shift_param, const double shift_sigma)
cluncky way of having a separate calculation of up / down shifted versions
Oscillation probability calculators.
const std::map< std::string, MECDoubleGaussEnhParam > DoubleGaussMap
MECGaussEnhSyst(const MECGaussEnhParam &shift_param, const std::string &shift_param_name)
const SystShifts kNoShift
NDPredGenerator(const HistAxis axis, const Cut cut, const Var wei=kUnweighted)
caf::Proxy< caf::SRTruthBranch > mc
const Var kMECDoubleGaussEnh(const GaussParams initial_params)
virtual ~NDPredGenerator()
IRescaledSigmaSyst(const std::string &shortName, const std::string &latexName, double sigmaScale=1.0)
const Var kWeightPionDeuteriumTune([](const caf::SRProxy *sr){double weight=1.0;if(kIsNumuCC(sr)&&kIsRes(sr)){if(sr->mc.nu[0].rwgt.genie.size()<=rwgt::fReweightMaCCRES-1){if(sr->mc.nu[0].isvtxcont) throw std::runtime_error("kWeightPionDeuteriumTune: Cannot do MA CCRES rescaling without GENIE reweights available.");else return 1.0;} const double correctionInSigma=(1.12-0.94)/0.2;weight *=1.+correctionInSigma *(sr->mc.nu[0].rwgt.genie[rwgt::fReweightMaCCRES].minus1sigma-1.);weight *=1.15;}else if(kIsNumuCC(sr)&&kIsDIS(sr)&&kTrueW(sr)< 1.7){if(sr->mc.nu[0].npiminus+sr->mc.nu[0].npiplus+sr->mc.nu[0].npizero==1){weight *=0.43;}}return weight;})
const Cut GetCutIsFitMEC(const bool isRHC)
BigChi2SingleSampleExperiment(const IPrediction *pred, const Spectrum &data, double scaleFactor=1)
assert(nhit_max >=nhit_nbins)
void Shift(double sigma, caf::SRProxy *sr, double &weight) const override
Perform the systematic shift.
string shortName
THUMBNAIL BLOCK: We need to make a thumbnail for each.
Both neutrinos and antineutrinos.
Standard interface to all prediction techniques.
void Shift(double sigma, caf::SRProxy *sr, double &weight) const override
Perform the systematic shift.
const Cut kNumu2020PIDLoosePTPxsec([](const caf::SRProxy *sr){return(sr->sel.remid.pid > 0.7 &&sr->sel.cvnloosepreselptp.numuid > 0.82);})
Given loaders and an MC shift, Generate() generates an IPrediction.
caf::Proxy< caf::SRIDBranch > sel
This module creates Common Analysis Files.
std::string to_string(ModuleType mt)
double CalcMECDoubleGaussEnhDOWN(const double q0, const double q3, const double Q2, const MECDoubleGaussEnhParam shift_param, const double shift_sigma)
double GetSigmaScale() const
const MECDoubleGaussEnhParam fShiftParam
static std::unique_ptr< TrivialPrediction > LoadFrom(TDirectory *dir, const std::string &name)
const Cut kNumuContainND2020([](const caf::SRProxy *sr){if(!sr->vtx.elastic.IsValid) return false;for(unsigned int i=0;i< sr->vtx.elastic.fuzzyk.nshwlid;++i){const caf::SRVector3DProxy &start=sr->vtx.elastic.fuzzyk.png[i].shwlid.start;const caf::SRVector3DProxy &stop=sr->vtx.elastic.fuzzyk.png[i].shwlid.stop;if(std::min(start.X(), stop.X())< -180.0) return false;if(std::max(start.X(), stop.X()) > 180.0) return false;if(std::min(start.Y(), stop.Y())< -180.0) return false;if(std::max(start.Y(), stop.Y()) > 180.0) return false;if(std::min(start.Z(), stop.Z())< 40.0) return false;if(std::max(start.Z(), stop.Z()) > 1525.0) return false;}if(sr->trk.kalman.ntracks< 1) return false;for(unsigned int i=0;i< sr->trk.kalman.ntracks;++i){if(i==sr->trk.kalman.idxremid) continue;else if(sr->trk.kalman.tracks[i].start.Z() > 1275||sr->trk.kalman.tracks[i].stop.Z() > 1275) return false;}return(sr->trk.kalman.ntracks > sr->trk.kalman.idxremid &&sr->slc.firstplane > 1
&&sr->slc.lastplane< 212 &&sr->trk.kalman.tracks[0].start.Z()< 1100
&&(sr->trk.kalman.tracks[0].stop.Z()< 1275 ||sr->sel.contain.kalyposattrans< 55) &&sr->sel.contain.kalfwdcellnd > 5 &&sr->sel.contain.kalbakcellnd > 10);})
const Var kUnweighted
The simplest possible Var, always 1. Used as a default weight.
TrivialPrediction(Loaders &loaders, const HistAxis &axis, const Cut &cut, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted)
caf::Proxy< float > numuid
Compare a single data spectrum to the MC + cosmics expectation.
const Var GetWeightFromShifts(const SystShifts &sys_shifts)