61 selector_(iConfig.existsAs<std::
string>(
"cut") ? iConfig.getParameter<std::
string>(
"cut") :
"",
true),
62 layersToKeep_(iConfig.getParameter<int32_t>(
"layersToKeep")),
63 insideOut_(iConfig.getParameter<bool>(
"insideOut")),
64 debug_(iConfig.getUntrackedParameter<bool>(
"debug",
false)),
65 refitter_(iConfig, consumesCollector()) {
66 produces<std::vector<TrajectorySeed>>();
81 auto out = std::make_unique<std::vector<TrajectorySeed>>();
82 unsigned int nsrc =
src->size();
93 const std::vector<TrajectoryMeasurement> &tms = traj.
front().measurements();
98 std::cout <<
"Considering muon of pt " << mu.
pt() <<
", eta = " << mu.
eta() <<
", phi = " << mu.
phi()
101 <<
" to momentum, so will start from " << (fromInside ?
"inside" :
"outside") << std::endl;
106 std::cout <<
"IN state: subdetector = " << tin.
recHit()->geographicalId().subdetId() << std::endl;
109 std::cout <<
"OU state: subdetector = " << tou.
recHit()->geographicalId().subdetId() << std::endl;
113 int lastSubdet = 0, lastLayer = -1;
114 for (
int i = (fromInside ? 0 : tms.size() - 1),
115 end = (fromInside ? tms.size() : -1),
116 step = (fromInside ? +1 : -1),
121 hit = tms[
i].recHit()->
hit();
129 if (subdet != lastSubdet || lay != lastLayer) {
141 tsos = tms[
i].updatedState().
isValid()
142 ? tms[
i].updatedState()
143 : (
abs(
i -
end) <
abs(
i) ? tms[
i].forwardPredictedState() : tms[
i].backwardPredictedState());
145 std::cout <<
" hit : subdetector = " << tms[
i].recHit()->geographicalId().subdetId() << std::endl;
147 std::cout <<
" global pos Rho " << tms[
i].recHit()->globalPosition().perp() <<
", Z "
148 << tms[
i].recHit()->globalPosition().z() << std::endl;
150 std::cout <<
" invalid tracking rec hit, so no global position" << std::endl;
160 out->push_back(seed);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
TrackTransformer refitter_
Track Transformer.
ConstRecHitPointer const & recHit() const
double pt() const final
transverse momentum
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
constexpr uint32_t rawId() const
get the raw id
StringCutObjectSelector< reco::Muon > selector_
Muon selection.
GlobalPoint globalPosition() const
TrackRef track() const override
reference to a Track
bool debug_
Dump deug information.
int layersToKeep_
How many hits to keep from the muon trajectory.
bool getData(T &iHolder) const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Abs< T >::type abs(const T &t)
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
bool insideOut_
Do inside-out.
edm::EDGetTokenT< edm::View< reco::Muon > > src_
Labels for input collections.
bool isNull() const
Checks for null.
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
virtual TrackingRecHit const * hit() const
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
TrajectoryStateOnSurface const & updatedState() const
DetId geographicalId() const
double phi() const final
momentum azimuthal angle
MuonReSeeder(const edm::ParameterSet &iConfig)
double eta() const final
momentum pseudorapidity