27 #include "fftjet/ProximityClusteringTree.hh"
28 #include "fftjet/OpenDXPeakTree.hh"
47 using namespace fftjetcms;
63 typedef fftjet::SparseClusteringTree<fftjet::Peak, long>
SparseTree;
64 typedef fftjet::OpenDXPeakTree<long, fftjet::AbsClusteringTree>
DXFormatter;
65 typedef fftjet::OpenDXPeakTree<long, fftjet::SparseClusteringTree>
SparseFormatter;
71 void endJob()
override;
74 void processTreeData(
const edm::Event&, std::ofstream&);
78 if (ptr.get() ==
nullptr)
96 std::unique_ptr<fftjet::AbsDistanceCalculator<fftjet::Peak> >
distanceCalc;
119 : clusteringTree(nullptr),
120 treeLabel(ps.getParameter<edm::
InputTag>(
"treeLabel")),
121 outputPrefix(ps.getParameter<std::
string>(
"outputPrefix")),
122 etaMax(ps.getParameter<double>(
"etaMax")),
123 storeInSinglePrecision(
true),
124 insertCompleteEvent(ps.getParameter<bool>(
"insertCompleteEvent")),
125 completeEventScale(ps.getParameter<double>(
"completeEventScale")),
128 throw cms::Exception(
"FFTJetBadConfig") <<
"etaMax can not be negative" << std::endl;
165 template <
class Real>
176 if (input->isSparse()) {
194 std::ofstream
file(filename.str().c_str());
196 throw cms::Exception(
"FFTJetBadConfig") <<
"Failed to open file \"" << filename.str() <<
"\"" << std::endl;
EventNumber_t event() const
Class for storing FFTJet sparse clustering trees.
fftjet::OpenDXPeakTree< long, fftjet::SparseClusteringTree > SparseFormatter
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
const edm::InputTag treeLabel
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > fftjet_PeakFunctor_parser(const edm::ParameterSet &ps)
fftjet::Functor1< double, fftjet::Peak > PeakProperty
unsigned long long EventNumber_t
void checkConfig(const Ptr &ptr, const char *message)
void processTreeData(const edm::Event &, std::ofstream &)
reco::PattRecoTree< Real, reco::PattRecoPeak< Real > > StoredTree
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< StoredTree > treeToken
static std::string const input
fftjet::OpenDXPeakTree< long, fftjet::AbsClusteringTree > DXFormatter
ClusteringTree * clusteringTree
~FFTJetTreeDump() override
fftjet::ProximityClusteringTree< fftjet::Peak, long > ClusteringTree
std::unique_ptr< fftjet::AbsDistanceCalculator< fftjet::Peak > > distanceCalc
const bool storeInSinglePrecision
fftjet::SparseClusteringTree< fftjet::Peak, long > SparseTree
const std::string outputPrefix
std::unique_ptr< DXFormatter > denseFormatter
std::unique_ptr< fftjet::AbsDistanceCalculator< fftjet::Peak > > fftjet_DistanceCalculator_parser(const edm::ParameterSet &ps)
std::unique_ptr< PeakProperty > glyphSize
void sparsePeakTreeFromStorable(const reco::PattRecoTree< Real, reco::PattRecoPeak< Real > > &in, const std::vector< double > *scaleSetIfNotAdaptive, double completeEventScale, fftjet::SparseClusteringTree< fftjet::Peak, long > *out)
void densePeakTreeFromStorable(const reco::PattRecoTree< Real, reco::PattRecoPeak< Real > > &in, const std::vector< double > *scaleSetIfNotAdaptive, double completeEventScale, fftjet::AbsClusteringTree< fftjet::Peak, long > *out)
T getParameter(std::string const &) const
std::unique_ptr< SparseFormatter > sparseFormatter
const double completeEventScale
static std::atomic< unsigned int > counter
const bool insertCompleteEvent
std::unique_ptr< std::vector< double > > iniScales
void analyze(const edm::Event &, const edm::EventSetup &) override
std::unique_ptr< std::vector< double > > fftjet_ScaleSet_parser(const edm::ParameterSet &ps)
std::unique_ptr< PeakProperty > glyphColor