47 theSeedsToken = consumes<TrajectorySeedCollection>(theSeedsLabel);
54 produces<reco::TrackCollection>().setBranchAlias(theAlias +
"Tracks");
64 delete theUpdatorAtVtx;
78 theService->update(eventSetup);
86 event.getByToken(theSeedsToken,
seeds);
88 for (TrajectorySeedCollection::const_iterator iSeed =
seeds->begin(); iSeed !=
seeds->end(); iSeed++) {
89 pair<bool, reco::Track> resultOfTrackExtrapAtPCA = buildTrackAtPCA(*iSeed);
90 if (!resultOfTrackExtrapAtPCA.first)
95 trackCollection->push_back(track);
122 const GeomDet* gdet = theService->trackingGeometry()->idToDet(seedDetId);
156 const string metname =
"MuonSeedTrack";
160 TSOS seedTSOS = getSeedTSOS(seed);
162 LogTrace(metname) <<
"Propagate to PCA...";
163 pair<bool, FreeTrajectoryState> extrapolationResult = theUpdatorAtVtx->propagateToNominalLine(seedTSOS);
166 if (extrapolationResult.first) {
167 ftsAtVtx = extrapolationResult.second;
170 LogWarning(metname) <<
"Track in the Tracker: taking the innermost state instead of the state at PCA";
173 if (theAllowNoVtxFlag) {
174 LogWarning(metname) <<
"Propagation to PCA failed, taking the innermost state instead of the state at PCA";
177 LogWarning(metname) <<
"Stand Alone track: this track will be rejected";
178 return pair<bool, reco::Track>(
false,
reco::Track());
183 LogTrace(metname) <<
"TSOS after the extrapolation at vtx";
191 double dummyNDOF = 1.0;
192 double dummyChi2 = 1.0;
197 return pair<bool, reco::Track>(
true,
track);
~MuonSeedTrack() override
destructor
T getUntrackedParameter(std::string const &, T const &) const
static bool isInside(const GlobalPoint &)
const std::string metname
std::vector< Track > TrackCollection
collection of Tracks
GlobalPoint globalPosition() const
TrackCharge charge() const
const CurvilinearTrajectoryError & curvilinearError() const
std::string dumpFTS(const FreeTrajectoryState &fts) const
FreeTrajectoryState const * freeState(bool withErrors=true) const
std::pair< bool, reco::Track > buildTrackAtPCA(const TrajectorySeed &) const
Build a track at the PCA WITHOUT any vertex constriant.
tuple MuonUpdatorAtVertex
unsigned int detId() const
GlobalVector momentum() const
GlobalPoint position() const
TrajectoryStateOnSurface TSOS
PTrajectoryStateOnDet const & startingState() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
TrajectoryStateOnSurface getSeedTSOS(const TrajectorySeed &seed) const
get the TrajectorySeed's TrajectoryStateOnSurface
T getParameter(std::string const &) const
void endJob() override
post-job
MuonSeedTrack(const edm::ParameterSet &)
constructor with config
void produce(edm::Event &, const edm::EventSetup &) override
construct proto-tracks
Log< level::Warning, false > LogWarning
void beginJob() override
pre-job booking