Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef HLTMuonTrackMassFilter_h_
0002 #define HLTMuonTrackMassFilter_h_
0003 /** HLT filter by muon+track mass (taken from two RecoChargedCandidate collections).
0004  *  Tracks are subject to quality and momentum cuts. The match with previous muon
0005  *  (and possibly track, if run after another mass filter) candidates is checked.
0006 */
0007 #include "HLTrigger/HLTcore/interface/HLTFilter.h"
0008 #include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h"
0009 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
0010 #include "MagneticField/Engine/interface/MagneticField.h"
0011 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0012 
0013 #include <vector>
0014 
0015 namespace edm {
0016   class ConfigurationDescriptions;
0017 }
0018 
0019 class HLTMuonTrackMassFilter : public HLTFilter {
0020 public:
0021   explicit HLTMuonTrackMassFilter(const edm::ParameterSet&);
0022   ~HLTMuonTrackMassFilter() override {}
0023   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0024 
0025 private:
0026   bool hltFilter(edm::Event&,
0027                  const edm::EventSetup&,
0028                  trigger::TriggerFilterObjectWithRefs& filterproduct) const override;
0029   bool pairMatched(std::vector<reco::RecoChargedCandidateRef>& prevMuonRefs,
0030                    std::vector<reco::RecoChargedCandidateRef>& prevTrackRefs,
0031                    const reco::RecoChargedCandidateRef& muonRef,
0032                    const reco::RecoChargedCandidateRef& trackRef) const;
0033 
0034 private:
0035   edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> const idealMagneticFieldRecordToken_;
0036   edm::InputTag beamspotTag_;                                             ///< beamspot used for quality cuts
0037   edm::EDGetTokenT<reco::BeamSpot> beamspotToken_;                        ///< beamspot used for quality cuts
0038   edm::InputTag muonTag_;                                                 ///< RecoChargedCandidateCollection (muons)
0039   edm::EDGetTokenT<reco::RecoChargedCandidateCollection> muonToken_;      ///< RecoChargedCandidateCollection (muons)
0040   edm::InputTag trackTag_;                                                ///< RecoChargedCandidateCollection (tracks)
0041   edm::EDGetTokenT<reco::RecoChargedCandidateCollection> trackToken_;     ///< RecoChargedCandidateCollection (tracks)
0042   edm::InputTag prevCandTag_;                                             ///< filter objects from previous filter
0043   edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> prevCandToken_;  ///< filter objects from previous filter
0044   std::vector<double> minMasses_;                                         ///< lower mass limits
0045   std::vector<double> maxMasses_;                                         ///< higher mass limits
0046   bool checkCharge_;                                                      ///< check opposite charge?
0047   double minTrackPt_;                                                     ///< track pt cut
0048   double minTrackP_;                                                      ///< track p cut
0049   double maxTrackEta_;                                                    ///< track |eta| cut
0050   double maxTrackDxy_;                                                    ///< track tip cut w.r.t. beamspot
0051   double maxTrackDz_;                                                     ///< track lip cut w.r.t. beamspot
0052   int minTrackHits_;                                                      ///< # valid hits on track
0053   double maxTrackNormChi2_;                                               ///< normalized chi2 of track
0054   //   double maxDzMuonTrack_;       ///< relative deltaZ between muon and track
0055   double max_DCAMuonTrack_;  /// DCA between the two muons
0056   bool cutCowboys_;          ///< if true, reject muon-track pairs that bend towards each other
0057 };
0058 
0059 #endif