1 #ifndef DQMOffline_PFTau_PFJetMonitor_h
2 #define DQMOffline_PFTau_PFJetMonitor_h
17 PFJetMonitor(
float dRMax = 0.3,
bool matchCharge =
true,
25 float ptmax,
float etamin,
float etamax,
41 template<
class T,
class C>
42 void fill(
const T& jetCollection,
43 const C& matchedJetCollection,
float& minVal,
float& maxVal);
66 template<
class T,
class C>
68 const C& matchedJetCollection,
float& minVal,
float& maxVal) {
71 std::vector<int> matchIndices;
72 PFB::match( jetCollection, matchedJetCollection, matchIndices,
75 for (
unsigned int i = 0;
i < (jetCollection).
size();
i++) {
80 int iMatch = matchIndices[
i];
81 assert(iMatch< static_cast<int>(matchedJetCollection.size()));
86 float ptRes = (jet.
pt() - matchedJet.
pt())/matchedJet.
pt();
88 if (ptRes > maxVal) maxVal = ptRes;
89 if (ptRes < minVal) minVal = ptRes;
To plot Candidate quantities.
void fillOne(const reco::Candidate &candidate, const reco::Candidate &matchedCandidate)
fill histograms with a given particle
To plot Candidate quantities.
CandidateBenchmark candBench_
void match(const C &candCollection, const M &matchedCandCollection, std::vector< int > &matchIndices, bool matchCharge=false, float dRMax=-1)
void setDirectory(TDirectory *dir)
set directory (to use in ROOT)
virtual double pt() const =0
transverse momentum
void fillOne(const reco::Candidate &candidate)
fill histograms with a given particle
Base class for all types of Jets.
void fill(const T &jetCollection, const C &matchedJetCollection, float &minVal, float &maxVal)
fill histograms with all particle
bool createPFractionHistos_
TH2F * delta_frac_VS_frac_muon_
MatchCandidateBenchmark matchCandBench_
virtual double eta() const
momentum pseudorapidity
TH2F * delta_frac_VS_frac_neutral_hadron_
void setup()
book histograms
void setParameters(float dRMax, bool matchCharge, Benchmark::Mode mode, float ptmin, float ptmax, float etamin, float etamax, float phimin, float phimax, bool fracHistoFlag=true)
set the parameters locally
PFJetMonitor(float dRMax=0.3, bool matchCharge=true, Benchmark::Mode mode=Benchmark::DEFAULT)
void fillOne(const reco::Jet &jet, const reco::Jet &matchedJet)
TH2F * delta_frac_VS_frac_photon_
TH2F * delta_frac_VS_frac_electron_
virtual double pt() const
transverse momentum
TH2F * delta_frac_VS_frac_charged_hadron_
bool isInRange(float pt, float eta, float phi) const
virtual double phi() const
momentum azimuthal angle
tuple size
Write out results.
virtual double phi() const =0
momentum azimuthal angle
virtual double eta() const =0
momentum pseudorapidity