37 int startEtaBin, endEtaBin, startPhiBin, endPhiBin;
47 auto firstLayerOnZSide = maxNumberOfLayers * zSide;
48 const auto &firstLayerHisto =
histo[firstLayerOnZSide];
49 origin_eta =
r.origin.eta();
50 origin_phi =
r.origin.phi();
51 int entryEtaBin = firstLayerHisto.etaBin(origin_eta);
52 int entryPhiBin = firstLayerHisto.phiBin(origin_phi);
57 auto etaWindow = deltaIEta;
63 <<
" reached! Increasing inner search window" << std::endl;
65 startEtaBin =
std::max(entryEtaBin - etaWindow, 0);
70 LogDebug(
"HGCGraph") <<
" Entrance eta, phi: " << origin_eta <<
", " << origin_phi
71 <<
" entryEtaBin: " << entryEtaBin <<
" entryPhiBin: " << entryPhiBin
72 <<
" globalBin: " << firstLayerHisto.globalBin(origin_eta, origin_phi)
73 <<
" on layer: " << firstLayerOnZSide <<
" startEtaBin: " << startEtaBin
74 <<
" endEtaBin: " << endEtaBin <<
" startPhiBin: " << startPhiBin
75 <<
" endPhiBin: " << endPhiBin <<
" phiBin(0): " << firstLayerHisto.phiBin(0.)
76 <<
" phiBin(" <<
M_PI / 2. <<
"): " << firstLayerHisto.phiBin(
M_PI / 2.) <<
" phiBin("
77 <<
M_PI <<
"): " << firstLayerHisto.phiBin(
M_PI) <<
" phiBin(" << -
M_PI / 2.
78 <<
"): " << firstLayerHisto.phiBin(-
M_PI / 2.) <<
" phiBin(" << -
M_PI
79 <<
"): " << firstLayerHisto.phiBin(-
M_PI) <<
" phiBin(" << 2. *
M_PI
80 <<
"): " << firstLayerHisto.phiBin(2. *
M_PI) << std::endl;
84 for (
int il = 0; il < maxNumberOfLayers - 1; ++il) {
85 for (
int outer_layer = 0; outer_layer <
std::min(1 +
skip_layers, maxNumberOfLayers - 1 - il); ++outer_layer) {
86 int currentInnerLayerId = il + maxNumberOfLayers * zSide;
87 int currentOuterLayerId = currentInnerLayerId + 1 + outer_layer;
88 auto const &outerLayerHisto =
histo[currentOuterLayerId];
89 auto const &innerLayerHisto =
histo[currentInnerLayerId];
93 <<
" at etaBin: " << etaLimitIncreaseWindowBin << std::endl;
98 for (
int iphi_it = startPhiBin; iphi_it < endPhiBin; ++iphi_it) {
102 <<
" on layers I/O: " << currentInnerLayerId <<
"/" << currentOuterLayerId
103 <<
" with clusters: " << innerLayerHisto[
offset +
iphi].
size() << std::endl;
105 for (
auto innerClusterId : innerLayerHisto[
offset +
iphi]) {
107 if (mask[innerClusterId] == 0.) {
109 LogDebug(
"HGCGraph") <<
"Skipping inner masked cluster " << innerClusterId << std::endl;
118 auto etaWindow = deltaIEta;
124 LogDebug(
"HGCGraph") <<
"Eta and Phi window increased by one" << std::endl;
130 for (
int oeta = etaRangeMin; oeta < etaRangeMax; ++oeta) {
132 for (
int phiRange = 0; phiRange < 2 *
phiWindow + 1; ++phiRange) {
141 <<
" on layers I/O: " << currentInnerLayerId <<
"/" << currentOuterLayerId
142 <<
" with clusters: " << innerLayerHisto[oeta *
nPhiBins + ophi].
size()
145 for (
auto outerClusterId : outerLayerHisto[oeta *
nPhiBins + ophi]) {
147 if (mask[outerClusterId] == 0.) {
149 LogDebug(
"HGCGraph") <<
"Skipping outer masked cluster " << outerClusterId << std::endl;
153 if (maxDeltaTime != -1 &&
154 !
areTimeCompatible(innerClusterId, outerClusterId, layerClustersTime, maxDeltaTime)) {
156 LogDebug(
"HGCGraph") <<
"Rejecting doublets due to timing!" << std::endl;
162 <<
"Creating doubletsId: " << doubletId <<
" layerLink in-out: [" << currentInnerLayerId
163 <<
", " << currentOuterLayerId <<
"] clusterLink in-out: [" << innerClusterId <<
", "
164 << outerClusterId <<
"]" << std::endl;
171 <<
"Checking compatibility of doubletId: " << doubletId
172 <<
" with all possible inners doublets link by the innerClusterId: " << innerClusterId
175 bool isRootDoublet = thisDoublet.checkCompatibilityAndTag(
allDoublets_,
181 if (isRootDoublet and checkDistanceRootDoubletVsSeed) {
182 auto dEtaSquared = (
layerClusters[innerClusterId].eta() - origin_eta);
183 dEtaSquared *= dEtaSquared;
184 auto dPhiSquared = (
layerClusters[innerClusterId].phi() - origin_phi);
185 dPhiSquared *= dPhiSquared;
187 isRootDoublet =
false;
203 LogDebug(
"HGCGraph") <<
"number of Root doublets " <<
theRootDoublets_.size() <<
" over a total number of doublets "