|
|
Go to the documentation of this file.
37 bool operator()(
const Hit& h1,
const Hit& h2) {
return h1->globalPosition().perp2() < h2->globalPosition().perp2(); }
44 desc.add<
double>(
"originHalfLength", 1E9);
45 desc.add<
double>(
"originRadius", 1E9);
46 desc.add<
bool>(
"useProtoTrackKinematics",
false);
47 desc.add<
bool>(
"useEventsWithNoVertex",
true);
48 desc.add<
std::string>(
"TTRHBuilder",
"TTRHBuilderWithoutAngle4PixelTriplets");
49 desc.add<
bool>(
"usePV",
false);
50 desc.add<
bool>(
"includeFourthHit",
false);
55 psd0.add<
double>(
"SeedMomentumForBOFF", 5.0);
56 psd0.add<
double>(
"OriginTransverseErrorMultiplier", 1.0);
57 psd0.add<
double>(
"MinOneOverPtError", 1.0);
60 psd0.add<
bool>(
"forceKinematicWithRegionDirection",
false);
63 descriptions.
add(
"SeedGeneratorFromProtoTracksEDProducer",
desc);
72 builderName(
cfg.getParameter<
std::
string>(
"TTRHBuilder")),
73 usePV_(
cfg.getParameter<
bool>(
"usePV")),
74 includeFourthHit_(
cfg.getParameter<
bool>(
"includeFourthHit")),
76 theInputVertexCollectionTag(
78 produces<TrajectorySeedCollection>();
82 auto result = std::make_unique<TrajectorySeedCollection>();
95 for (TrackCollection::const_iterator it = protos.begin(); it != protos.end(); ++it) {
96 const Track& proto = (*it);
100 bool keepTrack =
false;
101 if ((!foundVertices) ||
vertices->empty()) {
107 double distR2 =
sqr(
vtx.x() - aPV.x()) +
sqr(
vtx.y() - aPV.y());
108 double distZ = fabs(
vtx.z() - aPV.z());
113 for (reco::VertexCollection::const_iterator iv =
vertices->begin(); iv !=
vertices->end(); ++iv) {
114 GlobalPoint aPV(iv->position().x(), iv->position().y(), iv->position().z());
115 double distR2 =
sqr(
vtx.x() - aPV.x()) +
sqr(
vtx.y() - aPV.y());
116 double distZ = fabs(
vtx.z() - aPV.z());
128 if (seedFromProtoTrack.
isValid())
133 std::vector<Hit>
hits;
134 for (
unsigned int iHit = 0, nHits = proto.
recHitsSize(); iHit < nHits; ++iHit) {
141 if (
hits.size() > 1) {
148 seedCreator.init(
region, es,
nullptr);
149 seedCreator.makeSeed(
ParameterDescriptionBase * add(U const &iLabel, T const &value)
T const * product() const
const bool useProtoTrackKinematics
SeedFromConsecutiveHitsCreator
std::vector< Vertex > VertexCollection
collection of Vertex objects
BaseTrackerRecHit const * ConstRecHitPointer
TrajectorySeed trajectorySeed() const
const edm::EDGetTokenT< reco::TrackCollection > theInputCollectionTag
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits).
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const bool includeFourthHit_
const std::string builderName
static ConstRecHitPointer nullPtr()
void produce(edm::Event &ev, const edm::EventSetup &es) override
const double originRadius
const double originHalfLength
const edm::EDGetTokenT< reco::VertexCollection > theInputVertexCollectionTag
TrackingRecHitRef recHit(size_t i) const
Get i-th hit on the track.
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead
const bool useEventsWithNoVertex
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T getParameter(std::string const &) const
SeedGeneratorFromProtoTracksEDProducer(const edm::ParameterSet &cfg)
const Vector & momentum() const
track momentum vector
std::vector< Track > TrackCollection
collection of Tracks
bool operator()(const Hit &h1, const Hit &h2)
SeedingHitSet::ConstRecHitPointer Hit
const edm::ParameterSet theConfig