11 for (
auto iTr =
tracks.begin(); iTr !=
tracks.end(); ++iTr) {
12 if (&(*iTr) ==
track) {
13 return iTr -
tracks.begin();
26 std::vector<OnTrackCluster>
clusters{};
28 for (
const auto&
assoc : *trajTrackAssociations) {
29 const auto traj =
assoc.key.get();
32 for (
const auto& meas : traj->measurements()) {
33 const auto& trajState = meas.updatedState();
34 if (!trajState.isValid())
38 const auto trechit = meas.recHit()->hit();
46 clusters.emplace_back(simple->geographicalId().rawId(), simple->cluster().get(), traj,
track, meas);
47 }
else if (simple1d) {
48 clusters.emplace_back(simple1d->geographicalId().rawId(), simple1d->cluster().get(), traj,
track, meas);
55 std::vector<int> c_trackindex;
56 c_trackindex.reserve(
clusters.size());
57 std::vector<uint32_t> c_rawid;
61 c_rawid.push_back(clus.det);
63 addColumn(
out.get(),
"trackindex", c_trackindex,
"Track index");
int findTrackIndex(const edm::Handle< edm::View< reco::Track > > &h, const reco::Track *t)
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
~SiStripOnTrackClusterTableProducerBase() override