TTTT Analysis  0.1
filter.hpp
1 #ifndef root_filter_hpp
2 #define root_filter_hpp
3 #include "value.hpp"
4 #include "TLorentzVector.h"
5 
6 namespace fv::root{
7 
8 class MassFilter : public Filter {
9  private:
10  Value<TLorentzVector> *lorentz_vector;
11  Value<double> *mass_cut_low;
12  Value<double> *mass_cut_high;
13  void update_value(){
14  double m = lorentz_vector->get_value().M();
15  value = (m > mass_cut_low) && (m < mass_cut_high);
16  }
17  public:
18  FilterAnd(Value<TLorentzVector> *lorentz_vector,
19  Value<double> *mass_cut_low,
20  Value<double> *mass_cut_high)
21  :lorentz_vector(lorentz_vector),
22  mass_cut_low(mass_cut_low),
23  mass_cut_high(mass_cut_high){ }
24 };
25 
26 }
27 #endif // root_filter_hpp
Definition: api.hpp:8