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  * $Id $
11  *
12  * =====================================================================================
13  */
14 #include <boost/foreach.hpp>
15 #include <sstream>
16 
20 
23 
25 
27  public:
28  explicit TauGenJetDumper(const edm::ParameterSet& pset):
29  genJetSrc_(pset.getParameter<edm::InputTag>("src")) {}
30  virtual ~TauGenJetDumper() {}
31  virtual void analyze(const edm::Event& evt, const edm::EventSetup& es);
32  private:
34 };
35 
36 void
38  typedef edm::View<reco::GenJet> GenJetView;
40  evt.getByLabel(genJetSrc_, jetView);
41 
42  std::ostringstream output;
43  output << " * * * Tau GenJet Dump " << std::endl;
44  BOOST_FOREACH(const reco::GenJet& jet, *jetView) {
45  output << "Decay mode: " << JetMCTagUtils::genTauDecayMode(jet) << " "
46  << jet.print() << std::endl;
47  }
48  std::cout << output.str();
49 }
50 
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 void analyze(const edm::Event &evt, const edm::EventSetup &es)
virtual std::string print() const
Print object.
Definition: GenJet.cc:73
virtual ~TauGenJetDumper()
Jets made from MC generator particles.
Definition: GenJet.h:25
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
tuple cout
Definition: gather_cfg.py:121