1 #ifndef DQMOffline_PFTau_PFCandidateMonitor_h
2 #define DQMOffline_PFTau_PFCandidateMonitor_h
45 template <
class T,
class C>
48 void fill(
const T &candidateCollection,
49 const C &matchedCandCollection,
53 template <
class T,
class C,
class M>
54 void fill(
const T &candidateCollection,
55 const C &matchedCandCollection,
59 const M &muonMatchedCandCollection);
86 template <
class T,
class C>
88 const C &matchedCandCollection,
94 for (
unsigned i = 0;
i < candCollection.size(); ++
i) {
100 for (
unsigned j = 0;
j < matchedCandCollection.size(); ++
j)
106 std::vector<int> matchIndices;
113 for (
unsigned int i = 0;
i < (candCollection).
size();
i++) {
119 int iMatch = matchIndices[
i];
120 assert(iMatch < static_cast<int>(matchedCandCollection.size()));
130 float ptRes = (cand.
pt() - matchedCand.
pt()) / matchedCand.
pt();
161 template <
class T,
class C,
class M>
165 const C &matchedCandCollection,
169 const M &muonMatchedCandCollection) {
172 for (
unsigned i = 0;
i < candCollection.size(); ++
i) {
178 for (
unsigned j = 0;
j < matchedCandCollection.size(); ++
j)
184 std::vector<int> matchIndices;
189 matchedCandCollection,
192 muonMatchedCandCollection,
198 for (
unsigned int i = 0;
i < (candCollection).
size();
i++) {
204 int iMatch = matchIndices[
i];
205 assert(iMatch < static_cast<int>(matchedCandCollection.size()));
215 float ptRes = (cand.
pt() - matchedCand.
pt()) / matchedCand.
pt();
To plot Candidate quantities.
void fillOne(const reco::Candidate &candidate, const reco::Candidate &matchedCandidate)
fill histograms with a given particle
To plot Candidate quantities.
bool createReferenceHistos_
void match(const C &candCollection, const M &matchedCandCollection, std::vector< int > &matchIndices, bool matchCharge=false, float dRMax=-1)
virtual double pt() const =0
transverse momentum
void fillOne(const reco::Candidate &candidate)
fill histograms with a given particle
void setDirectory(TDirectory *dir) override
set directory (to use in ROOT)
void setup(DQMStore::IBooker &b)
book histograms
void setParameters(float dRMax, bool matchCharge, Benchmark::Mode mode, float ptmin, float ptmax, float etamin, float etamax, float phimin, float phimax, bool refHistoFlag)
set the parameters locally
void fill(const T &candidateCollection, const C &matchedCandCollection, float &minVal, float &maxVal, const edm::ParameterSet ¶meterSet)
fill histograms with all particle
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
~PFCandidateMonitor() override
CandidateBenchmark candBench_
bool createEfficiencyHistos_
void fillOne(const reco::Candidate &cand)
MatchCandidateBenchmark matchCandBench_
bool isInRange(float pt, float eta, float phi) const
tuple size
Write out results.
virtual double phi() const =0
momentum azimuthal angle
virtual double eta() const =0
momentum pseudorapidity
PFCandidateMonitor(float dRMax=0.3, bool matchCharge=true, Benchmark::Mode mode=Benchmark::DEFAULT)