CMS 3D CMS Logo

Namespaces | Classes | Typedefs | Functions | Variables
gpuVertexFinder Namespace Reference

Namespaces

 workSpace
 

Classes

class  Producer
 

Typedefs

using helper = TracksUtilities< TrackerTraits >
 
using Hist = cms::cuda::HistoContainer< uint8_t, 256, 16000, 8, uint16_t >
 
using VtxSoAView = zVertex::ZVertexSoAView
 
using WsSoAView = gpuVertexFinder::workSpace::PixelVertexWorkSpaceSoAView
 

Functions

__device__ __attribute__ ((always_inline)) void clusterTracksByDensity(VtxSoAView &pdata
 
 __attribute__ ((always_inline)) void clusterTracksByDensityKernel(VtxSoAView pdata
 
 __syncthreads ()
 
 assert (ptv2)
 
 assert (sortInd)
 
 assert (wv)
 
 assert (chi2)
 
 assert (nvFinal<=nvIntermediate)
 
 assert (zt)
 
 assert (ezt2)
 
 assert (izt)
 
 assert (nn)
 
 assert (iv)
 
 assert ((int) nt<=hist.capacity())
 
 assert (hist.size()==nt)
 
 assert (foundClusters< zVertex::utilities::MAXVTX)
 
size d for d tracks hist hist capacity ()
 
hist finalize (hws)
 
 fitVertices (pdata, pws, maxChi2ForFirstFit)
 
 fitVertices (pdata, pws, maxChi2ForFinalFit)
 
 for (int idx=first, nt=tracks_view.nTracks();idx< nt;idx+=gridDim.x *blockDim.x)
 
 for (auto j=threadIdx.x;j< Hist::totbins();j+=blockDim.x) = float(nn[i]) / chi2[i]
 
 if (verbose &&0==threadIdx.x) printf("params %d %f %f %f\
 
 if (1==nvFinal)
 
 if (threadIdx.x< 32) hws[threadIdx.x]=0
 
size d for d tracks hist nbins ()
 
 sortByPt2 (pdata, pws)
 
 splitVertices (pdata, pws, maxChi2ForSplit)
 
 while (__syncthreads_or(more))
 

Variables

float *__restrict__ chi2 = data.chi2()
 
__device__ WsSoAView float chi2Max
 
__device__ WsSoAView int float float float chi2max
 
auto &__restrict__ data = pdata
 
__device__ WsSoAView int float eps
 
auto er2mx = errmax * errmax
 
__device__ WsSoAView int float float errmax
 
float const *__restrict__ ezt2 = ws.ezt2()
 
auto first = blockIdx.x * blockDim.x + threadIdx.x
 
__shared__ unsigned int foundClusters = 0
 
__shared__ Hist hist
 
__shared__ Hist::Counter hws [32]
 
int32_t *__restrict__ iv = ws.iv()
 
uint8_t *__restrict__ izt = ws.izt()
 
__device__ WsSoAView float maxChi2
 
constexpr float maxChi2ForFinalFit = 5000.f
 
constexpr float maxChi2ForFirstFit = 50.f
 
constexpr float maxChi2ForSplit = 9.f
 
__device__ WsSoAView int minT
 
bool more = true
 
size d for d tracks n
 
__shared__ int nloops = 0
 
int32_t *__restrict__ nn = data.ndof()
 
__shared__ int noise
 
auto nt = ws.ntrks()
 
uint32_t & nvFinal = data.nvFinal()
 
uint32_t & nvIntermediate = ws.nvIntermediate()
 
VtxSoAView WsSoAView float float ptMax
 
VtxSoAView WsSoAView float ptMin
 
float const *__restrict__ ptt2 = ws.ptt2()
 
float *__restrict__ ptv2 = data.ptv2()
 
__device__ WsSoAViewpws
 
VtxSoAView soa
 
uint16_t *__restrict__ sortInd = data.sortInd()
 
constexpr bool verbose = false
 
auto &__restrict__ ws = pws
 
float *__restrict__ wv = data.wv()
 
float const *__restrict__ zt = ws.zt()
 
float *__restrict__ zv = data.zv()
 

Typedef Documentation

◆ helper

using gpuVertexFinder::helper = typedef TracksUtilities<TrackerTraits>

Definition at line 32 of file gpuVertexFinder.cc.

◆ Hist

typedef cms::cuda::HistoContainer< uint8_t, 256, 16000, 8, uint16_t > gpuVertexFinder::Hist

Definition at line 54 of file gpuClusterTracksByDensity.h.

◆ VtxSoAView

Definition at line 17 of file gpuVertexFinder.h.

◆ WsSoAView

Definition at line 18 of file gpuVertexFinder.h.

Function Documentation

◆ __attribute__() [1/2]

__device__ gpuVertexFinder::__attribute__ ( (always_inline)  ) &
inline

◆ __attribute__() [2/2]

gpuVertexFinder::__attribute__ ( (always_inline)  )
inline

◆ __syncthreads()

gpuVertexFinder::__syncthreads ( )
inline

◆ assert() [1/13]

gpuVertexFinder::assert ( ptv2  )

◆ assert() [2/13]

gpuVertexFinder::assert ( sortInd  )

◆ assert() [3/13]

gpuVertexFinder::assert ( wv  )

◆ assert() [4/13]

gpuVertexFinder::assert ( chi2  )

◆ assert() [5/13]

gpuVertexFinder::assert ( nvFinal<=  nvIntermediate)

◆ assert() [6/13]

gpuVertexFinder::assert ( zt  )

◆ assert() [7/13]

gpuVertexFinder::assert ( ezt2  )

◆ assert() [8/13]

gpuVertexFinder::assert ( izt  )

◆ assert() [9/13]

gpuVertexFinder::assert ( nn  )

◆ assert() [10/13]

gpuVertexFinder::assert ( iv  )

◆ assert() [11/13]

gpuVertexFinder::assert ( (int) nt<=hist.capacity()  )

◆ assert() [12/13]

gpuVertexFinder::assert ( hist.  size() = =nt)

◆ assert() [13/13]

gpuVertexFinder::assert ( )

◆ capacity()

size d for d tracks hist hist gpuVertexFinder::capacity ( )

◆ finalize()

hist gpuVertexFinder::finalize ( hws  )

◆ fitVertices() [1/2]

gpuVertexFinder::fitVertices ( pdata  ,
pws  ,
maxChi2ForFirstFit   
)

◆ fitVertices() [2/2]

gpuVertexFinder::fitVertices ( pdata  ,
pws  ,
maxChi2ForFinalFit   
)

◆ for() [1/2]

gpuVertexFinder::for ( int  idx = first)

Definition at line 34 of file gpuVertexFinder.cc.

References assert(), cms::cudacompat::atomicAdd(), data, pixelTrack::highPurity, heavyIonCSV_trainingSettings::idx, TracksUtilities< TrackerTraits >::isTriplet(), SiStripPI::min, nHits, TracksUtilities< TrackerTraits >::nHits(), DiDispStaMuonMonitor_cfi::pt, ptMax, ptMin, pws, quality, soa, caHitNtupletGeneratorKernels::tracks_view, and TracksUtilities< TrackerTraits >::zip().

34  {
36  assert(nHits >= 3);
37 
38  // initialize soa...
39  soa[idx].idv() = -1;
40 
41  if (helper::isTriplet(tracks_view, idx))
42  continue; // no triplets
44  continue;
45 
46  auto pt = tracks_view[idx].pt();
47 
48  if (pt < ptMin)
49  continue;
50 
51  // clamp pt
52  pt = std::min(pt, ptMax);
53 
54  auto& data = pws;
55  auto it = atomicAdd(&data.ntrks(), 1);
56  data[it].itrk() = idx;
57  data[it].zt() = helper::zip(tracks_view, idx);
58  data[it].ezt2() = tracks_view[idx].covariance()(14);
59  data[it].ptt2() = pt * pt;
60  }
uint32_t const *__restrict__ TkSoAView< TrackerTraits > tracks_view
constexpr float ptMin
assert(be >=bs)
string quality
__device__ WsSoAView & pws
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
VtxSoAView WsSoAView float float ptMax
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits
T1 atomicAdd(T1 *a, T2 b)
Definition: cudaCompat.h:61

◆ for() [2/2]

gpuVertexFinder::for ( ) = float(nn[i]) / chi2[i]

◆ if() [1/3]

gpuVertexFinder::if ( verbose &&  0 = = threadIdx.x)

◆ if() [2/3]

gpuVertexFinder::if ( = nvFinal)

Definition at line 53 of file gpuSortByPt2.h.

References sortInd, and cms::cudacompat::threadIdx.

53  {
54  if (threadIdx.x == 0)
55  sortInd[0] = 0;
56  return;
57  }
const dim3 threadIdx
Definition: cudaCompat.h:29
uint16_t *__restrict__ sortInd
Definition: gpuSortByPt2.h:27

◆ if() [3/3]

gpuVertexFinder::if ( )
pure virtual

◆ nbins()

size d for d tracks hist gpuVertexFinder::nbins ( )

◆ sortByPt2()

gpuVertexFinder::sortByPt2 ( pdata  ,
pws   
)

◆ splitVertices()

gpuVertexFinder::splitVertices ( pdata  ,
pws  ,
maxChi2ForSplit   
)

◆ while()

gpuVertexFinder::while ( __syncthreads_or(more )

Definition at line 111 of file gpuClusterTracksIterative.h.

References funct::abs(), assert(), cms::cudacompat::atomicMin(), cms::cuda::be, cms::cuda::HistoContainer< T, NBINS, SIZE, S, I, NHISTS >::bin(), cms::cudacompat::blockDim, chi2max, eps, ezt2, hist, mps_fire::i, iv, izt, dqmiolumiharvest::j, dqmdumpme::k, heppy_loop::loop, visualization-live-secondInstance_cfg::m, SiStripPI::min, minT, more, cms::cuda::HistoContainer< T, NBINS, SIZE, S, I, NHISTS >::nbins(), nloops, nn, nt, AlCaHLTBitMon_ParallelJobs::p, cms::cudacompat::threadIdx, and zt.

Referenced by ThreeThresholdAlgorithm::addToCandidate(), EcalSimParametersFromDD::build(), cppFunctionSkipper::delLines(), cppFunctionSkipper::filterFile(), commentSkipper.buildFileCommentSkipper::filterMultilineComment(), mkfit::MkBuilder::find_tracks_in_layers(), mkfit::MkBuilder::findTracksStandard(), dqm_interfaces.DQMcommunicator::get_runs_list(), and histoStyle::savePlots().

111  {
112  if (1 == nloops % 2) {
113  for (auto i = threadIdx.x; i < nt; i += blockDim.x) {
114  auto m = iv[i];
115  while (m != iv[m])
116  m = iv[m];
117  iv[i] = m;
118  }
119  } else {
120  more = false;
121  for (auto k = threadIdx.x; k < hist.size(); k += blockDim.x) {
122  auto p = hist.begin() + k;
123  auto i = (*p);
124  auto be = std::min(Hist::bin(izt[i]) + 1, int(hist.nbins() - 1));
125  if (nn[i] < minT)
126  continue; // DBSCAN core rule
127  auto loop = [&](uint32_t j) {
128  assert(i != j);
129  if (nn[j] < minT)
130  return; // DBSCAN core rule
131  auto dist = std::abs(zt[i] - zt[j]);
132  if (dist > eps)
133  return;
134  if (dist * dist > chi2max * (ezt2[i] + ezt2[j]))
135  return;
136  auto old = atomicMin(&iv[j], iv[i]);
137  if (old != iv[i]) {
138  // end the loop only if no changes were applied
139  more = true;
140  }
141  atomicMin(&iv[i], old);
142  };
143  ++p;
144  for (; p < hist.end(be); ++p)
145  loop(*p);
146  } // for i
147  }
148  if (threadIdx.x == 0)
149  ++nloops;
150  } // while
const dim3 threadIdx
Definition: cudaCompat.h:29
int32_t *__restrict__ iv
const dim3 blockDim
Definition: cudaCompat.h:30
assert(be >=bs)
float const *__restrict__ zt
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float const *__restrict__ ezt2
int nt
Definition: AMPTWrapper.h:42
T1 atomicMin(T1 *a, T2 b)
Definition: cudaCompat.h:85

Variable Documentation

◆ chi2

float const *__restrict__ gpuVertexFinder::chi2 = data.chi2()

Definition at line 28 of file gpuFitVertices.h.

◆ chi2Max

WsSoAView float gpuVertexFinder::chi2Max
Initial value:
{
constexpr bool verbose = false
bool verbose

Definition at line 18 of file gpuFitVertices.h.

◆ chi2max

WsSoAView int float float float gpuVertexFinder::chi2max
Initial value:

Definition at line 26 of file gpuClusterTracksByDensity.h.

Referenced by gpuVertexFinder::Producer< TrackerTraits >::make(), and while().

◆ data

auto &__restrict__ gpuVertexFinder::data = pdata

Definition at line 35 of file gpuClusterTracksByDensity.h.

Referenced by for().

◆ eps

WsSoAView int float gpuVertexFinder::eps

◆ er2mx

auto gpuVertexFinder::er2mx = errmax * errmax

Definition at line 33 of file gpuClusterTracksByDensity.h.

◆ errmax

WsSoAView int float float gpuVertexFinder::errmax

◆ ezt2

float const *__restrict__ gpuVertexFinder::ezt2 = ws.ezt2()

Definition at line 39 of file gpuClusterTracksByDensity.h.

Referenced by while().

◆ first

auto gpuVertexFinder::first = blockIdx.x * blockDim.x + threadIdx.x

Definition at line 33 of file gpuVertexFinder.cc.

◆ foundClusters

auto gpuVertexFinder::foundClusters = 0

Definition at line 185 of file gpuClusterTracksByDensity.h.

◆ hist

__shared__ Hist gpuVertexFinder::hist

Definition at line 55 of file gpuClusterTracksByDensity.h.

Referenced by for(), and while().

◆ hws

__shared__ Hist::Counter gpuVertexFinder::hws

Definition at line 56 of file gpuClusterTracksByDensity.h.

◆ iv

int32_t *__restrict__ gpuVertexFinder::iv = ws.iv()

Definition at line 46 of file gpuClusterTracksByDensity.h.

Referenced by RPCLinkSynchroStat::add(), TAPD::addEntry(), FBaseSimEvent::addSimTrack(), reco::IsoDeposit::algoWithin(), SiPixelMonitorVertexSoA::analyze(), HcalRecHitsAnalyzer::analyze(), IsoTrig::analyze(), PrimaryVertexAnalyzer4PUSlimmed::analyze(), IsolatedTracksNxN::analyze(), Primary4DVertexValidation::analyze(), XtalDedxAnalysis::analyzeHits(), HGCalTimingAnalyzer::analyzeSimTracks(), HGCalTB23Analyzer::analyzeSimTracks(), HGCalTBAnalyzer::analyzeSimTracks(), HLTMuonDimuonL3Filter::applyDiMuonSelection(), Basic2DVector< float >::Basic2DVector(), Basic3DVector< align::Scalar >::Basic3DVector(), magneticfield::MagGeoBuilder::build(), MagGeoBuilderFromDDD::build(), HGCalCellUV::cellUVFromXY1(), HGCalCellUV::cellUVFromXY3(), PFPileUpAlgo::chargedHadronVertex(), PrimaryVertexAssignment::chargedHadronVertex(), PFIsolationEstimator::chargedHadronVertex(), IsoTrig::chgIsolation(), PileupJetIdAlgo::computeIdVariables(), MVAJetPuId::computeIdVariables(), SeedMvaEstimator::computeMva(), SeedMvaEstimatorPhase2::computeMva(), gen::TauolappInterface::decay(), reco::IsoDeposit::depositAndCountWithin(), TMultiDimFet::EvalControl(), SiPixelActionExecutor::fillFEDErrorSummary(), SiPixelActionExecutor::fillGrandBarrelSummaryHistos(), SiPixelActionExecutor::fillGrandEndcapSummaryHistos(), GsfTrackProducerBase::fillMode(), DeepBoostedJetTagInfoProducer::fillParticleFeatures(), SiPixelActionExecutor::fillSummary(), TrackingFailureFilter::filter(), PythiaDauVFilter::filter(), PythiaAllDauVFilter::filter(), PythiaDauVFilterMatchID::filter(), FFTJetPFPileupCleaner::findSomeVertexWFakes(), DivisiveVertexFinder::findVertexesAlt(), CaloTowerGeometry::getSummary(), CaloSubdetectorGeometry::getSummary(), HcalGeometry::getSummary(), HGCalTypes::getUnpackedV(), reco::Photon::hcalTowerSumEt(), reco::GsfElectron::hcalTowerSumEt(), reco::Photon::hcalTowerSumEtBc(), reco::GsfElectron::hcalTowerSumEtBc(), HGCalCellUV::HGCalCellUV(), edm::OneToMany< std::vector< Trajectory >, std::vector< TrajectorySeed >, unsigned int >::insert(), edm::OneToOneGeneric< std::vector< TrackCandidate >, std::vector< Trajectory >, unsigned int >::insert(), edm::OneToManyWithQualityGeneric< TrackingVertexCollection, edm::View< reco::Vertex >, double, unsigned int >::insert(), FFTJetPFPileupCleaner::isAcceptableVtx(), edm::isTransientEqual(), TmpSimEvent::load(), TMultiDimFet::MakeCandidates(), Primary4DVertexValidation::matchReco2Sim(), JetPlusTrackCorrector::matchTracks(), multiTrajectoryStateMode::momentumFromModeLocal(), reco::IsoDeposit::nearestDR(), HGCalTypes::packTypeUV(), HitParentTest::parentSimTrack(), spr::parentSimTrack(), multiTrajectoryStateMode::positionFromModeLocal(), DDHGCalMixLayer::positionMix(), DDHGCalMixRotatedCassette::positionMix(), DDHGCalMixRotatedLayer::positionMix(), HGCalMixLayer::positionMix(), HGCalMixRotatedLayer::positionMix(), HGCalMixRotatedCassette::positionMix(), DDHGCalSiliconRotatedCassette::positionPassive(), HGCalSiliconRotatedCassette::positionPassive(), DDHGCalEEAlgo::positionSensitive(), DDHGCalEEFileAlgo::positionSensitive(), DDHGCalSiliconModule::positionSensitive(), DDHGCalSiliconRotatedCassette::positionSensitive(), DDHGCalSiliconRotatedModule::positionSensitive(), DDHGCalHEFileAlgo::positionSensitive(), DDHGCalHEAlgo::positionSensitive(), HGCalEEFileAlgo::positionSensitive(), HGCalSiliconModule::positionSensitive(), HGCalSiliconRotatedModule::positionSensitive(), HGCalEEAlgo::PositionSensitive(), HGCalSiliconRotatedCassette::positionSensitive(), HGCalHEFileAlgo::positionSensitive(), HGCalHEAlgo::positionSensitive(), SeedGeneratorFromProtoTracksEDProducer::produce(), JetTracksAssociationDRVertexAssigned::produce(), PFV0Producer::produce(), FFTJetVertexAdder::produce(), PrimaryVertexProducer::produce(), ConvBremSeedProducer::produce(), LmfSource::readEventWithinFile(), ZdcSimpleRecAlgoImpl::reco2(), rpcrawtodigi::RecordCD::RecordCD(), PointSeededTrackingRegionsProducer::regions(), PATPrimaryVertexSelector::select(), MultiTrackSelector::select(), HIMultiTrackSelector::select(), EMShower::setIntervals(), CaloNumberingScheme::setVerbosity(), ZdcNumberingScheme::setVerbosity(), spr::simTrackAtOrigin(), edm::OneToMany< std::vector< Trajectory >, std::vector< TrajectorySeed >, unsigned int >::val(), edm::OneToOneGeneric< std::vector< TrackCandidate >, std::vector< Trajectory >, unsigned int >::val(), edm::OneToManyWithQualityGeneric< TrackingVertexCollection, edm::View< reco::Vertex >, double, unsigned int >::val(), spr::validSimTrack(), HitParentTest::validSimTrack(), ConfigurableTrimmedVertexFinder::vertexCandidates(), HGCalWaferIndex::waferV(), while(), and ZdcNumberingScheme::ZdcNumberingScheme().

◆ izt

uint8_t *__restrict__ gpuVertexFinder::izt = ws.izt()

Definition at line 44 of file gpuClusterTracksByDensity.h.

Referenced by while().

◆ maxChi2

WsSoAView float gpuVertexFinder::maxChi2
Initial value:
{
constexpr bool verbose = false
bool verbose

Definition at line 15 of file gpuSplitVertices.h.

◆ maxChi2ForFinalFit

constexpr float gpuVertexFinder::maxChi2ForFinalFit = 5000.f

Definition at line 23 of file gpuVertexFinder.cc.

Referenced by gpuVertexFinder::Producer< TrackerTraits >::make().

◆ maxChi2ForFirstFit

constexpr float gpuVertexFinder::maxChi2ForFirstFit = 50.f

Definition at line 22 of file gpuVertexFinder.cc.

Referenced by gpuVertexFinder::Producer< TrackerTraits >::make().

◆ maxChi2ForSplit

constexpr float gpuVertexFinder::maxChi2ForSplit = 9.f

Definition at line 26 of file gpuVertexFinder.cc.

Referenced by gpuVertexFinder::Producer< TrackerTraits >::make().

◆ minT

WsSoAView int gpuVertexFinder::minT

◆ more

bool gpuVertexFinder::more = true

◆ n

size d for d tracks gpuVertexFinder::n

Definition at line 63 of file gpuClusterTracksByDensity.h.

◆ nloops

gpuVertexFinder::nloops = 0

Definition at line 104 of file gpuClusterTracksIterative.h.

Referenced by while().

◆ nn

int32_t const *__restrict__ gpuVertexFinder::nn = data.ndof()

Definition at line 45 of file gpuClusterTracksByDensity.h.

Referenced by while().

◆ noise

gpuVertexFinder::noise

Definition at line 47 of file gpuFitVertices.h.

◆ nt

auto gpuVertexFinder::nt = ws.ntrks()

Definition at line 37 of file gpuClusterTracksByDensity.h.

Referenced by while().

◆ nvFinal

uint32_t & gpuVertexFinder::nvFinal = data.nvFinal()

Definition at line 41 of file gpuClusterTracksByDensity.h.

◆ nvIntermediate

uint32_t & gpuVertexFinder::nvIntermediate = ws.nvIntermediate()

Definition at line 42 of file gpuClusterTracksByDensity.h.

◆ ptMax

VtxSoAView WsSoAView float float gpuVertexFinder::ptMax
Initial value:
{
auto const* quality = tracks_view.quality()
uint32_t const *__restrict__ TkSoAView< TrackerTraits > tracks_view
string quality

Definition at line 30 of file gpuVertexFinder.cc.

Referenced by for(), and gpuVertexFinder::Producer< TrackerTraits >::make().

◆ ptMin

VtxSoAView WsSoAView float gpuVertexFinder::ptMin

Definition at line 30 of file gpuVertexFinder.cc.

Referenced by for(), and gpuVertexFinder::Producer< TrackerTraits >::make().

◆ ptt2

float const* __restrict__ gpuVertexFinder::ptt2 = ws.ptt2()

Definition at line 22 of file gpuSortByPt2.h.

◆ ptv2

float* __restrict__ gpuVertexFinder::ptv2 = data.ptv2()

Definition at line 26 of file gpuSortByPt2.h.

◆ pws

WsSoAView gpuVertexFinder::pws
Initial value:
{
auto& __restrict__ data = pdata
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

Definition at line 21 of file gpuClusterTracksByDensity.h.

Referenced by for().

◆ soa

VtxSoAView gpuVertexFinder::soa

◆ sortInd

uint16_t* __restrict__ gpuVertexFinder::sortInd = data.sortInd()

Definition at line 27 of file gpuSortByPt2.h.

Referenced by if().

◆ verbose

constexpr bool gpuVertexFinder::verbose = false

Definition at line 28 of file gpuClusterTracksByDensity.h.

◆ ws

auto &__restrict__ gpuVertexFinder::ws = pws

◆ wv

float *__restrict__ gpuVertexFinder::wv = data.wv()

◆ zt

float const *__restrict__ gpuVertexFinder::zt = ws.zt()

◆ zv

float *__restrict__ gpuVertexFinder::zv = data.zv()