1 #ifndef __RecoLocalCalo_HGCRecProducers_HGCalClusterProducer_H__ 2 #define __RecoLocalCalo_HGCRecProducers_HGCalClusterProducer_H__ 47 std::unique_ptr<HGCalImagingAlgo>
algo;
59 doSharing(ps.getParameter<bool>(
"doSharing")),
63 std::vector<double> vecDeltas = ps.
getParameter<std::vector<double> >(
"deltac");
65 std::vector<double> multicluster_radii = ps.
getParameter<std::vector<double> >(
"multiclusterRadii");
95 algo = std::make_unique<HGCalImagingAlgo>(vecDeltas,
kappa,
ecut,
showerSigma,
algoId,
dependSensor,
dEdXweights,
thicknessCorrection,
fcPerMip,
fcPerEle,
nonAgedNoises,
noiseMip,
verbosity);
97 algo = std::make_unique<HGCalImagingAlgo>(vecDeltas,
kappa,
ecut,
algoId,
dependSensor,
dEdXweights,
thicknessCorrection,
fcPerMip,
fcPerEle,
nonAgedNoises,
noiseMip,
verbosity);
104 produces<std::vector<reco::BasicCluster> >();
105 produces<std::vector<reco::BasicCluster> >(
"sharing");
107 produces<std::vector<reco::HGCalMultiCluster> >();
108 produces<std::vector<reco::HGCalMultiCluster> >(
"sharing");
119 std::unique_ptr<std::vector<reco::BasicCluster> >
clusters(
new std::vector<reco::BasicCluster> ),
120 clusters_sharing(
new std::vector<reco::BasicCluster> );
124 algo->getEventSetup(es);
132 algo->populate(*ee_hits);
138 algo->populate(*fh_hits);
139 }
else if ( bh_hits.
isValid() ) {
140 algo->populate(*bh_hits);
145 algo->populate(*ee_hits);
147 algo->populate(*fh_hits);
149 algo->populate(*bh_hits);
154 algo->makeClusters();
157 *clusters_sharing =
algo->getClusters(
true);
159 std::vector<std::string>
names;
164 auto clusterHandleSharing = evt.
put(
std::move(clusters_sharing),
"sharing");
167 for(
unsigned i = 0;
i < clusterHandle->size(); ++
i ) {
173 for(
unsigned i = 0;
i < clusterHandleSharing->size(); ++
i ) {
179 std::unique_ptr<std::vector<reco::HGCalMultiCluster> >
180 multiclusters(
new std::vector<reco::HGCalMultiCluster> ),
181 multiclusters_sharing(
new std::vector<reco::HGCalMultiCluster> );
191 std::chrono::duration<float> time_span = std::chrono::duration_cast<std::chrono::milliseconds>(now - then);
193 edm::LogInfo (
"HGCalClusterProducer") <<
"Time taken by multiclustering " << time_span.count() <<
" ms";
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
static const HistoName names[]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void push_back(Ptr< T > const &iPtr)
edm::EDGetTokenT< HGCRecHitCollection > hits_ee_token
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::unique_ptr< HGCalImagingAlgo > algo
HGCalImagingAlgo::VerbosityLevel verbosity
std::unique_ptr< HGCal3DClustering > multicluster_algo
edm::EDGetTokenT< HGCRecHitCollection > hits_bh_token
edm::EDGetTokenT< HGCRecHitCollection > hits_fh_token
HGCalClusterProducer(const edm::ParameterSet &)
virtual void produce(edm::Event &, const edm::EventSetup &)
reco::CaloCluster::AlgoId algoId
static const G4double kappa