46 unsigned int& numSeedsMade,
71 : theInputCollectionTag_(
73 theMeasurementTrackerTag_(
75 theMinEtaForTEC_(
cfg.getParameter<double>(
"minEtaForTEC")),
76 theMaxEtaForTOB_(
cfg.getParameter<double>(
"maxEtaForTOB")),
77 theErrorSFHitless_(
cfg.getParameter<double>(
"errorSFHitless")),
78 mfToken_{esConsumes<MagneticField, IdealMagneticFieldRecord>()},
79 geomToken_{esConsumes<TrackerGeometry, TrackerDigiGeometryRecord>()},
80 estToken_{esConsumes<Chi2MeasurementEstimatorBase, TrackingComponentsRecord>(
82 propagatorAlongToken_{esConsumes<Propagator, TrackingComponentsRecord>(
84 propagatorOppositeToken_{esConsumes<Propagator, TrackingComponentsRecord>(
86 produces<TrajectorySeedCollection>();
91 desc.add<
edm::InputTag>(
"InputCollection", {
"l1tTTTracksFromTrackletEmulation",
"Level1TTTracks"});
95 desc.add<
double>(
"minEtaForTEC", 0.9);
96 desc.add<
double>(
"maxEtaForTOB", 1.2);
97 desc.add<
double>(
"errorSFHitless", 1
e-9);
106 unsigned int& numSeedsMade,
108 std::vector<GeometricSearchDet::DetWithState> dets;
112 auto const& detOnLayer = dets.front().first;
113 auto const& tsosOnLayer = dets.front().second;
114 if (!tsosOnLayer.isValid()) {
115 LogDebug(
"SeedGeneratorFromL1TTracks") <<
"Hitless TSOS is not valid!";
122 if (numSeedsMade < 1) {
131 std::unique_ptr<std::vector<TrajectorySeed>>
result(
new std::vector<TrajectorySeed>());
154 std::vector<BarrelDetLayer const*>
const& tob =
measurementTracker.geometricSearchTracker()->tobLayers();
156 std::vector<ForwardDetLayer const*>
const& tecPositive =
159 std::vector<ForwardDetLayer const*>
const& tecNegative =
167 for (
auto const& l1 :
trks) {
168 std::unique_ptr<std::vector<TrajectorySeed>>
out(
new std::vector<TrajectorySeed>());
170 dummyPlane->move(fts.
position() - dummyPlane->position());
173 unsigned int numSeedsMade = 0;
176 for (
auto it = tob.rbegin();
it != tob.rend(); ++
it) {
185 for (
auto it = tecPositive.rbegin();
it != tecPositive.rend(); ++
it) {
191 for (
auto it = tecNegative.rbegin();
it != tecNegative.rend(); ++
it) {
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< std::vector< TTTrack< Ref_Phase2TrackerDigi_ > > > theInputCollectionTag_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
void findSeedsOnLayer(const GeometricSearchDet &layer, const TrajectoryStateOnSurface &tsosAtIP, Propagator &propagatorAlong, const TTTrack< Ref_Phase2TrackerDigi_ > &l1, const MeasurementEstimator &estimator, unsigned int &numSeedsMade, std::unique_ptr< std::vector< TrajectorySeed >> &out) const
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
const double theMaxEtaForTOB_
static PlanePointer build(Args &&... args)
GlobalPoint position() const
std::unique_ptr< Propagator > SetPropagationDirection(Propagator const &iprop, PropagationDirection dir)
const double theErrorSFHitless_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Abs< T >::type abs(const T &t)
#define DEFINE_FWK_MODULE(type)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Class to store the L1 Track Trigger tracks.
const edm::ESGetToken< Chi2MeasurementEstimatorBase, TrackingComponentsRecord > estToken_
virtual void produce(StreamID, Event &, EventSetup const &) const =0
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorOppositeToken_
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorAlongToken_
SeedGeneratorFromL1TTracksEDProducer(const edm::ParameterSet &cfg)
const double theMinEtaForTEC_
const edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerTag_