#include <FFTJetInterface.h>
Definition at line 49 of file FFTJetInterface.h.
virtual fftjetcms::FFTJetInterface::~FFTJetInterface | ( | ) | [inline, virtual] |
Definition at line 52 of file FFTJetInterface.h.
{}
FFTJetInterface::FFTJetInterface | ( | const edm::ParameterSet & | ps | ) | [explicit, protected] |
Definition at line 23 of file FFTJetInterface.cc.
References completeEventScale, Exception, and insertCompleteEvent.
: inputLabel(ps.getParameter<edm::InputTag>("src")), init_param(std::string, outputLabel), jetType(parseJetType(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 58 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 96 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 44 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 50 of file FFTJetInterface.cc.
References anomalous, fftjetcms::CALOJET, candidateIndex, doPVCorrection, end, eventData, edm::Event::getByLabel(), getHLTprescales::index, inputCollection, inputLabel, edm::isNotFinite(), 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 (edm::isNotFinite(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] |
bool FFTJetInterface::storeInSinglePrecision | ( | ) | const [protected] |
Definition at line 17 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 69 of file FFTJetInterface.h.
References vertex_.
Referenced by FFTJetProducer::writeJets().
{return vertex_;}
const AnomalousTower fftjetcms::FFTJetInterface::anomalous [protected] |
Definition at line 90 of file FFTJetInterface.h.
Referenced by loadInputCollection().
std::vector<unsigned> fftjetcms::FFTJetInterface::candidateIndex [protected] |
Definition at line 96 of file FFTJetInterface.h.
Referenced by FFTJetProducer::determineGriddedConstituents(), FFTJetProducer::determineVectorConstituents(), and loadInputCollection().
const double fftjetcms::FFTJetInterface::completeEventScale [private] |
Definition at line 111 of file FFTJetInterface.h.
Referenced by FFTJetInterface(), and getEventScale().
const bool fftjetcms::FFTJetInterface::doPVCorrection [protected] |
Definition at line 81 of file FFTJetInterface.h.
Referenced by loadInputCollection().
std::auto_ptr<fftjet::Grid2d<fftjetcms::Real> > fftjetcms::FFTJetInterface::energyFlow [protected] |
Definition at line 99 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::loadFlatteningFactors(), FFTJetPileupProcessor::mixExtraGrid(), FFTJetPatRecoProducer::produce(), FFTJetProducer::produce(), FFTJetPileupProcessor::produce(), FFTJetEFlowSmoother::produce(), and FFTJetProducer::writeJets().
const std::vector<double> fftjetcms::FFTJetInterface::etaDependentMagnutideFactors [protected] |
Definition at line 87 of file FFTJetInterface.h.
Referenced by discretizeEnergyFlow().
std::vector<fftjetcms::VectorLike> fftjetcms::FFTJetInterface::eventData [protected] |
Definition at line 93 of file FFTJetInterface.h.
Referenced by FFTJetProducer::determineGriddedConstituents(), FFTJetProducer::determineVectorConstituents(), discretizeEnergyFlow(), FFTJetProducer::iterateJetReconstruction(), loadInputCollection(), and FFTJetProducer::produce().
Definition at line 102 of file FFTJetInterface.h.
Referenced by FFTJetProducer::determineGriddedConstituents(), FFTJetProducer::determineVectorConstituents(), and loadInputCollection().
const edm::InputTag fftjetcms::FFTJetInterface::inputLabel [protected] |
Definition at line 72 of file FFTJetInterface.h.
Referenced by loadInputCollection().
const bool fftjetcms::FFTJetInterface::insertCompleteEvent [private] |
Definition at line 110 of file FFTJetInterface.h.
Referenced by FFTJetInterface(), and getEventScale().
const JetType fftjetcms::FFTJetInterface::jetType [protected] |
Definition at line 78 of file FFTJetInterface.h.
Referenced by loadInputCollection().
const std::string fftjetcms::FFTJetInterface::outputLabel [protected] |
Definition at line 75 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 84 of file FFTJetInterface.h.
Referenced by loadInputCollection().
Definition at line 112 of file FFTJetInterface.h.
Referenced by loadInputCollection(), and vertexUsed().