137 auto out = std::make_unique<std::vector<TrajectorySeed>>();
139 for (
auto const &
mu : *src) {
150 int sizeBefore =
out->size();
151 if (
debug_)
LogDebug(
"OutsideInMuonSeeder") <<
"\n\n\nSeeding for muon of pt " <<
mu.pt() <<
", eta " <<
mu.eta() <<
", phi " <<
mu.phi() << std::endl;
159 std::vector< BarrelDetLayer const* >
const & tob = measurementTracker->geometricSearchTracker()->tobLayers();
161 int iLayer = tob.size();
162 if(iLayer==0)
LogError(
"OutsideInMuonSeeder") <<
"TOB has no layers." ;
164 for (
auto it = tob.rbegin(), ed = tob.rend(); it != ed; ++it, --iLayer) {
165 if (
debug_)
LogDebug(
"OutsideInMuonSeeder") <<
"\n ==== Trying TOB " << iLayer <<
" ====" << std::endl;
167 *(pmuon_cloned.get()),
168 *(ptracker_cloned.get()),
169 *measurementTracker)) {
176 measurementTracker->geometricSearchTracker()->posTidLayers() : 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();
183 if(iLayer==0)
LogError(
"OutsideInMuonSeeder") <<
"TEC+ has no layers." ;
185 if (
debug_)
LogDebug(
"OutsideInMuonSeeder") <<
"\n ==== Tot layers " << forwLayers.size() <<
" ====" << std::endl;
186 for (
auto it = forwLayers.rbegin(), ed = forwLayers.rend(); it != ed; ++it, --iLayer) {
187 if (
debug_)
LogDebug(
"OutsideInMuonSeeder") <<
"\n ==== Trying Forward Layer +" << +iLayer <<
" ====" << std::endl;
189 *(pmuon_cloned.get()),
190 *(ptracker_cloned.get()),
191 *measurementTracker)) {
198 measurementTracker->geometricSearchTracker()->negTidLayers() : measurementTracker->geometricSearchTracker()->negTecLayers();
200 LogDebug(
"OutsideInMuonSeeder") <<
"\n We are using the Phase2 Outer Tracker (defined as a TID-). ";
202 LogTrace(
"OutsideInMuonSeeder") <<
"\n ==== TEC- tot layers " << forwLayers.size() <<
" ====" << std::endl;
204 int iLayer = forwLayers.size();
205 if(iLayer==0)
LogError(
"OutsideInMuonSeeder") <<
"TEC- has no layers." ;
207 if (
debug_)
LogDebug(
"OutsideInMuonSeeder") <<
"\n ==== Tot layers " << forwLayers.size() <<
" ====" << std::endl;
208 for (
auto it = forwLayers.rbegin(), ed = forwLayers.rend(); it != ed; ++it, --iLayer) {
209 if (
debug_)
LogDebug(
"OutsideInMuonSeeder") <<
"\n ==== Trying Forward Layer -" << -iLayer <<
" ====" << std::endl;
211 *(pmuon_cloned.get()),
212 *(ptracker_cloned.get()),
213 *measurementTracker)) {
218 if (
debug_)
LogDebug(
"OutsideInMuonSeeder") <<
"Outcome of seeding for muon of pt " <<
mu.pt() <<
", eta " <<
mu.eta() <<
", phi " <<
mu.phi() <<
": found " << (
out->size() - sizeBefore) <<
" seeds."<< std::endl;
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_