CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
OutsideInMuonSeeder Class Reference
Inheritance diagram for OutsideInMuonSeeder:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 OutsideInMuonSeeder (const edm::ParameterSet &iConfig)
 
virtual void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
virtual ~OutsideInMuonSeeder ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void doDebug (const reco::Track &tk) const
 
int doLayer (const GeometricSearchDet &layer, const TrajectoryStateOnSurface &state, std::vector< TrajectorySeed > &out, const Propagator &muon_propagator, const Propagator &tracker_propagator, const MeasurementTrackerEvent &mte) const
 

Private Attributes

bool debug_
 Dump deug information. More...
 
Plane::PlanePointer dummyPlane_
 Surface used to make a TSOS at the PCA to the beamline. More...
 
double errorRescaling_
 How much to rescale errors from STA. More...
 
edm::ESHandle< Chi2MeasurementEstimatorBaseestimator_
 
std::string estimatorName_
 
bool fromVertex_
 Do inside-out. More...
 
edm::ESHandle< GlobalTrackingGeometrygeometry_
 
int hitsToTry_
 How many hits to try on same layer. More...
 
int layersToTry_
 How many layers to try. More...
 
edm::ESHandle< MagneticFieldmagfield_
 
double maxEtaForTOB_
 
std::string measurementTrackerName_
 
edm::EDGetTokenT< MeasurementTrackerEventmeasurementTrackerTag_
 
double minEtaForTEC_
 
edm::ESHandle< PropagatormuonPropagator_
 
std::string muonPropagatorName_
 
StringCutObjectSelector< reco::Muonselector_
 Muon selection. More...
 
edm::EDGetTokenT< edm::View< reco::Muon > > src_
 Labels for input collections. More...
 
edm::ESHandle< PropagatortrackerPropagator_
 
std::string trackerPropagatorName_
 
edm::ESHandle< TrajectoryStateUpdatorupdator_
 
std::string updatorName_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 44 of file OutsideInMuonSeeder.cc.

Constructor & Destructor Documentation

OutsideInMuonSeeder::OutsideInMuonSeeder ( const edm::ParameterSet iConfig)
explicit

Definition at line 102 of file OutsideInMuonSeeder.cc.

References updatorName_.

102  :
104  selector_(iConfig.existsAs<std::string>("cut") ? iConfig.getParameter<std::string>("cut") : "", true),
105  layersToTry_(iConfig.getParameter<int32_t>("layersToTry")),
106  hitsToTry_(iConfig.getParameter<int32_t>("hitsToTry")),
107  fromVertex_(iConfig.getParameter<bool>("fromVertex")),
108  errorRescaling_(iConfig.getParameter<double>("errorRescaleFactor")),
109  trackerPropagatorName_(iConfig.getParameter<std::string>("trackerPropagator")),
110  muonPropagatorName_(iConfig.getParameter<std::string>("muonPropagator")),
111  measurementTrackerTag_(consumes<MeasurementTrackerEvent>(edm::InputTag("MeasurementTrackerEvent"))),
112  estimatorName_(iConfig.getParameter<std::string>("hitCollector")),
113  minEtaForTEC_(iConfig.getParameter<double>("minEtaForTEC")),
114  maxEtaForTOB_(iConfig.getParameter<double>("maxEtaForTOB")),
115  debug_(iConfig.getUntrackedParameter<bool>("debug",false)),
117 {
118  produces<std::vector<TrajectorySeed> >();
119  updatorName_ = "KFUpdator";
120 }
int hitsToTry_
How many hits to try on same layer.
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:186
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::string trackerPropagatorName_
bool debug_
Dump deug information.
static PlanePointer build(Args &&...args)
Definition: Plane.h:33
int layersToTry_
How many layers to try.
StringCutObjectSelector< reco::Muon > selector_
Muon selection.
double errorRescaling_
How much to rescale errors from STA.
edm::EDGetTokenT< edm::View< reco::Muon > > src_
Labels for input collections.
edm::EDGetTokenT< MeasurementTrackerEvent > measurementTrackerTag_
Plane::PlanePointer dummyPlane_
Surface used to make a TSOS at the PCA to the beamline.
bool fromVertex_
Do inside-out.
virtual OutsideInMuonSeeder::~OutsideInMuonSeeder ( )
inlinevirtual

