CMS 3D CMS Logo

HEFRecHitFromSoA.cc
Go to the documentation of this file.
8 
11 
13 public:
14  explicit HEFRecHitFromSoA(const edm::ParameterSet& ps);
15  ~HEFRecHitFromSoA() override;
16 
17  void produce(edm::Event&, const edm::EventSetup&) override;
19 
20 private:
21  std::unique_ptr<HGChefRecHitCollection> rechits_;
24 };
25 
27  recHitSoAToken_ = consumes<HGCRecHitCPUProduct>(ps.getParameter<edm::InputTag>("HEFRecHitSoATok"));
28  recHitCollectionToken_ = produces<HGChefRecHitCollection>();
29 }
30 
32 
34  const HGCRecHitCPUProduct& recHits = event.get(recHitSoAToken_);
35  ConstHGCRecHitSoA recHitsSoA = recHits.get();
36  rechits_ = std::make_unique<HGCRecHitCollection>();
37  convert_soa_data_to_collection_(recHits.nHits(), *rechits_, &recHitsSoA);
38  event.put(std::move(rechits_));
39 }
40 
43  ConstHGCRecHitSoA* h_calibSoA) {
44  rechits.reserve(nhits);
45  for (uint i = 0; i < nhits; ++i) {
46  DetId id_converted(h_calibSoA->id_[i]);
47  rechits.emplace_back(id_converted,
48  h_calibSoA->energy_[i],
49  h_calibSoA->time_[i],
50  0,
51  h_calibSoA->flagBits_[i],
52  h_calibSoA->son_[i],
53  h_calibSoA->timeError_[i]);
54  }
55 }
56 
mps_fire.i
i
Definition: mps_fire.py:428
ConstHGCRecHitSoA.h
HEFRecHitFromSoA::recHitCollectionToken_
edm::EDPutTokenT< HGChefRecHitCollection > recHitCollectionToken_
Definition: HEFRecHitFromSoA.cc:23
HGCRecHitCPUProduct
Definition: HGCRecHitCPUProduct.h:12
HEFRecHitFromSoA::convert_soa_data_to_collection_
void convert_soa_data_to_collection_(uint32_t, HGCRecHitCollection &, ConstHGCRecHitSoA *)
Definition: HEFRecHitFromSoA.cc:41
edm::EDGetTokenT< HGCRecHitCPUProduct >
edm::EDPutTokenT
Definition: EDPutToken.h:33
HGCSiliconDetId.h
EDProducer.h
edm::SortedCollection
Definition: SortedCollection.h:49
ConstHGCRecHitSoA::energy_
const float * energy_
Definition: ConstHGCRecHitSoA.h:8
HGCRecHitCPUProduct.h
parallelization.uint
uint
Definition: parallelization.py:124
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
ConstHGCRecHitSoA::son_
const uint8_t * son_
Definition: ConstHGCRecHitSoA.h:13
DetId
Definition: DetId.h:17
MakerMacros.h
ConstHGCRecHitSoA::time_
const float * time_
Definition: ConstHGCRecHitSoA.h:9
HGCRecHit.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
HEFRecHitFromSoA::recHitSoAToken_
edm::EDGetTokenT< HGCRecHitCPUProduct > recHitSoAToken_
Definition: HEFRecHitFromSoA.cc:22
HI_PhotonSkim_cff.rechits
rechits
Definition: HI_PhotonSkim_cff.py:76
nhits
Definition: HIMultiTrackSelector.h:42
EDGetToken.h
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
HGCRecHitCollections.h
edm::ParameterSet
Definition: ParameterSet.h:47
EDPutToken.h
HEFRecHitFromSoA::rechits_
std::unique_ptr< HGChefRecHitCollection > rechits_
Definition: HEFRecHitFromSoA.cc:21
ConstHGCRecHitSoA::flagBits_
const uint32_t * flagBits_
Definition: ConstHGCRecHitSoA.h:12
edm::stream::EDProducer
Definition: EDProducer.h:36
HEFRecHitFromSoA
Definition: HEFRecHitFromSoA.cc:12
HEFRecHitFromSoA::HEFRecHitFromSoA
HEFRecHitFromSoA(const edm::ParameterSet &ps)
Definition: HEFRecHitFromSoA.cc:26
edm::EventSetup
Definition: EventSetup.h:58
ConstHGCRecHitSoA::timeError_
const float * timeError_
Definition: ConstHGCRecHitSoA.h:10
HEFRecHitFromSoA::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: HEFRecHitFromSoA.cc:33
HEFRecHitFromSoA::~HEFRecHitFromSoA
~HEFRecHitFromSoA() override
Definition: HEFRecHitFromSoA.cc:31
eostools.move
def move(src, dest)
Definition: eostools.py:511
ConstHGCRecHitSoA
Definition: ConstHGCRecHitSoA.h:6
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ParameterSet.h
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
ConstHGCRecHitSoA::id_
const uint32_t * id_
Definition: ConstHGCRecHitSoA.h:11