26 theMTDEventCacheID(0),
45 LogDebug(
"Track|RecoMTD|MTDDetLayerMeasurements") <<
"(MTD): "<<detId<<std::endl;
49 auto detset = (*theMTDRecHits)[detId];
51 for (
const auto & rechit : detset)
59 LogDebug(
"Track|RecoMTD|MTDDetLayerMeasurements") <<
"Checking MTD RecHits";
70 throw cms::Exception(
"MTDDetLayerMeasurements") <<
"Cannot get MTD RecHits";
71 LogDebug(
"Track|RecoMTD|MTDDetLayerMeasurements") <<
"Cannot get MTD RecHits";
95 std::vector<DetWithState> dss = layer->
compatibleDets(startingState, prop, est);
96 LogDebug(
"RecoMTD")<<
"compatibleDets: "<<dss.size()<<std::endl;
98 for(
const auto& dws: dss) {
101 =
measurements(layer, dws.first, dws.second, est, iEvent);
102 result.insert(result.end(), detMeasurements.begin(), detMeasurements.end());
123 for(
auto rechit = mtdRecHits.begin();
124 rechit != mtdRecHits.end(); ++rechit) {
127 LogDebug(
"RecoMTD")<<
"Dimension: "<<(*rechit)->dimension()
128 <<
" Chi2: "<<estimate.second<<std::endl;
129 if (estimate.first) {
131 estimate.second,layer));
156 estimate.second,layer));
160 if (!result.empty()) {
179 std::vector<TrajectoryMeasurementGroup>
189 std::vector<TrajectoryMeasurementGroup>
196 std::vector<TrajectoryMeasurementGroup>
result;
201 for (
const auto& grp : groups) {
203 std::vector<TrajectoryMeasurement> groupMeasurements;
204 for (
const auto& detAndStateItr : grp) {
206 std::vector<TrajectoryMeasurement> detMeasurements
207 =
measurements(layer, detAndStateItr.det(), detAndStateItr.trajectoryState(), est,
iEvent);
208 groupMeasurements.insert(groupMeasurements.end(), detMeasurements.begin(), detMeasurements.end());
211 if (!groupMeasurements.empty())
212 std::sort( groupMeasurements.begin(), groupMeasurements.end(),
TrajMeasLessEstim());
228 throw cms::Exception(
"MTDDetLayerMeasurements") <<
"The event has not been set";
237 for (
const GeomDet* igd : gds) {
239 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
std::pair< bool, double > HitReturnType
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::shared_ptr< GenericTransientTrackingRecHit > MTDRecHitPointer