6 dr_(conf.getParameter<double>(
"dR_multicluster")),
7 ptC3dThreshold_(conf.getParameter<double>(
"minPt_multicluster")),
8 calibSF_(conf.getParameter<double>(
"calibSF_multicluster"))
10 edm::LogInfo(
"HGCalMulticlusterParameters") <<
"Multicluster dR for Near Neighbour search: " <<
dr_;
12 edm::LogInfo(
"HGCalMulticlusterParameters") <<
"Multicluster global calibration factor: " <<
calibSF_;
24 if( cluDetId.zside() != firstClusterDetId.zside() ){
39 std::vector<l1t::HGCalMulticluster> multiclustersTmp;
45 vector<int> tcPertinentMulticlusters;
46 for(
const auto& mclu : multiclustersTmp ){
48 tcPertinentMulticlusters.push_back(imclu);
52 if( tcPertinentMulticlusters.empty() ){
53 multiclustersTmp.emplace_back( *clu );
57 unsigned targetMulticlu = 0;
58 for(
int imclu : tcPertinentMulticlusters ){
59 double d = ( multiclustersTmp.at(imclu).centreProj() - (*clu)->centreProj() ).
mag() ;
62 targetMulticlu = imclu;
66 multiclustersTmp.at( targetMulticlu ).addConstituent( *clu );
72 for(
unsigned i(0);
i<multiclustersTmp.size(); ++
i ){
74 multiclustersTmp.at(
i).eta(),
75 multiclustersTmp.at(
i).phi(),
78 multiclustersTmp.at(
i).setP4( calibP4 );
80 multiclusters.
push_back( 0, 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
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
const_iterator end() const
bool isPertinent(const l1t::HGCalCluster &clu, const l1t::HGCalMulticluster &mclu, double dR) const
void clusterize(const edm::PtrVector< l1t::HGCalCluster > &clustersPtr, l1t::HGCalMulticlusterBxCollection &multiclusters)
void push_back(int bx, T object)