#include <CATopJetProducer.h>
Public Member Functions | |
CATopJetProducer (const edm::ParameterSet &ps) | |
virtual void | produce (edm::Event &iEvent, const edm::EventSetup &iSetup) |
virtual void | runAlgorithm (edm::Event &iEvent, const edm::EventSetup &iSetup) |
virtual | ~CATopJetProducer () |
Private Types | |
enum | tagalgos { CA_TOPTAGGER, FJ_CMS_TOPTAG, FJ_HEP_TOPTAG, FJ_JHU_TOPTAG, FJ_NSUB_TAG } |
Private Attributes | |
double | centralEtaCut_ |
std::auto_ptr < fastjet::CMSTopTagger > | fjCMSTopTagger_ |
The algorithm to do the work. | |
std::auto_ptr < fastjet::HEPTopTagger > | fjHEPTopTagger_ |
std::auto_ptr < fastjet::JHTopTagger > | fjJHUTopTagger_ |
std::auto_ptr < fastjet::RestFrameNSubjettinessTagger > | fjNSUBTagger_ |
std::auto_ptr< CATopJetAlgorithm > | legacyCMSTopTagger_ |
double | ptMin_ |
int | tagAlgo_ |
bool | verbose_ |
Definition at line 76 of file CATopJetProducer.h.
enum cms::CATopJetProducer::tagalgos [private] |
Definition at line 101 of file CATopJetProducer.h.
CATopJetProducer::CATopJetProducer | ( | const edm::ParameterSet & | ps | ) |
Definition at line 10 of file CATopJetProducer.cc.
References CA_TOPTAGGER, FJ_CMS_TOPTAG, FJ_HEP_TOPTAG, FJ_JHU_TOPTAG, FJ_NSUB_TAG, fjCMSTopTagger_, fjHEPTopTagger_, fjJHUTopTagger_, fjNSUBTagger_, edm::ParameterSet::getParameter(), legacyCMSTopTagger_, pfTaus_cff::plugin, VirtualJetProducer::src_, and tagAlgo_.
: FastjetJetProducer( conf ), tagAlgo_(conf.getParameter<int>("tagAlgo")), ptMin_(conf.getParameter<double>("jetPtMin")), centralEtaCut_(conf.getParameter<double>("centralEtaCut")), verbose_(conf.getParameter<bool>("verbose")) { if (tagAlgo_ == CA_TOPTAGGER ) { legacyCMSTopTagger_ = std::auto_ptr<CATopJetAlgorithm>( new CATopJetAlgorithm(src_, conf.getParameter<bool> ("verbose"), conf.getParameter<int> ("algorithm"), // 0 = KT, 1 = CA, 2 = anti-KT conf.getParameter<int> ("useAdjacency"), // choose adjacency requirement: // 0 = no adjacency // 1 = deltar adjacency // 2 = modified adjacency // 3 = calotower neirest neigbor based adjacency (untested) conf.getParameter<double>("centralEtaCut"), // eta for defining "central" jets conf.getParameter<double>("jetPtMin"), // min jet pt conf.getParameter<std::vector<double> >("sumEtBins"), // sumEt bins over which cuts may vary. vector={bin 0 lower bound, bin 1 lower bound, ...} conf.getParameter<std::vector<double> >("rBins"), // Jet distance paramter R. R values depend on sumEt bins. conf.getParameter<std::vector<double> >("ptFracBins"), // fraction of hard jet pt that subjet must have (deltap) conf.getParameter<std::vector<double> >("deltarBins"), // Applicable only if useAdjacency=1. deltar adjacency values for each sumEtBin conf.getParameter<std::vector<double> >("nCellBins"), // Applicable only if useAdjacency=3. number of cells to consider two subjets adjacent conf.getParameter<double>("inputEtMin"), // seed threshold - NOT USED conf.getParameter<bool> ("useMaxTower"), // use max tower as adjacency criterion, otherwise use centroid - NOT USED conf.getParameter<double>("sumEtEtaCut"), // eta for event SumEt - NOT USED conf.getParameter<double>("etFrac") // fraction of event sumEt / 2 for a jet to be considered "hard" -NOT USED )); } else if (tagAlgo_ == FJ_CMS_TOPTAG ) { fjCMSTopTagger_ = std::auto_ptr<fastjet::CMSTopTagger>( new fastjet::CMSTopTagger() ); } else if (tagAlgo_ == FJ_HEP_TOPTAG ) { fjHEPTopTagger_ = std::auto_ptr<fastjet::HEPTopTagger>( new fastjet::HEPTopTagger() ); } else if (tagAlgo_ == FJ_JHU_TOPTAG ) { fjJHUTopTagger_ = std::auto_ptr<fastjet::JHTopTagger>( new fastjet::JHTopTagger() ); } else if (tagAlgo_ == FJ_NSUB_TAG ) { fastjet::JetDefinition::Plugin *plugin = new fastjet::SISConePlugin(0.6, 0.75); fastjet::JetDefinition NsubJetDef(plugin); fjNSUBTagger_ = std::auto_ptr<fastjet::RestFrameNSubjettinessTagger>( new fastjet::RestFrameNSubjettinessTagger(NsubJetDef) ); } }
virtual cms::CATopJetProducer::~CATopJetProducer | ( | ) | [inline, virtual] |
Definition at line 82 of file CATopJetProducer.h.
{}
void CATopJetProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Reimplemented from FastjetJetProducer.
Definition at line 72 of file CATopJetProducer.cc.
{ FastjetJetProducer::produce(e, c); }
void CATopJetProducer::runAlgorithm | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Reimplemented from FastjetJetProducer.
Definition at line 77 of file CATopJetProducer.cc.
References CA_TOPTAGGER, centralEtaCut_, gather_cfg::cout, VirtualJetProducer::doAreaFastjet_, VirtualJetProducer::doRhoFastjet_, FJ_CMS_TOPTAG, FJ_HEP_TOPTAG, FJ_JHU_TOPTAG, FJ_NSUB_TAG, VirtualJetProducer::fjAreaDefinition_, VirtualJetProducer::fjClusterSeq_, fjCMSTopTagger_, fjHEPTopTagger_, VirtualJetProducer::fjInputs_, VirtualJetProducer::fjJetDefinition_, VirtualJetProducer::fjJets_, fjJHUTopTagger_, fjNSUBTagger_, i, perp(), ptMin_, tagAlgo_, verbose_, and VirtualJetProducer::voronoiRfact_.
{ if ( !doAreaFastjet_ && !doRhoFastjet_) { fjClusterSeq_ = ClusterSequencePtr( new fastjet::ClusterSequence( fjInputs_, *fjJetDefinition_ ) ); } else if (voronoiRfact_ <= 0) { fjClusterSeq_ = ClusterSequencePtr( new fastjet::ClusterSequenceArea( fjInputs_, *fjJetDefinition_ , *fjAreaDefinition_ ) ); } else { fjClusterSeq_ = ClusterSequencePtr( new fastjet::ClusterSequenceVoronoiArea( fjInputs_, *fjJetDefinition_ , fastjet::VoronoiAreaSpec(voronoiRfact_) ) ); } if (tagAlgo_ == CA_TOPTAGGER){ (*legacyCMSTopTagger_).run( fjInputs_, fjJets_, fjClusterSeq_ ); } else { //Run the jet clustering vector<fastjet::PseudoJet> inclusiveJets = fjClusterSeq_->inclusive_jets(ptMin_); if ( verbose_ ) cout << "Getting central jets" << endl; // Find the transient central jets vector<fastjet::PseudoJet> centralJets; for (unsigned int i = 0; i < inclusiveJets.size(); i++) { if (inclusiveJets[i].perp() > ptMin_ && fabs(inclusiveJets[i].rapidity()) < centralEtaCut_) { centralJets.push_back(inclusiveJets[i]); } } fastjet::CMSTopTagger & CMSTagger = *fjCMSTopTagger_; fastjet::HEPTopTagger & HEPTagger = *fjHEPTopTagger_; fastjet::JHTopTagger & JHUTagger = *fjJHUTopTagger_; fastjet::RestFrameNSubjettinessTagger & NSUBTagger = *fjNSUBTagger_; vector<fastjet::PseudoJet>::iterator jetIt = centralJets.begin(), centralJetsEnd = centralJets.end(); if ( verbose_ )cout<<"Loop over jets"<<endl; for ( ; jetIt != centralJetsEnd; ++jetIt ) { if (verbose_) cout << "CMS FJ jet pt: " << (*jetIt).perp() << endl; fastjet::PseudoJet taggedJet; if (tagAlgo_ == FJ_CMS_TOPTAG) taggedJet = CMSTagger.result(*jetIt); else if (tagAlgo_ == FJ_HEP_TOPTAG) taggedJet = HEPTagger.result(*jetIt); else if (tagAlgo_ == FJ_JHU_TOPTAG) taggedJet = JHUTagger.result(*jetIt); else if (tagAlgo_ == FJ_NSUB_TAG) taggedJet = NSUBTagger.result(*jetIt); else cout << "NOT A VALID TAGGING ALGORITHM CHOICE!" << endl; if (taggedJet != 0) fjJets_.push_back(taggedJet); } } }
double cms::CATopJetProducer::centralEtaCut_ [private] |
Definition at line 99 of file CATopJetProducer.h.
Referenced by runAlgorithm().
std::auto_ptr<fastjet::CMSTopTagger> cms::CATopJetProducer::fjCMSTopTagger_ [private] |
The algorithm to do the work.
Definition at line 90 of file CATopJetProducer.h.
Referenced by CATopJetProducer(), and runAlgorithm().
std::auto_ptr<fastjet::HEPTopTagger> cms::CATopJetProducer::fjHEPTopTagger_ [private] |
Definition at line 91 of file CATopJetProducer.h.
Referenced by CATopJetProducer(), and runAlgorithm().
std::auto_ptr<fastjet::JHTopTagger> cms::CATopJetProducer::fjJHUTopTagger_ [private] |
Definition at line 92 of file CATopJetProducer.h.
Referenced by CATopJetProducer(), and runAlgorithm().
std::auto_ptr<fastjet::RestFrameNSubjettinessTagger> cms::CATopJetProducer::fjNSUBTagger_ [private] |
Definition at line 93 of file CATopJetProducer.h.
Referenced by CATopJetProducer(), and runAlgorithm().
std::auto_ptr<CATopJetAlgorithm> cms::CATopJetProducer::legacyCMSTopTagger_ [private] |
Definition at line 89 of file CATopJetProducer.h.
Referenced by CATopJetProducer().
double cms::CATopJetProducer::ptMin_ [private] |
Definition at line 98 of file CATopJetProducer.h.
Referenced by runAlgorithm().
int cms::CATopJetProducer::tagAlgo_ [private] |
Definition at line 97 of file CATopJetProducer.h.
Referenced by CATopJetProducer(), and runAlgorithm().
bool cms::CATopJetProducer::verbose_ [private] |
Definition at line 100 of file CATopJetProducer.h.
Referenced by runAlgorithm().