#include <FFTJetInterface.h>
Definition at line 48 of file FFTJetInterface.h.
virtual fftjetcms::FFTJetInterface::~FFTJetInterface | ( | ) | [inline, virtual] |
Definition at line 61 of file FFTJetInterface.h.
{}
FFTJetInterface::FFTJetInterface | ( | const edm::ParameterSet & | ps | ) | [explicit, protected] |
Definition at line 46 of file FFTJetInterface.cc.
References completeEventScale, Exception, and insertCompleteEvent.
: inputLabel(ps.getParameter<edm::InputTag>("src")), init_param(std::string, outputLabel), jetType(parse_jet_type(ps.getParameter<std::string>("jetType"))), init_param(bool, doPVCorrection), init_param(edm::InputTag, srcPVs), etaDependentMagnutideFactors( ps.getParameter<std::vector<double> >( "etaDependentMagnutideFactors")), init_param(edm::ParameterSet, anomalous), init_param(bool, insertCompleteEvent), init_param(double, completeEventScale), vertex_(0.0, 0.0, 0.0) { if (insertCompleteEvent && completeEventScale <= 0.0) throw cms::Exception("FFTJetBadConfig") << "Bad scale for the complete event : must be positive" << std::endl; }
fftjetcms::FFTJetInterface::FFTJetInterface | ( | ) | [private] |
fftjetcms::FFTJetInterface::FFTJetInterface | ( | const FFTJetInterface & | ) | [private] |
void fftjetcms::FFTJetInterface::checkConfig | ( | const Ptr & | ptr, |
const char * | message | ||
) | [inline, protected] |
Definition at line 69 of file FFTJetInterface.h.
References NULL.
Referenced by FFTJetProducer::beginJob(), FFTJetEFlowSmoother::FFTJetEFlowSmoother(), FFTJetPatRecoProducer::FFTJetPatRecoProducer(), FFTJetPileupProcessor::FFTJetPileupProcessor(), and FFTJetProducer::FFTJetProducer().
{ if (ptr.get() == NULL) throw cms::Exception("FFTJetBadConfig") << message << std::endl; }
void FFTJetInterface::discretizeEnergyFlow | ( | ) | [protected] |
Definition at line 119 of file FFTJetInterface.cc.
References energyFlow, etaDependentMagnutideFactors, eventData, g, and i.
Referenced by FFTJetPatRecoProducer::produce(), FFTJetProducer::produce(), FFTJetPileupProcessor::produce(), and FFTJetEFlowSmoother::produce().
{ // It is a bug to call this function before defining the energy flow grid assert(energyFlow.get()); fftjet::Grid2d<Real>& g(*energyFlow); g.reset(); const unsigned nInputs = eventData.size(); const VectorLike* inp = nInputs ? &eventData[0] : 0; for (unsigned i=0; i<nInputs; ++i) { const VectorLike& item(inp[i]); g.fill(item.Eta(), item.Phi(), item.Et()); } if (!etaDependentMagnutideFactors.empty()) { if (etaDependentMagnutideFactors.size() != g.nEta()) throw cms::Exception("FFTJetBadConfig") << "ERROR in FFTJetInterface::discretizeEnergyFlow() :" " number of elements in the \"etaDependentMagnutideFactors\"" " vector is inconsistent with the grid binning" << std::endl; g.scaleData(&etaDependentMagnutideFactors[0], etaDependentMagnutideFactors.size()); } }
double FFTJetInterface::getEventScale | ( | ) | const [protected] |
Definition at line 67 of file FFTJetInterface.cc.
References completeEventScale, and insertCompleteEvent.
Referenced by FFTJetPatRecoProducer::buildDenseProduct(), FFTJetPatRecoProducer::buildSparseProduct(), FFTJetPatRecoProducer::FFTJetPatRecoProducer(), FFTJetProducer::loadSparseTreeData(), FFTJetPatRecoProducer::produce(), and FFTJetEFlowSmoother::produce().
{ return insertCompleteEvent ? completeEventScale : 0.0; }
void FFTJetInterface::loadInputCollection | ( | const edm::Event & | iEvent | ) | [protected] |
Definition at line 73 of file FFTJetInterface.cc.
References anomalous, CALOJET, candidateIndex, doPVCorrection, end, eventData, edm::Event::getByLabel(), getHLTprescales::index, inputCollection, inputLabel, edm::detail::isnan(), jetType, reco::Candidate::p4(), CaloTower::p4(), reco::Candidate::pt(), srcPVs, and vertex_.
Referenced by FFTJetPatRecoProducer::produce(), FFTJetProducer::produce(), FFTJetPileupProcessor::produce(), and FFTJetEFlowSmoother::produce().
{ // Figure out if we are going to perform the vertex adjustment const bool adjustForVertex = doPVCorrection && jetType == CALOJET; // Figure out the vertex if (adjustForVertex) { edm::Handle<reco::VertexCollection> pvCollection; iEvent.getByLabel(srcPVs, pvCollection); if (pvCollection->empty()) vertex_ = reco::Particle::Point(0.0, 0.0, 0.0); else vertex_ = pvCollection->begin()->position(); } // Get the input collection iEvent.getByLabel(inputLabel, inputCollection); // Create the set of 4-vectors needed by the algorithm eventData.clear(); candidateIndex.clear(); unsigned index = 0; const reco::CandidateView::const_iterator end = inputCollection->end(); for (reco::CandidateView::const_iterator it = inputCollection->begin(); it != end; ++it, ++index) { const reco::Candidate& item(*it); if (anomalous(item)) continue; if (std::isnan(item.pt())) continue; if (adjustForVertex) { const CaloTower& tower(dynamic_cast<const CaloTower&>(item)); eventData.push_back(VectorLike(tower.p4(vertex_))); } else eventData.push_back(item.p4()); candidateIndex.push_back(index); } assert(eventData.size() == candidateIndex.size()); }
FFTJetInterface& fftjetcms::FFTJetInterface::operator= | ( | const FFTJetInterface & | ) | [private] |
FFTJetInterface::JetType FFTJetInterface::parse_jet_type | ( | const std::string & | name | ) | [static] |
Definition at line 24 of file FFTJetInterface.cc.
References Exception.
{ if (!name.compare("BasicJet")) return BASICJET; else if (!name.compare("GenJet")) return GENJET; else if (!name.compare("CaloJet")) return CALOJET; else if (!name.compare("PFJet")) return PFJET; else if (!name.compare("TrackJet")) return TRACKJET; else if (!name.compare("JPTJet")) return JPTJET; else throw cms::Exception("FFTJetBadConfig") << "Unsupported jet type specification \"" << name << "\"" << std::endl; }
bool FFTJetInterface::storeInSinglePrecision | ( | ) | const [protected] |
Definition at line 18 of file FFTJetInterface.cc.
Referenced by FFTJetPatRecoProducer::buildDenseProduct(), FFTJetPatRecoProducer::buildSparseProduct(), FFTJetPatRecoProducer::FFTJetPatRecoProducer(), FFTJetPatRecoProducer::produce(), and FFTJetProducer::produce().
{ return true; }
const reco::Particle::Point& fftjetcms::FFTJetInterface::vertexUsed | ( | ) | const [inline, protected] |
Definition at line 80 of file FFTJetInterface.h.
References vertex_.
Referenced by FFTJetProducer::writeJets().
{return vertex_;}
const AnomalousTower fftjetcms::FFTJetInterface::anomalous [protected] |
Definition at line 101 of file FFTJetInterface.h.
Referenced by loadInputCollection().
std::vector<unsigned> fftjetcms::FFTJetInterface::candidateIndex [protected] |
Definition at line 107 of file FFTJetInterface.h.
Referenced by FFTJetProducer::determineGriddedConstituents(), FFTJetProducer::determineVectorConstituents(), and loadInputCollection().
const double fftjetcms::FFTJetInterface::completeEventScale [private] |
Definition at line 122 of file FFTJetInterface.h.
Referenced by FFTJetInterface(), and getEventScale().
const bool fftjetcms::FFTJetInterface::doPVCorrection [protected] |
Definition at line 92 of file FFTJetInterface.h.
Referenced by loadInputCollection().
std::auto_ptr<fftjet::Grid2d<fftjetcms::Real> > fftjetcms::FFTJetInterface::energyFlow [protected] |
Definition at line 110 of file FFTJetInterface.h.
Referenced by FFTJetProducer::beginJob(), FFTJetProducer::buildGridAlg(), FFTJetEFlowSmoother::buildKernelConvolver(), FFTJetPatRecoProducer::buildKernelConvolver(), FFTJetPileupProcessor::buildKernelConvolver(), FFTJetPatRecoProducer::buildPeakFinder(), FFTJetProducer::determineGriddedConstituents(), discretizeEnergyFlow(), FFTJetEFlowSmoother::FFTJetEFlowSmoother(), FFTJetPatRecoProducer::FFTJetPatRecoProducer(), FFTJetPileupProcessor::FFTJetPileupProcessor(), FFTJetProducer::iterateJetReconstruction(), FFTJetPileupProcessor::mixExtraGrid(), FFTJetPatRecoProducer::produce(), FFTJetProducer::produce(), FFTJetPileupProcessor::produce(), FFTJetEFlowSmoother::produce(), and FFTJetProducer::writeJets().
const std::vector<double> fftjetcms::FFTJetInterface::etaDependentMagnutideFactors [protected] |
Definition at line 98 of file FFTJetInterface.h.
Referenced by discretizeEnergyFlow().
std::vector<fftjetcms::VectorLike> fftjetcms::FFTJetInterface::eventData [protected] |
Definition at line 104 of file FFTJetInterface.h.
Referenced by FFTJetProducer::determineGriddedConstituents(), FFTJetProducer::determineVectorConstituents(), discretizeEnergyFlow(), FFTJetProducer::iterateJetReconstruction(), loadInputCollection(), and FFTJetProducer::produce().
Definition at line 113 of file FFTJetInterface.h.
Referenced by FFTJetProducer::determineGriddedConstituents(), FFTJetProducer::determineVectorConstituents(), and loadInputCollection().
const edm::InputTag fftjetcms::FFTJetInterface::inputLabel [protected] |
Definition at line 83 of file FFTJetInterface.h.
Referenced by loadInputCollection().
const bool fftjetcms::FFTJetInterface::insertCompleteEvent [private] |
Definition at line 121 of file FFTJetInterface.h.
Referenced by FFTJetInterface(), and getEventScale().
const JetType fftjetcms::FFTJetInterface::jetType [protected] |
Definition at line 89 of file FFTJetInterface.h.
Referenced by loadInputCollection().
const std::string fftjetcms::FFTJetInterface::outputLabel [protected] |
Definition at line 86 of file FFTJetInterface.h.
Referenced by FFTJetPatRecoProducer::buildDenseProduct(), FFTJetPatRecoProducer::buildSparseProduct(), FFTJetEFlowSmoother::FFTJetEFlowSmoother(), FFTJetPatRecoProducer::FFTJetPatRecoProducer(), FFTJetPileupProcessor::FFTJetPileupProcessor(), FFTJetProducer::FFTJetProducer(), FFTJetPatRecoProducer::produce(), FFTJetPileupProcessor::produce(), FFTJetEFlowSmoother::produce(), and FFTJetProducer::writeJets().
const edm::InputTag fftjetcms::FFTJetInterface::srcPVs [protected] |
Definition at line 95 of file FFTJetInterface.h.
Referenced by loadInputCollection().
Definition at line 123 of file FFTJetInterface.h.
Referenced by loadInputCollection(), and vertexUsed().