CMS 3D CMS Logo

PixelTrackDumpAlpaka.cc
Go to the documentation of this file.
1 #include <Eigen/Core> // needed here by soa layout
2 
12 
15 
16 template <typename TrackerTraits>
18 public:
21 
22  explicit PixelTrackDumpAlpakaT(const edm::ParameterSet& iConfig);
23  ~PixelTrackDumpAlpakaT() override = default;
24 
25  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
26 
27 private:
28  void analyze(edm::StreamID streamID, edm::Event const& iEvent, const edm::EventSetup& iSetup) const override;
31 };
32 
33 template <typename TrackerTraits>
35  tokenSoATrack_ = consumes(iConfig.getParameter<edm::InputTag>("pixelTrackSrc"));
36  tokenSoAVertex_ = consumes(iConfig.getParameter<edm::InputTag>("pixelVertexSrc"));
37 }
38 
39 template <typename TrackerTraits>
42  desc.add<edm::InputTag>("pixelTrackSrc", edm::InputTag("pixelTracksAlpaka"));
43  desc.add<edm::InputTag>("pixelVertexSrc", edm::InputTag("pixelVerticesAlpaka"));
44  descriptions.addWithDefaultLabel(desc);
45 }
46 
47 template <typename TrackerTraits>
49  edm::Event const& iEvent,
50  const edm::EventSetup& iSetup) const {
51  auto const& tracks = iEvent.get(tokenSoATrack_);
52  assert(tracks.view().quality());
53  assert(tracks.view().chi2());
54  assert(tracks.view().nLayers());
55  assert(tracks.view().eta());
56  assert(tracks.view().pt());
57  assert(tracks.view().state());
58  assert(tracks.view().covariance());
59  assert(tracks.view().nTracks());
60 
61  auto const& vertices = iEvent.get(tokenSoAVertex_);
62  assert(vertices.view<reco::ZVertexTracksSoA>().idv());
63  assert(vertices.view().zv());
64  assert(vertices.view().wv());
65  assert(vertices.view().chi2());
66  assert(vertices.view().ptv2());
67  assert(vertices.view<reco::ZVertexTracksSoA>().ndof());
68  assert(vertices.view().sortInd());
69  assert(vertices.view().nvFinal());
70 }
71 
75 
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
~PixelTrackDumpAlpakaT() override=default
edm::EDGetTokenT< TkSoAHost > tokenSoATrack_
PixelTrackDumpAlpakaT(const edm::ParameterSet &iConfig)
assert(be >=bs)
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::EDGetTokenT< VertexSoAHost > tokenSoAVertex_
void analyze(edm::StreamID streamID, edm::Event const &iEvent, const edm::EventSetup &iSetup) const override
PortableHostCollection2< reco::ZVertexSoA, reco::ZVertexTracksSoA > ZVertexHost
Definition: ZVertexHost.h:12