CMS 3D CMS Logo

Classes | Typedefs | Functions | Variables
ALPAKA_ACCELERATOR_NAMESPACE::brokenline Namespace Reference

Classes

class  helixFit
 Helix fit by three step: -fast pre-fit (see Fast_fit() for further info);
-circle fit of the hits projected in the transverse plane by Broken Line algorithm (see BL_Circle_fit() for further info);
-line fit of the hits projected on the (pre-fitted) cilinder surface by Broken Line algorithm (see BL_Line_fit() for further info);
Points must be passed ordered (from inner to outer layer). More...
 
struct  PreparedBrokenLineData
 data needed for the Broken Line fit procedure. More...
 

Typedefs

using karimaki_circle_fit = riemannFit::CircleFit
 < Karimäki's parameters: (phi, d, k=1/R) More...
 

Functions

template<typename TAcc , typename M3xN , typename V4 , int n>
ALPAKA_FN_ACC ALPAKA_FN_INLINE void __attribute__ ((always_inline)) prepareBrokenLineData(const TAcc &acc
 Computes the data needed for the Broken Line fit procedure that are mainly common for the circle and the line fit. More...
 
template<typename TAcc , typename M3xN , typename M6xN , typename V4 , int n>
ALPAKA_FN_ACC ALPAKA_FN_INLINE void circleFit (const TAcc &acc, const M3xN &hits, const M6xN &hits_ge, const V4 &fast_fit, const double bField, PreparedBrokenLineData< n > &data, karimaki_circle_fit &circle_results)
 Performs the Broken Line fit in the curved track case (that is, the fit parameters are the interceptions u and the curvature correction ). More...
 
if constexpr (n > 3)
 
template<typename TAcc , typename M3xN , typename V4 >
ALPAKA_FN_ACC ALPAKA_FN_INLINE void fastFit (const TAcc &acc, const M3xN &hits, V4 &result)
 A very fast helix fit. More...
 
 for (u_int i=0;i< n;i++)
 
template<typename TAcc , typename V4 , typename M6xN , int n>
ALPAKA_FN_ACC ALPAKA_FN_INLINE void lineFit (const TAcc &acc, const M6xN &hits_ge, const V4 &fast_fit, const double bField, const PreparedBrokenLineData< n > &data, riemannFit::LineFit &line_results)
 Performs the Broken Line fit in the straight track case (that is, the fit parameters are only the interceptions u). More...
 
template<typename TAcc , int n>
ALPAKA_FN_ACC ALPAKA_FN_INLINE riemannFit::MatrixNd< n > matrixC_u (const TAcc &acc, const riemannFit::VectorNd< n > &weights, const riemannFit::VectorNd< n > &sTotal, const riemannFit::VectorNd< n > &varBeta)
 Computes the n-by-n band matrix obtained minimizing the Broken Line's cost function w.r.t u. This is the whole matrix in the case of the line fit and the main n-by-n block in the case of the circle fit. More...
 
template<typename TAcc >
ALPAKA_FN_ACC ALPAKA_FN_INLINE double multScatt (const TAcc &acc, const double &length, const double bField, const double radius, int layer, double slope)
 Computes the Coulomb multiple scattering variance of the planar angle. More...
 
template<typename TAcc >
ALPAKA_FN_ACC ALPAKA_FN_INLINE riemannFit::Matrix2d rotationMatrix (const TAcc &acc, double slope)
 Computes the 2D rotation matrix that transforms the line y=slope*x into the line y=0. More...
 
template<typename TAcc >
ALPAKA_FN_ACC ALPAKA_FN_INLINE void translateKarimaki (const TAcc &acc, karimaki_circle_fit &circle, double x0, double y0, riemannFit::Matrix3d &jacobian)
 Changes the Karimäki parameters (and consequently their covariance matrix) under a translation of the coordinate system, such that the old origin has coordinates (x0,y0) in the new coordinate system. The formulas are taken from Karimäki V., 1990, Effective circle fitting for particle trajectories, Nucl. Instr. and Meth. A305 (1991) 187. More...
 
results varBeta (0)
 

Variables

ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN const V4 const double bField
 
 dVec = hits.block(0, mId, 2, 1) - hits.block(0, 0, 2, 1)
 
riemannFit::Vector2d eVec = hits.block(0, n - 1, 2, 1) - hits.block(0, mId, 2, 1)
 
ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN const V4 & fast_fit
 
ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN & hits
 
int mId = 1
 
riemannFit::Matrix2xNd< n > pointsSZ = riemannFit::Matrix2xNd<n>::Zero()
 
results qCharge = riemannFit::cross2D(acc, dVec, eVec) > 0 ? -1 : 1
 
results radii = hits.block(0, 0, 2, n) - fast_fit.head(2) * riemannFit::MatrixXd::Constant(1, n, 1)
 
ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN const V4 const double PreparedBrokenLineData< n > & results
 
riemannFit::Matrix2d rotMat = rotationMatrix(acc, slope)
 
const double slope = -results.qCharge / fast_fit(3)
 
results sTotal = pointsSZ.block(0, 0, 1, n).transpose()
 
results zInSZplane = pointsSZ.block(1, 0, 1, n).transpose()
 
riemannFit::VectorNd< n > zVec = hits.block(2, 0, 1, n).transpose()
 

Typedef Documentation

◆ karimaki_circle_fit

< Karimäki's parameters: (phi, d, k=1/R)

< covariance matrix:
|cov(phi,phi)|cov( d ,phi)|cov( k ,phi)|
|cov(phi, d )|cov( d , d )|cov( k , d )|
|cov(phi, k )|cov( d , k )|cov( k , k )|
as defined in Karimäki V., 1990, Effective circle fitting for particle trajectories, Nucl. Instr. and Meth. A305 (1991) 187.

Definition at line 24 of file BrokenLine.h.

Function Documentation

◆ __attribute__()

template<typename TAcc , typename M3xN , typename V4 , int n>
ALPAKA_FN_ACC ALPAKA_FN_INLINE void ALPAKA_ACCELERATOR_NAMESPACE::brokenline::__attribute__ ( (always_inline)  ) const &

Computes the data needed for the Broken Line fit procedure that are mainly common for the circle and the line fit.

Parameters
hitshits coordinates.
fast_fitpre-fit result in the form (X0,Y0,R,tan(theta)).
bFieldmagnetic field in Gev/cm/c.
resultsPreparedBrokenLineData to be filled (see description of PreparedBrokenLineData).

◆ circleFit()

template<typename TAcc , typename M3xN , typename M6xN , typename V4 , int n>
ALPAKA_FN_ACC ALPAKA_FN_INLINE void ALPAKA_ACCELERATOR_NAMESPACE::brokenline::circleFit ( const TAcc &  acc,
const M3xN &  hits,
const M6xN &  hits_ge,
const V4 &  fast_fit,
const double  bField,
PreparedBrokenLineData< n > &  data,
karimaki_circle_fit circle_results 
)

Performs the Broken Line fit in the curved track case (that is, the fit parameters are the interceptions u and the curvature correction ).

Parameters
hitshits coordinates.
hits_covhits covariance matrix.
fast_fitpre-fit result in the form (X0,Y0,R,tan(theta)).
bFieldmagnetic field in Gev/cm/c.
dataPreparedBrokenLineData.
circle_resultsstruct to be filled with the results in this form: -par parameter of the line in this form: (phi, d, k);
-cov covariance matrix of the fitted parameter;
-chi2 value of the cost function in the minimum.

The function implements the steps 2 and 3 of the Broken Line fit with the curvature correction.
The step 2 is the least square fit, done by imposing the minimum constraint on the cost function and solving the consequent linear system. It determines the fitted parameters u and and their covariance matrix. The step 3 is the correction of the fast pre-fitted parameters for the innermost part of the track. It is first done in a comfortable coordinate system (the one in which the first hit is the origin) and then the parameters and their covariance matrix are transformed to the original coordinate system.

Definition at line 323 of file BrokenLine.h.

References bField, riemannFit::CircleFit::chi2, gather_cfg::cout, riemannFit::CircleFit::cov, data, dVec, eVec, fast_fit, hits, mps_fire::i, l1tstage2_dqm_sourceclient-live_cfg::invert, matrixC_u(), multScatt(), dqmiodumpmetadata::n, riemannFit::CircleFit::par, riemannFit::CircleFit::qCharge, radii, rotationMatrix(), rotMat, slope, ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::sqr(), mathSSE::sqrt(), sTotal, translateKarimaki(), varBeta(), and zInSZplane.

Referenced by ALPAKA_ACCELERATOR_NAMESPACE::Kernel_BLFit< N, TrackerTraits >::operator()(), and ALPAKA_ACCELERATOR_NAMESPACE::brokenline::helixFit< n >::operator()().

329  {
330  circle_results.qCharge = data.qCharge;
331  auto& radii = data.radii;
332  const auto& sTransverse = data.sTransverse;
333  const auto& sTotal = data.sTotal;
334  auto& zInSZplane = data.zInSZplane;
335  auto& varBeta = data.varBeta;
336  const double slope = -circle_results.qCharge / fast_fit(3);
337  varBeta *= 1. + riemannFit::sqr(slope); // the kink angles are projected!
338 
339  for (u_int i = 0; i < n; i++) {
340  zInSZplane(i) = radii.block(0, i, 2, 1).norm() - fast_fit(2);
341  }
342 
343  riemannFit::Matrix2d vMat; // covariance matrix
344  riemannFit::VectorNd<n> weightsVec; // weights
345  riemannFit::Matrix2d rotMat; // rotation matrix point by point
346  for (u_int i = 0; i < n; i++) {
347  vMat(0, 0) = hits_ge.col(i)[0]; // x errors
348  vMat(0, 1) = vMat(1, 0) = hits_ge.col(i)[1]; // cov_xy
349  vMat(1, 1) = hits_ge.col(i)[2]; // y errors
350  rotMat = rotationMatrix(acc, -radii(0, i) / radii(1, i));
351  weightsVec(i) =
352  1. / ((rotMat * vMat * rotMat.transpose())(1, 1)); // compute the orthogonal weight point by point
353  }
354 
356  r_uVec(n) = 0;
357  for (u_int i = 0; i < n; i++) {
358  r_uVec(i) = weightsVec(i) * zInSZplane(i);
359  }
360 
362  c_uMat.block(0, 0, n, n) = matrixC_u(acc, weightsVec, sTransverse, varBeta);
363  c_uMat(n, n) = 0;
364  //add the border to the c_uMat matrix
365  for (u_int i = 0; i < n; i++) {
366  c_uMat(i, n) = 0;
367  if (i > 0 && i < n - 1) {
368  c_uMat(i, n) +=
369  -(sTransverse(i + 1) - sTransverse(i - 1)) * (sTransverse(i + 1) - sTransverse(i - 1)) /
370  (2. * varBeta(i) * (sTransverse(i + 1) - sTransverse(i)) * (sTransverse(i) - sTransverse(i - 1)));
371  }
372  if (i > 1) {
373  c_uMat(i, n) +=
374  (sTransverse(i) - sTransverse(i - 2)) / (2. * varBeta(i - 1) * (sTransverse(i) - sTransverse(i - 1)));
375  }
376  if (i < n - 2) {
377  c_uMat(i, n) +=
378  (sTransverse(i + 2) - sTransverse(i)) / (2. * varBeta(i + 1) * (sTransverse(i + 1) - sTransverse(i)));
379  }
380  c_uMat(n, i) = c_uMat(i, n);
381  if (i > 0 && i < n - 1)
382  c_uMat(n, n) += riemannFit::sqr(sTransverse(i + 1) - sTransverse(i - 1)) / (4. * varBeta(i));
383  }
384 
385 #ifdef CPP_DUMP
386  std::cout << "CU5\n" << c_uMat << std::endl;
387 #endif
389  math::cholesky::invert(c_uMat, iMat);
390 #ifdef CPP_DUMP
391  std::cout << "I5\n" << iMat << std::endl;
392 #endif
393  riemannFit::VectorNplusONEd<n> uVec = iMat * r_uVec; // obtain the fitted parameters by solving the linear system
394 
395  // compute (phi, d_ca, k) in the system in which the midpoint of the first two corrected hits is the origin...
396 
397  radii.block(0, 0, 2, 1) /= radii.block(0, 0, 2, 1).norm();
398  radii.block(0, 1, 2, 1) /= radii.block(0, 1, 2, 1).norm();
399 
400  riemannFit::Vector2d dVec = hits.block(0, 0, 2, 1) + (-zInSZplane(0) + uVec(0)) * radii.block(0, 0, 2, 1);
401  riemannFit::Vector2d eVec = hits.block(0, 1, 2, 1) + (-zInSZplane(1) + uVec(1)) * radii.block(0, 1, 2, 1);
402  auto eMinusd = eVec - dVec;
403  auto eMinusd2 = eMinusd.squaredNorm();
404  auto tmp1 = 1. / eMinusd2;
405  auto tmp2 = alpaka::math::sqrt(acc, riemannFit::sqr(fast_fit(2)) - 0.25 * eMinusd2);
406 
407  circle_results.par << atan2(eMinusd(1), eMinusd(0)), circle_results.qCharge * (tmp2 - fast_fit(2)),
408  circle_results.qCharge * (1. / fast_fit(2) + uVec(n));
409 
410  tmp2 = 1. / tmp2;
411 
412  riemannFit::Matrix3d jacobian;
413  jacobian << (radii(1, 0) * eMinusd(0) - eMinusd(1) * radii(0, 0)) * tmp1,
414  (radii(1, 1) * eMinusd(0) - eMinusd(1) * radii(0, 1)) * tmp1, 0,
415  circle_results.qCharge * (eMinusd(0) * radii(0, 0) + eMinusd(1) * radii(1, 0)) * tmp2,
416  circle_results.qCharge * (eMinusd(0) * radii(0, 1) + eMinusd(1) * radii(1, 1)) * tmp2, 0, 0, 0,
417  circle_results.qCharge;
418 
419  circle_results.cov << iMat(0, 0), iMat(0, 1), iMat(0, n), iMat(1, 0), iMat(1, 1), iMat(1, n), iMat(n, 0),
420  iMat(n, 1), iMat(n, n);
421 
422  circle_results.cov = jacobian * circle_results.cov * jacobian.transpose();
423 
424  //...Translate in the system in which the first corrected hit is the origin, adding the m.s. correction...
425 
426  translateKarimaki(acc, circle_results, 0.5 * eMinusd(0), 0.5 * eMinusd(1), jacobian);
427  circle_results.cov(0, 0) +=
428  (1 + riemannFit::sqr(slope)) * multScatt(acc, sTotal(1) - sTotal(0), bField, fast_fit(2), 2, slope);
429 
430  //...And translate back to the original system
431 
432  translateKarimaki(acc, circle_results, dVec(0), dVec(1), jacobian);
433 
434  // compute chi2
435  circle_results.chi2 = 0;
436  for (u_int i = 0; i < n; i++) {
437  circle_results.chi2 += weightsVec(i) * riemannFit::sqr(zInSZplane(i) - uVec(i));
438  if (i > 0 && i < n - 1)
439  circle_results.chi2 +=
440  riemannFit::sqr(uVec(i - 1) / (sTransverse(i) - sTransverse(i - 1)) -
441  uVec(i) * (sTransverse(i + 1) - sTransverse(i - 1)) /
442  ((sTransverse(i + 1) - sTransverse(i)) * (sTransverse(i) - sTransverse(i - 1))) +
443  uVec(i + 1) / (sTransverse(i + 1) - sTransverse(i)) +
444  (sTransverse(i + 1) - sTransverse(i - 1)) * uVec(n) / 2) /
445  varBeta(i);
446  }
447  }
ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN & hits
Definition: BrokenLine.h:158
Eigen::Matrix3d Matrix3d
Definition: FitResult.h:15
static const double slope[3]
Eigen::Matrix< double, N+1, 1 > VectorNplusONEd
Definition: FitUtils.h:39
__host__ __device__ void translateKarimaki(karimaki_circle_fit &circle, double x0, double y0, riemannFit::Matrix3d &jacobian)
Changes the Karimäki parameters (and consequently their covariance matrix) under a translation of the...
Definition: BrokenLine.h:98
__host__ __device__ double multScatt(const double &length, const double bField, const double radius, int layer, double slope)
Computes the Coulomb multiple scattering variance of the planar angle.
Definition: BrokenLine.h:54
Eigen::Matrix< double, N, 1 > VectorNd
Definition: FitUtils.h:37
ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN const V4 const double bField
Definition: BrokenLine.h:158
T sqrt(T t)
Definition: SSEVec.h:23
Eigen::Matrix2d Matrix2d
Definition: FitResult.h:14
constexpr T sqr(const T a)
raise to square.
Definition: FitUtils.h:67
ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN const V4 & fast_fit
Definition: BrokenLine.h:158
__host__ __device__ riemannFit::Matrix2d rotationMatrix(double slope)
Computes the 2D rotation matrix that transforms the line y=slope*x into the line y=0.
Definition: BrokenLine.h:78
Eigen::Vector2d Vector2d
Definition: FitResult.h:10
__host__ __device__ riemannFit::MatrixNd< n > matrixC_u(const riemannFit::VectorNd< n > &weights, const riemannFit::VectorNd< n > &sTotal, const riemannFit::VectorNd< n > &varBeta)
Computes the n-by-n band matrix obtained minimizing the Broken Line&#39;s cost function w...
Definition: BrokenLine.h:216
Eigen::Matrix< double, N+1, N+1 > MatrixNplusONEd
Definition: FitUtils.h:21
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ constexpr()

if ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr ( ,
 
)

Definition at line 164 of file BrokenLine.h.

References d1, hits, mId, and dqmiodumpmetadata::n.

Referenced by gpuPixelRecHits::__attribute__(), caHitNtupletGeneratorKernels::__attribute__(), Matriplex::__attribute__(), edm::exception_actions::actionName(), CaloDirectionOperations::add2d(), trackerTFP::KalmanFilter::addLayer(), trklet::TrackletProcessorDisplaced::addOutput(), PFTrackTransformer::addPointsAndBrems(), edm::eventsetup::addRecordToDependencies(), SiStripGainsPCLHarvester::algoComputeMPVandGain(), algorithm(), AlignPCLThresholdPlotHelper::AlignPCLThresholds_CompareBase< PayloadType, nIOVs, ntags >::AlignPCLThresholds_CompareBase(), AlignPCLThresholdPlotHelper::AlignPCLThresholds_DisplayBase< PayloadType >::AlignPCLThresholds_DisplayBase(), ecal::multifit::EventDataForScratchGPU::allocate(), cms::cuda::allocate_device(), cms::cuda::allocate_host(), cms::alpakatools::CachingAllocator< TDev, TQueue >::allocateBuffer(), CAHitNtupletGeneratorKernelsCPU< TrackerTraits >::allocateOnGPU(), PFEnergyCalibration::Alpha(), SiStripBaseCondObjDQM::analysis(), L1TStage2EMTF::analyze(), CUDATestOpaqueAdditionModule::analyze(), ROCmTestOpaqueAdditionModule::analyze(), edmtest::AlignPCLThresholdsReader< T, R >::analyze(), ALPAKA_ACCELERATOR_NAMESPACE::AlpakaTestOpaqueAdditionModule::analyze(), CUDATestWrapperAdditionModule::analyze(), ROCmTestWrapperAdditionModule::analyze(), CUDATestDeviceAdditionModule::analyze(), CUDATestKernelAdditionModule::analyze(), ROCmTestDeviceAdditionModule::analyze(), ROCmTestKernelAdditionModule::analyze(), ALPAKA_ACCELERATOR_NAMESPACE::AlpakaTestWrapperAdditionModule::analyze(), ALPAKA_ACCELERATOR_NAMESPACE::AlpakaTestDeviceAdditionModule::analyze(), ALPAKA_ACCELERATOR_NAMESPACE::AlpakaTestKernelAdditionModule::analyze(), SiPixelLorentzAngleDBLoader::analyze(), HGCalTestPartialWaferHits::analyze(), HGCalHitCalibration::analyze(), AlignPCLThresholdsWriter< T >::analyze(), HGCalTB23Analyzer::analyzeSimHits(), apply(), mkfit::applyMaterialEffects(), approx_expf(), approx_logf(), trackerTFP::DataFormats::attachStub(), trackerTFP::DataFormats::attachTrack(), edm::StdArray< T, N >::back(), edm::StdArray< T, N >::begin(), edm::RootOutputFile::beginInputFile(), edm::stream::CallGlobalImpl< T, bool >::beginJob(), edm::EventProcessor::beginJob(), HGCalTrackCollectionProducer::beginLuminosityBlock(), SiStripCertificationInfo::beginRun(), SiStripDaqInfo::beginRun(), SiStripDcsInfo::beginRun(), SiStripGainsPCLHarvester::beginRun(), MaterialBudgetHcalProducer::beginRun(), SiStripOfflineDQM::beginRun(), PFEnergyCalibration::Beta(), nanoaod::FlatTable::bigVectorImpl(), cms::cuda::HistoContainer< T, NBINS, SIZE, S, I, NHISTS >::bin(), cms::alpakatools::HistoContainer< T, NBINS, SIZE, S, I, NHISTS >::bin(), PhysicsTools::BitSet::bits(), cms::alpakatools::blockPrefixScan(), MaterialBudgetMtdHistos::book(), PrimaryVertexResolution::Plots::book(), HLTTauDQML1Plotter::bookHistograms(), DigiTask::bookHistograms(), PFClusterValidation::bookHistograms(), SiPixelCompareTrackSoA< T >::bookHistograms(), SiPixelCompareTracks< T >::bookHistograms(), SiStripMonitorApproximateCluster::bookHistograms(), SiPixelLorentzAnglePCLWorker::bookHistograms(), PackedCandidateTrackValidator::bookHistograms(), tadqm::TrackAnalyzer::bookHistosForEfficiencyFromHitPatter(), SiStripMonitorTrack::bookLayerMEs(), SiStripTkMaps::bookMap(), DiLepPlotHelp::PlotsVsKinematics::bookPlots(), DiLeptonHelp::PlotsVsKinematics::bookPlots(), MTVHistoProducerAlgoForTracker::bookSimTrackHistos(), HcalSiPM::BorelCDF(), FWCaloClusterProxyBuilder::build(), GEMGeometryBuilder::build(), FWTracksterHitsProxyBuilder::build(), magneticfield::MagGeoBuilder::build(), CmsMTDConstruction< FilteredView >::buildBTLModule(), ME0GeometryParsFromDD::buildGeometry(), GEMGeometryParsFromDD::buildGeometry(), ME0GeometryBuilder::buildGeometry(), TotemRPRecHitProducerAlgorithm::buildRecoHits(), CSCSectorReceiverLUT::calcGlobalPhiME(), CSCSectorReceiverLUT::calcLocalPhi(), CSCSectorReceiverMiniLUT::calcLocalPhiMini(), tmtt::TrackerModule::calcModuleType(), Phase2TrackerDigitizerAlgorithm::calcQ(), TrackingParticleNumberOfLayers::calculate(), LikelihoodFitDeDxEstimator::calculate_wrt_epsilon(), ECAL2DPositionCalcWithDepthCorr::calculateAndSetPositionActual(), calo::multifit::calculateChiSq(), ticl::PatternRecognitionbyCLUE3D< TILES >::calculateDistanceToHigher(), HGCalCLUEAlgoT< TILE, STRATEGY >::calculateDistanceToHigher(), PFEGammaAlgo::calculateEleMVA(), DeepTauIdBase< TritonEDProducer<> >::calculateGottfriedJacksonAngleDifference(), PhotonIsolationCalculator::calculateHcalRecHitIso(), ticl::PatternRecognitionbyCLUE3D< TILES >::calculateLocalDensity(), tkDetUtil::calculatePhiWindow(), HGCalTriggerCellCalibration::calibrateInMipT(), HGCalTriggerCellCalibration::calibrateMipTinGeV(), CaloGeometryDBEP< T, U >::CaloGeometryDBEP(), edm::RefToBase< TrajectorySeed >::castTo(), SSDigitizerAlgorithm::cbc3PulsePolarExpansion(), edm::StdArray< T, N >::cbegin(), HGCalDDDConstants::cellHex(), HGCalCellUV::cellUVFromXY1(), HGCalCellUV::cellUVFromXY2(), HGCalCellUV::cellUVFromXY3(), edm::StdArray< T, N >::cend(), trklet::ChannelAssignment::ChannelAssignment(), MCParticlePairFilter::charge(), tmtt::DigitalStub::checkAccuracy(), tmtt::DigitalTrack::checkAccuracy(), CACell::checkAlignmentAndAct(), HGCDoublet::checkCompatibilityAndTag(), CSCMotherboard::checkConfigParameters(), JetMETDQMDCSFilter::checkDCSInfoPerPartition(), edm::checkForModuleDependencyCorrectness(), l1t::L1GTCorrelationalCut::checkObjects(), checkPhiInRange(), ALPAKA_ACCELERATOR_NAMESPACE::pixelDetails::checkROC(), GlobalTrackingRegion::checkRZ(), DetectorStateFilter::checkSubdet(), SiStripAnalyser::checkTrackerFEDs(), riemannFit::circleFit(), ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::circleFit(), Phase2L1GMT::TPSAlgorithm::cleanMuon(), magneticfield::VolumeBasedMagneticFieldESProducerFromDB::closerNominalLabel(), magneticfield::DD4hep_VolumeBasedMagneticFieldESProducerFromDB::closerNominalLabel(), edm::soa::TableExaminer< T >::columnDescImpl(), edm::soa::TableExaminer< T >::columnTypesImpl(), SimplePlan1RechitCombiner::combineAuxInfo(), edm::compare_key(), MTDSectorForwardDoubleLayer::compatible(), GsfMultipleScatteringUpdator::compute(), MultipleScatteringUpdator::compute(), hcal::reconstruction::compute_diff_charge_gain(), ALPAKA_ACCELERATOR_NAMESPACE::hcal::reconstruction::mahi::compute_diff_charge_gain(), hcal::compute_nsamples(), hcal::reconstruction::compute_pulse_shape_value(), ALPAKA_ACCELERATOR_NAMESPACE::hcal::reconstruction::mahi::compute_pulse_shape_value(), SiPixelGainCalibScaler::computeAndStorePalyoads(), EnergyLossUpdator::computeBetheBloch(), EcalUncalibRecHitTimingCCAlgo::computeCC(), MVAJetPuId::computeIdVariables(), EcalEBPhase2TPParamProducer::computeLinearizerParam(), ticl::computeLocalTracksterTime(), SeedMvaEstimator::computeMva(), EnergyUncertaintyPhotonSpecific::computePhotonEnergyUncertainty_highR9(), EnergyUncertaintyPhotonSpecific::computePhotonEnergyUncertainty_lowR9(), riemannFit::computeRadLenUniformMaterial(), ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::computeRadLenUniformMaterial(), EcalUncalibRecHitTimingCCAlgo::computeTimeCC(), configureIt(), tt::Setup::configureTPSelector(), portablecollection::constexpr_for(), DDHGCalGeom::constructLayers(), HGCalEEAlgo::ConstructLayers(), trklet::DRin::consume(), ALPAKA_ACCELERATOR_NAMESPACE::pixelDetails::conversionError(), emtf::phase2::CSCTPConverter::convert(), trackerTFP::Demonstrator::convert(), convert(), tmtt::HTbase::convertCoordRangeToBinRange(), mkfit::convertHits(), HLTPrescaleProvider::convertL1PS(), Phase2L1TGMTFwdMuonTranslator::Convertl1tMuon(), edm::convertToBranchType(), edm::convertToTransition(), edm::soa::MutableRowView< Args >::copyValueFromImpl(), edm::soa::MutableRowView< Args >::copyValuesUsingFiller(), PFEnergyCalibration::CorrBarrel(), FFTJetCorrector< Jet, Adjustable >::correct(), PFEnergyCalibration::CorrEta(), PFEnergyCalibration::CorrPhi(), trackerTFP::DataFormats::countFormats(), riemannFit::cov_carttorad(), ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::cov_carttorad(), riemannFit::cov_carttorad_prefit(), ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::cov_carttorad_prefit(), riemannFit::cov_radtocart(), ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::cov_radtocart(), DeepTauIdBase< TritonEDProducer<> >::createEgammaBlockInputs(), DeepTauIdBase< TritonEDProducer<> >::createHadronsBlockInputs(), DeepTauIdBase< TritonEDProducer<> >::createMuonBlockInputs(), DeepTauIdBase< TritonEDProducer<> >::createTauBlockInputs(), CSCALCTHeader::CSCALCTHeader(), CUDAService::CUDAService(), ThirdHitPredictionFromCircle::curvature(), edm::StdArray< T, N >::data(), PFResolutionMap::dCrackPhi(), PFEnergyCalibration::dCrackPhi(), AntiElectronIDMVA6< TauType, ElectronType >::dCrackPhi(), DDRotation::DDRotation(), nanoaod::FlatTable::defaultColumnType(), emtf::deg_to_rad(), emtf::phase2::tp::degToRad(), MiniFloatConverter::denorm_min(), cond::serialization::SerializationHelper< T, INIT >::deserialize(), cond::serialization::SerializationHelper< T, INIT >::deserialize_impl(), ALPAKA_ACCELERATOR_NAMESPACE::ProducerBase< BaseT, Args >::deviceProduces(), L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::diphi(), beamSpotPI::DisplayParameters< PayloadType >::DisplayParameters(), beamSpotPI::DisplayParametersDiff< PayloadType, nIOVs, ntags >::DisplayParametersDiff(), HGCalLayerTilesT< T, WRAPPER >::distance2(), cms::alpakatools::detail::UniformElementsND< TAcc, typename >::const_iterator::do_elements_loops(), edm::detail::do_post_insert_if_available(), cms::alpakatools::detail::UniformElementsND< TAcc, typename >::const_iterator::do_strided_loops(), edm::stream::EDAnalyzerAdaptor< T >::doAccessInputProcessBlock(), edm::stream::ProducingModuleAdaptor< T, M, B >::doAccessInputProcessBlock(), edm::stream::EDAnalyzerAdaptor< T >::doBeginLuminosityBlock(), edm::stream::ProducingModuleAdaptor< T, M, B >::doBeginLuminosityBlock(), edm::stream::EDAnalyzerAdaptor< T >::doBeginProcessBlock(), edm::stream::ProducingModuleAdaptor< T, M, B >::doBeginProcessBlock(), edm::stream::EDAnalyzerAdaptor< T >::doBeginRun(), edm::stream::ProducingModuleAdaptor< T, M, B >::doBeginRun(), edm::stream::EDAnalyzerAdaptor< T >::doEndLuminosityBlock(), edm::stream::ProducingModuleAdaptor< T, M, B >::doEndLuminosityBlock(), edm::stream::EDAnalyzerAdaptor< T >::doEndProcessBlock(), edm::stream::ProducingModuleAdaptor< T, M, B >::doEndProcessBlock(), edm::stream::EDAnalyzerAdaptor< T >::doEndRun(), edm::stream::ProducingModuleAdaptor< T, M, B >::doEndRun(), tmtt::KFbase::doKF(), dot(), HitPairGeneratorFromLayerPair::doublets(), edm::Worker::doWorkAsync(), SiStripGainsPCLWorker::dqmBeginRun(), ALPAKA_ACCELERATOR_NAMESPACE::dR2(), SiStripTkMaps::drawMap(), SiStripTkMaps::dressMap(), edm::soa::Table< edm::soa::col::Pt, edm::soa::col::Eta, edm::soa::col::Phi, edm::soa::col::Vz >::dtr(), emtf::dump_fw_raw_input(), Phase2L1GMT::TopoAlgo::DumpInputs(), ticl::PatternRecognitionbyCLUE3D< TILES >::dumpTiles(), reco::EcalClustersGraph::dynamicWindow(), PFEnergyCalibration::Ecorr(), PFEnergyCalibration::EcorrPS(), PFEnergyCalibration::EcorrPS_ePSNil(), PFEnergyCalibration::EcorrZoneAfterPS(), PFEnergyCalibration::EcorrZoneBeforePS(), EDMtoMEConverter::EDMtoMEConverter(), EGExtraInfoModifierFromValueMaps< MapType, OutputType >::EGExtraInfoModifierFromValueMaps(), ALPAKA_ACCELERATOR_NAMESPACE::device::Event::emplace(), tmtt::HTcell::end(), edm::StdArray< T, N >::end(), trackerTFP::KalmanFilterFormats::endJob(), DMRChecker::endJob(), TracksterLinksProducer::energyRegressionAndID(), TrackstersMergeProducer::energyRegressionAndID(), pixelCPEforDevice::errorFromSize(), pixelCPEforGPU::errorFromSize(), TICLLayerTileT< T >::etaBin(), TypedValueMapVariable< ObjType, TIn, StringFunctor, ValType >::eval(), ESRecHitSimAlgo::evalAmplitude(), trklet::MatchEngine::execute(), trklet::TripletEngine::execute(), DDHGCalCell::execute(), DDHGCalPassivePartial::execute(), DDHGCalWaferP::execute(), DDHGCalWaferPartialRotated::execute(), trklet::MatchProcessor::execute(), DDHGCalPassiveFull::execute(), DDHGCalWaferF::execute(), DDHGCalWaferFullRotated::execute(), DDHGCalPassive::execute(), trklet::TrackletProcessorDisplaced::execute(), trklet::FitTrack::execute(), edm::Worker::RunModuleTask< T >::execute(), EMTFSubsystemCollector::extractPrimitives(), trackerTFP::DataFormats::extractStub(), trackerTFP::DataFormats::extractTrack(), brokenline::fastFit(), fastFit(), riemannFit::fastFit(), ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::fastFit(), l1tVertexFinder::VertexFinder::fastHistoEmulation(), fastInvertPDM2(), FuncVariable< ObjType, StringFunctor, ValType >::fill(), AlignPCLThresholdPlotHelper::AlignPCLThresholds_DisplayBase< PayloadType >::fill(), AlignPCLThresholdPlotHelper::AlignPCLThresholds_CompareBase< PayloadType, nIOVs, ntags >::fill(), beamSpotPI::DisplayParameters< PayloadType >::fill(), templateHelper::SiPixelIDs< PayloadType, myType >::fill(), templateHelper::SiPixelFullPixelIDMap< PayloadType, StoreType, TransientType >::fill(), EmbeddingLHEProducer::fill_lhe_from_mumu(), MaterialBudgetHcalHistos::fillBeginJob(), edm::detail::fillCollectionForThinning(), LHEXMLStringProduct::fillCompressedContent(), trackerTFP::DataFormats::fillDataFormats(), LCToCPAssociatorByEnergyScoreProducer< HIT >::fillDescriptions(), LCToSCAssociatorByEnergyScoreProducer< HIT >::fillDescriptions(), ALPAKA_ACCELERATOR_NAMESPACE::PFRecHitTopologyESProducer< CAL >::fillDescriptions(), AlignPCLThresholdsWriter< T >::fillDescriptions(), MuRecObjBaseProducer< DETECTOR_T, RECO_T, GEOM_T >::fillDescriptions(), edm::soa::Table< Args >::CtrFillerFromAOS::fillElement(), edm::soa::Table< Args >::CtrFillerFromAOS::fillElementUsingFiller(), MaterialBudgetMtdHistos::fillEndTrack(), trackerTFP::KalmanFilterFormats::fillFormats(), trackerTFP::DataFormats::fillFormats(), DeepTauIdBase< TritonEDProducer<> >::fillGrids(), edm::fillDetails::fillIfExists(), tmtt::TP::fillNearestJetInfo(), Phase2StripCPE::fillParam(), PixelCPEFastParamsHost< TrackerTraits >::fillParamsForDevice(), PixelCPEFast< TrackerTraits >::fillParamsForGpu(), MillePedeMonitor::fillResidualHitHists(), MuRecObjBaseProducer< DETECTOR_T, RECO_T, GEOM_T >::fillTable(), SiStripCondVisualizer::fillTheHistoMap(), tmtt::TP::fillUse(), tmtt::TP::fillUseForEff(), HLTHcalLaserFilter::filter(), tmtt::DupFitTrkKiller::filterAlg1(), l1t::Stage2Layer2ClusterAlgorithmFirmwareImp1::filtering(), MPQualityEnhancerFilter::filterUnique(), mkfit::MkBuilder::find_tracks_in_layers(), mkfit::MkBuilder::find_tracks_unroll_candidates(), NearbyPixelClustersProducer::findAllNearbyClusters(), mkfit::MkFinder::findCandidates(), mkfit::MkFinder::findCandidatesCloneEngine(), edm::eventsetup::findDependentRecordsFor(), edm::eventsetup::produce::find_index< T, FindT >::findIndexOf(), PFElecTkProducer::findPfRef(), cms::DDFilteredView::findSpecPar(), edm::waiting_task::chain::first(), tmtt::SimpleLR4::fit(), CSCFindPeakTime::fivePoleFitTime(), calo::multifit::fnnls(), gpuClustering::for(), FakeBeamMonitor::formatFitTime(), BeamMonitor::formatFitTime(), cms::cuda::free_device(), cms::cuda::free_host(), edm::friendlyname::friendlyName(), edm::StdArray< T, N >::front(), FitterFuncs::PulseShapeFunctor::funcShape(), PFEnergyCalibration::Gamma(), EcalHitMaker::gapsLifting(), gen::BaseHadronizer::generateLHE(), ALPAKA_ACCELERATOR_NAMESPACE::device::Event::get(), ALPAKA_ACCELERATOR_NAMESPACE::device::Record< TRecord >::get(), gen::HydjetHadronizer::get_particles(), CaloGeometryDBEP< T, U >::getAlignGlobal(), alpaka::trait::BlockSharedMemDynSizeBytes< cms::alpakatools::multiBlockPrefixScan< T >, TAcc >::getBlockSharedMemDynSizeBytes(), EcalBarrelGeometry::getCells(), FWL1THGCalProxyTemplate< l1t::HGCalMulticluster >::getCellsFromTriggerCell(), HcalDDDGeometry::getClosestCell(), EcalBarrelGeometry::getClosestCell(), egamma::getClosestCtfToGsf(), HGCalCLUEAlgoT< TILE, STRATEGY >::getClusters(), ALPAKA_ACCELERATOR_NAMESPACE::device::EventSetup::getData(), EDMtoMEConverter::getData(), RealisticHitToClusterAssociator::getDecayLength(), SiStripTrackerMapCreator::getDetectorFlagAndComment(), HGCalLayerTilesT< T, WRAPPER >::getDim1Bin(), HGCalLayerTilesT< T, WRAPPER >::getDim2Bin(), DisplacedRegionSeedingVertexProducer::getDiscriminatorValue(), EopTreeWriter::getDistInCM(), RPCAMCLinkEvents::getEventName(), sim::Field::GetFieldValue(), ALPAKA_ACCELERATOR_NAMESPACE::device::Record< TRecord >::getHandle(), ALPAKA_ACCELERATOR_NAMESPACE::device::EventSetup::getHandle(), ALPAKA_ACCELERATOR_NAMESPACE::device::Event::getHandle(), edm::EventSetup::getHandle(), DeepTauIdBase< TritonEDProducer<> >::GetIDOutputs(), DeepTauIdBase< TritonEDProducer<> >::getInnerSignalConeRadius(), LowEnergyFastSimParam::GetInPointEnergyFraction(), pos::PixelTimeFormatter::getmSecTime(), edmtest::SourceWithWaits::getNextItemType(), CovarianceMatrix::getObjectType(), L1TUtmTriggerMenuInspectorHelper::L1UtmTriggerMenuInfo::getOtherMap(), EcalRecHit::getPower10(), OmtfPhase2AngleConverter::getProcessorPhi(), LowEnergyFastSimParam::GetRadius(), PFResolutionMap::getRes(), HGCalWaferMask::getRotation(), CTPPSPixelDQMSource::getRPglobalBin(), trklet::TrackletLUT::getSensorModules(), HcalSpecialTimes::getTDCTime(), L1TUtmTriggerMenuInspectorHelper::L1UtmTriggerMenuInfo::getThisMap(), pos::PixelTimeFormatter::getTime(), ConversionProducer::getTrackImpactPosition(), ALPAKA_ACCELERATOR_NAMESPACE::device::Record< TRecord >::getTransientHandle(), edm::EventSetup::getTransientHandle(), HGCalWaferMask::getTypeMode(), trklet::TrackletLUT::getVMRLookup(), LowEnergyFastSimParam::GetZ(), TracksToTrajectories::globalEndJob(), HGCalWaferMask::goodTypeMode(), TIDLayer::groupedCompatibleDetsV(), edm::friendlyname::handleTemplateArguments(), edm::Wrapper< OpticalAlignments >::hasIsProductEqual_(), edm::PrincipalGetAdapter::hasMergeProductFunction(), edm::Wrapper< OpticalAlignments >::hasSwap_(), ALPAKA_ACCELERATOR_NAMESPACE::hcalFastCluster_exotic(), ALPAKA_ACCELERATOR_NAMESPACE::hcalFastCluster_multiSeedIterative(), ALPAKA_ACCELERATOR_NAMESPACE::hcalFastCluster_multiSeedParallel(), ALPAKA_ACCELERATOR_NAMESPACE::hcalFastCluster_singleSeed(), mkfit::helixAtRFromIterativeCCSFullJac(), mkfit::helixAtZ(), riemannFit::helixFit(), HGCalEEFileAlgo::HGCalEEFileAlgo(), HGCalHEFileAlgo::HGCalHEFileAlgo(), HGCalMixLayer::HGCalMixLayer(), HGCalMixRotatedCassette::HGCalMixRotatedCassette(), HGCalMixRotatedFineCassette::HGCalMixRotatedFineCassette(), HGCalMixRotatedLayer::HGCalMixRotatedLayer(), HGCalPassive::HGCalPassive(), HGCalPassiveFull::HGCalPassiveFull(), HGCalPassivePartial::HGCalPassivePartial(), HGCalRecHitWorkerSimple::HGCalRecHitWorkerSimple(), HGCalSiliconModule::HGCalSiliconModule(), HGCalSiliconRotatedCassette::HGCalSiliconRotatedCassette(), HGCalSiliconRotatedModule::HGCalSiliconRotatedModule(), HGCalStage1TruncationImpl::HGCalStage1TruncationImpl(), HGCalStage2ClusterDistribution::HGCalStage2ClusterDistribution(), HGCalVFELinearizationImpl::HGCalVFELinearizationImpl(), HGCalVFESummationImpl::HGCalVFESummationImpl(), CSCMake2DRecHit::hitFromStripAndWire(), SiPixelChargeReweightingAlgorithm::hitSignalReweight(), PixelTripletHLTGenerator::hitTriplets(), PixelTripletLargeTipGenerator::hitTriplets(), l1ct::idx_from_real_val(), L1TauEmu::idx_from_real_val(), L1SCJetEmu::idx_from_real_val(), edm::waiting_task::chain::ifThen(), cms::cuda::HistoContainer< T, NBINS, SIZE, S, I, NHISTS >::ilog2(), cms::alpakatools::HistoContainer< T, NBINS, SIZE, S, I, NHISTS >::ilog2(), cms::cuda::OneToManyAssoc< I, NHISTS *NBINS+1, SIZE >::ilog2(), l1t::stage2::emtf::ImportGEM(), cms::alpakatools::detail::UniformElementsND< TAcc, typename >::const_iterator::increment(), edm::impl::indexInputProcessBlockCache(), edm::ESProductHost< Product, RecordTypes >::indexLoop(), SiTrivialInduceChargeOnStrips::induceVector(), TrackerMap::init(), RBCProcessRPCDigis::initialize(), RBCProcessRPCSimDigis::initialize(), EmbeddingLHEProducer::InitialRecoCorrection(), trklet::TrackletLUT::initProjectionBend(), cms::alpakatools::OneToManyAssocBase< I, ONES, SIZE >::initStorage(), cms::cuda::OneToManyAssoc< I, NHISTS *NBINS+1, SIZE >::initStorage(), reco::MustacheKernel::inMustache(), int2dphi(), int2phi(), HLLHCEvtVtxGenerator::integrandCC(), HLLHCEvtVtxGenerator::intensity(), math::cholesky::invertNN(), TrackCleaner::isCompatible(), DTSegmentExtendedCand::isCompatible(), PSPDigitizerAlgorithm::isInBiasRailRegion(), edm::Wrapper< OpticalAlignments >::isMergeable_(), edm::Wrapper< OpticalAlignments >::isProductEqual_(), PixelClusterShapeExtractor::isSuitable(), ConvertingESProducerWithDependenciesT< CombinedRecord< DepsRecords... >, Target, Dependencies... >::WalkConsumes< N >::iterate(), ConvertingESProducerWithDependenciesT< CombinedRecord< DepsRecords... >, Target, Dependencies... >::WalkAndCall< N, Types >::iterate(), tmtt::KFbase::kalmanAmbiguousLayer(), SiPixelChargeReweightingAlgorithm::lateSignalReweight(), cms::cuda::launch(), cms::cuda::launch_cooperative(), cms::alpakatools::OneToManyAssocRandomAccess< I, NHISTS *NBINS+1, SIZE >::launchFinalize(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::launchKernels(), cms::alpakatools::OneToManyAssocBase< I, ONES, SIZE >::launchZero(), trackerTFP::LayerEncoding::LayerEncoding(), HGCalTypes::layerType(), LCToCPAssociatorByEnergyScoreImpl< HIT >::LCToCPAssociatorByEnergyScoreImpl(), LCToCPAssociatorByEnergyScoreProducer< HIT >::LCToCPAssociatorByEnergyScoreProducer(), LCToSCAssociatorByEnergyScoreImpl< HIT >::LCToSCAssociatorByEnergyScoreImpl(), LCToSCAssociatorByEnergyScoreProducer< HIT >::LCToSCAssociatorByEnergyScoreProducer(), StripCPEfromTrackAngle::legacyStripErrorSquared(), HGCalVFELinearizationImpl::linearize(), riemannFit::lineFit(), ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::lineFit(), PFBlockAlgo::link(), PFEGammaAlgo::linkRefinableObjectGSFTracksToKFs(), PFEGammaAlgo::linkRefinableObjectPrimaryKFsToSecondaryKFs(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::barrel::lm_channel(), riemannFit::loadCovariance(), ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::loadCovariance(), riemannFit::loadCovariance2D(), ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::loadCovariance2D(), mtd_digitizer::loadSimHitAccumulator(), RectangularPixelTopology::localY(), main(), gpuVertexFinder::Producer< TrackerTraits >::make(), angle0to2pi::make0To2pi(), EMTFSubsystemCollector::make_copad_gem(), cms::alpakatools::make_device_buffer(), cms::alpakatools::make_host_buffer(), cms::alpakatools::make_workdiv(), stripgpu::SiStripRawToClusterGPUKernel::makeAsync(), HGCalCLUEAlgoT< TILE, STRATEGY >::makeClusters(), LCToSCAssociatorByEnergyScoreImpl< HIT >::makeConnections(), LCToCPAssociatorByEnergyScoreImpl< HIT >::makeConnections(), ALPAKA_ACCELERATOR_NAMESPACE::pixelgpudetails::PixelRecHitKernel< TrackerTraits >::makeHitsAsync(), rawparticle::makeMuon(), SiStripPI::makeNiceStyle(), cms::alpakatools::EventCache< Event >::makeOrGet(), ALPAKA_ACCELERATOR_NAMESPACE::pixelDetails::SiPixelRawToClusterKernel< pixelTopology::Phase2 >::makePhase1ClustersAsync(), ALPAKA_ACCELERATOR_NAMESPACE::pixelDetails::SiPixelRawToClusterKernel< pixelTopology::Phase2 >::makePhase2ClustersAsync(), SimplePlan1RechitCombiner::makeRechit(), ETLUncalibRecHitAlgo::makeRecHit(), HGCalUncalibRecHitRecWeightsAlgo< HGCDataFrame >::makeRecHit(), cms::makeRotReflect(), l1t::Stage2Layer2TauAlgorithmFirmwareImp1::makeSecClusters(), SeedFromConsecutiveHitsCreator::makeSeed(), ticl::PatternRecognitionbyCA< TILES >::makeTracksters(), ticl::PatternRecognitionbyFastJet< TILES >::makeTracksters(), tmtt::ConverterToTTTrack::makeTTTrack(), trklet::MatchProcessor::matchCalculator(), CSCGEMMatcher::matchingClustersLoc(), MiniFloatConverter::max(), MiniFloatConverter::max32RoundedToMax16(), ThirdHitPredictionFromCircle::HelixRZ::maxCurvature(), edm::Wrapper< OpticalAlignments >::mergeProduct_(), edm::service::MessageLogger::MessageLogger(), MiniFloatConverter::min(), MiniFloatConverter::min32RoundedToMin16(), EGRegressionModifierV2::modifyObject(), EGRegressionModifierV1::modifyObject(), APVGain::monHnames(), brokenline::multScatt(), multScatt(), OAQualityTranslator::name(), CaloDirectionOperations::neighbourDirection(), PulseChiSqSNNLS::NNLS(), tmtt::Utility::numLayerCut(), mkfit::DataFile::openRead(), PhotonHcalOverEcalCut< isBC >::operator()(), MTDDiskSectorBuilderFromDet::operator()(), CartesianLorentzForce::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::raw::Kernel_unpack::operator()(), pixelClustering::ClusterChargeCut< TrackerTraits >::operator()(), calibPixel::CalibDigis< debug >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::Kernel_BLFastFit< N, TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::Kernel_FastFit< N, TrackerTraits >::operator()(), EcalBasicClusterLocalContCorrection::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::Kernel_prep_1d_and_initialize::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::pixelRecHits::GetHits< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::Kernel_time_compute_nullhypot::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets::CAFishbone< TrackerTraits >::operator()(), MTDTrackQualityMVA::operator()(), MiniFloatConverter::ReduceMantissaToNbitsRounding::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::Kernel_minimize::operator()(), std::hash< DTCELinkId >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::Kernel_time_compute_makeratio::operator()(), cms::alpakatools::multiBlockPrefixScan< T >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::FindClus< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::caHitNtupletGeneratorKernels::Kernel_fishboneCleaner< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::Kernel_BLFit< N, TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::caHitNtupletGeneratorKernels::Kernel_earlyDuplicateRemover< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::caHitNtupletGeneratorKernels::Kernel_fastDuplicateRemover< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::pixelDetails::RawToDigi_kernel< debug >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::Kernel_prep_2d::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::caHitNtupletGeneratorKernels::Kernel_find_ntuplets< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::pixelDetails::FillHitsModuleStart< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::Kernel_time_compute_findamplchi2_and_finish::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::caHitNtupletGeneratorKernels::Kernel_countSharedHit< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::caHitNtupletGeneratorKernels::Kernel_markSharedHit< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::Kernel_time_compute_fixMGPAslew::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::Kernel_time_computation_init::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::caHitNtupletGeneratorKernels::Kernel_print_found_ntuplets< TrackerTraits >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::Kernel_time_correction_and_finalize::operator()(), riemannFit::helixFit< N >::operator()(), ALPAKA_ACCELERATOR_NAMESPACE::FastCluster::operator()(), cms::alpakatools::detail::UniformElementsAlong< TAcc, Dim, typename >::const_iterator::operator++(), cms::alpakatools::detail::UniformGroupElementsAlong< TAcc, Dim, typename >::const_iterator::operator++(), cms::alpakatools::detail::IndependentGroupElementsAlong< TAcc, Dim, typename >::const_iterator::operator++(), operator<<(), edm::operator<<(), VersionedSelector< T >::operator==(), CaloDirectionOperations::oppositeDirection(), OptimalHelixPlaneCrossing::OptimalHelixPlaneCrossing(), barrelUtil::overlap(), CastorCtdcPacker::pack(), CastorPacker::pack(), pixelgpudetails::pack(), pixelDetails::pack(), PFBlockAlgo::packLinks(), hltdqm::passTrig(), HelixArbitraryPlaneCrossing::pathLength(), ALPAKA_ACCELERATOR_NAMESPACE::PFClusterParamsESProducer::PFClusterParamsESProducer(), ALPAKA_ACCELERATOR_NAMESPACE::PFRecHitTopologyESProducer< CAL >::PFRecHitTopologyESProducer(), VectorHit::phase2clusterGlobalPosErr(), phi2int(), phi2short(), PhiInterval::PhiInterval(), RectangularMTDTopology::pixelIndex(), fireworks::pixelLocalY(), pixelgpudetails::pixelToChannel(), pixelDetails::pixelToChannel(), reweight::PoissonMeanShifter::PoissonMeanShifter(), HGCalCLUEAlgoT< TILE, STRATEGY >::populate(), pixelCPEforDevice::position(), pixelCPEforGPU::position(), BTLRecHitsErrorEstimatorIM::positionError(), edm::eventsetup::Callback< T, TProduceFunc, TReturn, TRecord, TDecorator >::prefetchAsync(), edm::eventsetup::CallbackExternalWork< T, TAcquireFunc, TAcquireReturn, TProduceFunc, TProduceReturn, TRecord, TDecorator >::prefetchAsync(), edm::Worker::prefetchAsync(), brokenline::prepareBrokenLineData(), edm::soa::Table< Args >::CtrFillerFromAOS::presize(), edm::fillDetails::prevalidateIfExists(), Phase2TrackerDigitizerAlgorithm::primary_ionization(), PhiMemoryImage::print(), PFRecoTauChargedHadronProducer::print(), SiStripTrackerMapCreator::printBadModuleList(), HcalUnpacker::printInvalidDataMessage(), bitset_utilities::printWords(), DeDxHitCalibrator::processHitInfo(), EcalLaserCondTools::processIov(), edm::GlobalSchedule::processOneGlobalAsync(), trklet::MatchEngineUnit::processPipeline(), L1THLTTauMatching::produce(), L1HLTTauMatching::produce(), ALPAKA_ACCELERATOR_NAMESPACE::BeamSpotDeviceProducer::produce(), L1HLTJetsMatching::produce(), TICLCandidateFromTrackstersProducer::produce(), ZllArbitrator::produce(), trklet::KFin::produce(), CastorDigiToRaw::produce(), LCToCPAssociatorByEnergyScoreProducer< HIT >::produce(), LCToSCAssociatorByEnergyScoreProducer< HIT >::produce(), ElectronIdMVABased::produce(), SiPixelDigisClustersFromSoAT< TrackerTraits >::produce(), SiPixelDigisClustersFromSoAAlpaka< TrackerTraits >::produce(), DisplacedRegionSeedingVertexProducer::produce(), VersionedIdProducer< PhysicsObjectPtr, SelectorType >::produce(), TrackListMerger::produce(), SiPixelRecHitFromSoAAlpaka< TrackerTraits >::produce(), ALPAKA_ACCELERATOR_NAMESPACE::HGCalSoARecHitsProducer::produce(), SiPixelRecHitFromCUDAT< TrackerTraits >::produce(), pat::LeptonUpdater< T >::produce(), SiPixelRecHitSoAFromLegacyT< TrackerTraits >::produce(), BSCTrigger::produce(), SimPFProducer::produce(), ALPAKA_ACCELERATOR_NAMESPACE::PFRecHitTopologyESProducer< CAL >::produce(), TracksToTrajectories::produce(), TkMSParameterizationBuilder::produce(), ConvBremSeedProducer::produce(), UnifiedParticleTransformerAK4TagInfoProducer::produce(), GoodSeedProducer::produce(), TTStubBuilder< T >::produce(), pat::PATMuonProducer::produce(), L1FPGATrackProducer::produce(), L1EGCrystalClusterEmulatorProducer::produce(), CaloGeometryDBEP< T, U >::produceAligned(), AnalyticalPropagator::propagateParametersOnCylinder(), proxim(), tmtt::KFTrackletTrack::pt(), tmtt::L1track3D::pt(), tmtt::L1fittedTrack::pt(), tmtt::L1fittedTrack::pt_bcon(), pat::PATMuonProducer::puppiCombinedIsolation(), DAClusterizerInZ_vect::purge(), DAClusterizerInZT_vect::purge(), PreMixingSiStripWorker::put(), ALPAKA_ACCELERATOR_NAMESPACE::device::Event::put(), tmtt::TP::qOverPt(), emtf::rad_to_deg(), cms::alpakatools::radixSortImpl(), emtf::phase2::tp::radToDeg(), HitRCheck::range(), L1TCorrelatorLayer1Producer::rawHgcalClusterEncode(), edm::storage::LocalFileSystem::readFSTypes(), EcalLaserCondTools::FileReader::readPs(), SiStripDaqInfo::readSubdetFedFractions(), l1ct::real_val_from_idx(), L1TauEmu::real_val_from_idx(), L1SCJetEmu::real_val_from_idx(), RectangularEtaPhiRegion::RectangularEtaPhiRegion(), MiniFloatConverter::reduceMantissaToNbits(), reco::reduceRange(), edm::stream::impl::InputProcessBlockCacheHolder< CacheTypes >::registerProcessBlockCacheFiller(), edm::impl::InputProcessBlockCacheImpl< CacheTypes... >::registerProcessBlockCacheFiller(), edm::path_configuration::removeSchedulingTokensFromModuleLabel(), TritonClient::reportServerSideStats(), edm::soa::Table< edm::soa::col::Pt, edm::soa::col::Eta, edm::soa::col::Phi, edm::soa::col::Vz >::resetStartingAt(), edm::soa::Table< edm::soa::col::Pt, edm::soa::col::Eta, edm::soa::col::Phi, edm::soa::col::Vz >::resizeFromTo(), ModuleTypeResolverAlpaka::resolveType(), ROCmService::ROCmService(), riemannFit::rolling_fits(), Matriplex::round_up_align64(), cms::rotation_utils::roundBinary(), HGCalStage1TruncationImplSA::rozBin(), HGCalVFEProcessorSums::run(), EcalUncalibRecHitWorkerMultiFit::run(), HGCHEbackDigitizer::runCaliceLikeDigitizer(), ALPAKA_ACCELERATOR_NAMESPACE::hcal::reconstruction::runMahiAsync(), edm::Worker::runModule(), ecaldqm::GpuTask::runOnCpuDigis(), ecaldqm::GpuTask::runOnGpuDigis(), HGCHEbackDigitizer::runRealisticDigitizer(), HGCFEElectronics< DFr >::runShaperWithToT(), mtd_digitizer::saveSimHitAccumulator(), HGCalSciNoiseMap::scaleByDose(), HGCalSciNoiseMap::scaleByTileArea(), riemannFit::scatter_cov_rad(), ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::scatter_cov_rad(), riemannFit::scatterCovLine(), ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::scatterCovLine(), HGCalLayerTilesT< T, WRAPPER >::searchBox(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::sector(), mkfit::MkBuilder::seed_post_cleaning(), tmtt::KFParamsComb::seedC(), tmtt::TrkRZfilter::seedFilter(), GE0TriggerPseudoBuilder::segmentConversion(), TrajectorySegmentBuilder::segments(), mkfit::MkFinder::selectHitIndicesV2(), CSCTMBHeader::selfTest(), edm::Schedule::sendFwkSummaryToMessageLogger(), cond::serialization::SerializationHelper< T, INIT >::serialize(), cond::serialization::SerializationHelper< T, INIT >::serialize_impl(), edm::streamer::StreamerOutputMsgBuilders::serializeEvent(), edm::streamer::StreamerOutputMsgBuilders::serializeEventCommon(), edm::streamer::StreamerOutputMsgBuilders::serializeEventMetaData(), cond::payloadInspector::serializeValue(), HcalDbProducer::ServiceTokenImpl< ProductType, RecordType, LABEL, EffectiveType >::ServiceTokenImpl(), edm::eventsetup::CallbackBase< T, TProduceFunc, TProduceReturn, TRecord, TDecorator >::setData(), HGCScintSD::setDetUnitId(), HGCalSD::setDetUnitId(), SiStripHitEfficiencyHarvester::setEffBinLabels(), edm::LuminosityBlockProcessingStatus::setEndTime(), edm::RunProcessingStatus::setEndTime(), EcalRecHit::setEnergyError(), PixelHitMatcher::setES(), PFBlockAlgo::setLinkers(), ticl::TracksterP4FromTrackAndPCA::setP4(), Plane::setPosPrec(), FRDStreamSource::setRunAndEventInfo(), tmtt::Settings::Settings(), hph::Setup::Setup(), edm::service::moduleAlloc::setupFile(), CovarianceMatrix::setupMatrix(), short2phi(), CaloDirectionOperations::Side(), L1DummyProducer::SimpleDigi(), templateHelper::SiPixelFullPixelIDMap< PayloadType, StoreType, TransientType >::SiPixelFullPixelIDMap(), gainCalibHelper::SiPixelGainCalibDiffAndRatioBase< myType, nIOVs, ntags, PayloadType >::SiPixelGainCalibDiffAndRatioBase(), gainCalibHelper::SiPixelGainCalibrationByRegionComparisonBase< myType, PayloadType, nIOVs, ntags >::SiPixelGainCalibrationByRegionComparisonBase(), gainCalibHelper::SiPixelGainCalibrationCorrelations< PayloadType >::SiPixelGainCalibrationCorrelations(), gainCalibHelper::SiPixelGainCalibrationValueComparisonBase< myType, PayloadType >::SiPixelGainCalibrationValueComparisonBase(), gainCalibHelper::SiPixelGainCalibrationValues< myType, PayloadType >::SiPixelGainCalibrationValues(), gainCalibHelper::SiPixelGainCalibrationValuesByPart< myType, PayloadType >::SiPixelGainCalibrationValuesByPart(), gainCalibHelper::SiPixelGainCalibrationValuesComparisonPerRegion< isBarrel, myType, nIOVs, ntags, PayloadType >::SiPixelGainCalibrationValuesComparisonPerRegion(), gainCalibHelper::SiPixelGainCalibrationValuesPerRegion< isBarrel, myType, PayloadType >::SiPixelGainCalibrationValuesPerRegion(), templateHelper::SiPixelHeaderTable< PayloadType, StoreType, TransientType >::SiPixelHeaderTable(), templateHelper::SiPixelIDs< PayloadType, myType >::SiPixelIDs(), templateHelper::SiPixelTemplateHeaderInfo< PayloadType, StoreType, TransientType, myType, myParam >::SiPixelTemplateHeaderInfo(), templateHelper::SiPixelTitles_Display< PayloadType, StoreType, TransientType >::SiPixelTitles_Display(), calo::multifit::solve_forward_subst_matrix(), calo::multifit::solve_forward_subst_vector(), DAClusterizerInZ_vect::split(), DAClusterizerInZT_vect::split(), edm::friendlyname::standardRenames(), CMSTDormandPrince45< T_Equation, N >::StepWithError(), tmtt::Sector::subEtaFwCalc(), edm::friendlyname::subFriendlyName(), edm::Wrapper< OpticalAlignments >::swapProduct_(), edm::soa::Table< edm::soa::col::Pt, edm::soa::col::Eta, edm::soa::col::Phi, edm::soa::col::Vz >::Table(), test_standard(), LinkByRecHit::testECALAndPSByRecHit(), TrackAndHOLinker::testLink(), ECALAndBREMLinker::testLink(), HCALAndBREMLinker::testLink(), GSFAndECALLinker::testLink(), GSFAndHGCalLinker::testLink(), GSFAndGSFLinker::testLink(), GSFAndHCALLinker::testLink(), HGCalAndBREMLinker::testLink(), TrackAndGSFLinker::testLink(), TrackAndTrackLinker::testLink(), TrackAndECALLinker::testLink(), edm::waiting_task::chain::then(), EcalUncalibRecHitWorkerMultiFit::timeCorrection(), egamma::towersOf(), tmtt::Histos::trackerGeometryAnalysis(), trackerStablePhiSort(), trklet::TrackletProcessorDisplaced::TrackletProcessorDisplaced(), TritonCpuShmResource< IO >::TritonCpuShmResource(), edm::soa::ColumnFillers< Args >::tryValue(), trackerTFP::TrackKF::ttTrack(), trackerTFP::TrackDR::ttTrack(), l1t::stage2::emtf::SPBlockUnpacker::unpack(), sistrip::fedchannelunpacker::detail::unpackRawB(), sistrip::fedchannelunpacker::detail::unpackRawW(), sistrip::fedchannelunpacker::detail::unpackZSB(), sistrip::fedchannelunpacker::detail::unpackZSW(), unsafe_acos07(), unsafe_acos71(), unsafe_asin71(), unsafe_atan2f_impl(), unsafe_atan2i_impl(), unsafe_atan2s_impl(), unsafe_expf_impl(), unsafe_logf_impl(), NoiseHistosUsingDb::update(), PedsOnlyHistosUsingDb::update(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit::update_covariance(), ALPAKA_ACCELERATOR_NAMESPACE::updateClusterPos(), mkfit::MkFinder::updateWithLoadedHit(), egammaTools::validateEgammaCandidate(), PhotonHcalOverEcalCut< isBC >::value(), VersionedIdProducer< PhysicsObjectPtr, SelectorType >::VersionedIdProducer(), NanoAODDQM::Plot1D::vfill(), HGCalDDDConstants::waferFromPosition(), edm::impl::WaitingThread::WaitingThread(), tmtt::DegradeBend::work(), SubjetFilterJetProducer::writeCompoundJets(), cms::CompoundJetProducer::writeCompoundJets(), VirtualJetProducer::writeCompoundJets(), LHEXMLStringProduct::writeCompressedContent(), edm::RootOutputFile::writeEventAuxiliary(), VirtualJetProducer::writeJets(), FFTJetProducer::writeJets(), edm::ParameterDescriptionBase::writeLabelValueCfi(), AlignPCLThresholdsWriter< T >::writePayload(), and CUDAService::~CUDAService().

164  {
165  riemannFit::Vector2d middle = 0.5 * (hits.block(0, n - 1, 2, 1) + hits.block(0, 0, 2, 1));
166  auto d1 = (hits.block(0, n / 2, 2, 1) - middle).squaredNorm();
167  auto d2 = (hits.block(0, n / 2 - 1, 2, 1) - middle).squaredNorm();
168  mId = d1 < d2 ? n / 2 : n / 2 - 1;
169  }
ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN & hits
Definition: BrokenLine.h:158
Eigen::Vector2d Vector2d
Definition: FitResult.h:10
static constexpr float d1

◆ fastFit()

template<typename TAcc , typename M3xN , typename V4 >
ALPAKA_FN_ACC ALPAKA_FN_INLINE void ALPAKA_ACCELERATOR_NAMESPACE::brokenline::fastFit ( const TAcc &  acc,
const M3xN &  hits,
V4 &  result 
)

A very fast helix fit.

Parameters
hitsthe measured hits.
Returns
(X0,Y0,R,tan(theta)).
Warning
sign of theta is (intentionally, for now) mistaken for negative charges.

Definition at line 266 of file BrokenLine.h.

References a, funct::abs(), b, DummyCfis::c, constexpr(), ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::cross2D(), ztail::d, d1, MillePedeFileConverter_cfg::e, hits, mId, dqmiodumpmetadata::n, mps_fire::result, mathSSE::sqrt(), and createJobs::tmp.

Referenced by ALPAKA_ACCELERATOR_NAMESPACE::Kernel_BLFastFit< N, TrackerTraits >::operator()(), and ALPAKA_ACCELERATOR_NAMESPACE::brokenline::helixFit< n >::operator()().

266  {
267  constexpr uint32_t n = M3xN::ColsAtCompileTime;
268 
269  int mId = 1;
270 
271  if constexpr (n > 3) {
272  riemannFit::Vector2d middle = 0.5 * (hits.block(0, n - 1, 2, 1) + hits.block(0, 0, 2, 1));
273  auto d1 = (hits.block(0, n / 2, 2, 1) - middle).squaredNorm();
274  auto d2 = (hits.block(0, n / 2 - 1, 2, 1) - middle).squaredNorm();
275  mId = d1 < d2 ? n / 2 : n / 2 - 1;
276  }
277 
278  const riemannFit::Vector2d a = hits.block(0, mId, 2, 1) - hits.block(0, 0, 2, 1);
279  const riemannFit::Vector2d b = hits.block(0, n - 1, 2, 1) - hits.block(0, mId, 2, 1);
280  const riemannFit::Vector2d c = hits.block(0, 0, 2, 1) - hits.block(0, n - 1, 2, 1);
281 
282  auto tmp = 0.5 / riemannFit::cross2D(acc, c, a);
283  result(0) = hits(0, 0) - (a(1) * c.squaredNorm() + c(1) * a.squaredNorm()) * tmp;
284  result(1) = hits(1, 0) + (a(0) * c.squaredNorm() + c(0) * a.squaredNorm()) * tmp;
285  // check Wikipedia for these formulas
286 
287  result(2) = alpaka::math::sqrt(acc, a.squaredNorm() * b.squaredNorm() * c.squaredNorm()) /
288  (2. * alpaka::math::abs(acc, riemannFit::cross2D(acc, b, a)));
289  // Using Math Olympiad's formula R=abc/(4A)
290 
291  const riemannFit::Vector2d d = hits.block(0, 0, 2, 1) - result.head(2);
292  const riemannFit::Vector2d e = hits.block(0, n - 1, 2, 1) - result.head(2);
293 
294  result(3) = result(2) * atan2(riemannFit::cross2D(acc, d, e), d.dot(e)) / (hits(2, n - 1) - hits(2, 0));
295  // ds/dz slope between last and first point
296  }
ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN & hits
Definition: BrokenLine.h:158
__host__ __device__ double cross2D(const Vector2d &a, const Vector2d &b)
Compute cross product of two 2D vector (assuming z component 0), returning z component of the result...
Definition: FitUtils.h:79
T sqrt(T t)
Definition: SSEVec.h:23
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
d
Definition: ztail.py:151
Eigen::Vector2d Vector2d
Definition: FitResult.h:10
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
static constexpr float d1
tmp
align.sh
Definition: createJobs.py:716

◆ for()

ALPAKA_ACCELERATOR_NAMESPACE::brokenline::for ( )

Definition at line 182 of file BrokenLine.h.

References ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::cross2D(), dVec, eVec, fast_fit, mps_fire::i, and results.

182  {
183  dVec = results.radii.block(0, i, 2, 1);
184  results.sTransverse(i) =
185  results.qCharge * fast_fit(2) *
186  alpaka::math::atan2(acc, riemannFit::cross2D(acc, dVec, eVec), dVec.dot(eVec)); // calculates the arc length
187  }
__host__ __device__ double cross2D(const Vector2d &a, const Vector2d &b)
Compute cross product of two 2D vector (assuming z component 0), returning z component of the result...
Definition: FitUtils.h:79
ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN const V4 const double PreparedBrokenLineData< n > & results
Definition: BrokenLine.h:158
ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN const V4 & fast_fit
Definition: BrokenLine.h:158

◆ lineFit()

template<typename TAcc , typename V4 , typename M6xN , int n>
ALPAKA_FN_ACC ALPAKA_FN_INLINE void ALPAKA_ACCELERATOR_NAMESPACE::brokenline::lineFit ( const TAcc &  acc,
const M6xN &  hits_ge,
const V4 &  fast_fit,
const double  bField,
const PreparedBrokenLineData< n > &  data,
riemannFit::LineFit line_results 
)

Performs the Broken Line fit in the straight track case (that is, the fit parameters are only the interceptions u).

Parameters
hitshits coordinates.
fast_fitpre-fit result in the form (X0,Y0,R,tan(theta)).
bFieldmagnetic field in Gev/cm/c.
dataPreparedBrokenLineData.
line_resultsstruct to be filled with the results in this form: -par parameter of the line in this form: (cot(theta), Zip);
-cov covariance matrix of the fitted parameter;
-chi2 value of the cost function in the minimum.

The function implements the steps 2 and 3 of the Broken Line fit without the curvature correction.
The step 2 is the least square fit, done by imposing the minimum constraint on the cost function and solving the consequent linear system. It determines the fitted parameters u and their covariance matrix. The step 3 is the correction of the fast pre-fitted parameters for the innermost part of the track. It is first done in a comfortable coordinate system (the one in which the first hit is the origin) and then the parameters and their covariance matrix are transformed to the original coordinate system.

Definition at line 472 of file BrokenLine.h.

References bField, riemannFit::LineFit::chi2, gather_cfg::cout, riemannFit::LineFit::cov, data, fast_fit, mps_fire::i, l1tstage2_dqm_sourceclient-live_cfg::invert, matrixC_u(), multScatt(), dqmiodumpmetadata::n, riemannFit::LineFit::par, radii, rotationMatrix(), rotMat, slope, ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::sqr(), sTotal, createJobs::tmp, varBeta(), w(), hltDeepSecondaryVertexTagInfosPFPuppi_cfi::weights, and zInSZplane.

Referenced by ALPAKA_ACCELERATOR_NAMESPACE::Kernel_BLFit< N, TrackerTraits >::operator()(), and ALPAKA_ACCELERATOR_NAMESPACE::brokenline::helixFit< n >::operator()().

477  {
478  const auto& radii = data.radii;
479  const auto& sTotal = data.sTotal;
480  const auto& zInSZplane = data.zInSZplane;
481  const auto& varBeta = data.varBeta;
482 
483  const double slope = -data.qCharge / fast_fit(3);
485 
486  riemannFit::Matrix3d vMat = riemannFit::Matrix3d::Zero(); // covariance matrix XYZ
487  riemannFit::Matrix2x3d jacobXYZtosZ =
488  riemannFit::Matrix2x3d::Zero(); // jacobian for computation of the error on s (xyz -> sz)
490  for (u_int i = 0; i < n; i++) {
491  vMat(0, 0) = hits_ge.col(i)[0]; // x errors
492  vMat(0, 1) = vMat(1, 0) = hits_ge.col(i)[1]; // cov_xy
493  vMat(0, 2) = vMat(2, 0) = hits_ge.col(i)[3]; // cov_xz
494  vMat(1, 1) = hits_ge.col(i)[2]; // y errors
495  vMat(2, 1) = vMat(1, 2) = hits_ge.col(i)[4]; // cov_yz
496  vMat(2, 2) = hits_ge.col(i)[5]; // z errors
497  auto tmp = 1. / radii.block(0, i, 2, 1).norm();
498  jacobXYZtosZ(0, 0) = radii(1, i) * tmp;
499  jacobXYZtosZ(0, 1) = -radii(0, i) * tmp;
500  jacobXYZtosZ(1, 2) = 1.;
501  weights(i) = 1. / ((rotMat * jacobXYZtosZ * vMat * jacobXYZtosZ.transpose() * rotMat.transpose())(
502  1, 1)); // compute the orthogonal weight point by point
503  }
504 
506  for (u_int i = 0; i < n; i++) {
507  r_u(i) = weights(i) * zInSZplane(i);
508  }
509 #ifdef CPP_DUMP
510  std::cout << "CU4\n" << matrixC_u(w, sTotal, varBeta) << std::endl;
511 #endif
514 #ifdef CPP_DUMP
515  std::cout << "I4\n" << iMat << std::endl;
516 #endif
517 
518  riemannFit::VectorNd<n> uVec = iMat * r_u; // obtain the fitted parameters by solving the linear system
519 
520  // line parameters in the system in which the first hit is the origin and with axis along SZ
521  line_results.par << (uVec(1) - uVec(0)) / (sTotal(1) - sTotal(0)), uVec(0);
522  auto idiff = 1. / (sTotal(1) - sTotal(0));
523  line_results.cov << (iMat(0, 0) - 2 * iMat(0, 1) + iMat(1, 1)) * riemannFit::sqr(idiff) +
524  multScatt(acc, sTotal(1) - sTotal(0), bField, fast_fit(2), 2, slope),
525  (iMat(0, 1) - iMat(0, 0)) * idiff, (iMat(0, 1) - iMat(0, 0)) * idiff, iMat(0, 0);
526 
527  // translate to the original SZ system
528  riemannFit::Matrix2d jacobian;
529  jacobian(0, 0) = 1.;
530  jacobian(0, 1) = 0;
531  jacobian(1, 0) = -sTotal(0);
532  jacobian(1, 1) = 1.;
533  line_results.par(1) += -line_results.par(0) * sTotal(0);
534  line_results.cov = jacobian * line_results.cov * jacobian.transpose();
535 
536  // rotate to the original sz system
537  auto tmp = rotMat(0, 0) - line_results.par(0) * rotMat(0, 1);
538  jacobian(1, 1) = 1. / tmp;
539  jacobian(0, 0) = jacobian(1, 1) * jacobian(1, 1);
540  jacobian(0, 1) = 0;
541  jacobian(1, 0) = line_results.par(1) * rotMat(0, 1) * jacobian(0, 0);
542  line_results.par(1) = line_results.par(1) * jacobian(1, 1);
543  line_results.par(0) = (rotMat(0, 1) + line_results.par(0) * rotMat(0, 0)) * jacobian(1, 1);
544  line_results.cov = jacobian * line_results.cov * jacobian.transpose();
545 
546  // compute chi2
547  line_results.chi2 = 0;
548  for (u_int i = 0; i < n; i++) {
549  line_results.chi2 += weights(i) * riemannFit::sqr(zInSZplane(i) - uVec(i));
550  if (i > 0 && i < n - 1)
551  line_results.chi2 += riemannFit::sqr(uVec(i - 1) / (sTotal(i) - sTotal(i - 1)) -
552  uVec(i) * (sTotal(i + 1) - sTotal(i - 1)) /
553  ((sTotal(i + 1) - sTotal(i)) * (sTotal(i) - sTotal(i - 1))) +
554  uVec(i + 1) / (sTotal(i + 1) - sTotal(i))) /
555  varBeta(i);
556  }
557  }
Eigen::Matrix3d Matrix3d
Definition: FitResult.h:15
T w() const
Eigen::Matrix< double, 2, 3 > Matrix2x3d
Definition: FitUtils.h:49
static const double slope[3]
__host__ __device__ double multScatt(const double &length, const double bField, const double radius, int layer, double slope)
Computes the Coulomb multiple scattering variance of the planar angle.
Definition: BrokenLine.h:54
Eigen::Matrix< double, N, 1 > VectorNd
Definition: FitUtils.h:37
ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN const V4 const double bField
Definition: BrokenLine.h:158
Eigen::Matrix2d Matrix2d
Definition: FitResult.h:14
Eigen::Matrix< double, N, N > MatrixNd
Definition: FitUtils.h:19
constexpr T sqr(const T a)
raise to square.
Definition: FitUtils.h:67
ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN const V4 & fast_fit
Definition: BrokenLine.h:158
__host__ __device__ riemannFit::Matrix2d rotationMatrix(double slope)
Computes the 2D rotation matrix that transforms the line y=slope*x into the line y=0.
Definition: BrokenLine.h:78
__host__ __device__ riemannFit::MatrixNd< n > matrixC_u(const riemannFit::VectorNd< n > &weights, const riemannFit::VectorNd< n > &sTotal, const riemannFit::VectorNd< n > &varBeta)
Computes the n-by-n band matrix obtained minimizing the Broken Line&#39;s cost function w...
Definition: BrokenLine.h:216
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
Vector2d par
(cotan(theta),Zip)
Definition: FitResult.h:36
tmp
align.sh
Definition: createJobs.py:716

◆ matrixC_u()

template<typename TAcc , int n>
ALPAKA_FN_ACC ALPAKA_FN_INLINE riemannFit::MatrixNd<n> ALPAKA_ACCELERATOR_NAMESPACE::brokenline::matrixC_u ( const TAcc &  acc,
const riemannFit::VectorNd< n > &  weights,
const riemannFit::VectorNd< n > &  sTotal,
const riemannFit::VectorNd< n > &  varBeta 
)

Computes the n-by-n band matrix obtained minimizing the Broken Line's cost function w.r.t u. This is the whole matrix in the case of the line fit and the main n-by-n block in the case of the circle fit.

Parameters
weightsweights of the first part of the cost function, the one with the measurements and not the angles ({i=1}^n w*(y_i-u_i)^2).
sTotaltotal distance traveled by the particle from the pre-fitted closest approach.
varBetakink angles' variance.
Returns
the n-by-n matrix of the linear system

Definition at line 222 of file BrokenLine.h.

References mps_fire::i, dqmiodumpmetadata::n, ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::sqr(), sTotal, varBeta(), and hltDeepSecondaryVertexTagInfosPFPuppi_cfi::weights.

Referenced by circleFit(), and lineFit().

225  {
227  for (u_int i = 0; i < n; i++) {
228  c_uMat(i, i) = weights(i);
229  if (i > 1)
230  c_uMat(i, i) += 1. / (varBeta(i - 1) * riemannFit::sqr(sTotal(i) - sTotal(i - 1)));
231  if (i > 0 && i < n - 1)
232  c_uMat(i, i) +=
233  (1. / varBeta(i)) * riemannFit::sqr((sTotal(i + 1) - sTotal(i - 1)) /
234  ((sTotal(i + 1) - sTotal(i)) * (sTotal(i) - sTotal(i - 1))));
235  if (i < n - 2)
236  c_uMat(i, i) += 1. / (varBeta(i + 1) * riemannFit::sqr(sTotal(i + 1) - sTotal(i)));
237 
238  if (i > 0 && i < n - 1)
239  c_uMat(i, i + 1) =
240  1. / (varBeta(i) * (sTotal(i + 1) - sTotal(i))) *
241  (-(sTotal(i + 1) - sTotal(i - 1)) / ((sTotal(i + 1) - sTotal(i)) * (sTotal(i) - sTotal(i - 1))));
242  if (i < n - 2)
243  c_uMat(i, i + 1) +=
244  1. / (varBeta(i + 1) * (sTotal(i + 1) - sTotal(i))) *
245  (-(sTotal(i + 2) - sTotal(i)) / ((sTotal(i + 2) - sTotal(i + 1)) * (sTotal(i + 1) - sTotal(i))));
246 
247  if (i < n - 2)
248  c_uMat(i, i + 2) = 1. / (varBeta(i + 1) * (sTotal(i + 2) - sTotal(i + 1)) * (sTotal(i + 1) - sTotal(i)));
249 
250  c_uMat(i, i) *= 0.5;
251  }
252  return c_uMat + c_uMat.transpose();
253  }
Eigen::Matrix< double, N, N > MatrixNd
Definition: FitUtils.h:19
constexpr T sqr(const T a)
raise to square.
Definition: FitUtils.h:67

◆ multScatt()

template<typename TAcc >
ALPAKA_FN_ACC ALPAKA_FN_INLINE double ALPAKA_ACCELERATOR_NAMESPACE::brokenline::multScatt ( const TAcc &  acc,
const double &  length,
const double  bField,
const double  radius,
int  layer,
double  slope 
)

Computes the Coulomb multiple scattering variance of the planar angle.

Parameters
lengthlength of the track in the material.
bFieldmagnetic field in Gev/cm/c.
radiusradius of curvature (needed to evaluate p).
layerdenotes which of the four layers of the detector is the endpoint of the multiple scattered track. For example, if Layer=3, then the particle has just gone through the material between the second and the third layer.
Warning
the formula used here assumes beta=1, and so neglects the dependence of theta_0 on the mass of the particle at fixed momentum.
Returns
the variance of the planar angle ((theta_0)^2 /3).

< inverse of radiation length of the material in cm

number between 1/3 (uniform material) and 1 (thin scatterer) to be manually tuned

Definition at line 60 of file BrokenLine.h.

References funct::abs(), bField, constexpr(), fact, dqm-mbProfile::log, SiStripPI::min, HLT_2024v14_cff::pt2, CosmicsPD_Skims::radius, slope, and ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::sqr().

Referenced by circleFit(), and lineFit().

61  {
62  // limit R to 20GeV...
63  auto pt2 = alpaka::math::min(acc, 20., bField * radius);
64  pt2 *= pt2;
65  constexpr double inv_X0 = 0.06 / 16.;
66  //if(Layer==1) XXI_0=0.06/16.;
67  // else XXI_0=0.06/16.;
68  //XX_0*=1;
69 
71  constexpr double geometry_factor = 0.7;
72  constexpr double fact = geometry_factor * riemannFit::sqr(13.6 / 1000.);
73  return fact / (pt2 * (1. + riemannFit::sqr(slope))) * (alpaka::math::abs(acc, length) * inv_X0) *
74  riemannFit::sqr(1. + 0.038 * log(alpaka::math::abs(acc, length) * inv_X0));
75  }
static const double slope[3]
ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN const V4 const double bField
Definition: BrokenLine.h:158
constexpr T sqr(const T a)
raise to square.
Definition: FitUtils.h:67
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const double fact

◆ rotationMatrix()

template<typename TAcc >
ALPAKA_FN_ACC ALPAKA_FN_INLINE riemannFit::Matrix2d ALPAKA_ACCELERATOR_NAMESPACE::brokenline::rotationMatrix ( const TAcc &  acc,
double  slope 
)

Computes the 2D rotation matrix that transforms the line y=slope*x into the line y=0.

Parameters
slopetangent of the angle of rotation.
Returns
2D rotation matrix.

Definition at line 85 of file BrokenLine.h.

References makeMuonMisalignmentScenario::rot, slope, ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::sqr(), and mathSSE::sqrt().

Referenced by circleFit(), lineFit(), and reco::BeamSpot::rotatedCovariance3D().

85  {
87  rot(0, 0) = 1. / alpaka::math::sqrt(acc, 1. + riemannFit::sqr(slope));
88  rot(0, 1) = slope * rot(0, 0);
89  rot(1, 0) = -rot(0, 1);
90  rot(1, 1) = rot(0, 0);
91  return rot;
92  }
static const double slope[3]
T sqrt(T t)
Definition: SSEVec.h:23
Eigen::Matrix2d Matrix2d
Definition: FitResult.h:14
constexpr T sqr(const T a)
raise to square.
Definition: FitUtils.h:67

◆ translateKarimaki()

template<typename TAcc >
ALPAKA_FN_ACC ALPAKA_FN_INLINE void ALPAKA_ACCELERATOR_NAMESPACE::brokenline::translateKarimaki ( const TAcc &  acc,
karimaki_circle_fit circle,
double  x0,
double  y0,
riemannFit::Matrix3d jacobian 
)

Changes the Karimäki parameters (and consequently their covariance matrix) under a translation of the coordinate system, such that the old origin has coordinates (x0,y0) in the new coordinate system. The formulas are taken from Karimäki V., 1990, Effective circle fitting for particle trajectories, Nucl. Instr. and Meth. A305 (1991) 187.

Parameters
circlecircle fit in the old coordinate system. circle.par(0) is phi, circle.par(1) is d and circle.par(2) is rho.
x0x coordinate of the translation vector.
y0y coordinate of the translation vector.
jacobianpassed by reference in order to save stack.

Definition at line 106 of file BrokenLine.h.

References funct::cos(), l1tPhase1JetProducer_cfi::cosPhi, riemannFit::CircleFit::cov, amptDefaultParameters_cff::mu, riemannFit::CircleFit::par, funct::sin(), l1tPhase1JetProducer_cfi::sinPhi, ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::sqr(), mathSSE::sqrt(), and protons_cff::xi.

Referenced by circleFit().

107  {
108  // Avoid multiple access to the circle.par vector.
109  using scalar = typename std::remove_reference<decltype(circle.par(0))>::type;
110  scalar phi = circle.par(0);
111  scalar dee = circle.par(1);
112  scalar rho = circle.par(2);
113 
114  // Avoid repeated trig. computations
117 
118  // Intermediate computations for the circle parameters
119  scalar deltaPara = x0 * cosPhi + y0 * sinPhi;
120  scalar deltaOrth = x0 * sinPhi - y0 * cosPhi + dee;
121  scalar tempSmallU = 1 + rho * dee;
122  scalar tempC = -rho * y0 + tempSmallU * cosPhi;
123  scalar tempB = rho * x0 + tempSmallU * sinPhi;
124  scalar tempA = 2. * deltaOrth + rho * (riemannFit::sqr(deltaOrth) + riemannFit::sqr(deltaPara));
125  scalar tempU = alpaka::math::sqrt(acc, 1. + rho * tempA);
126 
127  // Intermediate computations for the error matrix transform
128  scalar xi = 1. / (riemannFit::sqr(tempB) + riemannFit::sqr(tempC));
129  scalar tempV = 1. + rho * deltaOrth;
130  scalar lambda = (0.5 * tempA) / (riemannFit::sqr(1. + tempU) * tempU);
131  scalar mu = 1. / (tempU * (1. + tempU)) + rho * lambda;
132  scalar zeta = riemannFit::sqr(deltaOrth) + riemannFit::sqr(deltaPara);
133  jacobian << xi * tempSmallU * tempV, -xi * riemannFit::sqr(rho) * deltaOrth, xi * deltaPara,
134  2. * mu * tempSmallU * deltaPara, 2. * mu * tempV, mu * zeta - lambda * tempA, 0, 0, 1.;
135 
136  // translated circle parameters
137  // phi
138  circle.par(0) = alpaka::math::atan2(acc, tempB, tempC);
139  // d
140  circle.par(1) = tempA / (1 + tempU);
141  // rho after translation. It is invariant, so noop
142  // circle.par(2)= rho;
143 
144  // translated error matrix
145  circle.cov = jacobian * circle.cov * jacobian.transpose();
146  }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
T sqrt(T t)
Definition: SSEVec.h:23
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
constexpr T sqr(const T a)
raise to square.
Definition: FitUtils.h:67
double scalar(const CLHEP::HepGenMatrix &m)
Return the matrix as a scalar. Raise an assertion if the matris is not .
Definition: matutil.cc:166

◆ varBeta()

results ALPAKA_ACCELERATOR_NAMESPACE::brokenline::varBeta ( )

Variable Documentation

◆ bField

ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN const V4 const double ALPAKA_ACCELERATOR_NAMESPACE::brokenline::bField

◆ dVec

ALPAKA_ACCELERATOR_NAMESPACE::brokenline::dVec = hits.block(0, mId, 2, 1) - hits.block(0, 0, 2, 1)

◆ eVec

ALPAKA_ACCELERATOR_NAMESPACE::brokenline::eVec = hits.block(0, n - 1, 2, 1) - hits.block(0, mId, 2, 1)

◆ fast_fit

ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN const V4& ALPAKA_ACCELERATOR_NAMESPACE::brokenline::fast_fit

◆ hits

ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN& ALPAKA_ACCELERATOR_NAMESPACE::brokenline::hits

◆ mId

int ALPAKA_ACCELERATOR_NAMESPACE::brokenline::mId = 1

◆ pointsSZ

riemannFit::Matrix2xNd<n> ALPAKA_ACCELERATOR_NAMESPACE::brokenline::pointsSZ = riemannFit::Matrix2xNd<n>::Zero()

Definition at line 191 of file BrokenLine.h.

Referenced by brokenline::prepareBrokenLineData().

◆ qCharge

results ALPAKA_ACCELERATOR_NAMESPACE::brokenline::qCharge = riemannFit::cross2D(acc, dVec, eVec) > 0 ? -1 : 1

Definition at line 173 of file BrokenLine.h.

Referenced by SeedForPhotonConversionFromQuadruplets::buildSeedBool().

◆ radii

results ALPAKA_ACCELERATOR_NAMESPACE::brokenline::radii = hits.block(0, 0, 2, n) - fast_fit.head(2) * riemannFit::MatrixXd::Constant(1, n, 1)

◆ results

ALPAKA_FN_ACC ALPAKA_FN_INLINE void const M3xN const V4 const double PreparedBrokenLineData<n>& ALPAKA_ACCELERATOR_NAMESPACE::brokenline::results
Initial value:

Definition at line 158 of file BrokenLine.h.

Referenced by for(), and brokenline::prepareBrokenLineData().

◆ rotMat

riemannFit::Matrix2d ALPAKA_ACCELERATOR_NAMESPACE::brokenline::rotMat = rotationMatrix(acc, slope)

◆ slope

const double ALPAKA_ACCELERATOR_NAMESPACE::brokenline::slope = -results.qCharge / fast_fit(3)

Definition at line 175 of file BrokenLine.h.

Referenced by circleFit(), lineFit(), multScatt(), and rotationMatrix().

◆ sTotal

results ALPAKA_ACCELERATOR_NAMESPACE::brokenline::sTotal = pointsSZ.block(0, 0, 1, n).transpose()

◆ zInSZplane

results ALPAKA_ACCELERATOR_NAMESPACE::brokenline::zInSZplane = pointsSZ.block(1, 0, 1, n).transpose()

Definition at line 198 of file BrokenLine.h.

Referenced by brokenline::circleFit(), circleFit(), brokenline::lineFit(), and lineFit().

◆ zVec

riemannFit::VectorNd<n> ALPAKA_ACCELERATOR_NAMESPACE::brokenline::zVec = hits.block(2, 0, 1, n).transpose()