53 std::vector<const TrackingRecHit *>::iterator hitsBegin,
54 std::vector<const TrackingRecHit *>::iterator hitsEnd);
65 std::vector<edm::ParameterSet> selconfigs = iConfig.
getParameter<std::vector<edm::ParameterSet>>(
"selections");
67 for (std::vector<edm::ParameterSet>::const_iterator selconfig = selconfigs.begin(); selconfig != selconfigs.end();
75 produces<TrackCandidateCollection>();
91 auto const &
tracks = *trackCollectionHandle;
93 auto output = std::make_unique<TrackCandidateCollection>();
97 std::vector<const TrackingRecHit *>
hits;
99 bool saveTrack(
false);
101 for (
auto const &
hit : trk.recHits()) {
102 DetId detid =
hit->geographicalId();
105 if (detidsel.isSelected(detid)) {
106 LogDebug(
"CalibrationTrackSelectorFromDetIdList") <<
"Selected by selection " << detid;
113 hits.emplace_back(
hit);
125 std::vector<const TrackingRecHit *>::iterator hitsBegin,
126 std::vector<const TrackingRecHit *>::iterator hitsEnd) {
130 throw cms::Exception(
"UnimplementedFeature") <<
"Cannot work with tracks that have 'anyDirecton' \n";
145 ownHits.
reserve(hitsEnd - hitsBegin);
146 for (; hitsBegin != hitsEnd; ++hitsBegin) {
147 ownHits.
push_back((*hitsBegin)->clone());
162 for (
const auto &theDet : theDetIds) {
163 if (detidsel.isSelected(theDet)) {
164 LogDebug(
"CalibrationTrackSelectorFromDetIdList") <<
"detid: " << theDet.rawId() <<
" is taken" << std::endl;
const edm::RefToBase< TrajectorySeed > & seedRef() const
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::ESHandle< MagneticField > theMagField
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::ESHandle< TrackerGeometry > theGeometry
edm::EDGetTokenT< reco::TrackCollection > m_label
std::vector< DetIdSelector > detidsels_
const Vector & momentum() const
track momentum vector
const math::XYZPoint & outerPosition() const
position of the outermost hit
const math::XYZPoint & innerPosition() const
position of the innermost hit
~CalibrationTrackSelectorFromDetIdList() override
#define DEFINE_FWK_MODULE(type)
TrackCandidate makeCandidate(const reco::Track &tk, std::vector< const TrackingRecHit * >::iterator hitsBegin, std::vector< const TrackingRecHit * >::iterator hitsEnd)
CalibrationTrackSelectorFromDetIdList(const edm::ParameterSet &)
unsigned int outerDetId() const
DetId of the detector on which surface the outermost state is located.
const DetIdContainer & detIds() const override
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
void produce(edm::Event &, const edm::EventSetup &) override
const PropagationDirection & seedDirection() const
direction of how the hits were sorted in the original seed
void beginRun(edm::Run const &run, const edm::EventSetup &) override
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
T const * product() const