32 bool enableDT,
bool enableCSC,
bool enableRPC,
bool enableGEM):
33 enableDTMeasurement(enableDT),
34 enableCSCMeasurement(enableCSC),
35 enableRPCMeasurement(enableRPC),
36 enableGEMMeasurement(enableGEM),
43 theCSCEventCacheID(0),
44 theRPCEventCacheID(0),
45 theGEMEventCacheID(0),
54 static int procInstance(0);
55 std::ostringstream sDT;
56 sDT<<
"MuonDetLayerMeasurements::checkDTRecHits::" << procInstance;
58 std::ostringstream sRPC;
59 sRPC<<
"MuonDetLayerMeasurements::checkRPCRecHits::" << procInstance;
61 std::ostringstream sCSC;
62 sCSC<<
"MuonDetLayerMeasurements::checkCSCRecHits::" << procInstance;
64 std::ostringstream sGEM;
65 sGEM<<
"MuonDetLayerMeasurements::checkGEMRecHits::" << procInstance;
93 rechit!=range.second;++rechit)
112 rechit!=range.second; ++rechit)
131 rechit!=range.second; ++rechit)
151 rechit!=range.second; ++rechit)
158 throw cms::Exception(
"MuonDetLayerMeasurements") <<
"The DetLayer with det " << geoId.
det() <<
" subdet " << geoId.
subdetId() <<
" is not a valid Muon DetLayer. ";
175 throw cms::Exception(
"MuonDetLayerMeasurements") <<
"Cannot get DT RecHits";
192 throw cms::Exception(
"MuonDetLayerMeasurements") <<
"Cannot get CSC RecHits";
209 throw cms::Exception(
"MuonDetLayerMeasurements") <<
"Cannot get RPC RecHits";
225 throw cms::Exception(
"MuonDetLayerMeasurements") <<
"Cannot get GEM RecHits";
249 std::vector<DetWithState> dss = layer->
compatibleDets(startingState, prop, est);
250 LogTrace(
"RecoMuon")<<
"compatibleDets: "<<dss.size()<<std::endl;
252 for(std::vector<DetWithState>::const_iterator detWithStateItr = dss.begin();
253 detWithStateItr != dss.end(); ++detWithStateItr){
257 detWithStateItr->second, est, iEvent);
258 result.insert(result.end(), detMeasurements.begin(), detMeasurements.end());
279 for(MuonRecHitContainer::const_iterator rechit = muonRecHits.begin();
280 rechit != muonRecHits.end(); ++rechit) {
283 LogTrace(
"RecoMuon")<<
"Dimension: "<<(*rechit)->dimension()
284 <<
" Chi2: "<<estimate.second<<std::endl;
285 if (estimate.first) {
287 estimate.second,layer));
307 for (MuonRecHitContainer::const_iterator irh = rhs.begin(); irh!=rhs.end(); irh++) {
312 estimate.second,layer));
316 if (!result.empty()) {
335 std::vector<TrajectoryMeasurementGroup>
345 std::vector<TrajectoryMeasurementGroup>
352 std::vector<TrajectoryMeasurementGroup>
result;
361 for (std::vector<DetGroup>::const_iterator grp=groups.begin(); grp!=groups.end(); ++grp) {
363 std::vector<TrajectoryMeasurement> groupMeasurements;
364 for (DetGroup::const_iterator detAndStateItr=grp->begin();
365 detAndStateItr !=grp->end(); ++detAndStateItr) {
367 std::vector<TrajectoryMeasurement> detMeasurements
368 =
measurements(layer, detAndStateItr->det(), detAndStateItr->trajectoryState(), est,
iEvent);
369 groupMeasurements.insert(groupMeasurements.end(), detMeasurements.begin(), detMeasurements.end());
372 if (!groupMeasurements.empty())
389 throw cms::Exception(
"MuonDetLayerMeasurements") <<
"The event has not been set";
398 for (std::vector<const GeomDet*>::const_iterator igd = gds.begin();
399 igd != gds.end(); igd++) {
401 rhs.insert(rhs.end(), detHits.begin(), detHits.end());
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::pair< const_iterator, const_iterator > range
iterator range
MuonDetLayerMeasurements(edm::InputTag dtlabel, edm::InputTag csclabel, edm::InputTag rpclabel, edm::InputTag gemlabel, edm::ConsumesCollector &iC, bool enableDT=true, bool enableCSC=true, bool enableRPC=true, bool enableGEM=true)
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
edm::Event::CacheIdentifier_t theGEMEventCacheID
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
bool enableGEMMeasurement
DetId geographicalId() const
The label of this GeomDet.
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
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
edm::EDGetTokenT< GEMRecHitCollection > gemToken_
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
edm::Handle< GEMRecHitCollection > theGEMRecHits
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 ...