85 if (m_computeGhostTrack)
86 produces<reco::TrackCollection>(
"ghostTracks");
87 produces<reco::TrackIPTagInfoCollection>();
117 auto_ptr<reco::TrackIPTagInfoCollection>
result(
new reco::TrackIPTagInfoCollection);
119 auto_ptr<reco::TrackCollection> ghostTracks;
128 const Vertex *pv = &dummy;
130 if (primaryVertex->size() != 0) {
131 pv = &*primaryVertex->begin();
136 e(0, 0) = 0.0015 * 0.0015;
137 e(1, 1) = 0.0015 * 0.0015;
140 dummy =
Vertex(p, e, 0, 0, 0);
145 jetTracksAssociation->begin();
146 it != jetTracksAssociation->end(); it++, i++) {
153 itTrack != tracks.
end(); ++itTrack)
156 jetMomentum += (*itTrack)->momentum();
160 vector<TransientTrack> transientTracks;
163 itTrack != tracks.
end(); ++itTrack) {
164 const Track & track = **itTrack;
180 transientTracks.push_back(transientTrack);
184 GlobalVector direction(jetMomentum.x(), jetMomentum.y(), jetMomentum.z());
192 ghostTrack.reset(
new GhostTrack(fitter.
fit(origin, error, direction,
212 ghostTrackRef =
TrackRef(ghostTrackRefProd, ghostTracks->size());
213 ghostTracks->push_back(*ghostTrack);
217 double lambda = pred.
lambda(origin);
226 vector<float> prob2D, prob3D;
227 vector<TrackIPTagInfo::TrackIPData> ipData;
229 for(
unsigned int ind = 0; ind < transientTracks.size(); ind++) {
230 const Track & track = *selectedTracks[ind];
240 transientTrack.
field());
247 if (ghostTrack.get()) {
248 const std::vector<GhostTrackState> &states = ghostTrack->states();
249 std::vector<GhostTrackState>::const_iterator pos =
250 std::find_if(states.begin(), states.end(),
251 bind(equal_to<TransientTrack>(),
252 bind(&GhostTrackState::track, _1),
255 if (pos != states.end() && pos->isValid()) {
264 VertexState(p2, e2));
275 ipData.push_back(trackIP);
280 prob3D.push_back(probability.first ? probability.second : -1.);
284 prob2D.push_back(probability.first ? probability.second : -1.);
291 jtaRef, pvRef, direction, ghostTrackRef));
295 iEvent.
put(ghostTracks,
"ghostTracks");
310 using namespace edm::eventsetup;
315 unsigned long long cacheId3D= re3D.cacheIdentifier();
GlobalPoint closestToGhostTrack
virtual Measurement1D distance(const GlobalPoint &vtx1Position, const GlobalError &vtx1PositionError, const GlobalPoint &vtx2Position, const GlobalError &vtx2PositionError) const
reco::Vertex::Point convertPos(const GlobalPoint &p)
T getParameter(std::string const &) const
unsigned long long cacheIdentifier() const
void checkEventSetup(const edm::EventSetup &iSetup)
virtual void produce(edm::Event &, const edm::EventSetup &)
double m_ghostTrackPriorDeltaR
bool m_directionWithTracks
double m_cutMaxChiSquared
edm::EDGetTokenT< reco::VertexCollection > token_primaryVertex
double lambda(const GlobalPoint &point) const
transient_vector_type::const_iterator const_iterator
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
int numberOfValidHits() const
reco::Vertex::Error convertError(const GlobalError &ge)
std::vector< Track > TrackCollection
collection of Tracks
std::auto_ptr< HistogramProbabilityEstimator > m_probabilityEstimator
math::Error< dimension >::type Error
covariance error matrix (3x3)
GlobalPoint globalPosition() const
const MagneticField * field() const
unsigned long long m_calibrationCacheId2D
const_iterator end() const
Termination of iteration.
const Point & position() const
position
const_iterator begin() const
Initialize an iterator over the RefVector.
GhostTrack fit(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, double coneRadius, const std::vector< TransientTrack > &tracks) const
bool m_computeProbabilities
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
double pt() const
track transverse momentum
TrackIPProducer(const edm::ParameterSet &)
Abs< T >::type abs(const T &t)
math::XYZPoint Point
point in the space
GlobalPoint closestToJetAxis
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
RefProd< PROD > getRefBeforePut()
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Measurement1D distanceToJetAxis
Measurement1D distanceToGhostTrack
XYZVectorD XYZVector
spatial vector with cartesian internal representation
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
T const * product() const
Error error() const
return SMatrix
const edm::ParameterSet & m_config
const Vector & prediction() const
bool m_directionWithGhostTrack
GlobalPoint position(double lambda=0.) const
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
int numberOfValidPixelHits() const
TrajectoryStateOnSurface impactPointState() const
unsigned long long m_calibrationCacheId3D
edm::EDGetTokenT< reco::JetTracksAssociationCollection > token_associator
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
GlobalError positionError(double lambda=0.) const
const GlobalVector direction() const