4 #include "FWCore/Framework/interface/Event.h"
5 #include "FWCore/Framework/interface/EventSetup.h"
6 #include "FWCore/Framework/interface/MakerMacros.h"
7 #include "FWCore/ParameterSet/interface/ParameterSet.h"
8 #include "FWCore/Utilities/interface/InputTag.h"
9 #include "DataFormats/Common/interface/Handle.h"
10 #include "DataFormats/Common/interface/View.h"
11 #include "DataFormats/TrackReco/interface/Track.h"
12 #include "DataFormats/TrackReco/interface/TrackFwd.h"
20 : input_(config.getParameter<
edm::InputTag>(
"input")),
21 branch_(config.getParameter<
std::string>(
"branch")) {
22 consumes<edm::View<reco::Track>>(input_);
23 tracks_ =
new std::vector<ic::LightTrack>();
29 void ICLightTrackProducer::produce(edm::Event& event,
const edm::EventSetup& setup) {
30 edm::Handle<edm::View<reco::Track> > track_handle;
31 event.getByLabel(input_, track_handle);
37 for (
unsigned i = 0; i < track_handle->size(); ++i) {
38 reco::Track
const& src = track_handle->at(i);
40 dest.
set_id(track_hasher_(&src));
46 void ICLightTrackProducer::beginJob() {
50 void ICLightTrackProducer::endJob() {}
void set_pt(double const &pt)
The track transverse momentum.
ICLightTrackProducer(const edm::ParameterSet &)
DEFINE_FWK_MODULE(ICLightTrackProducer)
void set_vz(double const &vz)
The z-coordinate of the point-of-closest-approach to the beamspot.
Stores a minimal amount of track information.
void set_id(std::size_t const &id)
The unique identifier.