23 : theMTDRecHits(), theMTDEventCacheID(0), theEvent(
nullptr) {
38 LogDebug(
"Track|RecoMTD|MTDDetLayerMeasurements") <<
"(MTD): " << detId << std::endl;
42 auto detset = (*theMTDRecHits)[detId];
44 for (
const auto& rechit : detset)
51 LogDebug(
"Track|RecoMTD|MTDDetLayerMeasurements") <<
"Checking MTD RecHits";
62 throw cms::Exception(
"MTDDetLayerMeasurements") <<
"Cannot get MTD RecHits";
63 LogDebug(
"Track|RecoMTD|MTDDetLayerMeasurements") <<
"Cannot get MTD RecHits";
83 std::vector<DetWithState> dss = layer->
compatibleDets(startingState, prop, est);
84 LogDebug(
"RecoMTD") <<
"compatibleDets: " << dss.size() << std::endl;
86 for (
const auto& dws : dss) {
88 result.insert(result.end(), detMeasurements.begin(), detMeasurements.end());
108 for (
auto rechit = mtdRecHits.begin(); rechit != mtdRecHits.end(); ++rechit) {
110 LogDebug(
"RecoMTD") <<
"Dimension: " << (*rechit)->dimension() <<
" Chi2: " << estimate.second << std::endl;
111 if (estimate.first) {
132 if (estimate.first) {
137 if (!result.empty()) {
169 std::vector<TrajectoryMeasurementGroup>
result;
174 for (
const auto& grp : groups) {
175 std::vector<TrajectoryMeasurement> groupMeasurements;
176 for (
const auto& detAndStateItr : grp) {
177 std::vector<TrajectoryMeasurement> detMeasurements =
178 measurements(layer, detAndStateItr.det(), detAndStateItr.trajectoryState(), est,
iEvent);
179 groupMeasurements.insert(groupMeasurements.end(), detMeasurements.begin(), detMeasurements.end());
182 if (!groupMeasurements.empty())
183 std::sort(groupMeasurements.begin(), groupMeasurements.end(),
TrajMeasLessEstim());
196 throw cms::Exception(
"MTDDetLayerMeasurements") <<
"The event has not been set";
204 for (
const GeomDet* igd : gds) {
206 rhs.insert(rhs.end(), detHits.begin(), detHits.end());
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
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
virtual const std::vector< const GeomDet * > & basicComponents() const =0
edm::Event::CacheIdentifier_t theMTDEventCacheID
constexpr uint32_t rawId() const
get the raw id
virtual ~MTDDetLayerMeasurements()
MTDDetLayerMeasurements::MeasurementContainer MeasurementContainer
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
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)
Container::value_type value_type
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
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
edm::EDGetTokenT< MTDTrackingRecHit > mtdToken_
MTDDetLayerMeasurements(edm::InputTag mtdlabel, edm::ConsumesCollector &iC)
const edm::Event * theEvent
A 2D TrackerRecHit with time and time error information.
std::vector< GenericTransientTrackingRecHit::RecHitPointer > MTDRecHitContainer
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
std::pair< bool, double > HitReturnType
std::shared_ptr< GenericTransientTrackingRecHit > MTDRecHitPointer