CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
ALPAKA_ACCELERATOR_NAMESPACE::PixelVertexProducerAlpaka< TrackerTraits > Class Template Reference
Inheritance diagram for ALPAKA_ACCELERATOR_NAMESPACE::PixelVertexProducerAlpaka< TrackerTraits >:
ALPAKA_ACCELERATOR_NAMESPACE::global::EDProducer< Args > edm::ProducerBase< edm::global::EDProducer, Args... >

Public Member Functions

 PixelVertexProducerAlpaka (const edm::ParameterSet &iConfig)
 
 ~PixelVertexProducerAlpaka () override=default
 
- Public Member Functions inherited from ALPAKA_ACCELERATOR_NAMESPACE::global::EDProducer< Args >
void produce (edm::StreamID sid, edm::Event &iEvent, edm::EventSetup const &iSetup) const final
 
- Public Member Functions inherited from edm::ProducerBase< edm::global::EDProducer, Args... >
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Types

using Algo = vertexFinder::Producer< TrackerTraits >
 
using TkSoADevice = TracksSoACollection< TrackerTraits >
 

Private Member Functions

void produce (edm::StreamID streamID, device::Event &iEvent, const device::EventSetup &iSetup) const override
 

Private Attributes

const Algo algo_
 
const float ptMax_
 
const float ptMin_
 
device::EDGetToken< TkSoADevicetokenDeviceTrack_
 
device::EDPutToken< ZVertexSoACollectiontokenDeviceVertex_
 

Additional Inherited Members

- Public Types inherited from edm::ProducerBase< edm::global::EDProducer, Args... >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Protected Member Functions inherited from edm::ProducerBase< edm::global::EDProducer, Args... >
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
BranchAliasSetterT< ProductType > produces ()
 
auto produces () noexcept
 
ProducesCollector producesCollector ()
 

Detailed Description

template<typename TrackerTraits>
class ALPAKA_ACCELERATOR_NAMESPACE::PixelVertexProducerAlpaka< TrackerTraits >

Definition at line 30 of file PixelVertexProducerAlpaka.cc.

Member Typedef Documentation

◆ Algo

template<typename TrackerTraits >
using ALPAKA_ACCELERATOR_NAMESPACE::PixelVertexProducerAlpaka< TrackerTraits >::Algo = vertexFinder::Producer<TrackerTraits>
private

Definition at line 32 of file PixelVertexProducerAlpaka.cc.

◆ TkSoADevice

template<typename TrackerTraits >
using ALPAKA_ACCELERATOR_NAMESPACE::PixelVertexProducerAlpaka< TrackerTraits >::TkSoADevice = TracksSoACollection<TrackerTraits>
private

Definition at line 31 of file PixelVertexProducerAlpaka.cc.

Constructor & Destructor Documentation

◆ PixelVertexProducerAlpaka()

template<typename TrackerTraits >
ALPAKA_ACCELERATOR_NAMESPACE::PixelVertexProducerAlpaka< TrackerTraits >::PixelVertexProducerAlpaka ( const edm::ParameterSet iConfig)
explicit

Definition at line 54 of file PixelVertexProducerAlpaka.cc.

55  : algo_(conf.getParameter<bool>("oneKernel"),
56  conf.getParameter<bool>("useDensity"),
57  conf.getParameter<bool>("useDBSCAN"),
58  conf.getParameter<bool>("useIterative"),
59  conf.getParameter<bool>("doSplitting"),
60  conf.getParameter<int>("minT"),
61  conf.getParameter<double>("eps"),
62  conf.getParameter<double>("errmax"),
63  conf.getParameter<double>("chi2max")),
64  ptMin_(conf.getParameter<double>("PtMin")), // 0.5 GeV
65  ptMax_(conf.getParameter<double>("PtMax")), // 75. Onsumes
66  tokenDeviceTrack_(consumes(conf.getParameter<edm::InputTag>("pixelTrackSrc"))),
device::EDPutToken< ZVertexSoACollection > tokenDeviceVertex_
auto produces(std::string instanceName) noexcept
declare what type of product will make and with which optional label

◆ ~PixelVertexProducerAlpaka()

