diff --git a/README.md b/README.md index 47c94ca..adb24ee 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The scale factors can be found in the .root files in ‘scaleFactors/’. The fi This matching has to be performed in an analysis to apply the correct scale factors. Some pseudo code to give an example how this can be applied in an analysis is given in ‘pseudoCodeMatching’. The top quarks and their decay products are generator particles at LHE level. How to access them is framework dependent and in the responsibility of the analysers. -For HOTVR the decay products are not matched to the full jet but to the HOTVR subjets. The matching radius is estimated from the jet area of each subjet by sqrt( area / pi). Example pseudo code can be found in ‘pseudoCodeMatchingHOTVR’. +For HOTVR in 2016 the decay products are not matched to the full jet but to the HOTVR subjets. The matching radius is estimated from the jet area of each subjet by sqrt( area / pi). In 2018 the decay products are matched to the full jet. The matching radius is calculated from the pt of the jet via rho/pt. Example pseudo code can be found in ‘pseudoCodeMatchingHOTVR’. The scale factors can be accessed in a physics analysis with the functionality in ’readScaleFactors.cxx’. The function diff --git a/pseudoCodeMatchingHOTVR.cxx b/pseudoCodeMatchingHOTVR.cxx index de5ec45..ad6f3ef 100644 --- a/pseudoCodeMatchingHOTVR.cxx +++ b/pseudoCodeMatchingHOTVR.cxx @@ -15,15 +15,19 @@ ToptaggingSFs::eCategory getTopTaggingMatchHOTVR(std::vector tops, Jet t bool Wdecay1_matched = false; bool Wdecay2_matched = false; - for( const auto & subjet: tagged_jet.subjets()){ - double dRmatch = sqrt(subjet.jetArea()/3.14); - } - - if(deltaR( top.bquark(), subjet) < dRmatch ) b_matched = true; - if(deltaR( top.WDecayProduct1(), subjet) < dRmatch ) Wdecay1_matched = true; - if(deltaR( top.WDecayProduct2(), subjet) < dRmatch ) Wdecay2_matched = true; + double dRmatch; + double Rmin = 0.1; + double Rmax = 1.5; + double rho = 600.; + double reff = rho/jet.pt(); + if( reff < Rmin ) dRmatch = Rmin; + else if( reff > Rmax ) dRmatch = Rmax; + else dRmatch = reff; + + if(deltaR( top.bquark(), jet) < dRmatch ) b_matched = true; + if(deltaR( top.WDecayProduct1(), jet) < dRmatch ) Wdecay1_matched = true; + if(deltaR( top.WDecayProduct2(), jet) < dRmatch ) Wdecay2_matched = true; - int Nmatch = 0; if(b_matched) ++Nmatch; if(Wdecay1_matched) ++Nmatch; diff --git a/scaleFactors/2016TopTaggingScaleFactors.root b/scaleFactors/2016TopTaggingScaleFactors.root index a8ecdcf..e47f9b4 100644 Binary files a/scaleFactors/2016TopTaggingScaleFactors.root and b/scaleFactors/2016TopTaggingScaleFactors.root differ diff --git a/scaleFactors/2016TopTaggingScaleFactors_NoMassCut.root b/scaleFactors/2016TopTaggingScaleFactors_NoMassCut.root index c8d9f29..c3e936c 100644 Binary files a/scaleFactors/2016TopTaggingScaleFactors_NoMassCut.root and b/scaleFactors/2016TopTaggingScaleFactors_NoMassCut.root differ diff --git a/scaleFactors/2017TopTaggingScaleFactors.root b/scaleFactors/2017TopTaggingScaleFactors.root index be0f619..e154be1 100644 Binary files a/scaleFactors/2017TopTaggingScaleFactors.root and b/scaleFactors/2017TopTaggingScaleFactors.root differ diff --git a/scaleFactors/2017TopTaggingScaleFactors_NoMassCut.root b/scaleFactors/2017TopTaggingScaleFactors_NoMassCut.root index ff9beaf..d480350 100644 Binary files a/scaleFactors/2017TopTaggingScaleFactors_NoMassCut.root and b/scaleFactors/2017TopTaggingScaleFactors_NoMassCut.root differ diff --git a/scaleFactors/2018TopTaggingScaleFactors.root b/scaleFactors/2018TopTaggingScaleFactors.root index e4d0862..be7ab71 100644 Binary files a/scaleFactors/2018TopTaggingScaleFactors.root and b/scaleFactors/2018TopTaggingScaleFactors.root differ diff --git a/scaleFactors/2018TopTaggingScaleFactors_NoMassCut.root b/scaleFactors/2018TopTaggingScaleFactors_NoMassCut.root index 74683ef..e0b7cd6 100644 Binary files a/scaleFactors/2018TopTaggingScaleFactors_NoMassCut.root and b/scaleFactors/2018TopTaggingScaleFactors_NoMassCut.root differ