#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;
86 auto mag1sq = dx1 * dx1 + dy1 * dy1 + dz1 * dz1;
87 auto mag2sq = dx2 * dx2 + dy2 * dy2 + dz2 * dz2;
89 auto minCosTheta_sq = minCosTheta * minCosTheta;
90 bool isWithinLimits = (dotsq > minCosTheta_sq * mag1sq * mag2sq);
93 LogDebug(
"HGCDoublet") <<
"-- Are Aligned -- dotsq: " << dotsq <<
" mag1sq: " << mag1sq <<
" mag2sq: " << mag2sq
94 <<
"minCosTheta_sq:" << minCosTheta_sq <<
" isWithinLimits: " << isWithinLimits << std::endl;
107 auto dot_pointing = pointingDir.
dot(firstDoublet);
108 auto dot_pointing_sq = dot_pointing * dot_pointing;
109 auto mag_pointing_sq = pointingDir.
mag2();
110 auto minCosPointing_sq = minCosPointing * minCosPointing;
111 bool isWithinLimitsPointing = (dot_pointing_sq > minCosPointing_sq * mag_pointing_sq * mag2sq);
113 LogDebug(
"HGCDoublet") <<
"-- Are Aligned -- dot_pointing_sq: " << dot_pointing * dot_pointing
114 <<
" mag_pointing_sq: " << mag_pointing_sq <<
" mag2sq: " << mag2sq
115 <<
" isWithinLimits: " << isWithinLimitsPointing << std::endl;
119 return isWithinLimits && isWithinLimitsPointing;
References debug, Vector3DBase< T, FrameTag >::dot(), dot(), innerX(), innerY(), innerZ(), LogDebug, PV3DBase< T, PVType, FrameType >::mag2(), seedIndex_, 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 122 of file HGCDoublet.cc.
133 for (
unsigned int i = 0;
i < numberOfOuterNeighbors; ++
i) {
135 allDoublets, tmpNtuplet,
seedIndex, outInDFS, outInHops, maxOutInHops, outInToVisit);
137 if (outInDFS && outInHops < maxOutInHops) {
139 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