70 produces<TrackCandidateCollection>();
73 if (conf.
exists(
"hitMasks")){
123 for (
unsigned seedIndex = 0; seedIndex < seeds->size(); ++seedIndex){
126 std::vector<int32_t> recHitCombinationIndices;
143 recHitCombinationIndices.push_back(icomb);
147 for(
auto icomb : recHitCombinationIndices)
149 if(icomb < 0 ||
unsigned(icomb) >= recHitCombinations->size())
151 throw cms::Exception(
"TrackCandidateProducer") <<
" found seed with recHitCombination out or range: " << icomb << std::endl;
156 std::vector<const FastTrackerRecHit *> selectedRecHits;
162 selectedRecHits.push_back(static_cast<const FastTrackerRecHit*>(&*ihit));
167 if(!selectedRecHits.empty())
169 lastHitToSkip = selectedRecHits.back();
176 for (
unsigned hitIndex = hitsAlongMomentum ? 0 : recHitCombination.size() - 1;
177 hitIndex < recHitCombination.size();
178 hitsAlongMomentum ? ++hitIndex : --hitIndex)
186 if(lastHitToSkip->
sameId(selectedRecHit))
188 lastHitToSkip=
nullptr;
204 || selectedRecHits.empty()
208 selectedRecHits.push_back(selectedRecHit);
217 selectedRecHits.back() = selectedRecHit;
248 if (!initialTSOS.
isValid())
continue;
PropagationDirection direction() const
void setRecHitCombinationIndex(edm::OwnVector< T > &recHits, int32_t icomb)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
static std::vector< int > matchRecHitCombinations(const TrajectorySeed &seed, const FastTrackerRecHitCombinationCollection &recHitCombinationCollection, const std::vector< SimTrack > &simTrackCollection, double maxMatchEstimator, const Propagator &propagator, const MagneticField &magneticField, const TrackerGeometry &trackerGeometry)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool sameId(const FastTrackerRecHit *other, size_t i=0, size_t j=0) const
edm::EDGetTokenT< edm::SimTrackContainer > simTrackToken
TrackCandidateProducer(const edm::ParameterSet &conf)
static TrackingLayer createFromDetId(const DetId &detId, const TrackerTopology &trackerTopology)
std::vector< TrackCandidate > TrackCandidateCollection
constexpr uint32_t rawId() const
get the raw id
bool exists(std::string const ¶meterName) const
checks if a parameter exists
FastTrackerRecHitSplitter hitSplitter
void produce(edm::Event &e, const edm::EventSetup &es) override
const SurfaceType & surface() const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< FastTrackerRecHitCombinationCollection > recHitCombinationsToken
recHitContainer::const_iterator const_iterator
std::pair< const_iterator, const_iterator > range
unsigned int detId() const
edm::EDGetTokenT< std::vector< bool > > hitMasksToken
double maxSeedMatchEstimator
bool hitIsMasked(const FastTrackerRecHit *hit, const std::vector< bool > &hitMasks)
int32_t getRecHitCombinationIndex(const T &object)
std::vector< FastTrackerRecHitRef > FastTrackerRecHitCombination
PTrajectoryStateOnDet const & startingState() const
void split(const FastTrackerRecHit &hitIn, edm::OwnVector< TrackingRecHit > &hitsOut, bool alongMomentum) const
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
unsigned int nHits() const
double hitLocalError(const TrackingRecHit *hit)
const TrackerGeomDet * idToDet(DetId) const override
bool isUninitialized() const
DetId geographicalId() const
T const * product() const
std::string propagatorLabel