48 theSeedsToken = consumes<TrajectorySeedCollection>(theSeedsLabel);
55 produces<reco::TrackCollection>().setBranchAlias(theAlias +
"Tracks");
64 if (theService)
delete theService;
65 if (theUpdatorAtVtx)
delete theUpdatorAtVtx;
81 theService->update(eventSetup);
90 event.getByToken(theSeedsToken, seeds);
92 for ( TrajectorySeedCollection::const_iterator iSeed = seeds->begin();
93 iSeed != seeds->end(); iSeed++ ) {
94 pair<bool,reco::Track> resultOfTrackExtrapAtPCA = buildTrackAtPCA(*iSeed);
95 if(!resultOfTrackExtrapAtPCA.first)
continue;
97 reco::Track &track = resultOfTrackExtrapAtPCA.second;
99 trackCollection->push_back(track);
102 event.put(trackCollection);
136 const GeomDet* gdet = theService->trackingGeometry()->idToDet( seedDetId );
172 const string metname =
"MuonSeedTrack";
176 TSOS seedTSOS = getSeedTSOS(seed);
178 LogTrace(metname) <<
"Propagate to PCA...";
179 pair<bool,FreeTrajectoryState>
180 extrapolationResult = theUpdatorAtVtx->propagateToNominalLine(seedTSOS);
183 if(extrapolationResult.first) {
184 ftsAtVtx = extrapolationResult.second;
187 LogWarning(metname) <<
"Track in the Tracker: taking the innermost state instead of the state at PCA";
191 if ( theAllowNoVtxFlag ) {
192 LogWarning(metname) <<
"Propagation to PCA failed, taking the innermost state instead of the state at PCA";
195 LogWarning(metname) <<
"Stand Alone track: this track will be rejected";
196 return pair<bool,reco::Track>(
false,
reco::Track());
201 LogTrace(metname) <<
"TSOS after the extrapolation at vtx";
209 double dummyNDOF = 1.0;
211 double dummyChi2 = 1.0;
220 return pair<bool,reco::Track>(
true,track);
227 const string metname =
"MuonSeedTrack";
234 if ((*recHits1).isValid()) ndof += (*recHits1).dimension();
235 if ((*recHits2).isValid()) ndof += (*recHits2).dimension();
243 return max(ndof - 5., 0.);
T getParameter(std::string const &) const
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
virtual void beginJob()
pre-job booking
double computeNDOF(const TrajectorySeed &) const
compute the TrajectorySeed's degree of freedom
const CurvilinearTrajectoryError & curvilinearError() const
std::string dumpFTS(const FreeTrajectoryState &fts) const
recHitContainer::const_iterator const_iterator
FreeTrajectoryState const * freeState(bool withErrors=true) const
~MuonSeedTrack()
destructor
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
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
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
MuonSeedTrack(const edm::ParameterSet &)
constructor with config
virtual void endJob()
post-job
virtual void produce(edm::Event &, const edm::EventSetup &)
construct proto-tracks