Go to the documentation of this file. 1 #ifndef DQMOffline_PFTau_PFJetMonitor_h
2 #define DQMOffline_PFTau_PFJetMonitor_h
34 template <
class T,
class C>
35 void fill(
const T &candidateCollection,
36 const C &matchedCandCollection,
64 template <
class T,
class C>
66 const C &matchedJetCollection,
71 std::vector<int> matchIndices;
75 std::vector<uint32_t> sorted_pt_indices(
jetCollection.size());
78 std::sort(
std::begin(sorted_pt_indices),
std::end(sorted_pt_indices), [&](uint32_t
i, uint32_t
j) {
81 for (uint32_t
i = 0;
i < sorted_pt_indices.size(); ++
i) {
93 int iMatch = matchIndices[
i];
94 assert(iMatch < static_cast<int>(matchedJetCollection.size()));
97 const reco::Jet &matchedJet = matchedJetCollection[iMatch];
101 float ptRes = (
jet.pt() - matchedJet.
pt()) / matchedJet.
pt();
115 for (
unsigned j = 0;
j < matchedJetCollection.size(); ++
j)
TH2F * delta_frac_VS_frac_neutral_hadron_
Base class for all types of Jets.
bool isInRange(float pt, float eta, float phi) const
void match(const C &candCollection, const M &matchedCandCollection, std::vector< int > &matchIndices, bool matchCharge=false, float dRMax=-1)
void setup(DQMStore::IBooker &b)
book histograms
To plot Candidate quantities.
double pt() const final
transverse momentum
void fillOne(const reco::Candidate &candidate, const reco::Candidate &matchedCandidate)
fill histograms with a given particle
bool createPFractionHistos_
To plot Candidate quantities.
void fill(const T &candidateCollection, const C &matchedCandCollection, float &minVal, float &maxVal, float &jetpT, const edm::ParameterSet ¶meterSet)
fill histograms with all particle
TH2F * delta_frac_VS_frac_muon_
void setParameters(const edm::ParameterSet ¶meterSet)
set the parameters accessing them from ParameterSet
TH2F * delta_frac_VS_frac_photon_
void setDirectory(TDirectory *dir) override
set directory (to use in ROOT)
double eta() const final
momentum pseudorapidity
CandidateBenchmark candBench_
void fillOne(const reco::Candidate &candidate)
fill histograms with a given particle
double phi() const final
momentum azimuthal angle
void fillOne(const reco::Jet &jet, const reco::Jet &matchedJet)
ParameterSet const & parameterSet(Provenance const &provenance, ProcessHistory const &history)
MatchCandidateBenchmark matchCandBench_
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
TH2F * delta_frac_VS_frac_charged_hadron_
PFJetMonitor(float dRMax=0.3, bool matchCharge=true, Benchmark::Mode mode=Benchmark::DEFAULT)
TH2F * delta_frac_VS_frac_electron_