132 auto out = std::make_unique<std::vector<TrajectorySeed>>();
134 for (
auto const &
mu : *src) {
137 if (
debug_ &&
mu.innerTrack().isNonnull())
143 std::unique_ptr<Propagator> pmuon_cloned =
147 int sizeBefore =
out->size();
149 LogDebug(
"OutsideInMuonSeeder") <<
"\n\n\nSeeding for muon of pt " <<
mu.pt() <<
", eta " <<
mu.eta() <<
", phi " 150 <<
mu.phi() << std::endl;
158 std::vector<BarrelDetLayer const *>
const &tob = measurementTracker->geometricSearchTracker()->tobLayers();
160 int iLayer = tob.size();
162 LogError(
"OutsideInMuonSeeder") <<
"TOB has no layers.";
164 for (
auto it = tob.rbegin(), ed = tob.rend(); it != ed; ++it, --iLayer) {
166 LogDebug(
"OutsideInMuonSeeder") <<
"\n ==== Trying TOB " << iLayer <<
" ====" << std::endl;
167 if (
doLayer(**it, state, *
out, *(pmuon_cloned.get()), *(ptracker_cloned.get()), *measurementTracker)) {
175 ? measurementTracker->geometricSearchTracker()->posTidLayers()
176 : measurementTracker->geometricSearchTracker()->posTecLayers();
178 LogDebug(
"OutsideInMuonSeeder") <<
"\n We are using the Phase2 Outer Tracker (defined as a TID+). ";
180 LogTrace(
"OutsideInMuonSeeder") <<
"\n ==== TEC+ tot layers " << forwLayers.size() <<
" ====" << std::endl;
182 int iLayer = forwLayers.size();
184 LogError(
"OutsideInMuonSeeder") <<
"TEC+ has no layers.";
187 LogDebug(
"OutsideInMuonSeeder") <<
"\n ==== Tot layers " << forwLayers.size() <<
" ====" << std::endl;
188 for (
auto it = forwLayers.rbegin(), ed = forwLayers.rend(); it != ed; ++it, --iLayer) {
190 LogDebug(
"OutsideInMuonSeeder") <<
"\n ==== Trying Forward Layer +" << +iLayer <<
" ====" << std::endl;
191 if (
doLayer(**it, state, *
out, *(pmuon_cloned.get()), *(ptracker_cloned.get()), *measurementTracker)) {
199 ? measurementTracker->geometricSearchTracker()->negTidLayers()
200 : measurementTracker->geometricSearchTracker()->negTecLayers();
202 LogDebug(
"OutsideInMuonSeeder") <<
"\n We are using the Phase2 Outer Tracker (defined as a TID-). ";
204 LogTrace(
"OutsideInMuonSeeder") <<
"\n ==== TEC- tot layers " << forwLayers.size() <<
" ====" << std::endl;
206 int iLayer = forwLayers.size();
208 LogError(
"OutsideInMuonSeeder") <<
"TEC- has no layers.";
211 LogDebug(
"OutsideInMuonSeeder") <<
"\n ==== Tot layers " << forwLayers.size() <<
" ====" << std::endl;
212 for (
auto it = forwLayers.rbegin(), ed = forwLayers.rend(); it != ed; ++it, --iLayer) {
214 LogDebug(
"OutsideInMuonSeeder") <<
"\n ==== Trying Forward Layer -" << -iLayer <<
" ====" << std::endl;
215 if (
doLayer(**it, state, *
out, *(pmuon_cloned.get()), *(ptracker_cloned.get()), *measurementTracker)) {
222 LogDebug(
"OutsideInMuonSeeder") <<
"Outcome of seeding for muon of pt " <<
mu.pt() <<
", eta " <<
mu.eta()
223 <<
", phi " <<
mu.phi() <<
": found " << (
out->size() - sizeBefore) <<
" seeds."
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const std::string estimatorName_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::ESHandle< Chi2MeasurementEstimatorBase > estimator_
edm::ESHandle< MagneticField > magfield_
edm::ESHandle< GlobalTrackingGeometry > geometry_
float const maxEtaForTOB_
edm::ESHandle< Propagator > trackerPropagator_
const bool fromVertex_
Do inside-out.
edm::ESHandle< TrajectoryStateUpdator > updator_
int doLayer(const GeometricSearchDet &layer, const TrajectoryStateOnSurface &state, std::vector< TrajectorySeed > &out, const Propagator &muon_propagator, const Propagator &tracker_propagator, const MeasurementTrackerEvent &mte) const
bool isThere(GeomDetEnumerators::SubDetector subdet) const
std::unique_ptr< Propagator > SetPropagationDirection(Propagator const &iprop, PropagationDirection dir)
const bool debug_
Dump deug information.
double eta() const
pseudorapidity of momentum vector
Abs< T >::type abs(const T &t)
const std::string trackerPropagatorName_
const std::string updatorName_
edm::ESHandle< Propagator > muonPropagator_
StringCutObjectSelector< reco::Muon > selector_
Muon selection.
edm::EDGetTokenT< edm::View< reco::Muon > > src_
Labels for input collections.
void doDebug(const reco::Track &tk) const
const int layersToTry_
How many layers to try.
edm::EDGetTokenT< MeasurementTrackerEvent > measurementTrackerTag_
float const minEtaForTEC_
T const * product() const
const std::string muonPropagatorName_