JetResolution class: Software Guide


The JetResolution class provides a CMSSW software interface to jet resolutions. The user passes (generator) jet pT and eta and retrieves a TF1* describing the corresponding resolution for jet pT, eta, or phi. The parametrizations are stored in text files. The standard text files which are available correspond to resolutions derived from MC truth information, see e.g. AN 2010/121.


To checkout the code from CVS, compile it, and run a simple demonstration, do:

cmsrel CMSSW_3_6_1
cd CMSSW_3_6_1/src
cvs co CondFormats/JetMETObjects
scram b -j4


Many relevant use cases to use the JetResolution class interface are covered in the example executable

To use the class in your own code, first include its header:

#include "CondFormats/JetMETObjects/interface/JetResolution.h"

Then construct the class, passing the name of the text file containing the parameters and a flag indicating whether you want to restrict yourself to Gaussian resolutions or not:

string fileName = "Spring10_PtResolution_AK5Calo.txt";
bool  doGaussian = false;
JetResolution ptResol(fileName, doGaussian);

Given (generator) jet eta and pT values, you can then retrieve the corresponding resolution function as a ROOT TF1* object, and e.g. evaluate it as a PDF using TF1::GetRandom():

float geneta = ...;
float genpt = ...;  
TF1* fPtResol = ptResol.resolutionEtaPt(eta,pt);
float rndm = fPtResol->GetRandom();
float jetpt = rndm*genpt;

You can also get to the functions descriping the pT dependence of each single parameter, for example the Gaussian width sigma:

float eta = ...;
TF1* fSigma = ptResol.parameterEta("sigma",eta);

-- PhilippSchieferdecker - 19-May-2010

Edit | Attach | Watch | Print version | History: r10 | r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 2010-05-19 - PhilippSchieferdecker
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback