CMS 3D CMS Logo

EERecHitFromSoA.cc
Go to the documentation of this file.
8 
11 
13 public:
14  explicit EERecHitFromSoA(const edm::ParameterSet& ps);
15  ~EERecHitFromSoA() override;
16 
17  void produce(edm::Event&, const edm::EventSetup&) override;
19 
20 private:
21  std::unique_ptr<HGCeeRecHitCollection> rechits_;
24 };
25 
27  recHitSoAToken_ = consumes<HGCRecHitCPUProduct>(ps.getParameter<edm::InputTag>("EERecHitSoATok"));
28  recHitCollectionToken_ = produces<HGCeeRecHitCollection>();
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 
EERecHitFromSoA::EERecHitFromSoA
EERecHitFromSoA(const edm::ParameterSet &ps)
Definition: EERecHitFromSoA.cc:26
EERecHitFromSoA
Definition: EERecHitFromSoA.cc:12
mps_fire.i
i
Definition: mps_fire.py:428
ConstHGCRecHitSoA.h
HGCRecHitCPUProduct
Definition: HGCRecHitCPUProduct.h:12
edm::EDGetTokenT< HGCRecHitCPUProduct >
edm::EDPutTokenT
Definition: EDPutToken.h:33
HGCSiliconDetId.h
EERecHitFromSoA::recHitSoAToken_
edm::EDGetTokenT< HGCRecHitCPUProduct > recHitSoAToken_
Definition: EERecHitFromSoA.cc:22
EDProducer.h
edm::SortedCollection
Definition: SortedCollection.h:49
EERecHitFromSoA::~EERecHitFromSoA
~EERecHitFromSoA() override
Definition: EERecHitFromSoA.cc:31
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
EERecHitFromSoA::convert_soa_data_to_collection_
void convert_soa_data_to_collection_(uint32_t, HGCRecHitCollection &, ConstHGCRecHitSoA *)
Definition: EERecHitFromSoA.cc:41
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
EERecHitFromSoA::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: EERecHitFromSoA.cc:33
ConstHGCRecHitSoA::flagBits_
const uint32_t * flagBits_
Definition: ConstHGCRecHitSoA.h:12
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:58
ConstHGCRecHitSoA::timeError_
const float * timeError_
Definition: ConstHGCRecHitSoA.h:10
EERecHitFromSoA::rechits_
std::unique_ptr< HGCeeRecHitCollection > rechits_
Definition: EERecHitFromSoA.cc:21
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
EERecHitFromSoA::recHitCollectionToken_
edm::EDPutTokenT< HGCeeRecHitCollection > recHitCollectionToken_
Definition: EERecHitFromSoA.cc:23