In the 2015 miniaod formatted CMS open data collections, is there a standard branch or property that can be used to truth-match reco::GenParticle items to their corresponding pat::Jet?
If not, is the practice of matching deltaR the standard approach? Finally, if using deltaR is the standard approach then, is there a typical threshold used for considering two items to be a match?
Hi Eric,
Indeed, Delta-R is the typical method, and we use DR < 0.4 for “AK4” jets and < 0.8 for “AK8” jets.
You can ask a pat::Jet for its associated generated jet object:
ptscale_up = 1;
if(!isData) {
JME::JetParameters JERparameters = {{JME::Binning::JetPt, corrpt}, {JME::Binning::JetEta, jet.eta()}, {JME::Binning::Rho, *(rhoHandle.product())}};
float res = resolution.getResolution(JERparameters);
float sf = resolution_sf.getScaleFactor(JERparameters);
float sf_up = resolution_sf.getScaleFactor(JERparameters, Variation::UP);
float sf_down = resolution_sf.getScaleFactor(JERparameters, Variation::DOWN);
const reco::GenJet *genJet = jet.genJet();
bool smeared = false;
if(genJet){
double deltaPt = fabs(genJet->pt() - corrpt);
double deltaR = reco::deltaR(genJet->p4(),jet.p4());
if ((deltaR < 0.2) && deltaPt <= 3*corrpt*res){
ptscale = max(0.0, 1 + (sf - 1.0)*(corrpt - genJet->pt())/corrpt);
ptscale_down = max(0.0, 1 + (sf_down - 1.0)*(corrpt - genJet->pt())/corrpt);
ptscale_up = max(0.0, 1 + (sf_up - 1.0)*(corrpt - genJet->pt())/corrpt);
smeared = true;
}
And then from the generated jet you have more direct access to the generated particles:
#ifndef JetReco_GenJet_h
#define JetReco_GenJet_h
/** \class reco::GenJet
*
* \short Jets made from MC generator particles
*
* GenJet represents Jets made from MC candidates
* Provide energy contributions from different particle types
* in addition to generic Jet parameters
*
* \author Fedor Ratnikov, UMd
*
* \version Original March 31, 2006 by F.R.
************************************************************/
#include "DataFormats/JetReco/interface/Jet.h"
This file has been truncated. show original
(e.g. through “getConstituents”)
Regards,
Julie