Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RecoJets_JetProducers_CATopJetProducer_h
0002 #define RecoJets_JetProducers_CATopJetProducer_h
0003 
0004 /* *********************************************************
0005 
0006 
0007  * \class CATopJetProducer
0008  * Jet producer to produce top jets using the C-A algorithm to break
0009  * jets into subjets as described here:
0010  * "Top-tagging: A Method for Identifying Boosted Hadronic Tops"
0011  * David E. Kaplan, Keith Rehermann, Matthew D. Schwartz, Brock Tweedie
0012  * arXiv:0806.0848v1 [hep-ph] 
0013 
0014   \brief Jet producer to run the CATopJetAlgorithm
0015 
0016   \author   Salvatore Rappoccio
0017   \version  
0018 
0019          Notes on implementation:
0020 
0021      Because the BaseJetProducer only allows the user to produce
0022      one jet collection at a time, this algorithm cannot
0023      fit into that paradigm. 
0024 
0025      All of the "hard" jets are of type BasicJet, since
0026      they are "jets of jets". The subjets will be either
0027      CaloJets, GenJets, etc.
0028 
0029      In order to avoid a templatization of the entire
0030      EDProducer itself, we only use a templated method
0031      to write out the subjets to the event record,
0032      and to use that information to write out the
0033      hard jets to the event record.
0034 
0035      This templated method is called "write_outputs". It
0036      relies on a second templated method called "write_specific",
0037      which relies on some template specialization to create
0038      different specific objects (i.e. CaloJets, BasicJets, GenJets, etc). 
0039 
0040  ************************************************************/
0041 
0042 #include "FWCore/Framework/interface/Event.h"
0043 #include "FWCore/Framework/interface/EventSetup.h"
0044 #include "DataFormats/Common/interface/View.h"
0045 #include "DataFormats/Common/interface/Handle.h"
0046 #include "DataFormats/Provenance/interface/ProductID.h"
0047 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0048 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0049 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0050 
0051 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
0052 #include "DataFormats/JetReco/interface/GenJetCollection.h"
0053 #include "DataFormats/JetReco/interface/PFJetCollection.h"
0054 #include "DataFormats/JetReco/interface/BasicJetCollection.h"
0055 #include "RecoJets/JetAlgorithms/interface/JetAlgoHelper.h"
0056 #include "DataFormats/Candidate/interface/CandidateFwd.h"
0057 #include "DataFormats/Candidate/interface/LeafCandidate.h"
0058 #include "FWCore/Framework/interface/ESHandle.h"
0059 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0060 #include "Geometry/Records/interface/CaloGeometryRecord.h"
0061 
0062 #include "RecoJets/JetProducers/plugins/FastjetJetProducer.h"
0063 #include "RecoJets/JetAlgorithms/interface/CATopJetAlgorithm.h"
0064 #include "CATopJetProducer.h"
0065 #include "RecoJets/JetAlgorithms/interface/CMSTopTagger.h"
0066 
0067 #include <fastjet/tools/RestFrameNSubjettinessTagger.hh>
0068 #include "fastjet/SISConePlugin.hh"
0069 
0070 namespace cms {
0071   class CATopJetProducer : public FastjetJetProducer {
0072   public:
0073     CATopJetProducer(const edm::ParameterSet& ps);
0074 
0075     ~CATopJetProducer() override {}
0076     static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0077 
0078     void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
0079 
0080     void runAlgorithm(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
0081 
0082   private:
0083     std::unique_ptr<CATopJetAlgorithm> legacyCMSTopTagger_;  /// The algorithm to do the work
0084     std::unique_ptr<fastjet::CMSTopTagger> fjCMSTopTagger_;  // The FastJet implementation of the CMS tagger
0085     std::unique_ptr<fastjet::JHTopTagger> fjJHUTopTagger_;
0086     std::unique_ptr<fastjet::RestFrameNSubjettinessTagger> fjNSUBTagger_;
0087 
0088     int tagAlgo_;
0089     double ptMin_;
0090     double centralEtaCut_;
0091     bool verbose_;
0092     enum tagalgos { CA_TOPTAGGER, FJ_CMS_TOPTAG, FJ_JHU_TOPTAG, FJ_NSUB_TAG };
0093   };
0094 
0095 }  // namespace cms
0096 
0097 #endif