CMS 3D CMS Logo

HeavyChHiggsToTauNuSkim.h
Go to the documentation of this file.
1 #ifndef HeavyChHiggsToTauNuSkim_h
2 #define HeavyChHiggsToTauNuSkim_h
3 
16 // system include files
17 #include <memory>
18 
19 // user include files
22 
29 
30 #include <cmath>
31 
33 public:
35  ~HeavyChHiggsToTauNuSkim() override;
36 
37  bool filter(edm::Event&, const edm::EventSetup&) override;
38 
39 private:
40  double deltaPhi(double phi1, double phi2) {
41  const double PI = 3.1415926535;
42  // in ORCA phi = [0,2pi], in TLorentzVector phi = [-pi,pi].
43  // With the conversion below deltaPhi works ok despite the
44  // 2*pi difference in phi definitions.
45  if (phi1 < 0)
46  phi1 += 2 * PI;
47  if (phi2 < 0)
48  phi2 += 2 * PI;
49 
50  double dphi = fabs(phi1 - phi2);
51 
52  if (dphi > PI)
53  dphi = 2 * PI - dphi;
54  return dphi;
55  }
56 
57  double deltaR(double eta1, double eta2, double phi1, double phi2) {
58  double dphi = deltaPhi(phi1, phi2);
59  double deta = fabs(eta1 - eta2);
60  return sqrt(dphi * dphi + deta * deta);
61  }
62 
63  bool debug;
64 
68  double jetEtMin;
69  double jetEtaMin;
70  double jetEtaMax;
71  double minDRFromTau;
72 
74 };
75 #endif
double deltaR(double eta1, double eta2, double phi1, double phi2)
edm::EDGetTokenT< reco::CaloJetCollection > jetToken
double deltaPhi(double phi1, double phi2)
T sqrt(T t)
Definition: SSEVec.h:19
#define PI
Definition: QcdUeDQM.h:37
HeavyChHiggsToTauNuSkim(const edm::ParameterSet &)
edm::EDGetTokenT< reco::IsolatedTauTagInfoCollection > hltTauToken
bool filter(edm::Event &, const edm::EventSetup &) override