CMS 3D CMS Logo

TauGenJetDumper.cc
Go to the documentation of this file.
1 /*
2  * =====================================================================================
3  *
4  * Filename: TauGenJetDumper.cc
5  *
6  * Description: Dump information about Generator taus
7  *
8  * Author: Evan K. Friis, UC Davis
9  *
10  *
11  * =====================================================================================
12  */
13 #include <sstream>
14 
18 
21 
23 
25  public:
27  genJetSrc_(pset.getParameter<edm::InputTag>("src")) {}
28  ~TauGenJetDumper() override {}
29  void analyze(const edm::Event& evt, const edm::EventSetup& es) override;
30  private:
32 };
33 
34 void
36  typedef edm::View<reco::GenJet> GenJetView;
38  evt.getByLabel(genJetSrc_, jetView);
39 
40  std::ostringstream output;
41  output << " * * * Tau GenJet Dump " << std::endl;
42  for(auto const& jet : *jetView) {
43  output << "Decay mode: " << JetMCTagUtils::genTauDecayMode(jet) << " "
44  << jet.print() << std::endl;
45  }
46  std::cout << output.str();
47 }
48 
std::string genTauDecayMode(const reco::CompositePtrCandidate &c)
Definition: JetMCTag.cc:81
TauGenJetDumper(const edm::ParameterSet &pset)
~TauGenJetDumper() override
edm::InputTag genJetSrc_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:480
void analyze(const edm::Event &evt, const edm::EventSetup &es) override
HLT enums.