47 theSeedsToken = consumes<TrajectorySeedCollection>(theSeedsLabel);
50 theAllowNoVtxFlag =
pset.getUntrackedParameter<
bool>(
"AllowNoVertex",
false);
54 produces<reco::TrackCollection>().setBranchAlias(theAlias +
"Tracks");
64 delete theUpdatorAtVtx;
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)
122 const GeomDet* gdet = theService->trackingGeometry()->idToDet(seedDetId);
156 const string metname =
"MuonSeedTrack";
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";
178 return pair<bool, reco::Track>(
false,
reco::Track());
191 double dummyNDOF = 1.0;
192 double dummyChi2 = 1.0;
197 return pair<bool, reco::Track>(
true,
track);
~MuonSeedTrack() override
destructor
TrajectoryStateOnSurface TSOS
static bool isInside(const GlobalPoint &)
const CurvilinearTrajectoryError & curvilinearError() const
const std::string metname
std::vector< Track > TrackCollection
collection of Tracks
unsigned int detId() const
GlobalPoint position() const
TrajectoryStateOnSurface getSeedTSOS(const TrajectorySeed &seed) const
get the TrajectorySeed's TrajectoryStateOnSurface
GlobalPoint globalPosition() const
TrackCharge charge() const
GlobalVector momentum() const
std::pair< bool, reco::Track > buildTrackAtPCA(const TrajectorySeed &) const
Build a track at the PCA WITHOUT any vertex constriant.
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
void endJob() override
post-job
FreeTrajectoryState const * freeState(bool withErrors=true) const
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