|
|
Go to the documentation of this file.
56 const float globalTheta,
57 const double sigmaZ_beamSpot,
58 const double transverseMomentum)
const;
67 return ((measurement.
recHit() ==
nullptr) || !(measurement.
recHit()->isValid()) ||
68 !((measurement).updatedState().isValid()));
106 putToken_ = produces<TrajectorySeedCollection>();
117 descriptions.
add(
"SeedingOTEDProducer",
desc);
152 if (vhSeedsL1.empty() || vhSeedsL2.empty() || vhSeedsL3.empty()) {
164 for (
const auto& hitL3 : vhSeedsL3) {
171 if (signZ * signPz > 0.0)
177 std::vector<TrajectoryMeasurement> measurementsL2 =
180 std::vector<TrajectoryMeasurement>::iterator measurementsL2end =
181 std::remove_if(measurementsL2.begin(), measurementsL2.end(),
isInvalid());
182 measurementsL2.erase(measurementsL2end, measurementsL2.end());
184 if (!measurementsL2.empty()) {
188 for (
const auto& mL2 : measurementsL2) {
192 std::pair<bool, TrajectoryStateOnSurface> updatedTSOS =
194 if (!updatedTSOS.first)
198 std::vector<TrajectoryMeasurement> measurementsL1 =
200 std::vector<TrajectoryMeasurement>::iterator measurementsL1end =
201 std::remove_if(measurementsL1.begin(), measurementsL1.end(),
isInvalid());
202 measurementsL1.erase(measurementsL1end, measurementsL1.end());
204 if (!measurementsL1.empty()) {
205 for (
const auto& mL1 : measurementsL1) {
209 std::pair<bool, TrajectoryStateOnSurface> updatedTSOSL1 =
211 if (!updatedTSOSL1.first)
221 updatedTSOSL1.second.rescaleError(100);
226 std::pair<bool, TrajectoryStateOnSurface> updatedTSOSL2_final =
228 if (!updatedTSOSL2_final.first)
230 std::pair<bool, TrajectoryStateOnSurface> updatedTSOSL3_final =
232 if (!updatedTSOSL3_final.first)
241 createSeed(updatedTSOSL3_final.second, container, hitL3->geographicalId(), *buildingPropagator);
254 unsigned int subid =
strip.subdetId();
262 unsigned int layerNumber) {
263 std::vector<const VectorHit*> vHsOnLayer;
264 if (!
input.empty()) {
265 for (
const auto& DSViter :
input) {
266 if (
checkLayer(DSViter.id()) == layerNumber) {
267 for (
const auto&
vh : DSViter) {
268 vHsOnLayer.push_back(&
vh);
278 if (!
input.empty()) {
279 for (
const auto& DSViter :
input) {
280 for (
const auto&
vh : DSViter) {
282 LogTrace(
"SeedingOTEDProducer") <<
" VH in layer " << layerNumber <<
" >> " <<
vh;
286 LogTrace(
"SeedingOTEDProducer") <<
" No VHs in layer " << layerNumber <<
".";
293 float theta = gv.theta();
306 float dy = lv.y() / lv.z();
327 for (
int i = 1;
i < 5;
i++) {
328 for (
int j = 1;
j < 5;
j++) {
339 return std::make_pair(
false, propTSOS);
342 return std::make_pair(
false, updatedTSOS);
343 return std::make_pair(
true, updatedTSOS);
347 double derivative =
vh->globalPosition().perp() /
vh->globalPosition().mag2();
349 return pow(derivative2 *
vh->lowerGlobalPosErr().czz() + derivative2 *
pow(sigmaZ_beamSpot, 2), 0.5);
353 const float globalTheta,
354 const double sigmaZ_beamSpot,
355 const double transverseMomentum)
const {
357 float varianceInverseTransvMomentum = 1. / 12;
358 float derivativeTheta2 =
pow(
cos(globalTheta) / transverseMomentum, 2);
359 float derivativeInverseTransvMomentum2 =
pow(
sin(globalTheta), 2);
361 return pow(derivativeTheta2 *
pow(thetaError, 2) + derivativeInverseTransvMomentum2 * varianceInverseTransvMomentum,
T const * product() const
const Propagator * propagator_
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
TrajectorySeedCollection run(edm::Handle< VectorHitCollection >)
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
static const std::string input
std::vector< BarrelDetLayer const * > const & tobLayers() const
std::vector< TrajectorySeed > TrajectorySeedCollection
T const * product() const
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
void printVHsOnLayer(const edmNew::DetSetVector< VectorHit > &, unsigned int)
const MagneticField * magField_
virtual LocalVector localDirection() const
LocalPoint localPosition() const override
GlobalPoint globalPosition() const
const GeomDet * det() const
const TrajectoryStateUpdator * updator_
const edm::EDGetTokenT< MeasurementTrackerEvent > tkMeasEventToken_
bool operator()(const TrajectoryMeasurement &measurement)
const GeometricSearchTracker * geometricSearchTracker() const
const reco::BeamSpot * beamSpot_
Derivative< X, A >::type derivative(const A &_)
unsigned int layer(const DetId &id) const
edm::ESGetToken< TrajectoryStateUpdator, TrackingComponentsRecord > updatorToken_
const TrackerTopology * tkTopo_
edm::EDGetTokenT< VectorHitCollection > vhProducerToken_
Sin< T >::type sin(const T &t)
void produce(edm::Event &, const edm::EventSetup &) override
double sigmaZ() const
sigma z
const Plane & surface() const
The nominal surface of the GeomDet.
float momentum(float magField) const
Cos< T >::type cos(const T &t)
#define DEFINE_FWK_MODULE(type)
const TrajectoryStateOnSurface buildInitialTSOS(const VectorHit *) const
edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorToken_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
TrajectorySeed createSeed(const TrajectoryStateOnSurface &tsos, const edm::OwnVector< TrackingRecHit > &container, const DetId &id, const Propagator &prop) const
unsigned int checkLayer(unsigned int iidd)
virtual PropagationDirection propagationDirection() const final
Geom::Theta< T > theta() const
static constexpr auto TIB
virtual void setPropagationDirection(PropagationDirection dir)
SeedingOTEDProducer(const edm::ParameterSet &)
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const =0
std::pair< bool, TrajectoryStateOnSurface > propagateAndUpdate(const TrajectoryStateOnSurface initialTSOS, const Propagator &, const TrackingRecHit &hit) const
edm::ESGetToken< Chi2MeasurementEstimatorBase, TrackingComponentsRecord > estToken_
const AlgebraicSymMatrix44 & covMatrix() const
GlobalPoint globalPosition() const final
float transverseMomentum(float magField) const
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const MeasurementTracker * measurementTracker_
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
virtual TrackingRecHit * clone() const =0
~SeedingOTEDProducer() override
float computeGlobalThetaError(const VectorHit *vh, const double sigmaZ_beamSpot) const
bool getData(T &iHolder) const
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > AlgebraicSymMatrix44
const MeasurementEstimator * estimator_
ConstRecHitPointer const & recHit() const
GlobalVector globalMomentum() const
static void fillDescriptions(edm::ConfigurationDescriptions &)
virtual Propagator * clone() const =0
float computeInverseMomentumError(const VectorHit *vh, const float globalTheta, const double sigmaZ_beamSpot, const double transverseMomentum) const
LocalPoint toLocal(const GlobalPoint &gp) const
std::vector< const VectorHit * > collectVHsOnLayer(const edmNew::DetSetVector< VectorHit > &, unsigned int)
static constexpr auto TOB
T getParameter(std::string const &) const
edm::ESGetToken< MeasurementTracker, CkfComponentsRecord > measurementTrackerToken_
std::unique_ptr< LayerMeasurements > layerMeasurements_
Power< A, B >::type pow(const A &a, const B &b)
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
edm::EDPutTokenT< TrajectorySeedCollection > putToken_
AlgebraicSymMatrix55 assign44To55(const AlgebraicSymMatrix44 &) const
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_