Definition at line 47 of file OutsideInMuonSeeder.cc.

References iEvent, and produce().

47 { }

Member Function Documentation

void OutsideInMuonSeeder::doDebug ( const reco::Track tk) const
private

Definition at line 289 of file OutsideInMuonSeeder.cc.

References alongMomentum, DEFINE_FWK_MODULE, TrackingRecHit::geographicalId(), geometry_, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), mps_fire::i, GlobalTrackingGeometry::idToDet(), trajectoryStateTransform::innerStateOnSurface(), TrajectoryStateOnSurface::isValid(), TrackingRecHit::isValid(), LogDebug, magfield_, muonPropagator_, DetId::rawId(), reco::Track::recHit(), reco::Track::recHitsSize(), SetPropagationDirection(), and GeomDet::surface().

Referenced by produce().

289  {
291  std::unique_ptr<Propagator> pmuon_cloned = SetPropagationDirection(*muonPropagator_, alongMomentum);
292  for (unsigned int i = 0; i < tk.recHitsSize(); ++i) {
293  const TrackingRecHit *hit = &*tk.recHit(i);
294  const GeomDet *det = geometry_->idToDet(hit->geographicalId());
295  if (det == 0) continue;
296  if (i != 0) tsos = pmuon_cloned->propagate(tsos, det->surface());
297  if (!tsos.isValid()) continue;
298  LogDebug("OutsideInMuonSeeder") << " state " << i << " at x = " << tsos.globalPosition() << ", p = " << tsos.globalMomentum() << std::endl;
299  if (hit->isValid()) {
300  LogDebug("OutsideInMuonSeeder") << " valid rechit on detid " << hit->geographicalId().rawId() << std::endl;
301  } else {
302  LogDebug("OutsideInMuonSeeder") << " invalid rechit on detid " << hit->geographicalId().rawId() << std::endl;
303  }
304  }
305 }
#define LogDebug(id)
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
Definition: Track.h:119
edm::ESHandle< MagneticField > magfield_
edm::ESHandle< GlobalTrackingGeometry > geometry_
GlobalPoint globalPosition() const
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
virtual const GeomDet * idToDet(DetId) const
std::unique_ptr< Propagator > SetPropagationDirection(Propagator const &iprop, PropagationDirection dir)
edm::ESHandle< Propagator > muonPropagator_
bool isValid() const
GlobalVector globalMomentum() const
TrackingRecHitRef recHit(size_t i) const
Get i-th hit on the track.
Definition: Track.h:114
DetId geographicalId() const
TrajectoryStateOnSurface innerStateOnSurface(const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field, bool withErr=true)
int OutsideInMuonSeeder::doLayer ( const GeometricSearchDet layer,
const TrajectoryStateOnSurface state,
std::vector< TrajectorySeed > &  out,
const Propagator muon_propagator,
const Propagator tracker_propagator,
const MeasurementTrackerEvent mte 
) const
private

Definition at line 238 of file OutsideInMuonSeeder.cc.

References MessageLogger_cfi::cerr, GeometricSearchDet::compatibleDetsV(), debug_, errorRescaling_, estimator_, MeasurementDetWithData::fastMeasurements(), runEdmFileComparison::found, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), hitsToTry_, MeasurementTrackerEvent::idToDet(), MeasurementDetWithData::isNull(), TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localError(), LogDebug, eostools::move(), oppositeToMomentum, trajectoryStateTransform::persistentState(), LocalTrajectoryError::positionError(), edm::OwnVector< T, P >::push_back(), TrajectoryStateOnSurface::rescaleError(), SurveyInfoScenario_cff::seed, mathSSE::sqrt(), TrajectoryStateUpdator::update(), updator_, LocalError::xx(), and LocalError::yy().

Referenced by produce().

