CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/HiggsAnalysis/Skimming/interface/HeavyChHiggsToTauNuSkim.h

Go to the documentation of this file.
00001 #ifndef HeavyChHiggsToTauNuSkim_h
00002 #define HeavyChHiggsToTauNuSkim_h
00003 
00016 // system include files
00017 #include <memory>
00018 
00019 // user include files
00020 #include "FWCore/Framework/interface/Frameworkfwd.h"
00021 #include "FWCore/Framework/interface/EDFilter.h"
00022 
00023 #include "FWCore/Framework/interface/Event.h"
00024 #include "FWCore/Framework/interface/MakerMacros.h"
00025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00026 #include "FWCore/Utilities/interface/InputTag.h"
00027 
00028 #include <math.h>
00029 
00030 class HeavyChHiggsToTauNuSkim : public edm::EDFilter {
00031 
00032     public:
00033         explicit HeavyChHiggsToTauNuSkim(const edm::ParameterSet&);
00034         ~HeavyChHiggsToTauNuSkim();
00035 
00036         virtual bool filter(edm::Event&, const edm::EventSetup& );
00037 
00038    private:
00039         double deltaPhi(double phi1, double phi2){
00040             const double PI = 3.1415926535;     
00041             // in ORCA phi = [0,2pi], in TLorentzVector phi = [-pi,pi].
00042             // With the conversion below deltaPhi works ok despite the
00043             // 2*pi difference in phi definitions.
00044             if(phi1 < 0) phi1 += 2*PI;
00045             if(phi2 < 0) phi2 += 2*PI;
00046         
00047             double dphi = fabs(phi1-phi2);
00048         
00049             if(dphi > PI) dphi = 2*PI - dphi;
00050             return dphi;
00051         }
00052 
00053         double deltaR(double eta1, double eta2, double phi1, double phi2){
00054             double dphi = deltaPhi(phi1,phi2);
00055             double deta = fabs(eta1-eta2);
00056             return sqrt(dphi*dphi + deta*deta);
00057         }
00058 
00059         bool            debug;
00060 
00061         edm::InputTag   hltTauLabel;
00062         edm::InputTag   jetLabel;
00063         int             minNumberOfjets;
00064         double          jetEtMin;
00065         double          jetEtaMin;
00066         double          jetEtaMax;
00067         double          minDRFromTau;
00068 
00069         int nEvents, nSelectedEvents;
00070 };
00071 #endif
00072 
00073 
00074