1 #ifndef DQMOffline_PFTau_PFJetMonitor_h
2 #define DQMOffline_PFTau_PFJetMonitor_h
17 bool matchCharge =
true,
39 template<
class T,
class C>
40 void fill(
const T& jetCollection,
41 const C& matchedJetCollection,
float& minVal,
float& maxVal);
64 template<
class T,
class C>
66 const C& matchedJetCollection,
float& minVal,
float& maxVal) {
69 std::vector<int> matchIndices;
70 PFB::match( jetCollection, matchedJetCollection, matchIndices,
73 for (
unsigned int i = 0;
i < (jetCollection).
size();
i++) {
78 int iMatch = matchIndices[
i];
79 assert(iMatch< static_cast<int>(matchedJetCollection.size()));
84 float ptRes = (jet.
pt() - matchedJet.
pt())/matchedJet.
pt();
86 if (ptRes > maxVal) maxVal = ptRes;
87 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
PFJetMonitor(float dRMax=0.3, bool matchCharge=true, Benchmark::Mode mode=Benchmark::DEFAULT)
void setParameters(const edm::ParameterSet ¶meterSet)
set the parameters
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