test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CandidateBenchmark.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_Benchmark_CandidateBenchmark_h
2 #define RecoParticleFlow_Benchmark_CandidateBenchmark_h
3 
5 
8 
10 class CandidateBenchmark : public Benchmark {
11 
12  public:
13 
14 
16  virtual ~CandidateBenchmark();
17 
19  void setup();
22 
23  template< class C>
24  void fill( const C& candidates);
25 
27  void fillOne( const reco::Candidate& candidate);
28 
29  protected:
30 
31 
32  TH1F* pt_;
33  TH1F* eta_;
34  TH1F* phi_;
35  TH1F* charge_;
37  TH1F* pdgId_;
38 
40 };
41 
42 template< class C>
43 void CandidateBenchmark::fill(const C& candCollection) {
44 
45  for (unsigned int i = 0; i < candCollection.size(); i++) {
46  const reco::Candidate& cand = candCollection[i];
47  fillOne(cand);
48  }
49 }
50 
51 
52 #endif
int i
Definition: DBlmapReader.cc:9
To plot Candidate quantities.
void fillOne(const reco::Candidate &candidate)
fill histograms with a given particle
void setup()
book histograms
abstract base class
Definition: Benchmark.h:21
void fill(const C &candidates)
TH1F * pdgId_
COLIN add this histo.
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11