|
|
Go to the documentation of this file. 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();
bool createEfficiencyHistos_
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)
virtual double eta() const =0
momentum pseudorapidity
virtual double pt() const =0
transverse momentum
To plot Candidate quantities.
void fillOne(const reco::Candidate &candidate, const reco::Candidate &matchedCandidate)
fill histograms with a given particle
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
CandidateBenchmark candBench_
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
bool createReferenceHistos_
To plot Candidate quantities.
MatchCandidateBenchmark matchCandBench_
void setDirectory(TDirectory *dir) override
set directory (to use in ROOT)
void fillOne(const reco::Candidate &cand)
void setup(DQMStore::IBooker &b)
book histograms
void fillOne(const reco::Candidate &candidate)
fill histograms with a given particle
PFCandidateMonitor(float dRMax=0.3, bool matchCharge=true, Benchmark::Mode mode=Benchmark::DEFAULT)
~PFCandidateMonitor() override
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
virtual double phi() const =0
momentum azimuthal angle