70 produces<TrackCandidateCollection>();
73 if (conf.
exists(
"hitMasks")){
113 const std::vector<bool> * hitMasks = 0;
117 hitMasks = &(*hitMasksHandle);
124 for (
unsigned seedIndex = 0; seedIndex < seeds->size(); ++seedIndex){
127 std::vector<int32_t> recHitCombinationIndices;
144 recHitCombinationIndices.push_back(icomb);
148 for(
auto icomb : recHitCombinationIndices)
150 if(icomb < 0 ||
unsigned(icomb) >= recHitCombinations->size())
152 throw cms::Exception(
"TrackCandidateProducer") <<
" found seed with recHitCombination out or range: " << icomb << std::endl;
157 std::vector<const FastTrackerRecHit *> selectedRecHits;
163 selectedRecHits.push_back(static_cast<const FastTrackerRecHit*>(&*ihit));
168 if(selectedRecHits.size() > 0)
170 lastHitToSkip = selectedRecHits.back();
177 for (
unsigned hitIndex = hitsAlongMomentum ? 0 : recHitCombination.size() - 1;
178 hitIndex < recHitCombination.size();
179 hitsAlongMomentum ? ++hitIndex : --hitIndex)
187 if(lastHitToSkip->
sameId(selectedRecHit))
205 || selectedRecHits.size() == 0
209 selectedRecHits.push_back(selectedRecHit);
218 selectedRecHits.back() = selectedRecHit;
243 const GeomDet* gdet = trackerGeometry->idToDet(seedDetId);
249 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)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool sameId(const FastTrackerRecHit *other, size_t i=0, size_t j=0) const
#define DEFINE_FWK_MODULE(type)
TrackCandidateProducer(const edm::ParameterSet &conf)
static TrackingLayer createFromDetId(const DetId &detId, const TrackerTopology &trackerTopology)
std::vector< TrackCandidate > TrackCandidateCollection
bool exists(std::string const ¶meterName) const
checks if a parameter exists
bool hitIsMasked(const FastTrackerRecHit *hit, const std::vector< bool > *hitMasks)
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedToken
FastTrackerRecHitSplitter hitSplitter
edm::EDGetTokenT< FastTrackerRecHitCombinationCollection > recHitCombinationsToken
edm::EDGetTokenT< std::vector< bool > > hitMasksToken
virtual void produce(edm::Event &e, const edm::EventSetup &es) override
uint32_t rawId() const
get the raw id
const SurfaceType & surface() const
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
recHitContainer::const_iterator const_iterator
std::pair< const_iterator, const_iterator > range
unsigned int detId() const
double maxSeedMatchEstimator
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
T const * product() const
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
unsigned int nHits() const
double hitLocalError(const TrackingRecHit *hit)
bool isUninitialized() const
edm::EDGetTokenT< edm::SimTrackContainer > simTrackToken
DetId geographicalId() const
std::string propagatorLabel