#include <HGCDoublet.h>
|
int | areAligned (double xi, double yi, double zi, double xo, double yo, double zo, float minCosTheta, float minCosPointing, const GlobalVector &refDir, bool debug=false) const |
|
bool | checkCompatibilityAndTag (std::vector< HGCDoublet > &allDoublets, const std::vector< int > &innerDoublets, const GlobalVector &refDir, float minCosTheta, float minCosPointing=1., bool debug=false) |
|
void | findNtuplets (std::vector< HGCDoublet > &allDoublets, HGCntuplet &tmpNtuplet, int seedIndex, const bool outInDFS, const unsigned int outInHops, const unsigned int maxOutInHops, std::vector< std::pair< unsigned int, unsigned int > > &outInToVisit) |
|
| HGCDoublet (const int innerClusterId, const int outerClusterId, const int doubletId, const std::vector< reco::CaloCluster > *layerClusters, const int seedIndex) |
|
int | innerClusterId () const |
|
double | innerR () const |
|
double | innerX () const |
|
double | innerY () const |
|
double | innerZ () const |
|
int | outerClusterId () const |
|
double | outerR () const |
|
double | outerX () const |
|
double | outerY () const |
|
double | outerZ () const |
|
int | seedIndex () const |
|
void | setVisited (bool visited) |
|
void | tagAsInnerNeighbor (unsigned int otherDoublet) |
|
void | tagAsOuterNeighbor (unsigned int otherDoublet) |
|
Definition at line 14 of file HGCDoublet.h.
◆ HGCntuplet
◆ HGCDoublet()
HGCDoublet::HGCDoublet |
( |
const int |
innerClusterId, |
|
|
const int |
outerClusterId, |
|
|
const int |
doubletId, |
|
|
const std::vector< reco::CaloCluster > * |
layerClusters, |
|
|
const int |
seedIndex |
|
) |
| |
|
inline |
◆ areAligned()
int HGCDoublet::areAligned |
( |
double |
xi, |
|
|
double |
yi, |
|
|
double |
zi, |
|
|
double |
xo, |
|
|
double |
yo, |
|
|
double |
zo, |
|
|
float |
minCosTheta, |
|
|
float |
minCosPointing, |
|
|
const GlobalVector & |
refDir, |
|
|
bool |
debug = false |
|
) |
| const |
Definition at line 64 of file HGCDoublet.cc.
83 auto dot = dx1 * dx2 + dy1 * dy2 + dz1 * dz2;
85 auto mag1 =
std::sqrt(dx1 * dx1 + dy1 * dy1 + dz1 * dz1);
88 auto cosTheta =
dot / (mag1 *
mag2);
90 LogDebug(
"HGCDoublet") <<
"-- Are Aligned -- dot: " <<
dot <<
" mag1: " << mag1 <<
" mag2: " <<
mag2
91 <<
" cosTheta: " << cosTheta <<
" isWithinLimits: " << (cosTheta > minCosTheta) << std::endl;
104 auto dot_pointing = pointingDir.
dot(firstDoublet);
105 auto mag_pointing =
sqrt(pointingDir.
mag2());
106 auto cosTheta_pointing = dot_pointing / (
mag2 * mag_pointing);
108 LogDebug(
"HGCDoublet") <<
"-- Are Aligned -- dot_pointing: " << dot_pointing <<
" mag_pointing: " << mag_pointing
109 <<
" mag2: " <<
mag2 <<
" cosTheta_pointing: " << cosTheta_pointing
110 <<
" isWithinLimits: " << (cosTheta_pointing > minCosPointing) << std::endl;
113 return (cosTheta > minCosTheta) && (cosTheta_pointing > minCosPointing);
References debug, Vector3DBase< T, FrameTag >::dot(), dot(), innerX(), innerY(), innerZ(), LogDebug, PV3DBase< T, PVType, FrameType >::mag2(), mag2(), seedIndex_, mathSSE::sqrt(), and hybridSuperClusters_cfi::xi.
Referenced by checkCompatibilityAndTag().
◆ checkCompatibilityAndTag()
bool HGCDoublet::checkCompatibilityAndTag |
( |
std::vector< HGCDoublet > & |
allDoublets, |
|
|
const std::vector< int > & |
innerDoublets, |
|
|
const GlobalVector & |
refDir, |
|
|
float |
minCosTheta, |
|
|
float |
minCosPointing = 1. , |
|
|
bool |
debug = false |
|
) |
| |
Definition at line 3 of file HGCDoublet.cc.
9 int nDoublets = innerDoublets.size();
10 int constexpr VSIZE = 4;
21 auto loop = [&](
int i,
int vs) {
22 for (
int j = 0;
j < vs; ++
j) {
23 auto otherDoubletId = innerDoublets[
i +
j];
24 auto &otherDoublet = allDoublets[otherDoubletId];
25 xi[
j] = otherDoublet.innerX();
26 yi[
j] = otherDoublet.innerY();
27 zi[
j] = otherDoublet.innerZ();
28 seedi[
j] = otherDoublet.seedIndex();
30 LogDebug(
"HGCDoublet") <<
i +
j <<
" is doublet " << otherDoubletId << std::endl;
33 for (
int j = 0;
j < vs; ++
j) {
40 LogDebug(
"HGCDoublet") <<
"Are aligned for InnerDoubletId: " <<
i +
j <<
" is " <<
ok[
j] << std::endl;
43 for (
int j = 0;
j < vs; ++
j) {
44 auto otherDoubletId = innerDoublets[
i +
j];
45 auto &otherDoublet = allDoublets[otherDoubletId];
47 otherDoublet.tagAsOuterNeighbor(doubletId);
48 allDoublets[doubletId].tagAsInnerNeighbor(otherDoubletId);
52 auto lim = VSIZE * (nDoublets / VSIZE);
53 for (
int i = 0;
i < lim;
i += VSIZE)
55 loop(lim, nDoublets - lim);
59 <<
" considered" << std::endl;
References areAligned(), debug, mps_fire::i, innerNeighbors_, dqmiolumiharvest::j, LogDebug, heppy_loop::loop, convertSQLiteXML::ok, outerX(), outerY(), outerZ(), seedIndex_, theDoubletId_, and hybridSuperClusters_cfi::xi.
◆ findNtuplets()
void HGCDoublet::findNtuplets |
( |
std::vector< HGCDoublet > & |
allDoublets, |
|
|
HGCntuplet & |
tmpNtuplet, |
|
|
int |
seedIndex, |
|
|
const bool |
outInDFS, |
|
|
const unsigned int |
outInHops, |
|
|
const unsigned int |
maxOutInHops, |
|
|
std::vector< std::pair< unsigned int, unsigned int > > & |
outInToVisit |
|
) |
| |
Definition at line 116 of file HGCDoublet.cc.
127 for (
unsigned int i = 0;
i < numberOfOuterNeighbors; ++
i) {
129 allDoublets, tmpNtuplet,
seedIndex, outInDFS, outInHops, maxOutInHops, outInToVisit);
131 if (outInDFS && outInHops < maxOutInHops) {
133 outInToVisit.emplace_back(inN, outInHops + 1);
References alreadyVisited_, mps_fire::i, innerNeighbors_, outerNeighbors_, seedIndex(), seedIndex_, and theDoubletId_.
◆ innerClusterId()
int HGCDoublet::innerClusterId |
( |
| ) |
const |
|
inline |
◆ innerR()
double HGCDoublet::innerR |
( |
| ) |
const |
|
inline |
◆ innerX()
double HGCDoublet::innerX |
( |
| ) |
const |
|
inline |
◆ innerY()
double HGCDoublet::innerY |
( |
| ) |
const |
|
inline |
◆ innerZ()
double HGCDoublet::innerZ |
( |
| ) |
const |
|
inline |
◆ outerClusterId()
int HGCDoublet::outerClusterId |
( |
| ) |
const |
|
inline |
◆ outerR()
double HGCDoublet::outerR |
( |
| ) |
const |
|
inline |
◆ outerX()
double HGCDoublet::outerX |
( |
| ) |
const |
|
inline |
◆ outerY()
double HGCDoublet::outerY |
( |
| ) |
const |
|
inline |
◆ outerZ()
double HGCDoublet::outerZ |
( |
| ) |
const |
|
inline |
◆ seedIndex()
int HGCDoublet::seedIndex |
( |
| ) |
const |
|
inline |
◆ setVisited()
void HGCDoublet::setVisited |
( |
bool |
visited | ) |
|
|
inline |
◆ tagAsInnerNeighbor()
void HGCDoublet::tagAsInnerNeighbor |
( |
unsigned int |
otherDoublet | ) |
|
|
inline |
◆ tagAsOuterNeighbor()
void HGCDoublet::tagAsOuterNeighbor |
( |
unsigned int |
otherDoublet | ) |
|
|
inline |
◆ alreadyVisited_
bool HGCDoublet::alreadyVisited_ |
|
private |
◆ innerClusterId_
const int HGCDoublet::innerClusterId_ |
|
private |
◆ innerNeighbors_
std::vector<int> HGCDoublet::innerNeighbors_ |
|
private |
◆ innerR_
const double HGCDoublet::innerR_ |
|
private |
◆ innerX_
const double HGCDoublet::innerX_ |
|
private |
◆ innerY_
const double HGCDoublet::innerY_ |
|
private |
◆ innerZ_
const double HGCDoublet::innerZ_ |
|
private |
◆ layerClusters_
◆ outerClusterId_
const int HGCDoublet::outerClusterId_ |
|
private |
◆ outerNeighbors_
std::vector<int> HGCDoublet::outerNeighbors_ |
|
private |
◆ outerR_
const double HGCDoublet::outerR_ |
|
private |
◆ outerX_
const double HGCDoublet::outerX_ |
|
private |
◆ outerY_
const double HGCDoublet::outerY_ |
|
private |
◆ outerZ_
const double HGCDoublet::outerZ_ |
|
private |
◆ seedIndex_
int HGCDoublet::seedIndex_ |
|
private |
◆ theDoubletId_
const int HGCDoublet::theDoubletId_ |
|
private |
int areAligned(double xi, double yi, double zi, double xo, double yo, double zo, float minCosTheta, float minCosPointing, const GlobalVector &refDir, bool debug=false) const