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());
76 std::iota(std::begin(sorted_pt_indices),
std::end(sorted_pt_indices), 0);
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)
void setDirectory(TDirectory *dir) override
set directory (to use in ROOT)
void fill(const T &candidateCollection, const C &matchedCandCollection, float &minVal, float &maxVal, float &jetpT, const edm::ParameterSet ¶meterSet)
fill histograms with all particle
To plot Candidate quantities.
void fillOne(const reco::Candidate &candidate, const reco::Candidate &matchedCandidate)
fill histograms with a given particle
To plot Candidate quantities.
double pt() const final
transverse momentum
CandidateBenchmark candBench_
void match(const C &candCollection, const M &matchedCandCollection, std::vector< int > &matchIndices, bool matchCharge=false, float dRMax=-1)
void fillOne(const reco::Candidate &candidate)
fill histograms with a given particle
Base class for all types of Jets.
bool createPFractionHistos_
TH2F * delta_frac_VS_frac_muon_
MatchCandidateBenchmark matchCandBench_
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
void setup(DQMStore::IBooker &b)
book histograms
TH2F * delta_frac_VS_frac_neutral_hadron_
PFJetMonitor(float dRMax=0.3, bool matchCharge=true, Benchmark::Mode mode=Benchmark::DEFAULT)
bool isInRange(float pt, float eta, float phi) const
void setParameters(const edm::ParameterSet ¶meterSet)
set the parameters accessing them from ParameterSet
void fillOne(const reco::Jet &jet, const reco::Jet &matchedJet)
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
TH2F * delta_frac_VS_frac_photon_
TH2F * delta_frac_VS_frac_electron_
TH2F * delta_frac_VS_frac_charged_hadron_
double phi() const final
momentum azimuthal angle
double eta() const final
momentum pseudorapidity