#include <SeedFromConsecutiveHitsCreator.h>
Definition at line 15 of file SeedFromConsecutiveHitsCreator.h.
SeedFromConsecutiveHitsCreator::SeedFromConsecutiveHitsCreator | ( | const edm::ParameterSet & | cfg | ) | [inline] |
Definition at line 18 of file SeedFromConsecutiveHitsCreator.h.
: thePropagatorLabel(cfg.getParameter<std::string>("propagator")), theBOFFMomentum(cfg.existsAs<double>("SeedMomentumForBOFF") ? cfg.getParameter<double>("SeedMomentumForBOFF") : 5.0), theOriginTransverseErrorMultiplier(cfg.existsAs<double>("OriginTransverseErrorMultiplier") ? cfg.getParameter<double>("OriginTransverseErrorMultiplier") : 1.0), theMinOneOverPtError(cfg.existsAs<double>("MinOneOverPtError") ? cfg.getParameter<double>("MinOneOverPtError") : 1.0) {}
SeedFromConsecutiveHitsCreator::SeedFromConsecutiveHitsCreator | ( | const std::string & | propagator = "PropagatorWithMaterial" , |
double | seedMomentumForBOFF = -5.0 , |
||
double | aOriginTransverseErrorMultiplier = 1.0 , |
||
double | aMinOneOverPtError = 1.0 |
||
) | [inline] |
Definition at line 25 of file SeedFromConsecutiveHitsCreator.h.
: thePropagatorLabel(propagator), theBOFFMomentum(seedMomentumForBOFF), theOriginTransverseErrorMultiplier(aOriginTransverseErrorMultiplier), theMinOneOverPtError(aMinOneOverPtError) { }
SeedFromConsecutiveHitsCreator::~SeedFromConsecutiveHitsCreator | ( | ) | [virtual] |
Definition at line 23 of file SeedFromConsecutiveHitsCreator.cc.
{}
void SeedFromConsecutiveHitsCreator::buildSeed | ( | TrajectorySeedCollection & | seedCollection, |
const SeedingHitSet & | hits, | ||
const FreeTrajectoryState & | fts | ||
) | const [private] |
Definition at line 106 of file SeedFromConsecutiveHitsCreator.cc.
References alongMomentum, checkHit(), SeedComparitor::compatible(), filter, TrackingRecHit::geographicalId(), TrajectoryStateOnSurface::isValid(), trajectoryStateTransform::persistentState(), Propagator::propagate(), LargeD0_PixelPairStep_cff::propagator, edm::OwnVector< T, P >::push_back(), DetId::rawId(), refitHit(), SeedingHitSet::size(), and tracker.
Referenced by makeSeed().
{ const Propagator* propagator = &(*propagatorHandle); // get updator KFUpdator updator; // Now update initial state track using information from seed hits. TrajectoryStateOnSurface updatedState; edm::OwnVector<TrackingRecHit> seedHits; const TrackingRecHit* hit = 0; for ( unsigned int iHit = 0; iHit < hits.size(); iHit++) { hit = hits[iHit]->hit(); TrajectoryStateOnSurface state = (iHit==0) ? propagator->propagate(fts,tracker->idToDet(hit->geographicalId())->surface()) : propagator->propagate(updatedState, tracker->idToDet(hit->geographicalId())->surface()); if (!state.isValid()) return; TransientTrackingRecHit::ConstRecHitPointer const & tth = hits[iHit]; TransientTrackingRecHit::RecHitPointer const & newtth = refitHit( tth, state); if (!checkHit(state,newtth)) return; updatedState = updator.update(state, *newtth); if (!updatedState.isValid()) return; seedHits.push_back(newtth->hit()->clone()); } PTrajectoryStateOnDet const & PTraj = trajectoryStateTransform::persistentState(updatedState, hit->geographicalId().rawId()); TrajectorySeed seed(PTraj,std::move(seedHits),alongMomentum); if ( !filter || filter->compatible(seed)) seedCollection.push_back(seed); }
bool SeedFromConsecutiveHitsCreator::checkHit | ( | const TrajectoryStateOnSurface & | tsos, |
const TransientTrackingRecHit::ConstRecHitPointer & | hit | ||
) | const [private] |
Definition at line 158 of file SeedFromConsecutiveHitsCreator.cc.
References SeedComparitor::compatible(), and filter.
Referenced by buildSeed().
{ return (filter ? filter->compatible(tsos,hit) : true); }
void SeedFromConsecutiveHitsCreator::init | ( | const TrackingRegion & | region, |
const edm::EventSetup & | es, | ||
const SeedComparitor * | filter | ||
) | [virtual] |
Implements SeedCreator.
Definition at line 25 of file SeedFromConsecutiveHitsCreator.cc.
References bfield, filter, edm::EventSetup::get(), isBOFF, nomField, propagatorHandle, region, thePropagatorLabel, and tracker.
Referenced by SeedGeneratorFromProtoTracksEDProducer::produce().
{ region = &iregion; filter = ifilter; // get tracker es.get<TrackerDigiGeometryRecord>().get(tracker); // get propagator es.get<TrackingComponentsRecord>().get(thePropagatorLabel, propagatorHandle); // mag field es.get<IdealMagneticFieldRecord>().get(bfield); nomField = bfield->nominalValue(); isBOFF = (0==nomField); }
CurvilinearTrajectoryError SeedFromConsecutiveHitsCreator::initialError | ( | float | sin2Theta | ) | const [private] |
Definition at line 85 of file SeedFromConsecutiveHitsCreator.cc.
References funct::C, max(), TrackingRegion::originRBound(), TrackingRegion::originZBound(), TrackingRegion::ptMin(), region, funct::sqr(), theMinOneOverPtError, and theOriginTransverseErrorMultiplier.
Referenced by makeSeed().
{ // Set initial uncertainty on track parameters, using only P.V. constraint and no hit // information. AlgebraicSymMatrix55 C = ROOT::Math::SMatrixIdentity(); // FIXME: minC00. Prevent apriori uncertainty in 1/P from being too small, // to avoid instabilities. // N.B. This parameter needs optimising ... // Probably OK based on quick study: KS 22/11/12. float sin2th = sin2Theta; float minC00 = sqr(theMinOneOverPtError); C[0][0] = std::max(sin2th/sqr(region->ptMin()), minC00); float zErr = sqr(region->originZBound()); float transverseErr = sqr(theOriginTransverseErrorMultiplier*region->originRBound()); C[3][3] = transverseErr; C[4][4] = zErr*sin2th + transverseErr*(1.f-sin2th); return CurvilinearTrajectoryError(C); }
bool SeedFromConsecutiveHitsCreator::initialKinematic | ( | GlobalTrajectoryParameters & | kine, |
const SeedingHitSet & | hits | ||
) | const [private, virtual] |
Reimplemented in GCC11_FINAL< T, TOPO >, and GCC11_FINAL< T, TOPO >.
Definition at line 57 of file SeedFromConsecutiveHitsCreator.cc.
References bfield, GlobalTrajectoryParameters::charge(), SeedComparitor::compatible(), filter, isBOFF, GlobalTrajectoryParameters::momentum(), nomField, TrackingRegion::origin(), GlobalTrajectoryParameters::position(), region, theBOFFMomentum, Vector3DBase< T, FrameTag >::unit(), and unlikely.
Referenced by makeSeed().
{ TransientTrackingRecHit::ConstRecHitPointer tth1 = hits[0]; TransientTrackingRecHit::ConstRecHitPointer tth2 = hits[1]; const GlobalPoint& vertexPos = region->origin(); FastHelix helix(tth2->globalPosition(), tth1->globalPosition(), vertexPos, nomField,&*bfield); if (helix.isValid()) { kine = helix.stateAtVertex(); } else { GlobalVector initMomentum(tth2->globalPosition() - vertexPos); initMomentum *= (100./initMomentum.perp()); kine = GlobalTrajectoryParameters(vertexPos, initMomentum, 1, &*bfield); } if unlikely(isBOFF && (theBOFFMomentum > 0)) { kine = GlobalTrajectoryParameters(kine.position(), kine.momentum().unit() * theBOFFMomentum, kine.charge(), &*bfield); } return (filter ? filter->compatible(hits, kine, helix, *region) : true); }
void SeedFromConsecutiveHitsCreator::makeSeed | ( | TrajectorySeedCollection & | seedCollection, |
const SeedingHitSet & | hits | ||
) | [virtual] |
Implements SeedCreator.
Definition at line 40 of file SeedFromConsecutiveHitsCreator.cc.
References buildSeed(), error, initialError(), initialKinematic(), PV3DBase< T, PVType, FrameType >::mag2(), GlobalTrajectoryParameters::momentum(), PV3DBase< T, PVType, FrameType >::perp2(), and SeedingHitSet::size().
Referenced by SeedGeneratorFromProtoTracksEDProducer::produce().
{ if ( hits.size() < 2) return; GlobalTrajectoryParameters kine; if (!initialKinematic(kine, hits)) return; float sin2Theta = kine.momentum().perp2()/kine.momentum().mag2(); CurvilinearTrajectoryError error = initialError(sin2Theta); FreeTrajectoryState fts(kine, error); buildSeed(seedCollection,hits,fts); }
TransientTrackingRecHit::RecHitPointer SeedFromConsecutiveHitsCreator::refitHit | ( | const TransientTrackingRecHit::ConstRecHitPointer & | hit, |
const TrajectoryStateOnSurface & | state | ||
) | const [private] |
Definition at line 150 of file SeedFromConsecutiveHitsCreator.cc.
Referenced by buildSeed().
{
return hit->clone(state);
}
Definition at line 76 of file SeedFromConsecutiveHitsCreator.h.
Referenced by init(), and initialKinematic().
const SeedComparitor* SeedFromConsecutiveHitsCreator::filter = nullptr [protected] |
Definition at line 73 of file SeedFromConsecutiveHitsCreator.h.
Referenced by buildSeed(), checkHit(), init(), and initialKinematic().
bool SeedFromConsecutiveHitsCreator::isBOFF = false [protected] |
Definition at line 78 of file SeedFromConsecutiveHitsCreator.h.
Referenced by init(), and initialKinematic().
float SeedFromConsecutiveHitsCreator::nomField [protected] |
Definition at line 77 of file SeedFromConsecutiveHitsCreator.h.
Referenced by init(), and initialKinematic().
Definition at line 75 of file SeedFromConsecutiveHitsCreator.h.
Referenced by init().
const TrackingRegion* SeedFromConsecutiveHitsCreator::region = nullptr [protected] |
Definition at line 72 of file SeedFromConsecutiveHitsCreator.h.
Referenced by init(), initialError(), and initialKinematic().
double SeedFromConsecutiveHitsCreator::theBOFFMomentum [protected] |
Definition at line 68 of file SeedFromConsecutiveHitsCreator.h.
Referenced by initialKinematic().
double SeedFromConsecutiveHitsCreator::theMinOneOverPtError [protected] |
Definition at line 70 of file SeedFromConsecutiveHitsCreator.h.
Referenced by initialError().
double SeedFromConsecutiveHitsCreator::theOriginTransverseErrorMultiplier [protected] |
Definition at line 69 of file SeedFromConsecutiveHitsCreator.h.
Referenced by initialError().
std::string SeedFromConsecutiveHitsCreator::thePropagatorLabel [protected] |
Definition at line 67 of file SeedFromConsecutiveHitsCreator.h.
Referenced by init().
Definition at line 74 of file SeedFromConsecutiveHitsCreator.h.
Referenced by buildSeed(), and init().