4 const float thetaCut,
const float phiCut,
const float hardPtCut)
6 unsigned int cellId = 0;
8 float region_origin_x = region.
origin().
x();
9 float region_origin_y = region.
origin().
y();
12 std::vector<bool> alreadyVisitedLayerPairs;
14 for (
auto visited : alreadyVisitedLayerPairs)
21 std::queue<int> LayerPairsToVisit;
25 LayerPairsToVisit.push(LayerPair);
29 unsigned int numberOfLayerPairsToVisitAtThisDepth =
30 LayerPairsToVisit.size();
32 while (!LayerPairsToVisit.empty())
34 auto currentLayerPair = LayerPairsToVisit.front();
38 bool allInnerLayerPairsAlreadyVisited {
true };
40 for (
auto innerLayerPair : currentInnerLayerRef.theInnerLayerPairs)
42 allInnerLayerPairsAlreadyVisited &=
43 alreadyVisitedLayerPairs[innerLayerPair];
46 if (alreadyVisitedLayerPairs[currentLayerPair] ==
false
47 && allInnerLayerPairsAlreadyVisited)
51 hitDoublets[currentLayerPair];
52 auto numberOfDoublets = doubletLayerPairId->
size();
53 currentLayerPairRef.theFoundCells.reserve(numberOfDoublets);
54 for (
unsigned int i = 0;
i < numberOfDoublets; ++
i)
56 currentLayerPairRef.theFoundCells.emplace_back(
57 doubletLayerPairId,
i, cellId,
60 currentOuterLayerRef.isOuterHitOfCell[doubletLayerPairId->
outerHitId(
i)].push_back(
61 &(currentLayerPairRef.theFoundCells[
i]));
64 for (
auto neigCell : currentInnerLayerRef.isOuterHitOfCell[doubletLayerPairId->
innerHitId(
i)])
66 currentLayerPairRef.theFoundCells[
i].checkAlignmentAndTag(
67 neigCell, ptmin, region_origin_x,
68 region_origin_y, region_origin_radius, thetaCut,
74 for (
auto outerLayerPair : currentOuterLayerRef.theOuterLayerPairs)
76 LayerPairsToVisit.push(outerLayerPair);
79 alreadyVisitedLayerPairs[currentLayerPair] =
true;
81 LayerPairsToVisit.pop();
82 numberOfLayerPairsToVisitAtThisDepth--;
83 if (numberOfLayerPairsToVisitAtThisDepth == 0)
85 numberOfLayerPairsToVisitAtThisDepth = LayerPairsToVisit.size();
96 unsigned int numberOfIterations = minHitsPerNtuplet - 2;
103 for (
auto& cell : layerPair.theFoundCells)
111 for (
auto& cell : layerPair.theFoundCells)
130 if (cell.isRootCell(minHitsPerNtuplet - 2))
141 std::vector<CACell::CAntuplet>& foundNtuplets,
142 const unsigned int minHitsPerNtuplet)
144 std::vector<CACell*> tmpNtuplet;
145 tmpNtuplet.reserve(minHitsPerNtuplet);
150 tmpNtuplet.push_back(root_cell);
151 root_cell->findNtuplets(foundNtuplets, tmpNtuplet, minHitsPerNtuplet);
158 const float thetaCut,
const float phiCut,
const float hardPtCut)
160 unsigned int cellId = 0;
162 float region_origin_x = region.
origin().
x();
163 float region_origin_y = region.
origin().
y();
166 std::vector<bool> alreadyVisitedLayerPairs;
168 for (
auto visited : alreadyVisitedLayerPairs)
175 std::queue<int> LayerPairsToVisit;
179 LayerPairsToVisit.push(LayerPair);
183 unsigned int numberOfLayerPairsToVisitAtThisDepth =
184 LayerPairsToVisit.size();
186 while (!LayerPairsToVisit.empty())
188 auto currentLayerPair = LayerPairsToVisit.front();
192 bool allInnerLayerPairsAlreadyVisited {
true };
194 for (
auto innerLayerPair : currentInnerLayerRef.theInnerLayerPairs)
196 allInnerLayerPairsAlreadyVisited &=
197 alreadyVisitedLayerPairs[innerLayerPair];
200 if (alreadyVisitedLayerPairs[currentLayerPair] ==
false
201 && allInnerLayerPairsAlreadyVisited)
205 hitDoublets[currentLayerPair];
206 auto numberOfDoublets = doubletLayerPairId->
size();
207 currentLayerPairRef.theFoundCells.reserve(numberOfDoublets);
208 for (
unsigned int i = 0;
i < numberOfDoublets; ++
i)
210 currentLayerPairRef.theFoundCells.emplace_back(
211 doubletLayerPairId,
i, cellId,
214 currentOuterLayerRef.isOuterHitOfCell[doubletLayerPairId->
outerHitId(
i)].push_back(
215 &(currentLayerPairRef.theFoundCells[
i]));
218 for (
auto neigCell : currentInnerLayerRef.isOuterHitOfCell[doubletLayerPairId->
innerHitId(
i)])
220 currentLayerPairRef.theFoundCells[
i].checkAlignmentAndPushTriplet(
221 neigCell, foundTriplets, ptmin, region_origin_x,
222 region_origin_y, region_origin_radius, thetaCut,
228 for (
auto outerLayerPair : currentOuterLayerRef.theOuterLayerPairs)
230 LayerPairsToVisit.push(outerLayerPair);
233 alreadyVisitedLayerPairs[currentLayerPair] =
true;
235 LayerPairsToVisit.pop();
236 numberOfLayerPairsToVisitAtThisDepth--;
237 if (numberOfLayerPairsToVisitAtThisDepth == 0)
239 numberOfLayerPairsToVisitAtThisDepth = LayerPairsToVisit.size();
float originRBound() const
bounds the particle vertex in the transverse plane
void findNtuplets(std::vector< CACell::CAntuplet > &, const unsigned int)
void createAndConnectCells(const std::vector< const HitDoublets * > &, const TrackingRegion &, const float, const float, const float)
GlobalPoint const & origin() const
std::vector< CALayer > theLayers
int outerHitId(int i) const
std::vector< CACell * > theRootCells
std::vector< CALayerPair > theLayerPairs
float ptMin() const
minimal pt of interest
std::vector< int > theRootLayers
int innerHitId(int i) const
void findTriplets(const std::vector< const HitDoublets * > &hitDoublets, std::vector< CACell::CAntuplet > &foundTriplets, const TrackingRegion ®ion, const float thetaCut, const float phiCut, const float hardPtCut)
void evolve(const unsigned int)