template<typename TrackerTraits >
ALPAKA_ACCELERATOR_NAMESPACE::PixelVertexProducerAlpaka< TrackerTraits >::~PixelVertexProducerAlpaka ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

template<typename TrackerTraits >
void ALPAKA_ACCELERATOR_NAMESPACE::PixelVertexProducerAlpaka< TrackerTraits >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 70 of file PixelVertexProducerAlpaka.cc.

References edm::ConfigurationDescriptions::addWithDefaultLabel(), submitPVResolutionJobs::desc, and ProducerED_cfi::InputTag.

70  {
72 
73  // Only one of these three algos can be used at once.
74  // Maybe this should become a Plugin Factory
75  desc.add<bool>("oneKernel", true);
76  desc.add<bool>("useDensity", true);
77  desc.add<bool>("useDBSCAN", false);
78  desc.add<bool>("useIterative", false);
79  desc.add<bool>("doSplitting", true);
80 
81  desc.add<int>("minT", 2); // min number of neighbours to be "core"
82  desc.add<double>("eps", 0.07); // max absolute distance to cluster
83  desc.add<double>("errmax", 0.01); // max error to be "seed"
84  desc.add<double>("chi2max", 9.); // max normalized distance to cluster
85 
86  desc.add<double>("PtMin", 0.5);
87  desc.add<double>("PtMax", 75.);
88  desc.add<edm::InputTag>("pixelTrackSrc", edm::InputTag("pixelTracksAlpaka"));
89 
90  descriptions.addWithDefaultLabel(desc);
91  }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

◆ produce()

template<typename TrackerTraits >
void ALPAKA_ACCELERATOR_NAMESPACE::PixelVertexProducerAlpaka< TrackerTraits >::produce ( edm::StreamID  streamID,
device::Event iEvent,
const device::EventSetup iSetup 
) const
overrideprivatevirtual

Implements ALPAKA_ACCELERATOR_NAMESPACE::global::EDProducer< Args >.

Definition at line 94 of file PixelVertexProducerAlpaka.cc.

References iEvent.

96  {
97  auto const& hTracks = iEvent.get(tokenDeviceTrack_);
98 
99  iEvent.emplace(tokenDeviceVertex_, algo_.makeAsync(iEvent.queue(), hTracks.view(), ptMin_, ptMax_));
100  }
device::EDPutToken< ZVertexSoACollection > tokenDeviceVertex_
int iEvent
Definition: GenABIO.cc:224
ZVertexSoACollection makeAsync(Queue &queue, const TkSoAConstView &tracks_view, float ptMin, float ptMax) const

Member Data Documentation

◆ algo_

template<typename TrackerTraits >
const Algo ALPAKA_ACCELERATOR_NAMESPACE::PixelVertexProducerAlpaka< TrackerTraits >::algo_
private

Definition at line 43 of file PixelVertexProducerAlpaka.cc.

◆ ptMax_

template<typename TrackerTraits >
const float ALPAKA_ACCELERATOR_NAMESPACE::PixelVertexProducerAlpaka< TrackerTraits >::ptMax_
private

Definition at line 47 of file PixelVertexProducerAlpaka.cc.

◆ ptMin_

template<typename TrackerTraits >
const float ALPAKA_ACCELERATOR_NAMESPACE::PixelVertexProducerAlpaka< TrackerTraits >::ptMin_
private

Definition at line 46 of file PixelVertexProducerAlpaka.cc.

◆ tokenDeviceTrack_

template<typename TrackerTraits >
device::EDGetToken<TkSoADevice> ALPAKA_ACCELERATOR_NAMESPACE::PixelVertexProducerAlpaka< TrackerTraits >::tokenDeviceTrack_
private

Definition at line 49 of file PixelVertexProducerAlpaka.cc.

◆ tokenDeviceVertex_

template<typename TrackerTraits >
device::EDPutToken<ZVertexSoACollection> ALPAKA_ACCELERATOR_NAMESPACE::PixelVertexProducerAlpaka< TrackerTraits >::tokenDeviceVertex_
private

Definition at line 50 of file PixelVertexProducerAlpaka.cc.