28 int numberOfTracks = 0;
29 DimensionParameters param;
45 const auto& hits = hitBatch.second;
50 param.rangeBegin = hitRange.xBegin;
51 param.rangeEnd = hitRange.xEnd;
54 param.rangeBegin = hitRange.yBegin;
55 param.rangeEnd = hitRange.yEnd;
58 if (xPartTracks.empty() && yPartTracks.empty())
61 unsigned int validHitsNumber = (
unsigned int)
threshold_ + 1;
63 for (
const auto& xTrack : xPartTracks) {
64 for (
const auto& yTrack : yPartTracks) {
66 math::XYZPoint positionSigma(xTrack.x0Sigma(), yTrack.y0Sigma(), 0.5f * (hitRange.zEnd - hitRange.zBegin));
71 for (
const auto&
hit : hits)
73 componentHits.emplace_back(
hit);
74 if (componentHits.size() < validHitsNumber)
77 float mean_time = 0.f, time_sigma = 0.f;
78 bool valid_hits =
timeEval(componentHits, mean_time, time_sigma);
88 return numberOfTracks;
std::vector< TotemTimingRecHit > HitVector
SpatialRange getHitSpatialRange(const HitVector &hits)
void push_back(const T &t)
void producePartialTracks(const HitVector &hits, const DimensionParameters ¶m, float(*getHitCenter)(const TotemTimingRecHit &), float(*getHitRangeWidth)(const TotemTimingRecHit &), void(*setTrackCenter)(TotemTimingLocalTrack &, float), void(*setTrackSigma)(TotemTimingLocalTrack &, float), TrackVector &result)
TotemTimingTrackRecognition(const edm::ParameterSet &iConfig)
auto const & tracks
cannot be loose
void addHit(const TotemTimingRecHit &recHit) override
Add new hit to the set from which the tracks are reconstructed.
bool timeEval(const HitVector &hits, float &meanTime, float &timeSigma) const
void setTimeSigma(float t_sigma)
bool containsHit(const CTPPSTimingRecHit &recHit, float tolerance=0.1f, CheckDimension check=CheckDimension::all) const
std::vector< TotemTimingLocalTrack > TrackVector
void setPosition(const math::XYZPoint &pos0)
HitVectorMap hitVectorMap_
RecHit vectors that should be processed separately while reconstructing tracks.
XYZPointD XYZPoint
point in space with cartesian internal representation
static int position[264][3]
int produceTracks(edm::DetSet< TotemTimingLocalTrack > &tracks) override
Produces a collection of tracks for the current station, given its hits collection.
void setPositionSigma(const math::XYZPoint &pos0_sigma)
void setValid(bool valid)