100 src_(iConfig.getParameter<edm::InputTag>(
"src")),
101 selector_(iConfig.existsAs<std::
string>(
"cut") ? iConfig.getParameter<std::
string>(
"cut") :
"",
true),
102 layersToTry_(iConfig.getParameter<int32_t>(
"layersToTry")),
103 hitsToTry_(iConfig.getParameter<int32_t>(
"hitsToTry")),
104 fromVertex_(iConfig.getParameter<bool>(
"fromVertex")),
105 errorRescaling_(iConfig.getParameter<double>(
"errorRescaleFactor")),
106 trackerPropagatorName_(iConfig.getParameter<std::
string>(
"trackerPropagator")),
107 muonPropagatorName_(iConfig.getParameter<std::
string>(
"muonPropagator")),
108 estimatorName_(iConfig.getParameter<std::
string>(
"hitCollector")),
109 minEtaForTEC_(iConfig.getParameter<double>(
"minEtaForTEC")),
110 maxEtaForTOB_(iConfig.getParameter<double>(
"maxEtaForTOB")),
111 debug_(iConfig.getUntrackedParameter<bool>(
"debug",
false)),
114 produces<std::vector<TrajectorySeed> >();
137 auto_ptr<vector<TrajectorySeed> >
out(
new vector<TrajectorySeed>());
147 int sizeBefore = out->size();
148 if (
debug_)
std::cout <<
"\n\n\nSeeding for muon of pt " << mu.
pt() <<
", eta " << mu.
eta() <<
", phi " << mu.
phi() << std::endl;
160 std::vector< BarrelDetLayer * >
const & tob =
measurementTracker_->geometricSearchTracker()->tobLayers();
161 int iLayer = 6,
found = 0;
162 for (std::vector<BarrelDetLayer *>::const_reverse_iterator it = tob.rbegin(), ed = tob.rend(); it != ed; ++it, --iLayer) {
163 if (
debug_)
std::cout <<
"\n ==== Trying TOB " << iLayer <<
" ====" << std::endl;
164 if (
doLayer(**it, state, *out)) {
170 int iLayer = 9,
found = 0;
171 std::vector< ForwardDetLayer * >
const & tec =
measurementTracker_->geometricSearchTracker()->posTecLayers();
172 for (std::vector<ForwardDetLayer *>::const_reverse_iterator it = tec.rbegin(), ed = tec.rend(); it != ed; ++it, --iLayer) {
173 if (
debug_)
std::cout <<
"\n ==== Trying TEC " << +iLayer <<
" ====" << std::endl;
174 if (
doLayer(**it, state, *out)) {
180 int iLayer = 9,
found = 0;
181 std::vector< ForwardDetLayer * >
const & tec =
measurementTracker_->geometricSearchTracker()->negTecLayers();
182 for (std::vector<ForwardDetLayer *>::const_reverse_iterator it = tec.rbegin(), ed = tec.rend(); it != ed; ++it, --iLayer) {
183 if (
debug_)
std::cout <<
"\n ==== Trying TEC " << -iLayer <<
" ====" << std::endl;
184 if (
doLayer(**it, state, *out)) {
189 if (
debug_)
std::cout <<
"Outcome of seeding for muon of pt " << mu.
pt() <<
", eta " << mu.
eta() <<
", phi " << mu.
phi() <<
": found " << (out->size() - sizeBefore) <<
" seeds."<< std::endl;
200 std::vector< GeometricSearchDet::DetWithState > dets;
206 " returned " << dets.size() <<
" compatible detectors" << std::endl;
209 std::vector<TrajectoryMeasurement> meas;
210 for (std::vector<GeometricSearchDet::DetWithState>::const_iterator it = dets.begin(), ed = dets.end(); it != ed; ++it) {
212 if (det == 0) {
std::cerr <<
"BOGUS detid " << it->first->geographicalId().rawId() << std::endl;
continue; }
213 if (!it->second.isValid())
continue;
215 if (
debug_)
std::cout <<
"Query on detector " << it->first->geographicalId().rawId() <<
" returned " << mymeas.size() <<
" measurements." << std::endl;
216 for (std::vector<TrajectoryMeasurement>::const_iterator it2 = mymeas.begin(), ed2 = mymeas.end(); it2 != ed2; ++it2) {
217 if (it2->recHit()->isValid()) meas.push_back(*it2);
222 for (std::vector<TrajectoryMeasurement>::const_iterator it2 = meas.begin(), ed2 = meas.end(); it2 != ed2; ++it2) {
224 std::cout <<
" inspecting Hit with chi2 = " << it2->estimate() << std::endl;
225 std::cout <<
" track state " << it2->forwardPredictedState().globalPosition() << std::endl;
226 std::cout <<
" rechit position " << it2->recHit()->globalPosition() << std::endl;
232 seedHits.
push_back(*it2->recHit()->hit());
249 if (det == 0)
continue;
int hitsToTry_
How many hits to try on same layer.
TkRotation< Scalar > RotationType
void rescaleError(double factor)
virtual ~OutsideInMuonSeeder()
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
edm::InputTag src_
Labels for input collections.
virtual TrackRef innerTrack() const
#define DEFINE_FWK_MODULE(type)
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
edm::ESHandle< Chi2MeasurementEstimatorBase > estimator_
edm::ESHandle< MagneticField > magfield_
edm::ESHandle< GlobalTrackingGeometry > geometry_
GlobalPoint globalPosition() const
edm::ESHandle< Propagator > trackerPropagator_
edm::ESHandle< TrajectoryStateUpdator > updator_
const Plane & surface() const
The nominal surface of the GeomDet.
LocalError positionError() const
std::vector< TrajectoryMeasurement > fastMeasurements(const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &, const Propagator &, const MeasurementEstimator &est) const
uint32_t rawId() const
get the raw id
Point3DBase< Scalar, GlobalTag > PositionType
bool isNonnull() const
Checks for non-null.
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
std::string trackerPropagatorName_
bool isNull() const
Checks for null.
double eta() const
pseudorapidity of momentum vector
bool debug_
Dump deug information.
std::string muonPropagatorName_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::string estimatorName_
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
const LocalTrajectoryError & localError() const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only
edm::ESHandle< Propagator > muonPropagator_
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
GlobalPoint position() const
T const * product() const
int layersToTry_
How many layers to try.
StringCutObjectSelector< reco::Muon > selector_
Muon selection.
double errorRescaling_
How much to rescale errors from STA.
int doLayer(const GeometricSearchDet &layer, const TrajectoryStateOnSurface &state, std::vector< TrajectorySeed > &out) const
void doDebug(const reco::Track &tk) const
GlobalVector globalMomentum() const
TrackingRecHitRef recHit(size_t i) const
Get i-th hit on the track.
DetId geographicalId() const
edm::ESHandle< MeasurementTracker > measurementTracker_
Plane::PlanePointer dummyPlane_
Surface used to make a TSOS at the PCA to the beamline.
virtual float pt() const GCC11_FINAL
transverse momentum
std::string measurementTrackerName_
bool fromVertex_
Do inside-out.
virtual void compatibleDetsV(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetWithState > &result) const
OutsideInMuonSeeder(const edm::ParameterSet &iConfig)