67 produces<std::vector<TrajectorySeed> >();
84 auto out = std::make_unique<std::vector<TrajectorySeed>>();
85 unsigned int nsrc = src->size();
92 if (traj.size() != 1)
continue;
94 const std::vector<TrajectoryMeasurement> & tms = traj.
front().measurements();
98 std::cout <<
"Considering muon of pt " << mu.
pt() <<
", eta = " << mu.
eta() <<
", phi = " << mu.
phi() << std::endl;
99 std::cout <<
"Trajectory is " << (traj.front().direction() ==
alongMomentum ?
"along" :
"opposite") <<
" to momentum, so will start from " << (fromInside ?
"inside" :
"outside") << std::endl;
104 std::cout <<
"IN state: subdetector = " << tin.
recHit()->geographicalId().subdetId() << std::endl;
106 std::cout <<
"OU state: subdetector = " << tou.
recHit()->geographicalId().subdetId() << std::endl;
109 int lastSubdet = 0, lastLayer = -1;
110 for (
int i = (fromInside ? 0 : tms.size()-1),
111 end = (fromInside ? tms.size() : -1),
112 step = (fromInside ? +1 : -1),
115 hit = tms[
i].recHit()->
hit();
120 if (subdet != lastSubdet || lay != lastLayer) {
127 lastSubdet = subdet; lastLayer = lay;
131 tsos = tms[
i].updatedState().
isValid() ? tms[
i].updatedState() :
132 (
abs(
i-
end) <
abs(
i) ? tms[
i].forwardPredictedState() : tms[
i].backwardPredictedState());
134 std::cout <<
" hit : subdetector = " << tms[
i].recHit()->geographicalId().subdetId() << std::endl;
136 std::cout <<
" global pos Rho " << tms[
i].recHit()->globalPosition().perp() <<
", Z " << tms[
i].recHit()->globalPosition().z() << std::endl;
138 std::cout <<
" invalid tracking rec hit, so no global position" << std::endl;
146 out->push_back(seed);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
TrackRef track() const override
reference to a Track
double eta() const final
momentum pseudorapidity
TrackTransformer refitter_
Track Transformer.
ConstRecHitPointer const & recHit() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
StringCutObjectSelector< reco::Muon > selector_
Muon selection.
GlobalPoint globalPosition() const
double pt() const final
transverse momentum
bool debug_
Dump deug information.
int layersToKeep_
How many hits to keep from the muon trajectory.
uint32_t rawId() const
get the raw id
Abs< T >::type abs(const T &t)
bool insideOut_
Do inside-out.
edm::EDGetTokenT< edm::View< reco::Muon > > src_
Labels for input collections.
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool isNull() const
Checks for null.
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
virtual TrackingRecHit const * hit() const
unsigned int layer(const DetId &id) const
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
TrajectoryStateOnSurface const & updatedState() const
DetId geographicalId() const
MuonReSeeder(const edm::ParameterSet &iConfig)
double phi() const final
momentum azimuthal angle