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";
68 if (!result.empty()) {
92 LogDebug(
"MTDDetLayerMeasurements") <<
"compatibleDets: " << dss.size() << std::endl;
94 for (
const auto& dws : dss) {
96 result.insert(result.end(), detMeasurements.begin(), detMeasurements.end());
113 for (
const auto& rechit : mtdRecHits) {
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;
172 for (
const auto& grp : groups) {
173 std::vector<TrajectoryMeasurement> groupMeasurements;
174 for (
const auto& detAndStateItr : grp) {
175 std::vector<TrajectoryMeasurement> detMeasurements =
176 measurements(layer, detAndStateItr.det(), detAndStateItr.trajectoryState(), est,
iEvent);
177 groupMeasurements.insert(groupMeasurements.end(), detMeasurements.begin(), detMeasurements.end());
191 throw cms::Exception(
"MTDDetLayerMeasurements") <<
"The event has not been set";
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
void checkEvent() const
check that the event is set, and throw otherwise
virtual std::vector< DetGroup > groupedCompatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::Event::CacheIdentifier_t theMTDEventCacheID
constexpr uint32_t rawId() const
get the raw id
virtual ~MTDDetLayerMeasurements()
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
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
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 ...
static RecHitPointer build(const GeomDet *geom, const TrackingRecHit *rh)
CacheIdentifier_t cacheIdentifier() const
DetId geographicalId() const
The label of this GeomDet.
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
MTDDetLayerMeasurements(const edm::InputTag &mtdlabel, edm::ConsumesCollector &iC)
const edm::Event * theEvent
A 2D TrackerRecHit with time and time error information.
std::vector< TrajectoryMeasurement > MeasurementContainer
std::vector< GenericTransientTrackingRecHit::RecHitPointer > MTDRecHitContainer
virtual const std::vector< const GeomDet * > & basicComponents() const =0
std::pair< bool, double > HitReturnType
std::shared_ptr< GenericTransientTrackingRecHit > MTDRecHitPointer