45 startFromGen_ = iConfig.
getParameter<
bool>(
"StartFromGen");
46 plotAgainstRecoQuantities_ = iConfig.
getParameter<
bool>(
"PlotAgainstRecoQuantities");
47 onlyTwoJets_ = iConfig.
getParameter<
bool>(
"OnlyTwoJets");
53 minDeltaEt_ = iConfig.
getParameter<
double>(
"minDeltaEt");
54 maxDeltaEt_ = iConfig.
getParameter<
double>(
"maxDeltaEt");
55 minDeltaPhi_ = iConfig.
getParameter<
double>(
"minDeltaPhi");
56 maxDeltaPhi_ = iConfig.
getParameter<
double>(
"maxDeltaPhi");
59 if (outputFile_.size() > 0)
60 edm::LogInfo(
"OutputInfo") <<
" ParticleFLow Task histograms will be saved to '" << outputFile_.c_str()<<
"'";
61 else edm::LogInfo(
"OutputInfo") <<
" ParticleFlow Task histograms will NOT be saved";
63 myTruth_ = consumes< edm::View<reco::Candidate> >(inputTruthLabel_);
64 myReco_ = consumes< edm::View<reco::Candidate> >(inputRecoLabel_);
81 if (plotAgainstRecoQuantities_) path +=
"Reco";
else path +=
"Gen";
82 dbe_->setCurrentFolder(path.c_str());
83 setup(
dbe_, plotAgainstRecoQuantities_, minDeltaEt_, maxDeltaEt_, minDeltaPhi_, maxDeltaPhi_, doMetPlots_);
98 const candidateCollection *truth_candidates;
99 const candidateCollection *reco_candidates;
108 bool isGen = iEvent.
getByToken(myTruth_, truth_hnd);
111 std::cout <<
"Warning : no Gen jets in input !" << std::endl;
115 truth_candidates = truth_hnd.
product();
119 bool isReco = iEvent.
getByToken(myReco_, reco_hnd);
121 std::cout <<
"Warning : no Reco jets in input !" << std::endl;
124 reco_candidates = reco_hnd.
product();
132 if (!truth_candidates || !reco_candidates) {
134 edm::LogInfo(
"OutputInfo") <<
" failed to retrieve data required by ParticleFlow Task";
135 edm::LogInfo(
"OutputInfo") <<
" ParticleFlow Task cannot continue...!";
144 fill(reco_candidates,truth_candidates,
145 startFromGen_, plotAgainstRecoQuantities_,
146 onlyTwoJets_, recPt_cut, minEta_cut, maxEta_cut, deltaR_cut);
153 if (outputFile_.size() != 0)
154 dbe_->save(outputFile_);
GenericBenchmarkAnalyzer(const edm::ParameterSet &)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual ~GenericBenchmarkAnalyzer()
virtual void analyze(const edm::Event &, const edm::EventSetup &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
def setup(process, global_tag, zero_tesla=False)
T const * product() const