30 std::auto_ptr<TrackingRecHitCollection>& selHits,
31 std::auto_ptr<reco::GsfTrackCollection>& selTracks,
32 std::auto_ptr<reco::TrackExtraCollection>& selTrackExtras,
33 std::auto_ptr<reco::GsfTrackExtraCollection>& selGsfTrackExtras,
34 std::auto_ptr<std::vector<Trajectory> >& selTrajectories,
49 std::map<unsigned int, unsigned int> tjTkMap;
53 for(AlgoProductCollection::iterator
i=algoResults.begin();
i!=algoResults.end();
i++){
56 selTrajectories->push_back(*theTraj);
65 LogDebug(
"TrackProducer") <<
"In GsfTrackProducerBase::putInEvt - seedDir=" << seedDir;
68 selTracks->push_back( t );
77 unsigned int innerId, outerId;
114 selTrackExtras->push_back(
reco::TrackExtra (outpos, outmom,
true, inpos, inmom,
true,
127 for( TrajectoryFitter::RecHitContainer::const_iterator
j = transHits.begin();
128 j != transHits.end();
j ++ ) {
132 selHits->push_back( hit );
137 for( TrajectoryFitter::RecHitContainer::const_iterator
j = transHits.end()-1;
138 j != transHits.begin()-1; --
j ) {
142 selHits->push_back( hit );
149 std::vector<reco::GsfTangent> tangents;
151 if ( measurements.size()>2 ) {
152 tangents.reserve(measurements.size()-2);
153 Trajectory::DataContainer::const_iterator ibegin,iend;
156 ibegin = measurements.begin() + 1;
157 iend = measurements.end() - 1;
161 ibegin = measurements.end() - 2;
162 iend = measurements.begin();
169 for ( Trajectory::DataContainer::const_iterator
i=ibegin;
170 i!=iend;
i+=increment ) {
171 if (
i->recHit().get() ) {
172 DetId detId(
i->recHit()->geographicalId());
190 std::vector<reco::GsfComponent5D> outerStates;
191 outerStates.reserve(outertsos.
components().size());
193 std::vector<reco::GsfComponent5D> innerStates;
194 innerStates.reserve(innertsos.
components().size());
207 fillMode(track,innertsos,gsfProp,tipExtrapolator,tscblBuilder,bs);
214 LogTrace(
"TrackingRegressionTest") <<
"========== TrackProducer Info ===================";
215 LogTrace(
"TrackingRegressionTest") <<
"number of finalGsfTracks: " << selTracks->size();
216 for (reco::GsfTrackCollection::const_iterator it = selTracks->begin(); it != selTracks->end(); it++) {
217 LogTrace(
"TrackingRegressionTest") <<
"track's n valid and invalid hit, chi2, pt : "
218 << it->found() <<
" , "
219 << it->lost() <<
" , "
220 << it->normalizedChi2() <<
" , "
224 LogTrace(
"TrackingRegressionTest") <<
"=================================================";
228 evt.
put( selTrackExtras );
229 evt.
put( selGsfTrackExtras );
237 for ( std::map<unsigned int, unsigned int>::iterator
i = tjTkMap.begin();
238 i != tjTkMap.end();
i++ ) {
241 trajTrackMap->insert(
edm::Ref<std::vector<Trajectory> >( rTrajs, (*i).first ),
244 evt.
put( trajTrackMap );
250 std::vector<reco::GsfComponent5D>& states)
const
255 for ( std::vector<TrajectoryStateOnSurface>::const_iterator
i=
components.begin();
275 if ( !vtxTsos.isValid() ) vtxTsos = innertsos;
278 if ( !vtxTsos.isValid() )
return;
284 for (
unsigned int iv=0; iv<5; ++iv ) {
287 modeParameters(iv) = utils.
mode().
mean();
291 modeParameters(iv) = utils.
mean();
292 modeCovariance(iv,iv) = utils.
variance();
298 for (
unsigned int iv1=0; iv1<5; ++iv1 ) {
299 for (
unsigned int iv2=0; iv2<iv1; ++iv2 ) {
300 double cov12 = meanCovariance(iv1,iv2) *
301 sqrt(modeCovariance(iv1,iv1)/meanCovariance(iv1,iv1)*
302 modeCovariance(iv2,iv2)/meanCovariance(iv2,iv2));
303 modeCovariance(iv1,iv2) = modeCovariance(iv2,iv1) = cov12;
307 vtxTsos.localParameters().pzSign()),
310 vtxTsos.magneticField(),
311 vtxTsos.surfaceSide());
313 if ( !tscbl.isValid() )
return;
324 cov(iv1,iv2) = tscblCov(iv1,iv2);
352 double VarQpRatio =
sqrt(varQp/covariance(0,0));
354 covariance(0,0) = varQp;
355 for (
int i=1;
i<5; ++
i ) covariance(
i,0) *= VarQpRatio;
383 bool result = mts.momentumFromModeCartesian(upState,mom);
402 if ( tm.
recHit()->isValid() ) {
403 hitPos = tm.
recHit()->localPosition();
404 hitErr = tm.
recHit()->localPositionError();
407 deltaP = collinearFit.
deltaP();
math::Error< dimension >::type CovarianceMatrix
double pzSign() const
Sign of the z-component of the momentum in the local frame.
math::Error< dimensionMode >::type CovarianceMatrixMode
3 parameter covariance matrix (momentum part) from mode
const LocalTrajectoryParameters & localParameters() const
void setGsfExtra(const GsfTrackExtraRef &ref)
set reference to GSF "extra" object
TrajectoryStateOnSurface forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
void setSecondHitPattern(Trajectory *traj, reco::GsfTrack &track, const Propagator *prop, const MeasurementTracker *measTk)
const CurvilinearTrajectoryError & curvilinearError() const
std::vector< GsfTrackExtra > GsfTrackExtraCollection
collection of GsfTrackExtra objects
GlobalPoint globalPosition() const
ConstRecHitPointer recHit() const
edm::Ref< TrackExtraCollection > TrackExtraRef
persistent reference to a TrackExtra
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
TrackCharge charge() const
void fillMode(reco::GsfTrack &track, const TrajectoryStateOnSurface innertsos, const Propagator &gsfProp, const TransverseImpactPointExtrapolator &tipExtrapolator, TrajectoryStateClosestToBeamLineBuilder &tscblBuilder, const reco::BeamSpot &bs) const
const MagneticField * magneticField() const
const CurvilinearTrajectoryError & curvilinearError() const
void fillStates(TrajectoryStateOnSurface tsos, std::vector< reco::GsfComponent5D > &states) const
ConstRecHitContainer recHits(bool splitting=false) const
PropagationDirection const & direction() const
double dydz() const
dydz slope
DataContainer const & measurements() const
AlgebraicVector5 vector() const
void setMode(int chargeMode, const Vector &momentumMode, const CovarianceMatrixMode &covarianceMode)
set mode parameters
std::vector< TrajectoryMeasurement > DataContainer
virtual void putInEvt(edm::Event &, const Propagator *prop, const MeasurementTracker *measTk, std::auto_ptr< TrackingRecHitCollection > &, std::auto_ptr< reco::GsfTrackCollection > &, std::auto_ptr< reco::TrackExtraCollection > &, std::auto_ptr< reco::GsfTrackExtraCollection > &, std::auto_ptr< std::vector< Trajectory > > &, AlgoProductCollection &, const reco::BeamSpot &)
Put produced collections in the event.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
double mean() const
parameter vector
edm::Ref< TrackingRecHitCollection > TrackingRecHitRef
persistent reference to a TrackingRecHit
Measurement1D deltaP() const
estimated deltaP (out-in) from fit parameters
TrajectoryMeasurement const & lastMeasurement() const
GlobalVector momentum() const
std::vector< GsfTrack > GsfTrackCollection
collection of GsfTracks
double variance() const
variance
const SingleGaussianState1D & mode() const
TrajectoryStateOnSurface updatedState() const
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
edm::RefToBase< TrajectorySeed > seedRef(void) const
std::vector< AlgoProduct > AlgoProductCollection
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void localParametersFromQpMode(const TrajectoryStateOnSurface tsos, AlgebraicVector5 ¶meters, AlgebraicSymMatrix55 &covariance) const
local parameters rescaled with q/p from mode
GlobalVector momentum() const
double dxdz() const
dxdz slope
RefProd< PROD > getRefBeforePut()
GlobalPoint position() const
virtual TrajectoryStateOnSurface propagate(const FreeTrajectoryState &, const Surface &) const
edm::Ref< GsfTrackExtraCollection > GsfTrackExtraRef
persistent reference to a GsfTrackExtra
edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > > TrajGsfTrackAssociationCollection
Detector identifier class for the strip tracker.
double vz() const
z coordinate of the reference point on track
bool computeModeAtTM(const TrajectoryMeasurement &tm, reco::GsfTrackExtra::Point &position, reco::GsfTrackExtra::Vector &momentum, Measurement1D &deltaP) const
position, momentum and estimated deltaP at an intermediate measurement (true if successful) ...
void setHitPattern(const C &c)
set hit patterns from vector of hit references
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
void setExtra(const TrackExtraRef &ref)
set reference to "extra" object
TrajectoryMeasurement const & firstMeasurement() const
ROOT::Math::SVector< double, 5 > AlgebraicVector5
const GlobalTrajectoryParameters & globalParameters() const
double mean(unsigned int i) const
mean value of a component
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
double variance(unsigned int i) const
variance of a component
const AlgebraicSymMatrix55 & matrix() const
static int position[264][3]
const Surface & surface() const
edm::ESHandle< NavigationSchool > theSchool
const Point & position() const
position
boost::remove_cv< typename boost::remove_reference< argument_type >::type >::type key_type
edm::OrphanHandle< TrackCollection > rTracks_
std::vector< TrajectoryStateOnSurface > components() const
math::XYZVector Vector
spatial vector
Trajectory::RecHitContainer RecHitContainer
tuple AnalyticalPropagator
TrajectoryStateOnSurface backwardPredictedState() const
Access to backward predicted state (from smoother)
bool modeIsValid() const
mode status
math::Vector< dimension >::type ParameterVector