1 #ifndef DQMOffline_PFTau_PFCandidateMonitor_h
2 #define DQMOffline_PFTau_PFCandidateMonitor_h
18 bool matchCharge =
true,
25 float ptmin,
float ptmax,
float etamin,
float etamax,
41 template<
class T,
class C>
42 void fill(
const T& candidateCollection,
43 const C& matchedCandCollection,
float& minVal,
float& maxVal);
64 template<
class T,
class C>
66 const C& matchedCandCollection,
float& minVal,
float& maxVal) {
69 std::vector<int> matchIndices;
70 PFB::match( candCollection, matchedCandCollection, matchIndices,
73 for (
unsigned int i = 0;
i < (candCollection).
size();
i++) {
78 int iMatch = matchIndices[
i];
79 assert(iMatch< static_cast<int>(matchedCandCollection.size()));
84 float ptRes = (cand.
pt() - matchedCand.
pt())/matchedCand.
pt();
86 if (ptRes > maxVal) maxVal = ptRes;
87 if (ptRes < minVal) minVal = ptRes;
void setup()
book histograms
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 float eta() const =0
momentum pseudorapidity
void fillOne(const reco::Candidate &candidate)
fill histograms with a given particle
virtual float phi() const =0
momentum azimuthal angle
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
virtual float pt() const =0
transverse momentum
void setDirectory(TDirectory *dir)
set directory (to use in ROOT)
virtual ~PFCandidateMonitor()
void fill(const T &candidateCollection, const C &matchedCandCollection, float &minVal, float &maxVal)
fill histograms with all particle
CandidateBenchmark candBench_
void fillOne(const reco::Candidate &cand)
MatchCandidateBenchmark matchCandBench_
bool isInRange(float pt, float eta, float phi) const
tuple size
Write out results.
PFCandidateMonitor(float dRMax=0.3, bool matchCharge=true, Benchmark::Mode mode=Benchmark::DEFAULT)