44 template <
typename TrackerTraits>
75 template <
typename TrackerTraits>
78 tokenTrack_(consumes(iConfig.getParameter<
edm::
InputTag>(
"trackSrc"))),
83 minNumberOfHits_(iConfig.getParameter<
int>(
"minNumberOfHits")),
93 produces<TrackingRecHitCollection>();
94 produces<reco::TrackExtraCollection>();
98 produces<reco::TrackCollection>();
102 template <
typename TrackerTraits>
108 desc.add<
int>(
"minNumberOfHits", 0);
113 template <
typename TrackerTraits>
129 auto indToEdmP = std::make_unique<IndToEdm>();
130 auto &indToEdm = *indToEdmP;
132 auto const &idealField = iSetup.
getData(idealMagneticFieldToken_);
136 auto const &httopo = iSetup.
getData(ttTopoToken_);
138 const auto &bsh =
iEvent.get(tBeamSpot_);
142 std::vector<TrackingRecHit const *> hitmap;
143 auto const &rcs =
rechits.data();
144 auto nhits = rcs.size();
146 hitmap.resize(
nhits,
nullptr);
148 auto const *hitsModuleStart =
iEvent.get(hmsToken_).get();
149 auto fc = hitsModuleStart;
151 for (
auto const &
h : rcs) {
154 auto const &clus = thit.firstClusterRef();
156 auto i = fc[detI] + clus.pixelCluster().originalId();
157 if (
i >= hitmap.size())
158 hitmap.resize(
i + 256,
nullptr);
164 std::vector<const TrackingRecHit *>
hits;
167 auto const &tsoa =
iEvent.get(tokenTrack_);
168 auto const *
quality = tsoa.view().quality();
169 auto const &hitIndices = tsoa.view().hitIndices();
170 auto nTracks = tsoa.view().nTracks();
177 std::vector<int32_t> sortIdxs(
nTracks);
178 std::iota(sortIdxs.begin(), sortIdxs.end(), 0);
179 std::sort(sortIdxs.begin(), sortIdxs.end(), [&](int32_t
const i1, int32_t
const i2) {
180 return tsoa.view()[
i1].pt() > tsoa.view()[
i2].pt();
184 indToEdm.resize(sortIdxs.size(), -1);
185 for (
const auto &it : sortIdxs) {
192 if (
nHits < minNumberOfHits_)
198 auto b = hitIndices.begin(it);
199 for (
int iHit = 0; iHit <
nHits; ++iHit)
200 hits[iHit] = hitmap[*(
b + iHit)];
204 float chi2 = tsoa.view()[it].chi2();
214 for (
int i = 0;
i < 5; ++
i)
215 for (
int j =
i;
j < 5; ++
j)
216 m(
i,
j) = ocov(
i,
j);
239 auto tkq = recoQuality[
int(
q)];
240 track->setQuality(tkq);
248 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)