243  {
244  TrajectoryStateOnSurface onLayer(state);
245  onLayer.rescaleError(errorRescaling_);
246  std::vector< GeometricSearchDet::DetWithState > dets;
247  layer.compatibleDetsV(onLayer, muon_propagator, *estimator_, dets);
248 
249  if (debug_) {
250  LogDebug("OutsideInMuonSeeder") << "Query on layer around x = " << onLayer.globalPosition() <<
251  " with local pos error " << sqrt(onLayer.localError().positionError().xx()) << " , " << sqrt(onLayer.localError().positionError().yy()) << " , " <<
252  " returned " << dets.size() << " compatible detectors" << std::endl;
253  }
254 
255  std::vector<TrajectoryMeasurement> meas;
256  for (std::vector<GeometricSearchDet::DetWithState>::const_iterator it = dets.begin(), ed = dets.end(); it != ed; ++it) {
257  MeasurementDetWithData det = measurementTracker.idToDet(it->first->geographicalId());
258  if (det.isNull()) { std::cerr << "BOGUS detid " << it->first->geographicalId().rawId() << std::endl; continue; }
259  if (!it->second.isValid()) continue;
260  std::vector < TrajectoryMeasurement > mymeas = det.fastMeasurements(it->second, state, tracker_propagator, *estimator_);
261  if (debug_) LogDebug("OutsideInMuonSeeder") << "Query on detector " << it->first->geographicalId().rawId() << " returned " << mymeas.size() << " measurements." << std::endl;
262  for (std::vector<TrajectoryMeasurement>::const_iterator it2 = mymeas.begin(), ed2 = mymeas.end(); it2 != ed2; ++it2) {
263  if (it2->recHit()->isValid()) meas.push_back(*it2);
264  }
265  }
266  int found = 0;
267  std::sort(meas.begin(), meas.end(), TrajMeasLessEstim());
268  for (std::vector<TrajectoryMeasurement>::const_iterator it2 = meas.begin(), ed2 = meas.end(); it2 != ed2; ++it2) {
269  if (debug_) {
270  LogDebug("OutsideInMuonSeeder") << " inspecting Hit with chi2 = " << it2->estimate() << std::endl;
271  LogDebug("OutsideInMuonSeeder") << " track state " << it2->forwardPredictedState().globalPosition() << std::endl;
272  LogDebug("OutsideInMuonSeeder") << " rechit position " << it2->recHit()->globalPosition() << std::endl;
273  }
274  TrajectoryStateOnSurface updated = updator_->update(it2->forwardPredictedState(), *it2->recHit());
275  if (updated.isValid()) {
276  if (debug_) LogDebug("OutsideInMuonSeeder") << " --> updated state: x = " << updated.globalPosition() << ", p = " << updated.globalMomentum() << std::endl;
278  seedHits.push_back(*it2->recHit()->hit());
279  PTrajectoryStateOnDet const & pstate = trajectoryStateTransform::persistentState(updated, it2->recHit()->geographicalId().rawId());
280  TrajectorySeed seed(pstate, std::move(seedHits), oppositeToMomentum);
281  out.push_back(seed);
282  found++; if (found == hitsToTry_) break;
283  }
284  }
285  return found;
286 }
#define LogDebug(id)
int hitsToTry_
How many hits to try on same layer.
edm::ESHandle< Chi2MeasurementEstimatorBase > estimator_
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
GlobalPoint globalPosition() const
edm::ESHandle< TrajectoryStateUpdator > updator_
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const =0
void push_back(D *&d)
Definition: OwnVector.h:290
bool debug_
Dump deug information.
T sqrt(T t)
Definition: SSEVec.h:18
std::vector< TrajectoryMeasurement > fastMeasurements(const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &tsos2, const Propagator &prop, const MeasurementEstimator &est) const
double errorRescaling_
How much to rescale errors from STA.
GlobalVector globalMomentum() const
virtual void compatibleDetsV(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetWithState > &result) const
def move(src, dest)
Definition: eostools.py:510
void OutsideInMuonSeeder::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Definition at line 123 of file OutsideInMuonSeeder.cc.

