susy_cfa  b611ccad937ea179f86a1f5663960264616c0a20
event_handler_quick.hpp
Go to the documentation of this file.
1 #ifndef H_EVENT_HANDLER_QUICK
2 #define H_EVENT_HANDLER_QUICK
3 
4 #include <string>
5 #include <vector>
6 
7 #include "TString.h"
8 
9 #include "fastjet/ClusterSequence.hh"
10 
11 #include "event_handler_base.hpp"
12 #include "small_tree_quick.hpp"
13 
15 public:
16  event_handler_quick(const std::string &file_name);
17 
18  virtual void ReduceTree(int num_entries,
19  const TString &out_file_name,
20  int num_total_entries);
21 
22  virtual ~event_handler_quick();
23 
24  void WriteFatJets(int &nfjets,
25  float &mj,
26  std::vector<float> &fjets_pt,
27  std::vector<float> &fjets_eta,
28  std::vector<float> &fjets_phi,
29  std::vector<float> &fjets_m,
30  std::vector<int> &fjets_nconst,
31  std::vector<float> &fjets_sumcsv,
32  std::vector<float> &fjets_poscsv,
33  std::vector<int> &fjets_btags,
34  std::vector<int> &jets_fjet_index,
35  double radius,
36  const std::vector<int> &jets,
37  bool gen = false,
38  bool clean = false,
39  const std::vector<bool> &to_clean = std::vector<bool>(0));
40 
41  void SetMiniIso(small_tree_quick &tree, int ilep, int ParticleType);
42  void Setllmass(small_tree_quick &tree, size_t id1, size_t id2, int pdgid, bool isSig);
43 
44  unsigned TypeCode(const std::vector<mc_particle> &parts,
45  const std::vector<size_t> &moms);
46  float GetMinMTWb(const std::vector<int> &good_jets,
47  const double pt_cut,
48  const double bTag_req,
49  const bool use_W_mass) const;
50  void GetTrueLeptons(std::vector<int> &true_electrons, std::vector<int> &true_muons,
51  std::vector<int> &true_had_taus, std::vector<int> &true_lep_taus);
52  void WriteTks(small_tree_quick &tree, short lepmax_chg, size_t primary_lep);
53 
54 private:
55  static bool greater_m(const fastjet::PseudoJet &a, const fastjet::PseudoJet &b);
56  static std::vector<fastjet::PseudoJet> sorted_by_m(std::vector<fastjet::PseudoJet> pjs);
57 };
58 
59 #endif
void WriteTks(small_tree_quick &tree, short lepmax_chg, size_t primary_lep)
void SetMiniIso(small_tree_quick &tree, int ilep, int ParticleType)
void GetTrueLeptons(std::vector< int > &true_electrons, std::vector< int > &true_muons, std::vector< int > &true_had_taus, std::vector< int > &true_lep_taus)
void WriteFatJets(int &nfjets, float &mj, std::vector< float > &fjets_pt, std::vector< float > &fjets_eta, std::vector< float > &fjets_phi, std::vector< float > &fjets_m, std::vector< int > &fjets_nconst, std::vector< float > &fjets_sumcsv, std::vector< float > &fjets_poscsv, std::vector< int > &fjets_btags, std::vector< int > &jets_fjet_index, double radius, const std::vector< int > &jets, bool gen=false, bool clean=false, const std::vector< bool > &to_clean=std::vector< bool >(0))
event_handler_quick(const std::string &file_name)
static std::vector< fastjet::PseudoJet > sorted_by_m(std::vector< fastjet::PseudoJet > pjs)
void Setllmass(small_tree_quick &tree, size_t id1, size_t id2, int pdgid, bool isSig)
virtual void ReduceTree(int num_entries, const TString &out_file_name, int num_total_entries)
static bool greater_m(const fastjet::PseudoJet &a, const fastjet::PseudoJet &b)
unsigned TypeCode(const std::vector< mc_particle > &parts, const std::vector< size_t > &moms)
float GetMinMTWb(const std::vector< int > &good_jets, const double pt_cut, const double bTag_req, const bool use_W_mass) const