39 #include "filval/filval.hpp" 40 #include "filval_root/filval_root.hpp" 42 #include "analysis/common/obj_types.hpp" 44 struct EventSelection{
47 ObsFilter* z_mass_veto;
60 EventSelection event_selection;
62 void init_selection(){
63 auto leptons = lookup<std::vector<Particle>>(
"leptons");
64 auto jets = lookup<std::vector<Particle>>(
"jets");
67 event_selection.trilepton = obs_filter(
"trilepton",GenFunction::register_function<
bool()>(
"trilepton",
69 return leptons->get_value().size() == 3;
73 event_selection.b_jet3 = obs_filter(
"b_jet3",GenFunction::register_function<
bool()>(
"b_jet3",
76 for(
auto jet : jets->get_value()){
77 if(jet.tag == Particle::JET && jet.jet.b_cmva > 0)
85 event_selection.z_mass_veto = obs_filter(
"z_mass_veto",GenFunction::register_function<
bool()>(
"z_mass_veto",
87 auto& leps = leptons->get_value();
89 for(
int i = 0; i < n; i++){
90 for(
int j = i+1; j < n; j++){
91 const Particle& p1 = leps[i];
92 const Particle& p2 = leps[j];
93 if(abs(p1.lepton.pdg_id) != abs(p2.lepton.pdg_id))
continue;
94 if(p1.lepton.charge == p2.lepton.charge)
continue;
95 double m = (p1.v + p2.v).M();
104 event_selection.J4 = obs_filter(
"4jet_selection",GenFunction::register_function<
bool()>(
"4jet_selection",
106 return jets->get_value().size() >= 4;
109 event_selection.J5 = obs_filter(
"5jet_selection",GenFunction::register_function<
bool()>(
"5jet_selection",
111 return jets->get_value().size() >= 5;
114 event_selection.J6 = obs_filter(
"6jet_selection",GenFunction::register_function<
bool()>(
"6jet_selection",
116 return jets->get_value().size() >= 6;
119 event_selection.base_sel = ObsFilter::conj(event_selection.z_mass_veto, ObsFilter::conj(event_selection.trilepton, event_selection.b_jet3));
120 event_selection.SR4j = ObsFilter::conj(event_selection.base_sel, event_selection.J4);
121 event_selection.SR5j = ObsFilter::conj(event_selection.base_sel, event_selection.J5);
122 event_selection.SR6j = ObsFilter::conj(event_selection.base_sel, event_selection.J6);
124 #endif // SELECTION_HPP