CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
LSTProducer.cc
Go to the documentation of this file.
1 #include <alpaka/alpaka.hpp>
2 
4 
10 
17 
21 
23 
25 
27  public:
29  : lstPixelSeedInputToken_{consumes(config.getParameter<edm::InputTag>("pixelSeedInput"))},
30  lstPhase2OTHitsInputToken_{consumes(config.getParameter<edm::InputTag>("phase2OTHitsInput"))},
32  verbose_(config.getParameter<bool>("verbose")),
33  nopLSDupClean_(config.getParameter<bool>("nopLSDupClean")),
34  tcpLSTriplets_(config.getParameter<bool>("tcpLSTriplets")),
36 
37  void acquire(device::Event const& event, device::EventSetup const& setup) override {
38  // Inputs
39  auto const& pixelSeeds = event.get(lstPixelSeedInputToken_);
40  auto const& phase2OTHits = event.get(lstPhase2OTHitsInputToken_);
41 
42  auto const& lstESDeviceData = setup.getData(lstESToken_);
43 
44  lst_.run(event.queue(),
45  verbose_,
46  &lstESDeviceData,
47  pixelSeeds.px(),
48  pixelSeeds.py(),
49  pixelSeeds.pz(),
50  pixelSeeds.dxy(),
51  pixelSeeds.dz(),
52  pixelSeeds.ptErr(),
53  pixelSeeds.etaErr(),
54  pixelSeeds.stateTrajGlbX(),
55  pixelSeeds.stateTrajGlbY(),
56  pixelSeeds.stateTrajGlbZ(),
57  pixelSeeds.stateTrajGlbPx(),
58  pixelSeeds.stateTrajGlbPy(),
59  pixelSeeds.stateTrajGlbPz(),
60  pixelSeeds.q(),
61  pixelSeeds.hitIdx(),
62  phase2OTHits.detId(),
63  phase2OTHits.x(),
64  phase2OTHits.y(),
65  phase2OTHits.z(),
68  }
69 
70  void produce(device::Event& event, device::EventSetup const&) override {
71  // Output
73  event.emplace(lstOutputToken_, std::move(lstOutput));
74  }
75 
76  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
78  desc.add<edm::InputTag>("pixelSeedInput", edm::InputTag{"lstPixelSeedInputProducer"});
79  desc.add<edm::InputTag>("phase2OTHitsInput", edm::InputTag{"lstPhase2OTHitsInputProducer"});
80  desc.add<bool>("verbose", false);
81  desc.add<bool>("nopLSDupClean", false);
82  desc.add<bool>("tcpLSTriplets", false);
83  descriptions.addWithDefaultLabel(desc);
84  }
85 
86  private:
92 
94  };
95 
96 } // namespace ALPAKA_ACCELERATOR_NAMESPACE
97 
99 DEFINE_FWK_ALPAKA_MODULE(LSTProducer);
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
device::ESGetToken< lst::LSTESData< Device >, TrackerRecoGeometryRecord > lstESToken_
Definition: LSTProducer.cc:89
edm::EDPutTokenT< LSTOutput > lstOutputToken_
Definition: LSTProducer.cc:91
std::vector< short > const & trackCandidateType() const
Definition: LST.h:45
Definition: config.py:1
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: LSTProducer.cc:76
std::vector< unsigned int > const & len() const
Definition: LST.h:43
edm::EDGetTokenT< LSTPhase2OTHitsInput > lstPhase2OTHitsInputToken_
Definition: LSTProducer.cc:88
std::vector< std::vector< unsigned int > > const & hits() const
Definition: LST.h:42
void run(Queue &queue, bool verbose, LSTESData< Device > const *deviceESData, std::vector< float > const &see_px, std::vector< float > const &see_py, std::vector< float > const &see_pz, std::vector< float > const &see_dxy, std::vector< float > const &see_dz, std::vector< float > const &see_ptErr, std::vector< float > const &see_etaErr, std::vector< float > const &see_stateTrajGlbX, std::vector< float > const &see_stateTrajGlbY, std::vector< float > const &see_stateTrajGlbZ, std::vector< float > const &see_stateTrajGlbPx, std::vector< float > const &see_stateTrajGlbPy, std::vector< float > const &see_stateTrajGlbPz, std::vector< int > const &see_q, std::vector< std::vector< int >> const &see_hitIdx, std::vector< unsigned int > const &ph2_detId, std::vector< float > const &ph2_x, std::vector< float > const &ph2_y, std::vector< float > const &ph2_z, bool no_pls_dupclean, bool tc_pls_triplets)
Definition: LST.cc:256
edm::EDGetTokenT< LSTPixelSeedInput > lstPixelSeedInputToken_
Definition: LSTProducer.cc:87
void acquire(device::Event const &event, device::EventSetup const &setup) override
Definition: LSTProducer.cc:37
auto produces(std::string instanceName) noexcept
declare what type of product will make and with which optional label
#define DEFINE_FWK_ALPAKA_MODULE(name)
Definition: MakerMacros.h:16
LSTProducer(edm::ParameterSet const &config)
Definition: LSTProducer.cc:28
std::vector< int > const & seedIdx() const
Definition: LST.h:44
def move(src, dest)
Definition: eostools.py:511
void produce(device::Event &event, device::EventSetup const &) override
Definition: LSTProducer.cc:70
Definition: event.py:1