|
|
Go to the documentation of this file.
6 #include "Math/GenVector/VectorUtil.h"
8 #include "vdt/vdtMath.h"
13 if (conf.
exists(
"allCellsPositionCalc")) {
24 const std::vector<bool>& seedable,
26 std::vector<double> etaRMS2(
input.size(), 0.0);
27 std::vector<double> phiRMS2(
input.size(), 0.0);
41 std::vector<bool> mask(
input.size(),
false);
42 std::vector<bool> linked(
input.size(),
false);
52 for (
unsigned int i = 0;
i <
input.size(); ++
i) {
75 std::vector<double>& etaRMS2,
76 std::vector<double>& phiRMS2) {
79 for (
unsigned int i = 0;
i <
clusters.size(); ++
i) {
85 auto const&
h = *
frac.recHitRef();
86 auto const&
rep =
h.positionREP();
92 etaRMS2[
i] *= etaRMS2[
i];
94 phiRMS2[
i] *= phiRMS2[
i];
100 std::vector<ClusterLink>
links;
103 for (
unsigned int j = 0;
j <
clusters.size(); ++
j) {
119 auto deta = crep1.eta() - crep2.eta();
120 deta = deta * deta / (etaRMS2[
i] + etaRMS2[
j]);
121 auto dphi =
deltaPhi(crep1.phi(), crep2.phi());
122 dphi = dphi * dphi / (phiRMS2[
i] + phiRMS2[
j]);
134 std::vector<bool>& linkedClusters) {
135 std::vector<ClusterLink> goodLinks;
136 std::vector<bool> mask(
links.size(),
false);
140 for (
unsigned int i = 0;
i <
links.size() - 1; ++
i) {
143 for (
unsigned int j =
i + 1;
j <
links.size(); ++
j) {
150 if (link1.
to() == link2.
to()) {
152 if (link1.
dZ() < link2.
dZ()) {
154 }
else if (link1.
dZ() > link2.
dZ()) {
156 }
else if (fabs(link1.
dZ() - link2.
dZ()) < 0.2) {
157 if (link1.
dR() < link2.
dR()) {
159 }
else if (link1.
dR() > link2.
dR()) {
173 for (
unsigned int i = 0;
i <
links.size(); ++
i) {
176 goodLinks.push_back(
links[
i]);
177 linkedClusters[
links[
i].from()] =
true;
178 linkedClusters[
links[
i].to()] =
true;
197 e2 =
fraction.recHitRef()->energy();
206 std::vector<bool>& mask,
208 const std::vector<ClusterLink>&
links) {
212 if (!mask[
link.from()]) {
214 mask[
link.from()] =
true;
217 if (!mask[
link.to()]) {
219 mask[
link.to()] =
true;
225 if (!mask[
link.to()]) {
227 mask[
link.to()] =
true;
230 if (!mask[
link.from()]) {
232 mask[
link.from()] =
true;
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
static const std::string input
void calculateShowerShapes(const reco::PFClusterCollection &, std::vector< double > &, std::vector< double > &)
void expandCluster(reco::PFCluster &, unsigned int point, std::vector< bool > &mask, const reco::PFClusterCollection &, const std::vector< ClusterLink > &links)
const std::vector< reco::PFRecHitFraction > & recHitFractions() const
vector of rechit fractions
PFMultiDepthClusterizer(const edm::ParameterSet &conf)
std::unique_ptr< PFCPositionCalculatorBase > _allCellsPosCalc
double energy() const
cluster energy
std::vector< ClusterLink > prune(std::vector< ClusterLink > &, std::vector< bool > &linkedClusters)
double depth() const
cluster depth
const REPPoint & positionREP() const
cluster position: rho, eta, phi
bool exists(std::string const ¶meterName) const
checks if a parameter exists
void absorbCluster(reco::PFCluster &, const reco::PFCluster &)
std::vector< ClusterLink > link(const reco::PFClusterCollection &, const std::vector< double > &, const std::vector< double > &)
DetId seed() const
return DetId of seed
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
T getParameter(std::string const &) const
void buildClusters(const reco::PFClusterCollection &, const std::vector< bool > &, reco::PFClusterCollection &outclus) override
Power< A, B >::type pow(const A &a, const B &b)
Abs< T >::type abs(const T &t)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
ParameterSet const & getParameterSet(std::string const &) const