152 std::vector<const HitDoublets*> hitDoublets;
154 const int numberOfHitsInNtuplet = 4;
155 std::vector<CACell::CAntuplet> foundQuadruplets;
158 for (
const auto& regionLayerPairs : regionDoublets) {
161 foundQuadruplets.clear();
163 createGraphStructure(layers, g);
165 clearGraphStructure(layers, g);
168 fillGraph(layers, regionLayerPairs, g, hitDoublets);
174 ca.evolve(numberOfHitsInNtuplet);
176 ca.findNtuplets(foundQuadruplets, numberOfHitsInNtuplet);
178 auto& allCells = ca.getAllCells();
183 std::array<float, 4> bc_r;
184 std::array<float, 4> bc_z;
185 std::array<float, 4> bc_errZ2;
186 std::array<GlobalPoint, 4> gps;
187 std::array<GlobalError, 4> ges;
188 std::array<bool, 4> barrels;
190 unsigned int numberOfFoundQuadruplets = foundQuadruplets.size();
193 for (
unsigned int quadId = 0; quadId < numberOfFoundQuadruplets; ++quadId) {
195 for (
unsigned int i = 0;
i < 3; ++
i) {
196 auto const& ahit = allCells[foundQuadruplets[quadId][
i]].getInnerHit();
197 gps[
i] = ahit->globalPosition();
198 ges[
i] = ahit->globalPositionError();
199 barrels[
i] =
isBarrel(ahit->geographicalId().subdetId());
202 auto const& ahit = allCells[foundQuadruplets[quadId][2]].getOuterHit();
203 gps[3] = ahit->globalPosition();
204 ges[3] = ahit->globalPositionError();
205 barrels[3] =
isBarrel(ahit->geographicalId().subdetId());
212 const float abscurv =
std::abs(curvature);
213 const float thisMaxChi2 = maxChi2Eval.value(abscurv);
215 SeedingHitSet tmpTriplet(allCells[foundQuadruplets[quadId][0]].getInnerHit(),
216 allCells[foundQuadruplets[quadId][2]].getInnerHit(),
217 allCells[foundQuadruplets[quadId][2]].getOuterHit());
224 float chi2 = std::numeric_limits<float>::quiet_NaN();
228 const float simpleCot = (gps.back().z() - gps.front().z()) / (gps.back().perp() - gps.front().perp());
230 for (
int i = 0;
i < 4; ++
i) {
235 bc_z[
i] = point.
z() - region.
origin().
z();
236 bc_errZ2[
i] = (barrels[
i]) ? error.
czz() : error.
rerr(point) *
sqr(simpleCot);
239 chi2 = rzLine.chi2();
241 RZLine rzLine(gps, ges, barrels);
242 chi2 = rzLine.chi2();
257 result[
index].emplace_back(allCells[foundQuadruplets[quadId][0]].getInnerHit(),
258 allCells[foundQuadruplets[quadId][1]].getInnerHit(),
259 allCells[foundQuadruplets[quadId][2]].getInnerHit(),
260 allCells[foundQuadruplets[quadId][2]].getOuterHit());
const bool useBendingCorrection
GlobalPoint const & origin() const
constexpr bool isNotFinite(T x)
std::unique_ptr< SeedComparitor > theComparitor
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
T inversePt(T curvature, const edm::EventSetup &iSetup)
T curvature(T InversePt, const edm::EventSetup &iSetup)
Abs< T >::type abs(const T &t)
const float extraHitRPhitolerance
const bool fitFastCircleChi2Cut
const QuantityDependsPt maxChi2
T rerr(const GlobalPoint &aPoint) const
Square< F >::type sqr(const F &f)
QuantityDependsPtEval evaluator(const edm::EventSetup &es) const
*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