40 typedef std::map<std::string, HistoMap>
DiscMap;
51 :
src_(pset.getParameter<
edm::InputTag>(
"src")) {
69 fs->make<TH1F>(
tag.label().c_str(),
tag.label().c_str(),
75 fs->make<TH2F>(vs_pt_name.c_str(), vs_pt_name.c_str(),
81 fs->make<TH2F>(vs_jetpt_name.c_str(), vs_jetpt_name.c_str(),
86 discMap[
"vs_embedPt"] =
87 fs->make<TH2F>(vs_embedpt_name.c_str(), vs_embedpt_name.c_str(),
92 discMap[
"vs_pt_jetPt"] =
93 fs->make<TH3F>(vs_pt_jetPt_name.c_str(), vs_pt_jetPt_name.c_str(),
97 discMap[
"vs_pt_embedPt"] =
98 fs->make<TH3F>(vs_pt_embedPt_name.c_str(), vs_pt_embedPt_name.c_str(),
104 fs->make<TH2F>(vs_eta_name.c_str(), vs_eta_name.c_str(),
109 fs->make<TH2F>(vs_dm_name.c_str(), vs_dm_name.c_str(),
114 discMap[
"vs_truePU"] = fs->make<TH2F>(vs_truePU_name.c_str(),
115 vs_truePU_name.c_str(),
nbins,
min,
max, 15, -0.5, 14.5);
117 discMap[
"vs_recoPU"] = fs->make<TH2F>(vs_recoPU_name.c_str(),
118 vs_recoPU_name.c_str(),
nbins,
min,
max, 15, -0.5, 14.5);
134 reco::tau::castView<reco::PFTauRefVector>(
input);
144 for(
auto const&
tau : inputRefs) {
152 mymap[
"plain"]->Fill(result);
153 mymap[
"vs_pt"]->Fill(result,
tau->pt());
154 mymap[
"vs_jetPt"]->Fill(result,
tau->jetRef()->pt());
155 mymap[
"vs_embedPt"]->Fill(result,
tau->alternatLorentzVect().pt());
156 dynamic_cast<TH3F*
>(mymap[
"vs_pt_jetPt"])->
Fill(
157 result,
tau->pt(),
tau->jetRef()->pt());
158 dynamic_cast<TH3F*
>(mymap[
"vs_pt_embedPt"])->
Fill(
159 result,
tau->pt(),
tau->alternatLorentzVect().pt());
160 mymap[
"vs_eta"]->Fill(result,
tau->eta());
161 mymap[
"vs_dm"]->Fill(result,
tau->decayMode());
163 if (puInfo.isValid())
164 mymap[
"vs_truePU"]->
Fill(result, puInfo->getPU_NumInteractions());
165 mymap[
"vs_recoPU"]->Fill(result, puVertices->size());
T getParameter(std::string const &) const
edm::InputTag pileupVerticesSrc_
RecoTauPlotDiscriminator(const edm::ParameterSet &pset)
edm::InputTag pileupInfoSrc_
static std::string const input
void analyze(const edm::Event &evt, const edm::EventSetup &es) override
#define DEFINE_FWK_MODULE(type)
std::map< std::string, HistoMap > DiscMap
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::map< std::string, TH1 * > HistoMap
~RecoTauPlotDiscriminator() override
std::vector< edm::InputTag > VInputTag