56 setAlias(pset.
getParameter<std::string>(
"@module_label"));
57 produces<reco::TrackCollection>().setBranchAlias(theAlias +
"Tracks");
66 if (theService)
delete theService;
67 if (theUpdatorAtVtx)
delete theUpdatorAtVtx;
83 theService->update(eventSetup);
92 event.getByLabel(theSeedsLabel, seeds);
94 for ( TrajectorySeedCollection::const_iterator iSeed = seeds->begin();
95 iSeed != seeds->end(); iSeed++ ) {
96 pair<bool,reco::Track> resultOfTrackExtrapAtPCA = buildTrackAtPCA(*iSeed);
97 if(!resultOfTrackExtrapAtPCA.first)
continue;
99 reco::Track &track = resultOfTrackExtrapAtPCA.second;
101 trackCollection->push_back(track);
104 event.put(trackCollection);
138 const GeomDet* gdet = theService->trackingGeometry()->idToDet( seedDetId );
174 const string metname =
"MuonSeedTrack";
178 TSOS seedTSOS = getSeedTSOS(seed);
180 LogTrace(metname) <<
"Propagate to PCA...";
181 pair<bool,FreeTrajectoryState>
182 extrapolationResult = theUpdatorAtVtx->propagateToNominalLine(seedTSOS);
185 if(extrapolationResult.first) {
186 ftsAtVtx = extrapolationResult.second;
189 LogWarning(metname) <<
"Track in the Tracker: taking the innermost state instead of the state at PCA";
193 if ( theAllowNoVtxFlag ) {
194 LogWarning(metname) <<
"Propagation to PCA failed, taking the innermost state instead of the state at PCA";
197 LogWarning(metname) <<
"Stand Alone track: this track will be rejected";
198 return pair<bool,reco::Track>(
false,
reco::Track());
203 LogTrace(metname) <<
"TSOS after the extrapolation at vtx";
211 double dummyNDOF = 1.0;
213 double dummyChi2 = 1.0;
222 return pair<bool,reco::Track>(
true,track);
229 const string metname =
"MuonSeedTrack";
236 if ((*recHits1).isValid()) ndof += (*recHits1).dimension();
237 if ((*recHits2).isValid()) ndof += (*recHits2).dimension();
245 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
FreeTrajectoryState * freeState(bool withErrors=true) const
const T & max(const T &a, const T &b)
recHitContainer::const_iterator const_iterator
~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