File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
RecoTracker/LST/plugins/alpaka Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -158,14 +158,21 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
158158
159159 std::vector<int > hitIdx;
160160 for (auto const & hit : seed.recHits ()) {
161+ auto det = hit.geographicalId ().det ();
161162 int subid = hit.geographicalId ().subdetId ();
162- if (subid == ( int )PixelSubdetector::PixelBarrel || subid == ( int )PixelSubdetector::PixelEndcap ) {
163+ if (det == DetId::Tracker ) {
163164 const BaseTrackerRecHit* bhit = dynamic_cast <const BaseTrackerRecHit*>(&hit);
164165 const auto & clusterRef = bhit->firstClusterRef ();
165- const auto clusterKey = clusterRef.cluster_pixel ().key ();
166- hitIdx.push_back (clusterKey);
166+ if (subid == (int )PixelSubdetector::PixelBarrel || subid == (int )PixelSubdetector::PixelEndcap) {
167+ const auto clusterKey = clusterRef.cluster_pixel ().key ();
168+ hitIdx.push_back (clusterKey);
169+ } else if (clusterRef.isPhase2 ()) {
170+ hitIdx.push_back (clusterRef.rawIndex ());
171+ } else {
172+ throw cms::Exception (" LSTInputProducer" ) << " Unknown tracker hit type found!" ;
173+ }
167174 } else {
168- throw cms::Exception (" LSTInputProducer" ) << " Not pixel hits found!" ;
175+ throw cms::Exception (" LSTInputProducer" ) << " Not tracker hit found!" ;
169176 }
170177 }
171178
You can’t perform that action at this time.
0 commit comments