1 #ifndef RecoParticleFlow_Benchmark_GenericBenchmark_h 2 #define RecoParticleFlow_Benchmark_GenericBenchmark_h 30 bool PlotAgainstReco_ =
true,
40 bool startFromGen = false,
41 bool PlotAgainstReco = true,
43 double recPt_cut = -1.,
44 double minEta_cut = -1.,
45 double maxEta_cut = -1.,
46 double deltaR_cut = -1.);
130 const
C *GenCollection,
132 bool PlotAgainstReco,
148 for (
unsigned int i = 0;
i < RecoCollection->size();
i++) {
152 assert(particle !=
nullptr);
153 if (!
accepted(particle, recPt_cut, minEta_cut, maxEta_cut))
158 unsigned highJets = 0;
159 for (
unsigned j = 0;
j < RecoCollection->size();
j++) {
161 if (
j !=
i && otherParticle->
pt() > particle->
pt())
170 if (gen_particle ==
nullptr)
174 fillHistos(gen_particle, particle, deltaR_cut, PlotAgainstReco);
186 for (
unsigned int i = 0;
i < GenCollection->size();
i++) {
189 if (!
accepted(gen_particle, recPt_cut, minEta_cut, maxEta_cut)) {
193 hEtaGen->Fill(gen_particle->
eta());
194 hPhiGen->Fill(gen_particle->
phi());
195 hEtGen->Fill(gen_particle->
et());
196 hEtvsEtaGen->Fill(gen_particle->
eta(), gen_particle->
et());
197 hEtvsPhiGen->Fill(gen_particle->
phi(), gen_particle->
et());
205 double deltaR = algo_->
deltaR(rec_particle, gen_particle);
206 if (deltaR > deltaR_cut && deltaR_cut != -1.)
209 hEtaSeen->Fill(gen_particle->
eta());
210 hPhiSeen->Fill(gen_particle->
phi());
211 hEtSeen->Fill(gen_particle->
et());
212 hEtvsEtaSeen->Fill(gen_particle->
eta(), gen_particle->
et());
213 hEtvsPhiSeen->Fill(gen_particle->
phi(), gen_particle->
et());
215 hPhiRec->Fill(rec_particle->
phi());
216 hEtRec->Fill(rec_particle->
et());
217 hExRec->Fill(rec_particle->
px());
218 hEyRec->Fill(rec_particle->
py());
220 hEtRecvsEt->Fill(gen_particle->
et(), rec_particle->
et());
221 if (gen_particle->
et() != 0.0)
222 hEtRecOverTrueEtvsTrueEt->Fill(gen_particle->
et(), rec_particle->
et() / gen_particle->
et());
225 fillHistos(gen_particle, rec_particle, deltaR_cut, PlotAgainstReco);
230 #endif // RecoParticleFlow_Benchmark_GenericBenchmark_h void fillHistos(const reco::Candidate *genParticle, const reco::Candidate *recParticle, double deltaR_cut, bool plotAgainstReco)
void fill(const C *RecoCollection, const C *GenCollection, bool startFromGen=false, bool PlotAgainstReco=true, bool onlyTwoJets=false, double recPt_cut=-1., double minEta_cut=-1., double maxEta_cut=-1., double deltaR_cut=-1.)
void setfile(TFile *file)
dqm::legacy::DQMStore DQMStore
bool accepted(const reco::Candidate *particle, double ptCut, double minEtaCut, double maxEtaCut) const
virtual double et() const =0
transverse energy
virtual double py() const =0
y coordinate of momentum vector
TH2F * hDeltaEtOverEtvsEt
TH2F * hRecSetOverTrueSetvsTrueSet
static double deltaR(const T *, const U *)
TH2F * hDeltaEtOverEtvsDeltaR
def template(fileName, svg, replaceme="REPLACEME")
virtual ~GenericBenchmark()(false)
static const Collection::value_type * matchByDeltaR(const T *, const Collection *)
virtual double eta() const =0
momentum pseudorapidity
TH2F * hDeltaSetOverSetvsSet
virtual double pt() const =0
transverse momentum
void setup(DQMStore *DQM=0, bool PlotAgainstReco_=true, float minDeltaEt=-100., float maxDeltaEt=50., float minDeltaPhi=-0.5, float maxDeltaPhi=0.5, bool doMetPlots=false)
TH2F * hEtRecOverTrueEtvsTrueEt
void write(std::string Filename)
dqm::legacy::MonitorElement MonitorElement
virtual double px() const =0
x coordinate of momentum vector
TH2F * hDeltaEtOverEtvsPhi
virtual double phi() const =0
momentum azimuthal angle
TH2F * hDeltaEtOverEtvsEta