Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-03-25 23:59:50

0001 #ifndef HLTPMMassFilter_h
0002 #define HLTPMMassFilter_h
0003 
0004 /** \class HLTPMMassFilter
0005  *
0006  *  Original Author: Jeremy Werner
0007  *  Institution: Princeton University, USA
0008  *  Contact: Jeremy.Werner@cern.ch
0009  *  Date: February 21, 2007
0010  */
0011 
0012 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
0013 #include "DataFormats/EgammaCandidates/interface/Electron.h"
0014 #include "DataFormats/EgammaCandidates/interface/ElectronFwd.h"
0015 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
0016 #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h"
0017 #include "DataFormats/HLTReco/interface/TriggerFilterObjectWithRefs.h"
0018 #include "DataFormats/Math/interface/Point3D.h"
0019 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h"
0020 #include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h"
0021 #include "FWCore/Framework/interface/EventSetup.h"
0022 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0023 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0024 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0025 #include "HLTrigger/HLTcore/interface/HLTFilter.h"
0026 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0027 #include "MagneticField/Engine/interface/MagneticField.h"
0028 #include "TrackingTools/TrajectoryState/interface/ftsFromVertexToPoint.h"
0029 
0030 #include "TLorentzVector.h"
0031 
0032 class HLTPMMassFilter : public HLTFilter {
0033 public:
0034   explicit HLTPMMassFilter(const edm::ParameterSet&);
0035   ~HLTPMMassFilter() override;
0036   bool hltFilter(edm::Event&,
0037                  const edm::EventSetup&,
0038                  trigger::TriggerFilterObjectWithRefs& filterproduct) const override;
0039   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0040 
0041 private:
0042   TLorentzVector approxMomAtVtx(const MagneticField& magField,
0043                                 const GlobalPoint& xvert,
0044                                 const reco::SuperClusterRef sc,
0045                                 int charge) const;
0046 
0047   edm::InputTag candTag_;  // input tag identifying product contains filtered egammas
0048   edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> candToken_;
0049   edm::InputTag beamSpot_;  // input tag identifying beamSpot product
0050   edm::EDGetTokenT<reco::BeamSpot> beamSpotToken_;
0051   double lowerMassCut_;
0052   double upperMassCut_;
0053   int nZcandcut_;  // number of Z candidates required
0054   bool reqOppCharge_;
0055 
0056   bool isElectron1_;
0057   bool isElectron2_;
0058   edm::InputTag l1EGTag_;
0059 
0060   edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> const magFieldToken_;
0061 };
0062 
0063 #endif  //HLTPMMassFilter_h