References funct::abs(), alongMomentum, debug_, doDebug(), doLayer(), dummyPlane_, estimator_, estimatorName_, reco::LeafCandidate::eta(), reco::TrackBase::eta(), runEdmFileComparison::found, fromVertex_, geometry_, edm::EventSetup::get(), edm::Event::getByToken(), trajectoryStateTransform::initialFreeState(), trajectoryStateTransform::innerStateOnSurface(), reco::Muon::innerTrack(), edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::isNull(), TrackerGeometry::isThere(), layersToTry_, LogDebug, LogTrace, magfield_, maxEtaForTOB_, MeasurementTrackerEventProducer_cfi::measurementTracker, measurementTrackerTag_, minEtaForTEC_, eostools::move(), RPCpg::mu, muonPropagator_, muonPropagatorName_, oppositeToMomentum, MillePedeFileConverter_cfg::out, reco::Muon::outerTrack(), GeomDetEnumerators::P2OTEC, reco::LeafCandidate::phi(), FreeTrajectoryState::position(), edm::ESHandle< T >::product(), reco::LeafCandidate::pt(), edm::Event::put(), selector_, SetPropagationDirection(), TrackRefitter_38T_cff::src, src_, trackerPropagator_, trackerPropagatorName_, updator_, and updatorName_.

Referenced by ~OutsideInMuonSeeder().

