Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:18:31

0001 #ifndef HLTTrackMETProducer_h_
0002 #define HLTTrackMETProducer_h_
0003 
0004 /** \class HLTTrackMETProducer
0005  *
0006  *  \brief  This produces a reco::MET object that stores MHT (or MET)
0007  *  \author Steven Lowette
0008  *  \author Michele de Gruttola, Jia Fu Low (Nov 2013)
0009  *
0010  *  MHT (or MET) is calculated using one of the input collections:
0011  *    - Calo or PF jets
0012  *    - tracks
0013  *    - PF tracks
0014  *    - PF charged candidates
0015  *    - PF candidates
0016  *  MHT can include or exclude the contribution from muons.
0017  *
0018  */
0019 
0020 #include "FWCore/Framework/interface/stream/EDProducer.h"
0021 #include "FWCore/Framework/interface/Event.h"
0022 #include "FWCore/Framework/interface/EventSetup.h"
0023 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0024 
0025 #include "DataFormats/Common/interface/View.h"
0026 #include "DataFormats/JetReco/interface/Jet.h"
0027 #include "DataFormats/JetReco/interface/JetCollection.h"
0028 #include "DataFormats/METReco/interface/MET.h"
0029 #include "DataFormats/METReco/interface/METFwd.h"
0030 #include "DataFormats/TrackReco/interface/Track.h"
0031 #include "DataFormats/ParticleFlowReco/interface/PFRecTrack.h"
0032 #include "DataFormats/ParticleFlowReco/interface/PFRecTrackFwd.h"
0033 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
0034 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
0035 
0036 namespace edm {
0037   class ConfigurationDescriptions;
0038 }
0039 
0040 // Class declaration
0041 class HLTTrackMETProducer : public edm::stream::EDProducer<> {
0042 public:
0043   explicit HLTTrackMETProducer(const edm::ParameterSet& iConfig);
0044   ~HLTTrackMETProducer() override;
0045   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0046   void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
0047 
0048 private:
0049   /// Use pt; otherwise, use et.
0050   /// Ignored if jets are not used as input.
0051   bool usePt_;
0052 
0053   /// Use reco tracks as input instead of jets.
0054   /// If true, it overrides usePFRecTracks, usePFCandidatesCharged_ & usePFCandidates_.
0055   bool useTracks_;
0056 
0057   /// Use PF tracks as input instead of jets.
0058   /// If true, it overrides usePFCandidatesCharged_ & usePFCandidates_.
0059   bool usePFRecTracks_;
0060 
0061   /// Use PF charged candidates as input instead of jets.
0062   /// If true, it overrides usePFCandidates_.
0063   bool usePFCandidatesCharged_;
0064 
0065   /// Use PF candidates as input instead of jets.
0066   bool usePFCandidates_;
0067 
0068   /// Exclude PF muons in the MHT calculation (but not HT)
0069   /// Ignored if pfCandidatesLabel_ is empty.
0070   bool excludePFMuons_;
0071 
0072   /// Minimum number of jets passing pt and eta requirements
0073   /// Ignored if jets are not used as input
0074   int minNJet_;
0075 
0076   /// Minimum pt requirement for jets (or objects used as input)
0077   double minPtJet_;
0078 
0079   /// Maximum (abs) eta requirement for jets (or objects used as input)
0080   double maxEtaJet_;
0081 
0082   /// Input jet, track, PFRecTrack, PFCandidate collections
0083   edm::InputTag jetsLabel_;
0084   edm::InputTag tracksLabel_;
0085   edm::InputTag pfRecTracksLabel_;
0086   edm::InputTag pfCandidatesLabel_;
0087 
0088   edm::EDGetTokenT<reco::JetView> m_theJetToken;
0089   edm::EDGetTokenT<reco::TrackCollection> m_theTrackToken;
0090   edm::EDGetTokenT<reco::PFRecTrackCollection> m_theRecTrackToken;
0091   edm::EDGetTokenT<reco::PFCandidateCollection> m_thePFCandidateToken;
0092 };
0093 
0094 #endif  // HLTTrackMETProducer_h_