1 #ifndef RecoParticleFlow_Benchmark_GenericBenchmark_h 2 #define RecoParticleFlow_Benchmark_GenericBenchmark_h 32 bool PlotAgainstReco_=
true,
39 const C *GenCollection,
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.);
58 double maxEtaCut )
const;
136 template<
typename C>
138 const C *GenCollection,
140 bool PlotAgainstReco,
157 for (
unsigned int i = 0;
i < RecoCollection->size();
i++) {
162 assert( particle!=
NULL );
164 minEta_cut, maxEta_cut))
continue;
169 unsigned highJets = 0;
170 for(
unsigned j=0; j<RecoCollection->size(); j++) {
172 if ( j !=
i && otherParticle->
pt() > particle->
pt() ) highJets++;
174 if ( highJets > 1 )
continue;
180 if(gen_particle==
NULL)
continue;
185 fillHistos( gen_particle, particle, deltaR_cut, PlotAgainstReco);
197 for (
unsigned int i = 0;
i < GenCollection->size();
i++) {
201 if( !
accepted(gen_particle, recPt_cut, minEta_cut, maxEta_cut)) {
214 if(! rec_particle)
continue;
218 if (deltaR>deltaR_cut && deltaR_cut != -1.)
236 fillHistos( gen_particle, rec_particle, deltaR_cut, PlotAgainstReco);
245 #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)
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
virtual ~GenericBenchmark()(false)
double deltaR(double eta1, double eta2, double phi1, double phi2)
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
TH2F * hEtRecOverTrueEtvsTrueEt
void write(std::string Filename)
virtual double px() const =0
x coordinate of momentum vector
void setup(DQMStore *DQM=NULL, bool PlotAgainstReco_=true, float minDeltaEt=-100., float maxDeltaEt=50., float minDeltaPhi=-0.5, float maxDeltaPhi=0.5, bool doMetPlots=false)
TH2F * hDeltaEtOverEtvsPhi
virtual double phi() const =0
momentum azimuthal angle
TH2F * hDeltaEtOverEtvsEta