75 startFromGen_ = iConfig.
getParameter<
bool>(
"StartFromGen");
76 plotAgainstRecoQuantities_ = iConfig.
getParameter<
bool>(
"PlotAgainstRecoQuantities");
77 onlyTwoJets_ = iConfig.
getParameter<
bool>(
"OnlyTwoJets");
83 minDeltaEt_ = iConfig.
getParameter<
double>(
"minDeltaEt");
84 maxDeltaEt_ = iConfig.
getParameter<
double>(
"maxDeltaEt");
85 minDeltaPhi_ = iConfig.
getParameter<
double>(
"minDeltaPhi");
86 maxDeltaPhi_ = iConfig.
getParameter<
double>(
"maxDeltaPhi");
89 if (!outputFile_.empty())
90 edm::LogInfo(
"OutputInfo") <<
" ParticleFLow Task histograms will be saved to '" << outputFile_.c_str() <<
"'";
92 edm::LogInfo(
"OutputInfo") <<
" ParticleFlow Task histograms will NOT be saved";
94 myTruth_ = consumes<edm::View<reco::Candidate>>(inputTruthLabel_);
95 myReco_ = consumes<edm::View<reco::Candidate>>(inputRecoLabel_);
108 if (plotAgainstRecoQuantities_)
112 dbe_->setCurrentFolder(path);
113 setup(
dbe_, plotAgainstRecoQuantities_, minDeltaEt_, maxDeltaEt_, minDeltaPhi_, maxDeltaPhi_, doMetPlots_);
122 const candidateCollection *truth_candidates;
123 const candidateCollection *reco_candidates;
132 bool isGen = iEvent.
getByToken(myTruth_, truth_hnd);
135 std::cout <<
"Warning : no Gen jets in input !" << std::endl;
139 truth_candidates = truth_hnd.
product();
143 bool isReco = iEvent.
getByToken(myReco_, reco_hnd);
145 std::cout <<
"Warning : no Reco jets in input !" << std::endl;
148 reco_candidates = reco_hnd.
product();
156 if (!truth_candidates || !reco_candidates) {
157 edm::LogInfo(
"OutputInfo") <<
" failed to retrieve data required by ParticleFlow Task";
158 edm::LogInfo(
"OutputInfo") <<
" ParticleFlow Task cannot continue...!";
166 fill(reco_candidates,
169 plotAgainstRecoQuantities_,
179 if (!outputFile_.empty())
180 dbe_->save(outputFile_);
GenericBenchmarkAnalyzer(const edm::ParameterSet &)
T getUntrackedParameter(std::string const &, T const &) const
void analyze(const edm::Event &, const edm::EventSetup &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::string benchmarkLabel_
edm::EDGetTokenT< edm::View< reco::Candidate > > myTruth_
edm::InputTag inputRecoLabel_
bool plotAgainstRecoQuantities_
edm::InputTag inputTruthLabel_
Log< level::Info, false > LogInfo
void fill(std::map< std::string, TH1 * > &h, const std::string &s, double x)
T const * product() const
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::View< reco::Candidate > > myReco_
~GenericBenchmarkAnalyzer() override