CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 <boost/foreach.hpp>
14 #include <sstream>
15 
19 
22 
24 
26  public:
27  explicit TauGenJetDumper(const edm::ParameterSet& pset):
28  genJetSrc_(pset.getParameter<edm::InputTag>("src")) {}
29  virtual ~TauGenJetDumper() {}
30  virtual void analyze(const edm::Event& evt, const edm::EventSetup& es) override;
31  private:
33 };
34 
35 void
37  typedef edm::View<reco::GenJet> GenJetView;
39  evt.getByLabel(genJetSrc_, jetView);
40 
41  std::ostringstream output;
42  output << " * * * Tau GenJet Dump " << std::endl;
43  BOOST_FOREACH(const reco::GenJet& jet, *jetView) {
44  output << "Decay mode: " << JetMCTagUtils::genTauDecayMode(jet) << " "
45  << jet.print() << std::endl;
46  }
47  std::cout << output.str();
48 }
49 
std::string genTauDecayMode(const reco::CompositePtrCandidate &c)
Definition: JetMCTag.cc:81
TauGenJetDumper(const edm::ParameterSet &pset)
edm::InputTag genJetSrc_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
virtual std::string print() const
Print object.
Definition: GenJet.cc:72
virtual ~TauGenJetDumper()
Jets made from MC generator particles.
Definition: GenJet.h:24
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:420
virtual void analyze(const edm::Event &evt, const edm::EventSetup &es) override
tuple cout
Definition: gather_cfg.py:121