CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SiStripOnTrackClusterTableProducerBase.h
Go to the documentation of this file.
4 
9 
11 public:
13  : m_name(params.getParameter<std::string>("name")),
14  m_doc(params.existsAs<std::string>("doc") ? params.getParameter<std::string>("doc") : ""),
15  m_extension(params.existsAs<bool>("extension") ? params.getParameter<bool>("extension") : true),
16  m_tracks_token(consumes<edm::View<reco::Track>>(params.getParameter<edm::InputTag>("Tracks"))),
17  m_association_token(consumes<TrajTrackAssociationCollection>(params.getParameter<edm::InputTag>("Tracks"))) {
18  produces<nanoaod::FlatTable>();
19  }
21 
22  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) final;
23 
24  struct OnTrackCluster {
25  uint32_t det;
27  const Trajectory* traj;
30  OnTrackCluster(uint32_t detId,
31  const SiStripCluster* stripCluster,
32  const Trajectory* trajectory,
33  const reco::Track* track_,
34  const TrajectoryMeasurement& measurement_)
35  : det{detId}, cluster{stripCluster}, traj{trajectory}, track{track_}, measurement{measurement_} {}
36  };
37 
38  virtual void fillTable(const std::vector<OnTrackCluster>& clusters,
41  const edm::EventSetup& iSetup) = 0;
42 
43  template <typename VALUES>
44  static void addColumn(nanoaod::FlatTable* table, const std::string& name, VALUES&& values, const std::string& doc) {
46  table->template addColumn<value_type>(name, values, doc);
47  }
48 
49 private:
53 
56 };
auto const & tracks
cannot be loose
SiStripOnTrackClusterTableProducerBase(const edm::ParameterSet &params)
int iEvent
Definition: GenABIO.cc:224
OnTrackCluster(uint32_t detId, const SiStripCluster *stripCluster, const Trajectory *trajectory, const reco::Track *track_, const TrajectoryMeasurement &measurement_)
const edm::EDGetTokenT< TrajTrackAssociationCollection > m_association_token
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) final
static void addColumn(nanoaod::FlatTable *table, const std::string &name, VALUES &&values, const std::string &doc)
const edm::EDGetTokenT< edm::View< reco::Track > > m_tracks_token
virtual void fillTable(const std::vector< OnTrackCluster > &clusters, const edm::View< reco::Track > &tracks, nanoaod::FlatTable *table, const edm::EventSetup &iSetup)=0