6 dr_(conf.getParameter<double>(
"dR_multicluster"))
8 edm::LogInfo(
"HGCalMulticlusterParameters") <<
"Multicluster dR for Near Neighbour search: " <<
dr_;
19 if( cluDetId.zside() != firstClusterDetId.zside() ){
34 std::vector<l1t::HGCalMulticluster> multiclustersTmp;
40 vector<int> tcPertinentMulticlusters;
41 for(
const auto& mclu : multiclustersTmp ){
43 tcPertinentMulticlusters.push_back(imclu);
47 if( tcPertinentMulticlusters.size() == 0 ){
48 multiclustersTmp.emplace_back( *clu );
52 unsigned targetMulticlu = 0;
53 for(
int imclu : tcPertinentMulticlusters ){
54 double d = ( multiclustersTmp.at(imclu).centreProj() - (*clu)->centreProj() ).
mag() ;
57 targetMulticlu = imclu;
61 multiclustersTmp.at( targetMulticlu ).addConstituent( *clu );
67 multiclusters.
resize(0, multiclustersTmp.size());
68 for(
unsigned i(0);
i<multiclustersTmp.size(); ++
i ){
69 multiclusters.
set( 0,
i, multiclustersTmp.at(
i) );
HGCalMulticlusteringImpl(const edm::ParameterSet &conf)
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
const GlobalPoint & centreProj() const
const_iterator begin() const
const_iterator end() const
bool isPertinent(const l1t::HGCalCluster &clu, const l1t::HGCalMulticluster &mclu, double dR) const
void set(int bx, unsigned i, const T &object)
void clusterize(const edm::PtrVector< l1t::HGCalCluster > &clustersPtr, l1t::HGCalMulticlusterBxCollection &multiclusters)
void resize(int bx, unsigned size)