Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:34:44

0001 #ifndef HiJetBackground_HiFJRhoProducer_h
0002 #define HiJetBackground_HiFJRhoProducer_h
0003 
0004 // system include files
0005 #include <memory>
0006 #include <sstream>
0007 #include <string>
0008 #include <vector>
0009 
0010 // user include files
0011 #include "FWCore/Framework/interface/Frameworkfwd.h"
0012 #include "FWCore/Framework/interface/stream/EDProducer.h"
0013 
0014 #include "FWCore/Framework/interface/Event.h"
0015 #include "FWCore/Framework/interface/MakerMacros.h"
0016 
0017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0018 #include "FWCore/Utilities/interface/StreamID.h"
0019 
0020 #include "DataFormats/JetReco/interface/Jet.h"
0021 
0022 //
0023 // class declaration
0024 //
0025 
0026 class HiFJRhoProducer : public edm::stream::EDProducer<> {
0027 public:
0028   explicit HiFJRhoProducer(const edm::ParameterSet&);
0029   ~HiFJRhoProducer() override;
0030 
0031   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0032 
0033 private:
0034   void beginStream(edm::StreamID) override;
0035   void produce(edm::Event&, const edm::EventSetup&) override;
0036   void endStream() override;
0037 
0038   double calcMedian(std::vector<double>& v);
0039   double calcMd(const reco::Jet* jet);
0040   bool isPackedCandidate(const reco::Candidate* candidate);
0041 
0042   // ----------member data ---------------------------
0043   //input
0044   edm::EDGetTokenT<edm::View<reco::Jet>> jetsToken_;
0045 
0046   //members
0047   edm::InputTag src_;             // input kt jet source
0048   unsigned int nExcl_;            //Number of leading jets to exclude
0049   double etaMaxExcl_;             //max eta for jets to exclude
0050   double ptMinExcl_;              //min pt for excluded jets
0051   unsigned int nExcl2_;           //Number of leading jets to exclude in 2nd eta region
0052   double etaMaxExcl2_;            //max eta for jets to exclude in 2nd eta region
0053   double ptMinExcl2_;             //min pt for excluded jets in 2nd eta region
0054   std::vector<double> etaRanges;  //eta boundaries for rho calculation regions
0055   bool checkJetCand, usingPackedCand;
0056 };
0057 
0058 #endif