43 template <
typename TrackerTraits>
74 template <
typename TrackerTraits>
77 tokenTrack_(consumes(iConfig.getParameter<
edm::
InputTag>(
"trackSrc"))),
82 minNumberOfHits_(iConfig.getParameter<
int>(
"minNumberOfHits")),
92 produces<TrackingRecHitCollection>();
93 produces<reco::TrackExtraCollection>();
97 produces<reco::TrackCollection>();
101 template <
typename TrackerTraits>
107 desc.add<
int>(
"minNumberOfHits", 0);
112 template <
typename TrackerTraits>
128 auto indToEdmP = std::make_unique<IndToEdm>();
129 auto &indToEdm = *indToEdmP;
131 auto const &idealField = iSetup.
getData(idealMagneticFieldToken_);
135 auto const &httopo = iSetup.
getData(ttTopoToken_);
137 const auto &bsh =
iEvent.get(tBeamSpot_);
141 std::vector<TrackingRecHit const *> hitmap;
142 auto const &rcs =
rechits.data();
143 auto nhits = rcs.size();
145 hitmap.resize(
nhits,
nullptr);
147 auto const *hitsModuleStart =
iEvent.get(hmsToken_).get();
148 auto fc = hitsModuleStart;
150 for (
auto const &
h : rcs) {
153 auto const &clus = thit.firstClusterRef();
155 auto i = fc[detI] + clus.pixelCluster().originalId();
156 if (
i >= hitmap.size())
157 hitmap.resize(
i + 256,
nullptr);
163 std::vector<const TrackingRecHit *>
hits;
166 auto const &tsoa =
iEvent.get(tokenTrack_);
167 auto const *
quality = tsoa.view().quality();
168 auto const &hitIndices = tsoa.view().hitIndices();
169 auto nTracks = tsoa.view().nTracks();
176 std::vector<int32_t> sortIdxs(
nTracks);
177 std::iota(sortIdxs.begin(), sortIdxs.end(), 0);
178 std::sort(sortIdxs.begin(), sortIdxs.end(), [&](int32_t
const i1, int32_t
const i2) {
179 return tsoa.view()[
i1].pt() > tsoa.view()[
i2].pt();
183 indToEdm.resize(sortIdxs.size(), -1);
184 for (
const auto &it : sortIdxs) {
191 if (
nHits < minNumberOfHits_)
197 auto b = hitIndices.begin(it);
198 for (
int iHit = 0; iHit <
nHits; ++iHit)
199 hits[iHit] = hitmap[*(
b + iHit)];
203 float chi2 = tsoa.view()[it].chi2();
213 for (
int i = 0;
i < 5; ++
i)
214 for (
int j =
i;
j < 5; ++
j)
215 m(
i,
j) = ocov(
i,
j);
238 auto tkq = recoQuality[
int(
q)];
239 track->setQuality(tkq);
247 track->setQuality(tkq);
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T getParameter(std::string const &) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
const edm::EDGetTokenT< reco::BeamSpot > tBeamSpot_
const edm::EDGetTokenT< TrackSoAHost > tokenTrack_
Quality qualityByName(std::string const &name)
void storeTracks(Ev &ev, const TWH &tracksWithHits, const TrackerTopology &ttopo)
const edm::EDGetTokenT< SiPixelRecHitCollectionNew > cpuHits_
TrackQuality
track quality
Sin< T >::type sin(const T &t)
~PixelTrackProducerFromSoAT() override=default
int32_t const minNumberOfHits_
const GeomDet * det() const
Eigen::Matrix< double, 5, 1 > Vector5d
__host__ __device__ void transformToPerigeePlane(VI5 const &ip, MI5 const &icov, VO5 &op, MO5 &ocov)
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > idealMagneticFieldToken_
LocalVector momentum() const
Momentum vector in the local frame.
Cos< T >::type cos(const T &t)
def template(fileName, svg, replaceme="REPLACEME")
#define DEFINE_FWK_MODULE(type)
TrackCharge charge() const
Charge (-1, 0 or 1)
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
std::vector< uint32_t > IndToEdm
const edm::EDGetTokenT< HMSstorage > hmsToken_
pixelTrack::Quality const minQuality_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
void produce(edm::StreamID streamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
XYZPointD XYZPoint
point in space with cartesian internal representation
PixelTrackProducerFromSoAT(const edm::ParameterSet &iConfig)
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Eigen::Matrix< double, 5, 5 > Matrix5d
std::vector< TrackWithRecHits > TracksWithRecHits
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > ttTopoToken_
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
LocalPoint position() const
Local x and y position coordinates.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)