123  {
124  using namespace edm;
125  using namespace std;
126 
127  iSetup.get<IdealMagneticFieldRecord>().get(magfield_);
133 
135  iEvent.getByToken(measurementTrackerTag_, measurementTracker);
136 
137  ESHandle<TrackerGeometry> tmpTkGeometry;
138  iSetup.get<TrackerDigiGeometryRecord>().get(tmpTkGeometry);
139 
141  iEvent.getByToken(src_, src);
142 
143 
144  auto out = std::make_unique<std::vector<TrajectorySeed>>();
145 
146  for (View<reco::Muon>::const_iterator it = src->begin(), ed = src->end(); it != ed; ++it) {
147  const reco::Muon &mu = *it;
148  if (mu.outerTrack().isNull() || !selector_(mu)) continue;
149  if (debug_ && mu.innerTrack().isNonnull()) doDebug(*mu.innerTrack());
150 
151  // Better clone here and not directly into doLayer to avoid
152  // useless clone/destroy operations to set, in the end, the
153  // very same direction every single time.
154  std::unique_ptr<Propagator> pmuon_cloned = SetPropagationDirection(*muonPropagator_,
156  std::unique_ptr<Propagator> ptracker_cloned = SetPropagationDirection(*trackerPropagator_, alongMomentum);
157 
158  int sizeBefore = out->size();
159  if (debug_) LogDebug("OutsideInMuonSeeder") << "\n\n\nSeeding for muon of pt " << mu.pt() << ", eta " << mu.eta() << ", phi " << mu.phi() << std::endl;
160  const reco::Track &tk = *mu.outerTrack();
161 
163  if (fromVertex_) {
165  dummyPlane_->move(fstate.position() - dummyPlane_->position());
166  state = TrajectoryStateOnSurface(fstate, *dummyPlane_);
167  } else {
169  }
170  if (std::abs(tk.eta()) < maxEtaForTOB_) {
171  std::vector< BarrelDetLayer const* > const & tob = measurementTracker->geometricSearchTracker()->tobLayers();
172  int found = 0;
173  int iLayer = tob.size();
174  if(iLayer==0) LogError("OutsideInMuonSeeder") << "TOB has no layers." ;
175 
176  for (auto it = tob.rbegin(), ed = tob.rend(); it != ed; ++it, --iLayer) {
177  if (debug_) LogDebug("OutsideInMuonSeeder") << "\n ==== Trying TOB " << iLayer << " ====" << std::endl;
178  if (doLayer(**it, state, *out,
179  *(pmuon_cloned.get()),
180  *(ptracker_cloned.get()),
181  *measurementTracker)) {
182  if (++found == layersToTry_) break;
183  }
184  }
185  }
186  if (tk.eta() > minEtaForTEC_) {
187  const auto& forwLayers = tmpTkGeometry->isThere(GeomDetEnumerators::P2OTEC) ?
188  measurementTracker->geometricSearchTracker()->posTidLayers() : measurementTracker->geometricSearchTracker()->posTecLayers();
189  if (tmpTkGeometry->isThere(GeomDetEnumerators::P2OTEC)) {
190  LogDebug("OutsideInMuonSeeder") << "\n We are using the Phase2 Outer Tracker (defined as a TID+). ";
191  }
192  LogTrace("OutsideInMuonSeeder") << "\n ==== TEC+ tot layers " << forwLayers.size() << " ====" << std::endl;
193  int found = 0;
194  int iLayer = forwLayers.size();
195  if(iLayer==0) LogError("OutsideInMuonSeeder") << "TEC+ has no layers." ;
196 
197  if (debug_) LogDebug("OutsideInMuonSeeder") << "\n ==== Tot layers " << forwLayers.size() << " ====" << std::endl;
198  for (auto it = forwLayers.rbegin(), ed = forwLayers.rend(); it != ed; ++it, --iLayer) {
199  if (debug_) LogDebug("OutsideInMuonSeeder") << "\n ==== Trying Forward Layer +" << +iLayer << " ====" << std::endl;
200  if (doLayer(**it, state, *out,
201  *(pmuon_cloned.get()),
202  *(ptracker_cloned.get()),
203  *measurementTracker)) {
204  if (++found == layersToTry_) break;
205  }
206  }
207  }
208  if (tk.eta() < -minEtaForTEC_) {
209  const auto& forwLayers = tmpTkGeometry->isThere(GeomDetEnumerators::P2OTEC) ?
210  measurementTracker->geometricSearchTracker()->negTidLayers() : measurementTracker->geometricSearchTracker()->negTecLayers();
211  if (tmpTkGeometry->isThere(GeomDetEnumerators::P2OTEC)) {
212  LogDebug("OutsideInMuonSeeder") << "\n We are using the Phase2 Outer Tracker (defined as a TID-). ";
213  }
214  LogTrace("OutsideInMuonSeeder") << "\n ==== TEC- tot layers " << forwLayers.size() << " ====" << std::endl;
215  int found = 0;
216  int iLayer = forwLayers.size();
217  if(iLayer==0) LogError("OutsideInMuonSeeder") << "TEC- has no layers." ;
218 
219  if (debug_) LogDebug("OutsideInMuonSeeder") << "\n ==== Tot layers " << forwLayers.size() << " ====" << std::endl;
220  for (auto it = forwLayers.rbegin(), ed = forwLayers.rend(); it != ed; ++it, --iLayer) {
221  if (debug_) LogDebug("OutsideInMuonSeeder") << "\n ==== Trying Forward Layer -" << -iLayer << " ====" << std::endl;
222  if (doLayer(**it, state, *out,
223  *(pmuon_cloned.get()),
224  *(ptracker_cloned.get()),
225  *measurementTracker)) {
226  if (++found == layersToTry_) break;
227  }
228  }
229  }
230  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;
231 
232  }
233 
234  iEvent.put(std::move(out));
235 }
#define LogDebug(id)
virtual double pt() const final
transverse momentum
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
virtual double eta() const final
momentum pseudorapidity
virtual TrackRef innerTrack() const
Definition: Muon.h:48
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
edm::ESHandle< Chi2MeasurementEstimatorBase > estimator_
edm::ESHandle< MagneticField > magfield_
edm::ESHandle< GlobalTrackingGeometry > geometry_
edm::ESHandle< Propagator > trackerPropagator_
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
virtual double phi() const final
momentum azimuthal angle
std::unique_ptr< Propagator > SetPropagationDirection(Propagator const &iprop, PropagationDirection dir)
std::string trackerPropagatorName_
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:646
bool debug_
Dump deug information.
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const int mu
Definition: Constants.h:22
bool isNull() const
Checks for null.
Definition: Ref.h:249
#define LogTrace(id)
virtual TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only
Definition: Muon.h:51
edm::ESHandle< Propagator > muonPropagator_
GlobalPoint position() const
const T & get() const
Definition: EventSetup.h:56
int layersToTry_
How many layers to try.
StringCutObjectSelector< reco::Muon > selector_
Muon selection.
edm::EDGetTokenT< edm::View< reco::Muon > > src_
Labels for input collections.
void doDebug(const reco::Track &tk) const
HLT enums.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
edm::EDGetTokenT< MeasurementTrackerEvent > measurementTrackerTag_
Plane::PlanePointer dummyPlane_
Surface used to make a TSOS at the PCA to the beamline.
FreeTrajectoryState initialFreeState(const reco::Track &tk, const MagneticField *field, bool withErr=true)
T const * product() const
Definition: ESHandle.h:86
bool fromVertex_
Do inside-out.
def move(src, dest)
Definition: eostools.py:510
TrajectoryStateOnSurface innerStateOnSurface(const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field, bool withErr=true)

Member Data Documentation

bool OutsideInMuonSeeder::debug_
private

Dump deug information.

Definition at line 87 of file OutsideInMuonSeeder.cc.

Referenced by doLayer(), and produce().

Plane::PlanePointer OutsideInMuonSeeder::dummyPlane_
private

Surface used to make a TSOS at the PCA to the beamline.

Definition at line 90 of file OutsideInMuonSeeder.cc.

Referenced by produce().

double OutsideInMuonSeeder::errorRescaling_
private

How much to rescale errors from STA.

Definition at line 68 of file OutsideInMuonSeeder.cc.

Referenced by doLayer().

edm::ESHandle<Chi2MeasurementEstimatorBase> OutsideInMuonSeeder::estimator_
private

Definition at line 83 of file OutsideInMuonSeeder.cc.

Referenced by doLayer(), and produce().

std::string OutsideInMuonSeeder::estimatorName_
private

Definition at line 74 of file OutsideInMuonSeeder.cc.

Referenced by produce().

bool OutsideInMuonSeeder::fromVertex_
private

Do inside-out.

Definition at line 65 of file OutsideInMuonSeeder.cc.

Referenced by produce().

edm::ESHandle<GlobalTrackingGeometry> OutsideInMuonSeeder::geometry_
private

Definition at line 82 of file OutsideInMuonSeeder.cc.

Referenced by doDebug(), and produce().

int OutsideInMuonSeeder::hitsToTry_
private

How many hits to try on same layer.

Definition at line 62 of file OutsideInMuonSeeder.cc.

Referenced by doLayer().

int OutsideInMuonSeeder::layersToTry_
private

How many layers to try.

Definition at line 59 of file OutsideInMuonSeeder.cc.

Referenced by produce().

edm::ESHandle<MagneticField> OutsideInMuonSeeder::magfield_
private

Definition at line 79 of file OutsideInMuonSeeder.cc.

Referenced by doDebug(), and produce().

double OutsideInMuonSeeder::maxEtaForTOB_
private

Definition at line 77 of file OutsideInMuonSeeder.cc.

Referenced by produce().

std::string OutsideInMuonSeeder::measurementTrackerName_
private

Definition at line 73 of file OutsideInMuonSeeder.cc.

edm::EDGetTokenT<MeasurementTrackerEvent> OutsideInMuonSeeder::measurementTrackerTag_
private

Definition at line 72 of file OutsideInMuonSeeder.cc.

Referenced by produce().

double OutsideInMuonSeeder::minEtaForTEC_
private

Definition at line 77 of file OutsideInMuonSeeder.cc.

Referenced by produce().

edm::ESHandle<Propagator> OutsideInMuonSeeder::muonPropagator_
private

Definition at line 80 of file OutsideInMuonSeeder.cc.

Referenced by doDebug(), and produce().

std::string OutsideInMuonSeeder::muonPropagatorName_
private

Definition at line 71 of file OutsideInMuonSeeder.cc.

Referenced by produce().

StringCutObjectSelector<reco::Muon> OutsideInMuonSeeder::selector_
private

Muon selection.

Definition at line 56 of file OutsideInMuonSeeder.cc.

Referenced by produce().

edm::EDGetTokenT<edm::View<reco::Muon> > OutsideInMuonSeeder::src_
private

Labels for input collections.

Definition at line 53 of file OutsideInMuonSeeder.cc.

Referenced by produce().

edm::ESHandle<Propagator> OutsideInMuonSeeder::trackerPropagator_
private

Definition at line 81 of file OutsideInMuonSeeder.cc.

Referenced by produce().

std::string OutsideInMuonSeeder::trackerPropagatorName_
private

Definition at line 70 of file OutsideInMuonSeeder.cc.

Referenced by produce().

edm::ESHandle<TrajectoryStateUpdator> OutsideInMuonSeeder::updator_
private

Definition at line 84 of file OutsideInMuonSeeder.cc.

Referenced by doLayer(), and produce().

std::string OutsideInMuonSeeder::updatorName_
private

Definition at line 75 of file OutsideInMuonSeeder.cc.

Referenced by OutsideInMuonSeeder(), and produce().