babymaker  e95a6a9342d4604277fe7cc6149b6b5b24447d89
mc_tools.hh
Go to the documentation of this file.
1 // MC_TOOLS: Functions that deal with MC particles
2 
3 #ifndef H_MC_TOOLS
4 #define H_MC_TOOLS
5 
6 #include <utility>
7 #include <vector>
8 
9 #include "FWCore/Framework/interface/ESHandle.h"
10 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
11 
13 
14 class mc_tools{
15 
16 public:
17 
18  bool hasDaughter(const reco::GenParticle &mc, size_t id);
19  int numChargeDaughters(const reco::GenParticle &mc);
20  bool isLast(const reco::GenParticle &mc, size_t id);
21  bool decaysTo(const reco::GenParticle &mc, size_t id, const reco::GenParticle *&mcDau);
22  void printParticle(const reco::GenParticle &mc);
23  bool fromWOrWTau(const reco::GenParticle &mc);
24  bool fromTau(const reco::GenParticle &mc);
25  int mom(const reco::GenParticle &mc, const reco::GenParticle *&mcMom);
26  int getMomIndex(const reco::GenParticle &mc, std::vector<std::pair<int, const reco::GenParticle *> > indices);
27  bool isFromGSP(const reco::Candidate *c);
28  bool isHardProcess(const int status);
29  void getMassPoints(TString mpoints, int &mgluino, int &mlsp);
30 
31  mc_tools();
32  ~mc_tools();
33 };
34 
35 #endif
~mc_tools()
Definition: mc_tools.cc:164
int numChargeDaughters(const reco::GenParticle &mc)
Definition: mc_tools.cc:19
bool isLast(const reco::GenParticle &mc, size_t id)
Definition: mc_tools.cc:29
bool fromTau(const reco::GenParticle &mc)
Definition: mc_tools.cc:42
bool decaysTo(const reco::GenParticle &mc, size_t id, const reco::GenParticle *&mcDau)
Definition: mc_tools.cc:70
bool fromWOrWTau(const reco::GenParticle &mc)
Definition: mc_tools.cc:33
int mom(const reco::GenParticle &mc, const reco::GenParticle *&mcMom)
Definition: mc_tools.cc:51
mc_tools()
Definition: mc_tools.cc:161
bool isHardProcess(const int status)
Definition: mc_tools.cc:107
void getMassPoints(TString mpoints, int &mgluino, int &mlsp)
Definition: mc_tools.cc:131
bool hasDaughter(const reco::GenParticle &mc, size_t id)
Definition: mc_tools.cc:11
bool isFromGSP(const reco::Candidate *c)
Definition: mc_tools.cc:84
int getMomIndex(const reco::GenParticle &mc, std::vector< std::pair< int, const reco::GenParticle * > > indices)
Definition: mc_tools.cc:60
void printParticle(const reco::GenParticle &mc)
Definition: mc_tools.cc:115