34 bool operator()(
const Hit& h1,
const Hit& h2) {
return h1->globalPosition().perp2() < h2->globalPosition().perp2(); }
41 desc.add<
double>(
"originHalfLength", 1E9);
42 desc.add<
double>(
"originRadius", 1E9);
43 desc.add<
bool>(
"useProtoTrackKinematics",
false);
44 desc.add<
bool>(
"useEventsWithNoVertex",
true);
45 desc.add<
std::string>(
"TTRHBuilder",
"TTRHBuilderWithoutAngle4PixelTriplets");
46 desc.add<
bool>(
"usePV",
false);
47 desc.add<
bool>(
"includeFourthHit",
false);
48 desc.add<
bool>(
"produceComplement",
false);
53 psd0.add<
double>(
"SeedMomentumForBOFF", 5.0);
54 psd0.add<
double>(
"OriginTransverseErrorMultiplier", 1.0);
55 psd0.add<
double>(
"MinOneOverPtError", 1.0);
58 psd0.add<
bool>(
"forceKinematicWithRegionDirection",
false);
61 descriptions.
add(
"SeedGeneratorFromProtoTracksEDProducer",
desc);
69 usePV_(
cfg.getParameter<
bool>(
"usePV")),
70 includeFourthHit_(
cfg.getParameter<
bool>(
"includeFourthHit")),
71 produceComplement_(
cfg.getParameter<
bool>(
"produceComplement")),
73 theInputVertexCollectionTag(
75 seedCreator_(
cfg.getParameter<
edm::
ParameterSet>(
"SeedCreatorPSet"), consumesCollector()),
76 config_(consumesCollector()) {
77 produces<TrajectorySeedCollection>();
79 produces<reco::TrackCollection>();
84 auto result = std::make_unique<TrajectorySeedCollection>();
85 auto leftTracks = std::make_unique<reco::TrackCollection>();
98 for (TrackCollection::const_iterator it = protos.begin(); it != protos.end(); ++it) {
99 const Track& proto = (*it);
103 bool keepTrack =
false;
104 if ((!foundVertices) ||
vertices->empty()) {
110 double distR2 =
sqr(
vtx.x() - aPV.x()) +
sqr(
vtx.y() - aPV.y());
111 double distZ = fabs(
vtx.z() - aPV.z());
118 double distR2 =
sqr(
vtx.x() - aPV.x()) +
sqr(
vtx.y() - aPV.y());
119 double distZ = fabs(
vtx.z() - aPV.z());
127 (*leftTracks).push_back(proto);
133 if (seedFromProtoTrack.
isValid())
136 std::vector<Hit>
hits;
144 if (
hits.size() > 1) {
const SeedFromProtoTrack::Config config_
SeedGeneratorFromProtoTracksEDProducer(const edm::ParameterSet &cfg)
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
SeedFromConsecutiveHitsCreator seedCreator_
std::vector< Track > TrackCollection
collection of Tracks
std::vector< Vertex > VertexCollection
collection of Vertex objects
TrajectorySeed trajectorySeed() const
const bool useProtoTrackKinematics
const edm::EDGetTokenT< reco::TrackCollection > theInputCollectionTag
const bool produceComplement_
bool operator()(const Hit &h1, const Hit &h2)
BaseTrackerRecHit const * ConstRecHitPointer
const bool includeFourthHit_
const double originRadius
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const edm::EDGetTokenT< reco::VertexCollection > theInputVertexCollectionTag
SeedingHitSet::ConstRecHitPointer Hit
const double originHalfLength
void produce(edm::Event &ev, const edm::EventSetup &es) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const Vector & momentum() const
track momentum vector
TrackingRecHitRef recHit(size_t i) const
Get i-th hit on the track.
const bool useEventsWithNoVertex
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits