37 #ifdef XAOD_STANDALONE
74 m_phi_reso_pt20(nullptr),
75 m_phi_reso_pt50(nullptr),
76 m_phi_reso_pt100(nullptr)
108 ATH_MSG_WARNING(
" tool wasn't updated for EMTopo jets so far and is not supported.");
112 m_file = TFile::Open(configpath.c_str());
122 ATH_MSG_ERROR(
"PU Jet Uncertainty TFile is not valid: " << configpath);
123 return StatusCode::FAILURE;
126 std::string toolName;
127 std::string
jetcoll =
"AntiKt4EMTopoJets";
134 std::string
config =
"JES_data2017_2016_2015_Recommendation_Aug2018_rel21.config";
135 std::string calibSeq =
"JetArea_Residual_EtaJES_GSC_Smear";
136 std::string calibArea =
"00-04-81";
138 config =
"JES_data2017_2016_2015_Recommendation_PFlow_Aug2018_rel21.config";
139 calibSeq =
"JetArea_Residual_EtaJES_GSC_Smear";
140 calibArea =
"00-04-81";
152 ATH_MSG_INFO(
"Set up MuonCalibrationAndSmearing tools");
153 toolName =
"MuonCalibrationAndSmearingTool";
155 ATH_MSG_WARNING(
"Setup the muon calibration tool with calib mode 1. Please consider to configure the tool via the 'MuonCalibTool' property.");
163 toolName =
"EgammaCalibrationAndSmearingTool";
165 asg::AsgToolConfig toolConfig (
"CP::EgammaCalibrationAndSmearingTool/METSigAutoConf_" + toolName);
174 toolName =
"TauPerfTool";
183 return StatusCode::SUCCESS;
193 return StatusCode::SUCCESS;
205 double particle_sum[2][2] = {{0.0,0.0}, {0.0,0.0}};
216 unsigned nIterSoft=0;
217 double softSumET=0.0;
220 if(metCont->
find(totalMETName)!=metCont->
end()){
223 ATH_MSG_ERROR(
"NOT the total MET with name:" <<totalMETName);
224 return StatusCode::SUCCESS;
235 ATH_MSG_ERROR(
"Could not find the total MET with name:" <<totalMETName);
236 return StatusCode::SUCCESS;
241 for(
const auto met : *metCont) {
248 if(
met->source()==invisSource)
continue;
256 if(
met->name()!=softTermName || nIterSoft>0){
257 if(nIterSoft>0)
ATH_MSG_ERROR(
"Found multiple soft terms with the name:" <<softTermName <<
". Your MET configuration is wrong!!!");
271 for(
const auto&
el : acc_constitObjLinks(*
met)) {
273 float pt_reso=0.0, phi_reso=0.0;
275 ATH_MSG_ERROR(
"Particle pointer is not valid. This will likely result in a crash " <<
obj);
276 return StatusCode::FAILURE;
285 if(
met->name()!=jetTermName)
continue;
303 double particle_u[2][2] = {{pt_reso*pt_reso*
obj->pt()*
obj->pt()/
m_GeV/
m_GeV,0.0},
305 double particle_u_rot[2][2] = {{pt_reso*pt_reso*
obj->pt()*
obj->pt()/
m_GeV/
m_GeV,0.0},
308 m_VarL+=particle_u_rot[0][0];
309 m_VarT+=particle_u_rot[1][1];
310 m_CvLT+=particle_u_rot[0][1];
314 particle_u_rot[1][1],
315 particle_u_rot[0][1],
318 RotateXY (particle_u, particle_u_rot,
obj->p4().Phi());
319 AddMatrix(particle_sum, particle_u_rot, particle_sum);
322 ATH_MSG_VERBOSE(
"Resolution: " << pt_reso <<
" phi reso: " << phi_reso );
342 met_vect.SetXYZ(MEx,MEy,0.0);
351 met_vect.SetXYZ(MEx,MEy,0.0);
374 return StatusCode::SUCCESS;
392 return StatusCode::SUCCESS;
416 return StatusCode::SUCCESS;
423 bool DoEMuReso =
false;
428 if(
obj->pt()>0.5e6) pt_reso=0.03;
429 if(
obj->pt()>1.0e6) pt_reso=0.1;
433 if(
muon->muonType()==0){
436 else if(
muon->muonType()==1){
439 else if(
muon->muonType()>1){
443 ATH_MSG_VERBOSE(
"This muon had none of the normal muon types (ID,MS,CB) - check this in detail");
444 return StatusCode::FAILURE;
454 ATH_MSG_VERBOSE(
"muon: " << pt_reso <<
" dettype: " << dettype <<
" " <<
muon->pt() <<
" " <<
muon->p4().Eta() <<
" " <<
muon->p4().Phi());
459 ATH_MSG_VERBOSE(
"muon: " << pt_reso <<
" dettype: " << dettype <<
" " <<
obj->pt() <<
" " <<
obj->p4().Eta() <<
" " <<
obj->p4().Phi());
468 return StatusCode::SUCCESS;
474 bool DoEMuReso =
false;
484 ATH_MSG_VERBOSE(
"el: " << pt_reso <<
" " << ele->
pt() <<
" " << ele->
p4().Eta() <<
" " << ele->
p4().Phi());
489 DoEMuReso = acc_EMReso.
isAvailable(*ele) ? acc_EMReso(*ele) :
false;
499 return StatusCode::SUCCESS;
513 ATH_MSG_VERBOSE(
"pho: " << pt_reso <<
" " << pho->
pt() <<
" " << pho->
p4().Eta() <<
" " << pho->
p4().Phi());
515 return StatusCode::SUCCESS;
522 double pt_reso_dbl_data=0.0, pt_reso_dbl_mc=0.0, pt_reso_dbl_max=0.0;
530 pt_reso_dbl_max =
std::max(pt_reso_dbl_data,pt_reso_dbl_mc);
531 pt_reso = pt_reso_dbl_max;
537 double jet_pu_unc = 0.;
538 if(acc_fjvt.isAvailable(*
jet))
540 else if(acc_fjvt_der.isAvailable(*
jet))
543 ATH_MSG_ERROR(
"No fJVT decoration available - must have treat pileup jets set to off or provide fJVT!");
544 return StatusCode::FAILURE;
546 pt_reso = std::sqrt(jet_pu_unc*jet_pu_unc + pt_reso*pt_reso);
554 phi_reso =
jet->pt()*jet_phi_unc;
561 float extra_relative_pt_reso = acc_extra(*
jet);
562 pt_reso = std::sqrt(pt_reso*pt_reso + extra_relative_pt_reso*extra_relative_pt_reso);
566 return StatusCode::SUCCESS;
580 pt_reso = combp4->getMvaEnergyResolution(*tau);
584 ATH_MSG_VERBOSE(
"tau: " << pt_reso <<
" " << tau->
pt() <<
" " << tau->
p4().Eta() <<
" " << tau->
p4().Phi() <<
" phi reso: " << phi_reso);
605 m_VarL+=particle_u_rot[0][0];
606 m_VarT+=particle_u_rot[1][1];
607 m_CvLT+=particle_u_rot[0][1];
611 particle_u_rot[1][1],
612 particle_u_rot[0][1],
615 RotateXY (particle_u, particle_u_rot,-1.0*soft->
phi());
616 AddMatrix(particle_sum, particle_u_rot, particle_sum);
619 <<
" Var_L: " << particle_u_rot[0][0] <<
" Var_T: " << particle_u_rot[1][1]
620 <<
" " << particle_u_rot[0][1]);
624 ATH_MSG_VERBOSE(
"Resolution Soft term parameterized in pthard direction");
632 double particle_u[2][2] = {{varTST,0.0},
634 double particle_u_rot[2][2] = {{varTST,0.0},
638 m_VarL+=particle_u_rot[0][0];
639 m_VarT+=particle_u_rot[1][1];
640 m_CvLT+=particle_u_rot[0][1];
644 particle_u_rot[1][1],
645 particle_u_rot[0][1],
649 AddMatrix(particle_sum, particle_u_rot, particle_sum);
660 double particle_u[2][2] = {{varTST,0.0},
662 double particle_u_rot[2][2] = {{varTST,0.0},
666 m_VarL+=particle_u_rot[0][0];
667 m_VarT+=particle_u_rot[1][1];
668 m_CvLT+=particle_u_rot[0][1];
672 particle_u_rot[1][1],
673 particle_u_rot[0][1],
676 RotateXY (particle_u, particle_u_rot,-1.0*soft->
phi());
677 AddMatrix(particle_sum, particle_u_rot, particle_sum);
687 double jet_pt,
double jet_jvt,
695 if(std::abs(jet_eta)<2.4){
697 if(jet_jvt<0.11) unc = 1;
698 else if(jet_jvt<0.25) unc = 0.0730 + 0.0024 * avgmu + 0.00001 * avgmu * avgmu;
699 else if(jet_jvt<0.85) unc = 0.0995 + 0.0031 * avgmu + 0.00005 * avgmu * avgmu;
700 else if(jet_jvt<0.95) unc = 0.0311 + 0.0025 * avgmu + 0.00005 * avgmu * avgmu;
701 else unc = 0.0308 -0.0010 * avgmu + 0.00006 * avgmu * avgmu ;
703 if(jet_jvt<0.11) unc = 1.;
704 else if(jet_jvt<0.25) unc = 1.;
705 else if(jet_jvt<0.85) unc = -0.0188 + 0.0039 * avgmu + 0.00002 * avgmu * avgmu;
706 else if(jet_jvt<0.95) unc = 0.0252 -0.0009 * avgmu + 0.00006 * avgmu * avgmu ;
707 else unc = 0.0085 -0.0003 * avgmu + 0.00002 * avgmu * avgmu ;
709 if(jet_jvt<0.11) unc = 1;
710 else if(jet_jvt<0.25) unc = 0.0345 -0.0006 * avgmu + 0.00004 * avgmu * avgmu ;
711 else if(jet_jvt<0.85) unc = 0.1078 -0.0051 * avgmu + 0.00011 * avgmu * avgmu ;
712 else if(jet_jvt<0.95) unc = -0.0026 + 0.0005 * avgmu + 0.00002 * avgmu * avgmu;
713 else unc = 0.0090 -0.0004 * avgmu + 0.00001 * avgmu * avgmu ;
715 if(jet_jvt<0.11) unc = 1;
716 else if(jet_jvt<0.25) unc = -0.0321 + 0.0030 * avgmu -0.00002 * avgmu * avgmu;
717 else if(jet_jvt<0.85) unc = 0.0260 -0.0007 * avgmu + 0.00003 * avgmu * avgmu ;
718 else unc = -0.0040 + 0.0003 * avgmu;
719 }
else if(jet_pt<100){
720 unc = 0.9492 -2.0757 * jet_jvt + 1.13328 * jet_jvt * jet_jvt;
721 }
else if(jet_pt<150){
722 unc = 0.7888 -1.8372 * jet_jvt + 1.05539 * jet_jvt * jet_jvt;
724 }
else if(std::abs(jet_eta)<2.6){
726 if(jet_jvt<0.11) unc = 0.2633 + 0.0091 * avgmu + -0.00009 * avgmu * avgmu;
727 else if(jet_jvt<0.25) unc = 0.1841 + 0.0144 * avgmu + -0.00008 * avgmu * avgmu;
728 else if(jet_jvt<0.85) unc = 0.1401 + 0.0048 * avgmu + 0.00006 * avgmu * avgmu ;
729 else if(jet_jvt<0.95) unc = -0.0118 + 0.0076 * avgmu + 0.00003 * avgmu * avgmu;
730 else unc = 0.0534 + -0.0011 * avgmu + 0.00010 * avgmu * avgmu;
732 if(jet_jvt<0.11) unc = 0.1497 + 0.0133 * avgmu + -0.00015 * avgmu * avgmu ;
733 else if(jet_jvt<0.25) unc = -0.2260 + 0.0276 * avgmu + -0.00021 * avgmu * avgmu ;
734 else if(jet_jvt<0.85) unc = 0.2743 + -0.0093 * avgmu + 0.00022 * avgmu * avgmu ;
735 else if(jet_jvt<0.95) unc = 0.0604 + 0.0006 * avgmu + 0.00006 * avgmu * avgmu ;
736 else unc = 0.0478 + -0.0009 * avgmu + 0.00004 * avgmu * avgmu ;
738 if(jet_jvt<0.11) unc = -0.2187 + 0.0317 * avgmu + -0.00037 * avgmu * avgmu ;
739 else if(jet_jvt<0.25) unc = 0.0964 + 0.0053 * avgmu + 0.00002 * avgmu * avgmu ;
740 else if(jet_jvt<0.85) unc = 1.1730 + -0.0624 * avgmu + 0.00088 * avgmu * avgmu ;
741 else if(jet_jvt<0.95) unc = -0.2011 + 0.0151 * avgmu + -0.00018 * avgmu * avgmu ;
742 else unc = 0.0145 + -0.0003 * avgmu + 0.00002 * avgmu * avgmu ;
744 if(jet_jvt<0.11) unc = 0.0051 + 0.0113 * avgmu + -0.00008 * avgmu * avgmu ;
745 else if(jet_jvt<0.25) unc = -0.1024 + 0.0109 * avgmu + -0.00006 * avgmu * avgmu ;
746 else if(jet_jvt<0.85) unc = 1.2491 + -0.0501 * avgmu + 0.00052 * avgmu * avgmu ;
747 else unc = 0.0267 + -0.0014 * avgmu + 0.00003 * avgmu * avgmu ;
748 }
else if(jet_pt<100){
749 unc = 0.8951 -2.4995 * jet_jvt + 1.63229 * jet_jvt * jet_jvt;
750 }
else if(jet_pt<150){
751 unc = 0.9998 -1.7319 * jet_jvt + 0.72680 * jet_jvt * jet_jvt;
753 }
else if(std::abs(jet_eta)<2.7){
755 if(jet_jvt<0.11) unc = 0.3001 + 0.0054 * avgmu -0.00004 * avgmu * avgmu ;
756 else if(jet_jvt<0.25) unc = 0.0663 + 0.0198 * avgmu -0.00013 * avgmu * avgmu ;
757 else if(jet_jvt<0.85) unc = -0.0842 + 0.0163 * avgmu -0.00008 * avgmu * avgmu ;
758 else if(jet_jvt<0.95) unc = -0.0219 + 0.0080 * avgmu + 0.00003 * avgmu * avgmu;
759 else unc = 0.0461 -0.0003 * avgmu + 0.00012 * avgmu * avgmu ;
761 if(jet_jvt<0.11) unc = 0.1885 + 0.0083 * avgmu -0.00006 * avgmu * avgmu ;
762 else if(jet_jvt<0.25) unc = -0.0286 + 0.0150 * avgmu -0.00007 * avgmu * avgmu;
763 else if(jet_jvt<0.85) unc = 0.0152 + 0.0028 * avgmu + 0.00005 * avgmu * avgmu;
764 else if(jet_jvt<0.95) unc = 0.1815 -0.0076 * avgmu + 0.00018 * avgmu * avgmu ;
765 else unc = 0.0192 -0.0003 * avgmu + 0.00007 * avgmu * avgmu ;
767 if(jet_jvt<0.11) unc = 0.1257 + 0.0074 * avgmu -0.00004 * avgmu * avgmu ;
768 else if(jet_jvt<0.25) unc = -0.0276 + 0.0080 * avgmu + 0.00000 * avgmu * avgmu;
769 else if(jet_jvt<0.85) unc = 0.1403 -0.0051 * avgmu + 0.00009 * avgmu * avgmu ;
770 else if(jet_jvt<0.95) unc = 0.2078 -0.0101 * avgmu + 0.00017 * avgmu * avgmu ;
771 else unc = 0.2597 -0.0132 * avgmu + 0.00020 * avgmu * avgmu ;
773 if(jet_jvt<0.11) unc = 0.1111 + 0.0045 * avgmu -0.00000 * avgmu * avgmu ;
774 else if(jet_jvt<0.25) unc = 0.0975 -0.0011 * avgmu + 0.00008 * avgmu * avgmu ;
775 else if(jet_jvt<0.85) unc = 0.0920 -0.0053 * avgmu + 0.00013 * avgmu * avgmu ;
776 else unc = -0.0071 + 0.0016 * avgmu -0.00001 * avgmu * avgmu;
777 }
else if(jet_pt<100){
778 unc = 0.4660 -1.2116 * jet_jvt + 0.78807 * jet_jvt * jet_jvt;
779 }
else if(jet_pt<150){
780 unc = 0.2254 -0.5476 * jet_jvt + 0.32617 * jet_jvt * jet_jvt;
784 float fjvt = jet_fjvt>0.6 ? 0.6 : jet_fjvt;
785 if(jet_pt<30) unc = 0.5106 + 1.2566 * fjvt -1.15060 * fjvt * fjvt;
786 else if(jet_pt<40) unc = 0.2972 + 1.9418 * fjvt -1.82694 * fjvt * fjvt;
787 else if(jet_pt<50) unc = 0.1543 + 1.9864 * fjvt -1.48429 * fjvt * fjvt;
788 else if(jet_pt<60) unc = 0.1050 + 1.3196 * fjvt + 0.03554 * fjvt * fjvt;
789 else if(jet_pt<120) unc = 0.0400 + 0.5653 * fjvt + 1.96323 * fjvt * fjvt;
791 if(jet_fjvt>0.6) unc = 0.9;
797 if(std::abs(jet_eta)<2.4){
799 if(jet_jvt<0.11) unc = 0.524466 + 0.00750057 * avgmu -4.73422e-05 * avgmu * avgmu ;
800 else if(jet_jvt<0.25) unc = 4.17584e-01 + 1.00112e-02 * avgmu -7.43546e-05 * avgmu * avgmu ;
801 else if(jet_jvt<0.85) unc = 2.12625e-01 + 1.03484e-02 * avgmu -5.68063e-05 * avgmu * avgmu;
802 else if(jet_jvt<0.95) unc = 1.08396e-01 + 1.04273e-02 * avgmu -5.00299e-05 * avgmu * avgmu;
803 else unc = 1.26304e-03 +2.10385e-04 * avgmu + 1.10086e-06 * avgmu * avgmu ;
805 if(jet_jvt<0.11) unc = 3.78090e-01 + 8.83535e-03 * avgmu -5.38873e-05* avgmu * avgmu;
806 else if(jet_jvt<0.25) unc = 2.67244e-01+ 9.81193e-03* avgmu -5.87765e-05 * avgmu * avgmu;
807 else if(jet_jvt<0.85) unc = 9.60892e-02 +8.11069e-03 * avgmu -3.73101e-05 * avgmu * avgmu ;
808 else if(jet_jvt<0.95) unc = 5.16235e-02 +6.27371e-03 * avgmu -1.95433e-05 * avgmu * avgmu ;
809 else unc = -2.74714e-03 +2.45273e-04* avgmu -1.44731e-06* avgmu * avgmu ;
811 if(jet_jvt<0.11) unc = 2.44953e-01 + 1.23246e-02 * avgmu -8.48696e-05 * avgmu * avgmu;
812 else if(jet_jvt<0.25) unc = 1.78141e-01 + 1.09451e-02 * avgmu -6.90796e-05 * avgmu * avgmu;
813 else if(jet_jvt<0.85) unc = 9.60998e-02+6.21945e-03* avgmu -2.76203e-05* avgmu * avgmu ;
814 else if(jet_jvt<0.95) unc = 5.79210e-02+ 4.49780e-03 * avgmu + -1.15125e-05 * avgmu * avgmu ;
815 else unc = -2.96644e-03 +2.27707e-04 * avgmu -1.86712e-06 * avgmu * avgmu ;
817 if(jet_jvt<0.11) unc = 1.97017e-01 + 1.34089e-02 * avgmu -9.18923e-05 * avgmu * avgmu ;
818 else if(jet_jvt<0.25) unc = 1.27602e-01 + 1.12287e-02 * avgmu -6.62192e-05 * avgmu * avgmu ;
819 else if(jet_jvt<0.85) unc = 6.94905e-02 + 6.27784e-03 * avgmu -3.07298e-05 * avgmu * avgmu;
820 else if(jet_jvt<0.95) unc = 3.58417e-02 +4.62268e-03 * avgmu -2.12417e-05 * avgmu * avgmu ;
821 else unc = 1.35616e-03 + 5.46723e-06* avgmu + 1.92327e-07 * avgmu * avgmu;
822 }
else if(jet_pt<100){
823 unc = 6.19009e-01 -8.96042e-01 * jet_jvt + 2.89066e-01 * jet_jvt * jet_jvt;
824 }
else if(jet_pt<150){
825 unc = 6.18350e-01 -8.97327e-01 * jet_jvt + 2.90998e-01 * jet_jvt * jet_jvt;
827 }
else if(std::abs(jet_eta)<2.6){
829 if(jet_jvt<0.11) unc = 5.06496e-01 + 8.21123e-03 * avgmu -5.17501e-05 * avgmu * avgmu;
830 else if(jet_jvt<0.25) unc = 4.26616e-01 + 9.25936e-03 * avgmu -5.68847e-05 * avgmu * avgmu;
831 else if(jet_jvt<0.85) unc = 2.03333e-01 + 1.11951e-02 * avgmu-6.09233e-05 * avgmu * avgmu ;
832 else if(jet_jvt<0.95) unc = 1.03167e-01 + 1.13444e-02 * avgmu -5.43274e-05 * avgmu * avgmu;
833 else unc = 1.51480e-03 + 2.08394e-04 * avgmu + 1.39579e-06 * avgmu * avgmu;
835 if(jet_jvt<0.11) unc = 3.40612e-01 + 9.94199e-03 * avgmu + -5.93760e-05* avgmu * avgmu ;
836 else if(jet_jvt<0.25) unc = 2.43360e-01 + 1.05579e-02* avgmu + -6.05403e-05* avgmu * avgmu ;
837 else if(jet_jvt<0.85) unc = 8.34364e-02 + 8.76364e-03 * avgmu -3.64035e-05 * avgmu * avgmu ;
838 else if(jet_jvt<0.95) unc = 4.40362e-02 + 6.92580e-03 * avgmu -1.79853e-05 * avgmu * avgmu ;
839 else unc = -2.68670e-03 + 2.50861e-04 * avgmu + -1.46410e-06* avgmu * avgmu ;
841 if(jet_jvt<0.11) unc = 2.36561e-01 + 1.14078e-02 * avgmu +-7.10025e-05 * avgmu * avgmu ;
842 else if(jet_jvt<0.25) unc = 1.86653e-01 +9.61140e-03 * avgmu +-5.15356e-05 * avgmu * avgmu ;
843 else if(jet_jvt<0.85) unc = 9.37026e-02 +5.93028e-03 * avgmu +-2.02571e-05 * avgmu * avgmu ;
844 else if(jet_jvt<0.95) unc = 5.79210e-02+ 4.49780e-03 * avgmu + -1.15125e-05 * avgmu * avgmu ;
845 else unc = -3.02487e-03 + 2.31337e-04* avgmu + -1.85225e-06 * avgmu * avgmu ;
847 if(jet_jvt<0.11) unc =1.75215e-01+ 1.21805e-02 * avgmu + -7.48846e-05 * avgmu * avgmu ;
848 else if(jet_jvt<0.25) unc = 1.26276e-01+ 9.80117e-03 * avgmu + -4.99913e-05 * avgmu * avgmu ;
849 else if(jet_jvt<0.85) unc = 7.91422e-02 + 5.26009e-03 * avgmu +-1.87388e-05 * avgmu * avgmu ;
850 else if(jet_jvt<0.95) unc = 4.39136e-02+ 4.09435e-03* avgmu +-1.35926e-05 * avgmu * avgmu ;
851 else unc = 1.21410e-03 + 1.14188e-05 * avgmu + 1.53654e-07 * avgmu * avgmu ;
852 }
else if( jet_pt<100){
853 unc = 6.44179e-01 -9.20194e-01* jet_jvt + 2.89686e-01 * jet_jvt * jet_jvt;
854 }
else if(jet_pt<150){
855 unc = 6.43423e-01 -9.21407e-01 * jet_jvt + 2.91648e-01 * jet_jvt * jet_jvt;
857 }
else if(std::abs(jet_eta)<2.7){
859 if(jet_jvt<0.11) unc = 4.76243e-01 + 9.22046e-03 * avgmu -5.88765e-05 * avgmu * avgmu;
860 else if(jet_jvt<0.25) unc = 4.07406e-01+ 1.01167e-02 * avgmu -6.30429e-05 * avgmu * avgmu;
861 else if(jet_jvt<0.85) unc = 2.01324e-01+ 1.20631e-02 * avgmu -6.75582e-05 * avgmu * avgmu;
862 else if(jet_jvt<0.95) unc = 1.03815e-01 + 1.24007e-02 * avgmu -6.26892e-05 * avgmu * avgmu;
863 else unc = 1.63714e-03 +2.00682e-04 * avgmu + 1.53621e-06 * avgmu * avgmu;
865 if(jet_jvt<0.11) unc = 2.89505e-01 + 1.11643e-02 * avgmu -6.45475e-05* avgmu * avgmu;
866 else if(jet_jvt<0.25) unc = 2.15968e-01 + 1.14451e-02* avgmu -6.32545e-05 * avgmu * avgmu;
867 else if(jet_jvt<0.85) unc = 7.92319e-02 +9.66239e-03* avgmu -3.81872e-05 * avgmu * avgmu ;
868 else if(jet_jvt<0.95) unc = 4.25501e-02 +7.90022e-03 * avgmu -1.93561e-05 * avgmu * avgmu;
869 else unc = -2.68089e-03 +2.50117e-04 * avgmu -1.43591e-06 * avgmu * avgmu ;
871 if(jet_jvt<0.11) unc = 1.66062e-01+ 1.21029e-02 * avgmu -7.00743e-05 * avgmu * avgmu;
872 else if(jet_jvt<0.25) unc = 1.36874e-01+ 1.03543e-02 * avgmu -5.13482e-05 * avgmu * avgmu;
873 else if(jet_jvt<0.85) unc = 7.24015e-02 +6.72611e-03 * avgmu -1.98316e-05 * avgmu * avgmu;
874 else if(jet_jvt<0.95) unc = 4.84508e-02 +5.10548e-03* avgmu -8.65067e-06 * avgmu * avgmu;
875 else unc = -3.02710e-03 +2.31422e-04* avgmu -1.84795e-06 * avgmu * avgmu;
877 if(jet_jvt<0.11) unc =1.33626e-01 + 1.02813e-02 * avgmu -4.87698e-05 * avgmu * avgmu;
878 else if(jet_jvt<0.25) unc = 1.06724e-01 + 8.45131e-03 * avgmu -3.26833e-05 * avgmu * avgmu;
879 else if(jet_jvt<0.85) unc = 7.47468e-02 +4.85387e-03 * avgmu -1.01430e-05* avgmu * avgmu;
880 else if(jet_jvt<0.95) unc = 4.57521e-02 + 3.86782e-03 * avgmu -6.38948e-06 * avgmu * avgmu;
881 else unc = 1.20495e-03 +1.18941e-05* avgmu +1.47846e-07 * avgmu * avgmu;
882 }
else if( jet_pt<100){
883 unc = 6.59079e-01 -9.29754e-01 * jet_jvt + 2.83653e-01 * jet_jvt * jet_jvt;
884 }
else if(jet_pt<150){
885 unc = 6.58295e-01 -9.31032e-01 * jet_jvt + 2.85724e-01 * jet_jvt * jet_jvt;
889 float fjvt = jet_fjvt>0.6 ? 0.6 : jet_fjvt;
890 if(jet_pt<30) unc = 0.605329 + 0.625734 * fjvt -0.42484 * fjvt * fjvt;
891 else if(jet_pt<40) unc = 0.409696 + 1.00173 * fjvt -0.609179 * fjvt * fjvt;
892 else if(jet_pt<50) unc = 0.173755 + 1.48847 * fjvt -0.803771 * fjvt * fjvt;
893 else if(jet_pt<60) unc = 0.0140303 + 1.79909 * fjvt -0.889274 * fjvt * fjvt;
894 else if(jet_pt<120) unc = -0.0828333 + 1.81167 * fjvt -0.716881 * fjvt * fjvt;
896 if(jet_fjvt>0.6) unc = 0.9;
920 else if(jet_pt<100.0)
927 if(-4.5<jet_eta && -3.8>=jet_eta)
return 1;
928 else if(-3.8<jet_eta && -3.5>=jet_eta)
return 2;
929 else if(-3.5<jet_eta && -3.0>=jet_eta)
return 3;
930 else if(-3.0<jet_eta && -2.7>=jet_eta)
return 4;
931 else if(-2.7<jet_eta && -2.4>=jet_eta)
return 5;
932 else if(-2.4<jet_eta && -1.5>=jet_eta)
return 6;
933 else if(-1.5<jet_eta && -0.5>=jet_eta)
return 7;
934 else if(-0.5<jet_eta && 0.0>=jet_eta)
return 8;
935 else if(0.0<jet_eta && 0.5>=jet_eta)
return 9;
936 else if(0.5<jet_eta && 1.5>=jet_eta)
return 10;
937 else if(1.5<jet_eta && 2.4>=jet_eta)
return 11;
938 else if(2.4<jet_eta && 2.7>=jet_eta)
return 12;
939 else if(2.7<jet_eta && 3.0>=jet_eta)
return 13;
940 else if(3.0<jet_eta && 3.5>=jet_eta)
return 14;
941 else if(3.5<jet_eta && 3.8>=jet_eta)
return 15;
942 else if(3.8<jet_eta )
return 16;
951 return std::make_tuple( V11, V22, V12);
956 Double_t
rho =
cov / std::sqrt( var_parall * var_perpen ) ;
957 Double_t Significance = 0;
958 if (std::abs(
rho ) >= 0.9 ){
965 if( std::abs(Significance) >= 10
e+15)
990 mat_new[0][0]=
X[0][0]+
Y[0][0];
991 mat_new[0][1]=
X[0][1]+
Y[0][1];
992 mat_new[1][0]=
X[1][0]+
Y[1][0];
993 mat_new[1][1]=
X[1][1]+
Y[1][1];
1018 if (PtSoft<60.)
return (0.145)+(-0.45)*PtSoft;
1019 else return (0.145)+(-0.45)*(60.);
1026 if (PtSoft<50.)
return 41.9+3.8*PtSoft+0.1*
std::pow(PtSoft,2)-12.7+ 1.39*SoftSumet-0.03*
std::pow(SoftSumet,2);
1027 else return 41.9+3.8*50.+0.1*
std::pow(50.,2)-12.7+ 1.39*SoftSumet-0.03*
std::pow(SoftSumet,2);
1030 if (PtSoft<50.)
return 41.9+3.8*PtSoft+0.1*
std::pow(PtSoft,2);
1031 else return (40.5614)+(4.10965)*50.+(0.0955044)*
std::pow(50.,2);
1037 if (PtSoft<45.)
return 40. + 2*PtSoft + 0.1*
std::pow(PtSoft,2);
1038 else return 40. + 2*45 + 0.1*
std::pow(45,2);
1044 if (-60.<=PtSoft_Parall && PtSoft_Parall<0.)
return -8. -0.4*PtSoft_Parall;
1045 if (-60.>PtSoft_Parall)
return -8. -0.4 * (-60.);
1046 if( PtSoft_Parall>=0. && PtSoft_Parall<60.)
return -8. -PtSoft_Parall;
1047 if(PtSoft_Parall>60.)
return -8. -60.;