25 theMTDEventCacheID(0),
39 LogDebug(
"MTDDetLayerMeasurements") <<
"(MTD): " <<
static_cast<MTDDetId>(detId) << std::endl;
42 auto detset = (*theMTDRecHits)[detId];
44 for (
const auto& rechit : detset)
51 LogDebug(
"MTDDetLayerMeasurements") <<
"Checking MTD RecHits";
62 throw cms::Exception(
"MTDDetLayerMeasurements") <<
"Cannot get MTD RecHits";
91 const auto& dss =
layer->compatibleDets(startingState, prop, est);
92 LogDebug(
"MTDDetLayerMeasurements") <<
"compatibleDets: " << dss.size() << std::endl;
94 for (
const auto& dws : dss) {
96 result.insert(
result.end(), detMeasurements.begin(), detMeasurements.end());
115 LogDebug(
"RecoMTD") <<
"Dimension: " << rechit->dimension() <<
" Chi2: " << estimate.second << std::endl;
116 if (estimate.first) {
132 for (
const auto& irh : rhs) {
134 if (estimate.first) {
167 std::vector<TrajectoryMeasurementGroup>
result;
170 std::vector<DetGroup> groups(
layer->groupedCompatibleDets(startingState, prop, est));
172 for (
const auto& grp : groups) {
173 std::vector<TrajectoryMeasurement> groupMeasurements;
174 for (
const auto& detAndStateItr : grp) {
175 std::vector<TrajectoryMeasurement> detMeasurements =
177 groupMeasurements.insert(groupMeasurements.end(), detMeasurements.begin(), detMeasurements.end());
191 throw cms::Exception(
"MTDDetLayerMeasurements") <<
"The event has not been set";
197 std::vector<const GeomDet*> gds =
layer->basicComponents();
199 for (
const GeomDet* igd : gds) {
201 rhs.insert(rhs.end(), detHits.begin(), detHits.end());
MTDRecHitContainer recHits(const DetLayer *layer, const edm::Event &iEvent)
returns the rechits which are on the layer
std::vector< TrajectoryMeasurement > MeasurementContainer
edm::Event::CacheIdentifier_t theMTDEventCacheID
virtual ~MTDDetLayerMeasurements()
MTDDetLayerMeasurements::MeasurementContainer MeasurementContainer
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< TrajectoryMeasurementGroup > groupedMeasurements(const DetLayer *layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, const edm::Event &iEvent)
std::vector< GenericTransientTrackingRecHit::RecHitPointer > MTDRecHitContainer
Detector identifier base class for the MIP Timing Layer.
constexpr std::array< uint8_t, layerIndexSize > layer
void setEvent(const edm::Event &)
set event
MeasurementContainer fastMeasurements(const DetLayer *layer, const TrajectoryStateOnSurface &theStateOnDet, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, const edm::Event &iEvent)
faster version in case the TrajectoryState on the surface of the GeomDet is already available ...
void checkEvent() const
check that the event is set, and throw otherwise
static RecHitPointer build(const GeomDet *geom, const TrackingRecHit *rh)
MeasurementContainer measurements(const DetLayer *layer, const GeomDet *det, const TrajectoryStateOnSurface &stateOnDet, const MeasurementEstimator &est, const edm::Event &iEvent)
edm::Handle< edmNew::DetSetVector< MTDTrackingRecHit > > theMTDRecHits
edm::EDGetTokenT< MTDTrackingRecHit > theMTDToken
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
DetId geographicalId() const
The label of this GeomDet.
MTDDetLayerMeasurements(const edm::InputTag &mtdlabel, edm::ConsumesCollector &iC)
CacheIdentifier_t cacheIdentifier() const
constexpr uint32_t rawId() const
get the raw id
const edm::Event * theEvent
A 2D TrackerRecHit with time and time error information.
std::vector< GenericTransientTrackingRecHit::RecHitPointer > MTDRecHitContainer
std::pair< bool, double > HitReturnType
std::shared_ptr< GenericTransientTrackingRecHit > MTDRecHitPointer