42 startFromGen_ = iConfig.
getParameter<
bool>(
"StartFromGen");
43 plotAgainstRecoQuantities_ = iConfig.
getParameter<
bool>(
"PlotAgainstRecoQuantities");
44 onlyTwoJets_ = iConfig.
getParameter<
bool>(
"OnlyTwoJets");
50 minDeltaEt_ = iConfig.
getParameter<
double>(
"minDeltaEt");
51 maxDeltaEt_ = iConfig.
getParameter<
double>(
"maxDeltaEt");
52 minDeltaPhi_ = iConfig.
getParameter<
double>(
"minDeltaPhi");
53 maxDeltaPhi_ = iConfig.
getParameter<
double>(
"maxDeltaPhi");
56 if (!outputFile_.empty())
57 edm::LogInfo(
"OutputInfo") <<
" ParticleFLow Task histograms will be saved to '" << outputFile_.c_str() <<
"'";
59 edm::LogInfo(
"OutputInfo") <<
" ParticleFlow Task histograms will NOT be saved";
61 myTruth_ = consumes<edm::View<reco::Candidate>>(inputTruthLabel_);
62 myReco_ = consumes<edm::View<reco::Candidate>>(inputRecoLabel_);
75 if (plotAgainstRecoQuantities_)
79 dbe_->setCurrentFolder(path);
80 setup(
dbe_, plotAgainstRecoQuantities_, minDeltaEt_, maxDeltaEt_, minDeltaPhi_, maxDeltaPhi_, doMetPlots_);
89 const candidateCollection *truth_candidates;
90 const candidateCollection *reco_candidates;
99 bool isGen = iEvent.
getByToken(myTruth_, truth_hnd);
102 std::cout <<
"Warning : no Gen jets in input !" << std::endl;
106 truth_candidates = truth_hnd.
product();
110 bool isReco = iEvent.
getByToken(myReco_, reco_hnd);
112 std::cout <<
"Warning : no Reco jets in input !" << std::endl;
115 reco_candidates = reco_hnd.
product();
123 if (!truth_candidates || !reco_candidates) {
124 edm::LogInfo(
"OutputInfo") <<
" failed to retrieve data required by ParticleFlow Task";
125 edm::LogInfo(
"OutputInfo") <<
" ParticleFlow Task cannot continue...!";
133 fill(reco_candidates,
136 plotAgainstRecoQuantities_,
146 if (!outputFile_.empty())
147 dbe_->save(outputFile_);
GenericBenchmarkAnalyzer(const edm::ParameterSet &)
T getParameter(std::string const &) const
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
def setup(process, global_tag, zero_tesla=False)
T const * product() const
~GenericBenchmarkAnalyzer() override