1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#ifndef RecoParticleFlow_Benchmark_CandidateBenchmark_h
#define RecoParticleFlow_Benchmark_CandidateBenchmark_h
#include "DQMOffline/PFTau/interface/Benchmark.h"
#include "DataFormats/Candidate/interface/CandidateFwd.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
/// To plot Candidate quantities
class CandidateBenchmark : public Benchmark {
public:
CandidateBenchmark(Mode mode);
~CandidateBenchmark() override;
/// book histograms
void setup(DQMStore::IBooker &b);
void setup(DQMStore::IBooker &b, const edm::ParameterSet ¶meterSet);
template <class C>
void fill(const C &candidates);
/// fill histograms with a given particle
void fillOne(const reco::Candidate &candidate);
protected:
TH1F *pt_;
TH1F *eta_;
TH1F *phi_;
TH1F *charge_;
/// COLIN add this histo
TH1F *pdgId_;
bool histogramBooked_;
};
template <class C>
void CandidateBenchmark::fill(const C &candCollection) {
for (unsigned int i = 0; i < candCollection.size(); i++) {
const reco::Candidate &cand = candCollection[i];
fillOne(cand);
}
}
#endif
|