29 bool enableDT,
bool enableCSC,
bool enableRPC):
30 theDTRecHitLabel(dtlabel),
31 theCSCRecHitLabel(csclabel),
32 theRPCRecHitLabel(rpclabel),
33 enableDTMeasurement(enableDT),
34 enableCSCMeasurement(enableCSC),
35 enableRPCMeasurement(enableRPC),
43 static int procInstance(0);
44 std::ostringstream sDT;
45 sDT<<
"MuonDetLayerMeasurements::checkDTRecHits::" << procInstance;
47 std::ostringstream sRPC;
48 sRPC<<
"MuonDetLayerMeasurements::checkRPCRecHits::" << procInstance;
50 std::ostringstream sCSC;
51 sCSC<<
"MuonDetLayerMeasurements::checkCSCRecHits::" << procInstance;
79 rechit!=range.second;++rechit)
98 rechit!=range.second; ++rechit)
117 rechit!=range.second; ++rechit)
123 throw cms::Exception(
"MuonDetLayerMeasurements") <<
"The DetLayer with det " << geoId.
det() <<
" subdet " << geoId.
subdetId() <<
" is not a valid Muon DetLayer. ";
140 throw cms::Exception(
"MuonDetLayerMeasurements") <<
"Cannot get DT RecHits";
156 throw cms::Exception(
"MuonDetLayerMeasurements") <<
"Cannot get CSC RecHits";
172 throw cms::Exception(
"MuonDetLayerMeasurements") <<
"Cannot get RPC RecHits";
197 std::vector<DetWithState> dss = layer->
compatibleDets(startingState, prop, est);
198 LogTrace(
"RecoMuon")<<
"compatibleDets: "<<dss.size()<<std::endl;
200 for(std::vector<DetWithState>::const_iterator detWithStateItr = dss.begin();
201 detWithStateItr != dss.end(); ++detWithStateItr){
205 detWithStateItr->second, est, iEvent);
206 result.insert(result.end(), detMeasurements.begin(), detMeasurements.end());
227 for(MuonRecHitContainer::const_iterator rechit = muonRecHits.begin();
228 rechit != muonRecHits.end(); ++rechit) {
231 LogTrace(
"RecoMuon")<<
"Dimension: "<<(*rechit)->dimension()
232 <<
" Chi2: "<<estimate.second<<std::endl;
233 if (estimate.first) {
235 estimate.second,layer));
255 for (MuonRecHitContainer::const_iterator irh = rhs.begin(); irh!=rhs.end(); irh++) {
260 estimate.second,layer));
264 if (!result.empty()) {
283 std::vector<TrajectoryMeasurementGroup>
293 std::vector<TrajectoryMeasurementGroup>
300 std::vector<TrajectoryMeasurementGroup>
result;
309 for (std::vector<DetGroup>::const_iterator grp=groups.begin(); grp!=groups.end(); ++grp) {
311 std::vector<TrajectoryMeasurement> groupMeasurements;
312 for (DetGroup::const_iterator detAndStateItr=grp->begin();
313 detAndStateItr !=grp->end(); ++detAndStateItr) {
315 std::vector<TrajectoryMeasurement> detMeasurements
316 =
measurements(layer, detAndStateItr->det(), detAndStateItr->trajectoryState(), est,
iEvent);
317 groupMeasurements.insert(groupMeasurements.end(), detMeasurements.begin(), detMeasurements.end());
320 if (!groupMeasurements.empty())
337 throw cms::Exception(
"MuonDetLayerMeasurements") <<
"The event has not been set";
346 for (std::vector<const GeomDet*>::const_iterator igd = gds.begin();
347 igd != gds.end(); igd++) {
349 rhs.insert(rhs.end(), detHits.begin(), detHits.end());
edm::EventID theCSCEventID
MuonDetLayerMeasurements(edm::InputTag dtlabel, edm::InputTag csclabel, edm::InputTag rpclabel, bool enableDT=true, bool enableCSC=true, bool enableRPC=true)
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
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TransientTrackingRecHit &hit) const =0
std::string theDTCheckName
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
uint32_t rawId() const
get the raw id
C::const_iterator const_iterator
constant access iterator type
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
edm::EventID theRPCEventID
MuonRecHitContainer recHits(const DetLayer *layer, const edm::Event &iEvent)
returns the rechits which are on the layer
edm::EventID theDTEventID
DetId geographicalId() const
The label of this GeomDet.
edm::InputTag theCSCRecHitLabel
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::string theCSCCheckName
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::pair< bool, double > HitReturnType
virtual ~MuonDetLayerMeasurements()
std::vector< TrajectoryMeasurement > MeasurementContainer
virtual const std::vector< const GeomDet * > & basicComponents() const =0
void setEvent(const edm::Event &)
set event
edm::InputTag theDTRecHitLabel
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
std::string theRPCCheckName
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 ...
edm::InputTag theRPCRecHitLabel