CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
FlavorHistoryProducer.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_HepMCCandAlgos_interface_FlavorHistoryProducer_h
2 #define PhysicsTools_HepMCCandAlgos_interface_FlavorHistoryProducer_h
3 
12 // -------------------------------------------------------------
13 // Identify the ancestry of the Quark
14 //
15 //
16 // Matrix Element:
17 // Status 3 parent with precisely 2 "grandparents" that
18 // is outside of the "initial" section (0-5) that has the
19 // same ID as the status 2 parton in question.
20 //
21 // Flavor excitation:
22 // Almost the same as the matrix element classification,
23 // but has only one outgoing parton product instead of two.
24 //
25 // Gluon splitting:
26 // Parent is a quark of a different flavor than the parton
27 // in question, or a gluon. Can come from either ISR or FSR.
28 //
29 // True decay:
30 // Decays from a resonance like top, Higgs, etc.
31 // -------------------------------------------------------------
32 
34 #include <string>
35 #include <vector>
36 #include <set>
37 #include <utility>
38 #include <algorithm>
39 
52 #include <fstream>
53 
55 public:
59  ~FlavorHistoryProducer() override;
60 
61 private:
63  void produce(edm::Event &e, const edm::EventSetup &) override;
64 
65  void getAncestors(const reco::Candidate &c, std::vector<reco::Candidate const *> &moms);
66 
67  reco::Candidate const *getSister(const reco::Candidate &c);
68 
70  reco::Candidate const &parton) const;
71 
72  edm::EDGetTokenT<reco::CandidateView> srcToken_; // GenParticles source collection name
73  edm::EDGetTokenT<reco::CandidateView> matchedSrcToken_; // matched particles source collection name
74  double matchDR_; // delta r to match matched particles
75  int pdgIdToSelect_; // pdg of hf partons to select
76  double ptMinParticle_; // minimum pt of the partons
77  double ptMinShower_; // minimum pt of the shower
78  double etaMaxParticle_; // max eta of the parton
79  double etaMaxShower_; // max eta of the shower
80  std::string flavorHistoryName_; // name to give flavor history
81  bool verbose_; // verbose flag
82 };
83 
84 #endif
FlavorHistoryProducer(const edm::ParameterSet &)
constructor
~FlavorHistoryProducer() override
destructor
const edm::EventSetup & c
void produce(edm::Event &e, const edm::EventSetup &) override
process one event
reco::CandidateView::const_iterator getClosestJet(edm::Handle< reco::CandidateView > const &pJets, reco::Candidate const &parton) const
edm::EDGetTokenT< reco::CandidateView > srcToken_
void getAncestors(const reco::Candidate &c, std::vector< reco::Candidate const * > &moms)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
reco::Candidate const * getSister(const reco::Candidate &c)
edm::EDGetTokenT< reco::CandidateView > matchedSrcToken_