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)),
67 produces<std::vector<TrajectorySeed> >();
84 auto_ptr<vector<TrajectorySeed> >
out(
new 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);
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.
virtual TrackRef track() const
reference to a Track
GlobalPoint globalPosition() const
bool debug_
Dump deug information.
int layersToKeep_
How many hits to keep from the muon trajectory.
virtual double eta() const
momentum pseudorapidity
virtual double pt() const
transverse momentum
uint32_t rawId() const
get the raw id
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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.
virtual 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
volatile std::atomic< bool > shutdown_flag false
MuonReSeeder(const edm::ParameterSet &iConfig)
virtual double phi() const
momentum azimuthal angle