28 bool enableDT,
bool enableCSC,
bool enableRPC):
29 enableDTMeasurement(enableDT),
30 enableCSCMeasurement(enableCSC),
31 enableRPCMeasurement(enableRPC),
36 theCSCEventCacheID(0),
37 theRPCEventCacheID(0),
46 static int procInstance(0);
47 std::ostringstream sDT;
48 sDT<<
"MuonDetLayerMeasurements::checkDTRecHits::" << procInstance;
50 std::ostringstream sRPC;
51 sRPC<<
"MuonDetLayerMeasurements::checkRPCRecHits::" << procInstance;
53 std::ostringstream sCSC;
54 sCSC<<
"MuonDetLayerMeasurements::checkCSCRecHits::" << procInstance;
82 rechit!=range.second;++rechit)
101 rechit!=range.second; ++rechit)
120 rechit!=range.second; ++rechit)
126 throw cms::Exception(
"MuonDetLayerMeasurements") <<
"The DetLayer with det " << geoId.
det() <<
" subdet " << geoId.
subdetId() <<
" is not a valid Muon DetLayer. ";
143 throw cms::Exception(
"MuonDetLayerMeasurements") <<
"Cannot get DT RecHits";
160 throw cms::Exception(
"MuonDetLayerMeasurements") <<
"Cannot get CSC RecHits";
177 throw cms::Exception(
"MuonDetLayerMeasurements") <<
"Cannot get RPC RecHits";
202 std::vector<DetWithState> dss = layer->
compatibleDets(startingState, prop, est);
203 LogTrace(
"RecoMuon")<<
"compatibleDets: "<<dss.size()<<std::endl;
205 for(std::vector<DetWithState>::const_iterator detWithStateItr = dss.begin();
206 detWithStateItr != dss.end(); ++detWithStateItr){
210 detWithStateItr->second, est, iEvent);
211 result.insert(result.end(), detMeasurements.begin(), detMeasurements.end());
232 for(MuonRecHitContainer::const_iterator rechit = muonRecHits.begin();
233 rechit != muonRecHits.end(); ++rechit) {
236 LogTrace(
"RecoMuon")<<
"Dimension: "<<(*rechit)->dimension()
237 <<
" Chi2: "<<estimate.second<<std::endl;
238 if (estimate.first) {
240 estimate.second,layer));
260 for (MuonRecHitContainer::const_iterator irh = rhs.begin(); irh!=rhs.end(); irh++) {
265 estimate.second,layer));
269 if (!result.empty()) {
288 std::vector<TrajectoryMeasurementGroup>
298 std::vector<TrajectoryMeasurementGroup>
305 std::vector<TrajectoryMeasurementGroup>
result;
314 for (std::vector<DetGroup>::const_iterator grp=groups.begin(); grp!=groups.end(); ++grp) {
316 std::vector<TrajectoryMeasurement> groupMeasurements;
317 for (DetGroup::const_iterator detAndStateItr=grp->begin();
318 detAndStateItr !=grp->end(); ++detAndStateItr) {
320 std::vector<TrajectoryMeasurement> detMeasurements
321 =
measurements(layer, detAndStateItr->det(), detAndStateItr->trajectoryState(), est,
iEvent);
322 groupMeasurements.insert(groupMeasurements.end(), detMeasurements.begin(), detMeasurements.end());
325 if (!groupMeasurements.empty())
342 throw cms::Exception(
"MuonDetLayerMeasurements") <<
"The event has not been set";
351 for (std::vector<const GeomDet*>::const_iterator igd = gds.begin();
352 igd != gds.end(); igd++) {
354 rhs.insert(rhs.end(), detHits.begin(), detHits.end());
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::pair< const_iterator, const_iterator > range
iterator range
MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer
virtual std::vector< DetGroup > groupedCompatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
edm::Handle< DTRecSegment4DCollection > theDTRecHits
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TransientTrackingRecHit &hit) const =0
edm::Event::CacheIdentifier_t theDTEventCacheID
edm::EDGetTokenT< DTRecSegment4DCollection > dtToken_
edm::Handle< CSCSegmentCollection > theCSCRecHits
std::vector< TrajectoryMeasurementGroup > groupedMeasurements(const DetLayer *layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, const edm::Event &iEvent)
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
edm::EDGetTokenT< CSCSegmentCollection > cscToken_
uint32_t rawId() const
get the raw id
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
MuonRecHitContainer recHits(const DetLayer *layer, const edm::Event &iEvent)
returns the rechits which are on the layer
edm::Event::CacheIdentifier_t theRPCEventCacheID
CacheIdentifier_t cacheIdentifier() const
DetId geographicalId() const
The label of this GeomDet.
MuonDetLayerMeasurements(edm::InputTag dtlabel, edm::InputTag csclabel, edm::InputTag rpclabel, edm::ConsumesCollector &iC, bool enableDT=true, bool enableCSC=true, bool enableRPC=true)
bool enableCSCMeasurement
edm::Handle< RPCRecHitCollection > theRPCRecHits
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
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
MeasurementContainer measurements(const DetLayer *layer, const GeomDet *det, const TrajectoryStateOnSurface &stateOnDet, const MeasurementEstimator &est, const edm::Event &iEvent)
std::pair< bool, double > HitReturnType
virtual ~MuonDetLayerMeasurements()
std::vector< TrajectoryMeasurement > MeasurementContainer
edm::Event::CacheIdentifier_t theCSCEventCacheID
virtual const std::vector< const GeomDet * > & basicComponents() const =0
void setEvent(const edm::Event &)
set event
edm::EDGetTokenT< RPCRecHitCollection > rpcToken_
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
void checkEvent() const
check that the event is set, and throw otherwise
const edm::Event * theEvent
Detector det() const
get the detector field from this detid
static MuonRecHitPointer specificBuild(const GeomDet *geom, const TrackingRecHit *rh)
std::vector< MuonRecHitPointer > MuonRecHitContainer
bool enableRPCMeasurement
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 ...