CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
MuonDetLayerMeasurements Class Reference

#include <MuonDetLayerMeasurements.h>

Public Types

typedef
MuonTransientTrackingRecHit::MuonRecHitContainer 
MuonRecHitContainer
 

Public Member Functions

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 More...
 
MeasurementContainer fastMeasurements (const DetLayer *layer, const TrajectoryStateOnSurface &theStateOnDet, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est)
 faster version in case the TrajectoryState on the surface of the GeomDet is already available More...
 
std::vector
< TrajectoryMeasurementGroup
groupedMeasurements (const DetLayer *layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, const edm::Event &iEvent)
 
std::vector
< TrajectoryMeasurementGroup
groupedMeasurements (const DetLayer *layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est)
 
MeasurementContainer measurements (const DetLayer *layer, const GeomDet *det, const TrajectoryStateOnSurface &stateOnDet, const MeasurementEstimator &est, const edm::Event &iEvent)
 
MeasurementContainer measurements (const DetLayer *layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, const edm::Event &iEvent)
 returns TMeasurements in a DetLayer compatible with the TSOS. More...
 
MeasurementContainer measurements (const DetLayer *layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est)
 returns TMeasurements in a DetLayer compatible with the TSOS. More...
 
 MuonDetLayerMeasurements (edm::InputTag dtlabel, edm::InputTag csclabel, edm::InputTag rpclabel, edm::ConsumesCollector &iC, bool enableDT=true, bool enableCSC=true, bool enableRPC=true)
 
MuonRecHitContainer recHits (const DetLayer *layer, const edm::Event &iEvent)
 returns the rechits which are on the layer More...
 
MuonRecHitContainer recHits (const DetLayer *layer)
 returns the rechits which are on the layer More...
 
void setEvent (const edm::Event &)
 set event More...
 
virtual ~MuonDetLayerMeasurements ()
 

Private Member Functions

void checkCSCRecHits ()
 
void checkDTRecHits ()
 
void checkEvent () const
 check that the event is set, and throw otherwise More...
 
void checkRPCRecHits ()
 
MuonRecHitContainer recHits (const GeomDet *, const edm::Event &iEvent)
 obtain TrackingRecHits from a DetLayer More...
 

Private Attributes

edm::EDGetTokenT
< CSCSegmentCollection
cscToken_
 
edm::EDGetTokenT
< DTRecSegment4DCollection
dtToken_
 
bool enableCSCMeasurement
 
bool enableDTMeasurement
 
bool enableRPCMeasurement
 
edm::EDGetTokenT
< RPCRecHitCollection
rpcToken_
 
edm::Event::CacheIdentifier_t theCSCEventCacheID
 
edm::Handle< CSCSegmentCollectiontheCSCRecHits
 
edm::Event::CacheIdentifier_t theDTEventCacheID
 
edm::Handle
< DTRecSegment4DCollection
theDTRecHits
 
const edm::EventtheEvent
 
edm::Event::CacheIdentifier_t theRPCEventCacheID
 
edm::Handle< RPCRecHitCollectiontheRPCRecHits
 

Detailed Description

The class to access recHits and TrajectoryMeasurements from DetLayer.

Author
C. Liu, R. Bellan, N. Amapane

Definition at line 39 of file MuonDetLayerMeasurements.h.

Member Typedef Documentation

Definition at line 41 of file MuonDetLayerMeasurements.h.

Constructor & Destructor Documentation

MuonDetLayerMeasurements::MuonDetLayerMeasurements ( edm::InputTag  dtlabel,
edm::InputTag  csclabel,
edm::InputTag  rpclabel,
edm::ConsumesCollector iC,
bool  enableDT = true,
bool  enableCSC = true,
bool  enableRPC = true 
)

Definition at line 24 of file MuonDetLayerMeasurements.cc.

References edm::ConsumesCollector::consumes(), cscToken_, dtToken_, and rpcToken_.

28  :
29  enableDTMeasurement(enableDT),
30  enableCSCMeasurement(enableCSC),
31  enableRPCMeasurement(enableRPC),
32  theDTRecHits(),
33  theCSCRecHits(),
34  theRPCRecHits(),
38  theEvent(0)
39 {
40 
42  cscToken_ = iC.consumes<CSCSegmentCollection>(csclabel);
43  rpcToken_ = iC.consumes<RPCRecHitCollection>(rpclabel);
44 
45 
46  static int procInstance(0);
47  std::ostringstream sDT;
48  sDT<<"MuonDetLayerMeasurements::checkDTRecHits::" << procInstance;
49  // theDTCheckName = sDT.str();
50  std::ostringstream sRPC;
51  sRPC<<"MuonDetLayerMeasurements::checkRPCRecHits::" << procInstance;
52  //theRPCCheckName = sRPC.str();
53  std::ostringstream sCSC;
54  sCSC<<"MuonDetLayerMeasurements::checkCSCRecHits::" << procInstance;
55  //theCSCCheckName = sCSC.str();
56  procInstance++;
57 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::Handle< DTRecSegment4DCollection > theDTRecHits
edm::Event::CacheIdentifier_t theDTEventCacheID
edm::EDGetTokenT< DTRecSegment4DCollection > dtToken_
edm::Handle< CSCSegmentCollection > theCSCRecHits
edm::EDGetTokenT< CSCSegmentCollection > cscToken_
edm::Event::CacheIdentifier_t theRPCEventCacheID
edm::Handle< RPCRecHitCollection > theRPCRecHits
edm::Event::CacheIdentifier_t theCSCEventCacheID
edm::EDGetTokenT< RPCRecHitCollection > rpcToken_
MuonDetLayerMeasurements::~MuonDetLayerMeasurements ( )
virtual

Definition at line 59 of file MuonDetLayerMeasurements.cc.

59 {}

Member Function Documentation

void MuonDetLayerMeasurements::checkCSCRecHits ( )
private

Definition at line 148 of file MuonDetLayerMeasurements.cc.

References edm::Event::cacheIdentifier(), checkEvent(), cscToken_, Exception, edm::Event::getByToken(), edm::HandleBase::isValid(), theCSCEventCacheID, theCSCRecHits, and theEvent.

Referenced by recHits().

149 {
150  checkEvent();
151  auto cacheID = theEvent->cacheIdentifier();
152  if (cacheID == theCSCEventCacheID) return;
153 
154  {
156  theCSCEventCacheID = cacheID;
157  }
158  if(!theCSCRecHits.isValid())
159  {
160  throw cms::Exception("MuonDetLayerMeasurements") << "Cannot get CSC RecHits";
161  }
162 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
edm::Handle< CSCSegmentCollection > theCSCRecHits
edm::EDGetTokenT< CSCSegmentCollection > cscToken_
CacheIdentifier_t cacheIdentifier() const
Definition: Event.cc:32
bool isValid() const
Definition: HandleBase.h:75
edm::Event::CacheIdentifier_t theCSCEventCacheID
void checkEvent() const
check that the event is set, and throw otherwise
void MuonDetLayerMeasurements::checkDTRecHits ( )
private

Definition at line 132 of file MuonDetLayerMeasurements.cc.

References edm::Event::cacheIdentifier(), checkEvent(), dtToken_, Exception, edm::Event::getByToken(), edm::HandleBase::isValid(), theDTEventCacheID, theDTRecHits, and theEvent.

Referenced by recHits().

133 {
134  checkEvent();
135  auto const cacheID = theEvent->cacheIdentifier();
136  if (cacheID == theDTEventCacheID) return;
137 
138  {
140  }
141  if(!theDTRecHits.isValid())
142  {
143  throw cms::Exception("MuonDetLayerMeasurements") << "Cannot get DT RecHits";
144  }
145 }
edm::Handle< DTRecSegment4DCollection > theDTRecHits
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
edm::Event::CacheIdentifier_t theDTEventCacheID
edm::EDGetTokenT< DTRecSegment4DCollection > dtToken_
CacheIdentifier_t cacheIdentifier() const
Definition: Event.cc:32
bool isValid() const
Definition: HandleBase.h:75
void checkEvent() const
check that the event is set, and throw otherwise
void MuonDetLayerMeasurements::checkEvent ( ) const
private

check that the event is set, and throw otherwise

Definition at line 340 of file MuonDetLayerMeasurements.cc.

References Exception, and theEvent.

Referenced by checkCSCRecHits(), checkDTRecHits(), checkRPCRecHits(), fastMeasurements(), groupedMeasurements(), measurements(), and recHits().

340  {
341  if(!theEvent)
342  throw cms::Exception("MuonDetLayerMeasurements") << "The event has not been set";
343 }
void MuonDetLayerMeasurements::checkRPCRecHits ( )
private

Definition at line 165 of file MuonDetLayerMeasurements.cc.

References edm::Event::cacheIdentifier(), checkEvent(), Exception, edm::Event::getByToken(), edm::HandleBase::isValid(), rpcToken_, theEvent, theRPCEventCacheID, and theRPCRecHits.

Referenced by recHits().

166 {
167  checkEvent();
168  auto cacheID = theEvent->cacheIdentifier();
169  if (cacheID == theRPCEventCacheID) return;
170 
171  {
173  theRPCEventCacheID = cacheID;
174  }
175  if(!theRPCRecHits.isValid())
176  {
177  throw cms::Exception("MuonDetLayerMeasurements") << "Cannot get RPC RecHits";
178  }
179 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
edm::Event::CacheIdentifier_t theRPCEventCacheID
CacheIdentifier_t cacheIdentifier() const
Definition: Event.cc:32
edm::Handle< RPCRecHitCollection > theRPCRecHits
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< RPCRecHitCollection > rpcToken_
void checkEvent() const
check that the event is set, and throw otherwise
MeasurementContainer MuonDetLayerMeasurements::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

Definition at line 252 of file MuonDetLayerMeasurements.cc.

References MeasurementEstimator::estimate(), recHits(), query::result, and python.multivaluedict::sort().

Referenced by fastMeasurements().

257  {
259  MuonRecHitContainer rhs = recHits(layer, iEvent);
260  for (MuonRecHitContainer::const_iterator irh = rhs.begin(); irh!=rhs.end(); irh++) {
261  MeasurementEstimator::HitReturnType estimate = est.estimate(theStateOnDet, (**irh));
262  if (estimate.first)
263  {
264  result.push_back(TrajectoryMeasurement(theStateOnDet,(*irh),
265  estimate.second,layer));
266  }
267  }
268 
269  if (!result.empty()) {
270  sort( result.begin(), result.end(), TrajMeasLessEstim());
271  }
272 
273  return result;
274 }
MuonRecHitContainer recHits(const DetLayer *layer, const edm::Event &iEvent)
returns the rechits which are on the layer
tuple result
Definition: query.py:137
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
std::pair< bool, double > HitReturnType
std::vector< TrajectoryMeasurement > MeasurementContainer
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
MeasurementContainer MuonDetLayerMeasurements::fastMeasurements ( const DetLayer layer,
const TrajectoryStateOnSurface theStateOnDet,
const TrajectoryStateOnSurface startingState,
const Propagator prop,
const MeasurementEstimator est 
)

faster version in case the TrajectoryState on the surface of the GeomDet is already available

fastMeasurements method if already got the Event

Definition at line 278 of file MuonDetLayerMeasurements.cc.

References checkEvent(), fastMeasurements(), and theEvent.

282  {
283  checkEvent();
284  return fastMeasurements(layer, theStateOnDet, startingState, prop, est, *theEvent);
285 }
void checkEvent() const
check that the event is set, and throw otherwise
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 ...
std::vector< TrajectoryMeasurementGroup > MuonDetLayerMeasurements::groupedMeasurements ( const DetLayer layer,
const TrajectoryStateOnSurface startingState,
const Propagator prop,
const MeasurementEstimator est,
const edm::Event iEvent 
)

Definition at line 299 of file MuonDetLayerMeasurements.cc.

References GeometricSearchDet::groupedCompatibleDets(), iEvent, measurements(), query::result, and python.multivaluedict::sort().

Referenced by CosmicMuonTrajectoryBuilder::findBestMeasurements(), StandAloneMuonFilter::findBestMeasurements(), and groupedMeasurements().

303  {
304 
305  std::vector<TrajectoryMeasurementGroup> result;
306  // if we want to use the concept of InvalidRecHits,
307  // we can reuse LayerMeasurements from TrackingTools/MeasurementDet
308  std::vector<DetGroup> groups(layer->groupedCompatibleDets(startingState, prop, est));
309 
310  // this should be fixed either in RecoMuon/MeasurementDet/MuonDetLayerMeasurements or
311  // RecoMuon/DetLayers/MuRingForwardDoubleLayer
312  // and removed the reverse operation in StandAloneMuonFilter::findBestMeasurements
313 
314  for (std::vector<DetGroup>::const_iterator grp=groups.begin(); grp!=groups.end(); ++grp) {
315 
316  std::vector<TrajectoryMeasurement> groupMeasurements;
317  for (DetGroup::const_iterator detAndStateItr=grp->begin();
318  detAndStateItr !=grp->end(); ++detAndStateItr) {
319 
320  std::vector<TrajectoryMeasurement> detMeasurements
321  = measurements(layer, detAndStateItr->det(), detAndStateItr->trajectoryState(), est, iEvent);
322  groupMeasurements.insert(groupMeasurements.end(), detMeasurements.begin(), detMeasurements.end());
323  }
324 
325  if (!groupMeasurements.empty())
326  std::sort( groupMeasurements.begin(), groupMeasurements.end(), TrajMeasLessEstim());
327 
328  result.push_back(TrajectoryMeasurementGroup(groupMeasurements, *grp));
329  }
330 
331  return result;
332 }
virtual std::vector< DetGroup > groupedCompatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
int iEvent
Definition: GenABIO.cc:230
tuple result
Definition: query.py:137
MeasurementContainer measurements(const DetLayer *layer, const GeomDet *det, const TrajectoryStateOnSurface &stateOnDet, const MeasurementEstimator &est, const edm::Event &iEvent)
std::vector< TrajectoryMeasurementGroup > MuonDetLayerMeasurements::groupedMeasurements ( const DetLayer layer,
const TrajectoryStateOnSurface startingState,
const Propagator prop,
const MeasurementEstimator est 
)

Definition at line 289 of file MuonDetLayerMeasurements.cc.

References checkEvent(), groupedMeasurements(), and theEvent.

292  {
293  checkEvent();
294  return groupedMeasurements(layer, startingState, prop, est, *theEvent);
295 }
std::vector< TrajectoryMeasurementGroup > groupedMeasurements(const DetLayer *layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, const edm::Event &iEvent)
void checkEvent() const
check that the event is set, and throw otherwise
MeasurementContainer MuonDetLayerMeasurements::measurements ( const DetLayer layer,
const GeomDet det,
const TrajectoryStateOnSurface stateOnDet,
const MeasurementEstimator est,
const edm::Event iEvent 
)

Definition at line 221 of file MuonDetLayerMeasurements.cc.

References MeasurementEstimator::estimate(), LogTrace, recHits(), query::result, and python.multivaluedict::sort().

Referenced by CosmicMuonTrajectoryBuilder::findBestMeasurements(), StandAloneMuonFilter::findBestMeasurements(), groupedMeasurements(), and measurements().

225  {
227 
228  // Get the Segments which relies on the GeomDet given by compatibleDets
229  MuonRecHitContainer muonRecHits = recHits(det, iEvent);
230 
231  // Create the Trajectory Measurement
232  for(MuonRecHitContainer::const_iterator rechit = muonRecHits.begin();
233  rechit != muonRecHits.end(); ++rechit) {
234 
235  MeasurementEstimator::HitReturnType estimate = est.estimate(stateOnDet,**rechit);
236  LogTrace("RecoMuon")<<"Dimension: "<<(*rechit)->dimension()
237  <<" Chi2: "<<estimate.second<<std::endl;
238  if (estimate.first) {
239  result.push_back(TrajectoryMeasurement(stateOnDet, *rechit,
240  estimate.second,layer));
241  }
242  }
243 
244  if (!result.empty()) sort( result.begin(), result.end(), TrajMeasLessEstim());
245 
246  return result;
247 }
MuonRecHitContainer recHits(const DetLayer *layer, const edm::Event &iEvent)
returns the rechits which are on the layer
tuple result
Definition: query.py:137
virtual HitReturnType estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const =0
#define LogTrace(id)
std::pair< bool, double > HitReturnType
std::vector< TrajectoryMeasurement > MeasurementContainer
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
MeasurementContainer MuonDetLayerMeasurements::measurements ( const DetLayer layer,
const TrajectoryStateOnSurface startingState,
const Propagator prop,
const MeasurementEstimator est,
const edm::Event iEvent 
)

returns TMeasurements in a DetLayer compatible with the TSOS.

Definition at line 194 of file MuonDetLayerMeasurements.cc.

References GeometricSearchDet::compatibleDets(), LogTrace, measurements(), query::result, and python.multivaluedict::sort().

198  {
199 
201 
202  std::vector<DetWithState> dss = layer->compatibleDets(startingState, prop, est);
203  LogTrace("RecoMuon")<<"compatibleDets: "<<dss.size()<<std::endl;
204 
205  for(std::vector<DetWithState>::const_iterator detWithStateItr = dss.begin();
206  detWithStateItr != dss.end(); ++detWithStateItr){
207 
208  MeasurementContainer detMeasurements
209  = measurements(layer, detWithStateItr->first,
210  detWithStateItr->second, est, iEvent);
211  result.insert(result.end(), detMeasurements.begin(), detMeasurements.end());
212  }
213 
214  if (!result.empty()) sort( result.begin(), result.end(), TrajMeasLessEstim());
215 
216  return result;
217 }
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
tuple result
Definition: query.py:137
MeasurementContainer measurements(const DetLayer *layer, const GeomDet *det, const TrajectoryStateOnSurface &stateOnDet, const MeasurementEstimator &est, const edm::Event &iEvent)
#define LogTrace(id)
std::vector< TrajectoryMeasurement > MeasurementContainer
MeasurementContainer MuonDetLayerMeasurements::measurements ( const DetLayer layer,
const TrajectoryStateOnSurface startingState,
const Propagator prop,
const MeasurementEstimator est 
)

returns TMeasurements in a DetLayer compatible with the TSOS.

measurements method if already got the Event

Definition at line 184 of file MuonDetLayerMeasurements.cc.

References checkEvent(), measurements(), and theEvent.

187  {
188  checkEvent();
189  return measurements(layer, startingState, prop, est, *theEvent);
190 }
MeasurementContainer measurements(const DetLayer *layer, const GeomDet *det, const TrajectoryStateOnSurface &stateOnDet, const MeasurementEstimator &est, const edm::Event &iEvent)
void checkEvent() const
check that the event is set, and throw otherwise
MuonRecHitContainer MuonDetLayerMeasurements::recHits ( const DetLayer layer,
const edm::Event iEvent 
)

returns the rechits which are on the layer

Definition at line 345 of file MuonDetLayerMeasurements.cc.

References GeometricSearchDet::basicComponents().

Referenced by MuonSeedBuilder::build(), fastMeasurements(), measurements(), MuonSeedOrcaPatternRecognition::produce(), recHits(), CosmicMuonTrajectoryBuilder::trajectories(), and CosmicMuonTrajectoryBuilder::unusedHits().

346  {
348 
349  std::vector <const GeomDet*> gds = layer->basicComponents();
350 
351  for (std::vector<const GeomDet*>::const_iterator igd = gds.begin();
352  igd != gds.end(); igd++) {
353  MuonRecHitContainer detHits = recHits(*igd, iEvent);
354  rhs.insert(rhs.end(), detHits.begin(), detHits.end());
355  }
356  return rhs;
357 }
MuonRecHitContainer recHits(const DetLayer *layer, const edm::Event &iEvent)
returns the rechits which are on the layer
virtual const std::vector< const GeomDet * > & basicComponents() const =0
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
MuonRecHitContainer MuonDetLayerMeasurements::recHits ( const DetLayer layer)

returns the rechits which are on the layer

Definition at line 359 of file MuonDetLayerMeasurements.cc.

References checkEvent(), recHits(), and theEvent.

360 {
361  checkEvent();
362  return recHits(layer, *theEvent);
363 }
MuonRecHitContainer recHits(const DetLayer *layer, const edm::Event &iEvent)
returns the rechits which are on the layer
void checkEvent() const
check that the event is set, and throw otherwise
MuonRecHitContainer MuonDetLayerMeasurements::recHits ( const GeomDet geomDet,
const edm::Event iEvent 
)
private

obtain TrackingRecHits from a DetLayer

Definition at line 61 of file MuonDetLayerMeasurements.cc.

References checkCSCRecHits(), checkDTRecHits(), checkRPCRecHits(), MuonSubdetId::CSC, DetId::det(), MuonSubdetId::DT, enableCSCMeasurement, enableDTMeasurement, enableRPCMeasurement, Exception, GeomDet::geographicalId(), iEvent, DetId::rawId(), query::result, MuonSubdetId::RPC, MuonTransientTrackingRecHit::specificBuild(), DetId::subdetId(), theCSCRecHits, theDTRecHits, theEvent, and theRPCRecHits.

63 {
64  DetId geoId = geomDet->geographicalId();
65  theEvent = &iEvent;
67 
68  if (geoId.subdetId() == MuonSubdetId::DT) {
70  {
72 
73  // Create the ChamberId
74  DTChamberId chamberId(geoId.rawId());
75  // LogTrace("Muon|RecoMuon|MuonDetLayerMeasurements") << "(DT): "<<chamberId<<std::endl;
76 
77  // Get the DT-Segment which relies on this chamber
78  DTRecSegment4DCollection::range range = theDTRecHits->get(chamberId);
79 
80  // Create the MuonTransientTrackingRechit
81  for (DTRecSegment4DCollection::const_iterator rechit = range.first;
82  rechit!=range.second;++rechit)
83  result.push_back(MuonTransientTrackingRecHit::specificBuild(geomDet,&*rechit));
84  }
85  }
86 
87  else if (geoId.subdetId() == MuonSubdetId::CSC) {
89  {
91 
92  // Create the chamber Id
93  CSCDetId chamberId(geoId.rawId());
94  // LogTrace("Muon|RecoMuon|MuonDetLayerMeasurements") << "(CSC): "<<chamberId<<std::endl;
95 
96  // Get the CSC-Segment which relies on this chamber
97  CSCSegmentCollection::range range = theCSCRecHits->get(chamberId);
98 
99  // Create the MuonTransientTrackingRecHit
100  for (CSCSegmentCollection::const_iterator rechit = range.first;
101  rechit!=range.second; ++rechit)
102  result.push_back(MuonTransientTrackingRecHit::specificBuild(geomDet,&*rechit));
103  }
104  }
105 
106  else if (geoId.subdetId() == MuonSubdetId::RPC) {
108  {
109  checkRPCRecHits();
110 
111  // Create the chamber Id
112  RPCDetId chamberId(geoId.rawId());
113  // LogTrace("Muon|RecoMuon|MuonDetLayerMeasurements") << "(RPC): "<<chamberId<<std::endl;
114 
115  // Get the RPC-Segment which relies on this chamber
116  RPCRecHitCollection::range range = theRPCRecHits->get(chamberId);
117 
118  // Create the MuonTransientTrackingRecHit
119  for (RPCRecHitCollection::const_iterator rechit = range.first;
120  rechit!=range.second; ++rechit)
121  result.push_back(MuonTransientTrackingRecHit::specificBuild(geomDet,&*rechit));
122  }
123  }
124  else {
125  // wrong type
126  throw cms::Exception("MuonDetLayerMeasurements") << "The DetLayer with det " << geoId.det() << " subdet " << geoId.subdetId() << " is not a valid Muon DetLayer. ";
127  }
128  return result;
129 }
std::pair< const_iterator, const_iterator > range
iterator range
Definition: RangeMap.h:50
edm::Handle< DTRecSegment4DCollection > theDTRecHits
edm::Handle< CSCSegmentCollection > theCSCRecHits
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
int iEvent
Definition: GenABIO.cc:230
static const int CSC
Definition: MuonSubdetId.h:13
tuple result
Definition: query.py:137
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:77
edm::Handle< RPCRecHitCollection > theRPCRecHits
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
Definition: DetId.h:18
static const int RPC
Definition: MuonSubdetId.h:14
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
static const int DT
Definition: MuonSubdetId.h:12
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
static MuonRecHitPointer specificBuild(const GeomDet *geom, const TrackingRecHit *rh)
void MuonDetLayerMeasurements::setEvent ( const edm::Event event)

set event

Definition at line 335 of file MuonDetLayerMeasurements.cc.

References event(), and theEvent.

Referenced by CosmicMuonTrajectoryBuilder::setEvent(), and StandAloneMuonFilter::setEvent().

335  {
336  theEvent = &event;
337 }
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

Member Data Documentation

edm::EDGetTokenT<CSCSegmentCollection> MuonDetLayerMeasurements::cscToken_
private

Definition at line 127 of file MuonDetLayerMeasurements.h.

Referenced by checkCSCRecHits(), and MuonDetLayerMeasurements().

edm::EDGetTokenT<DTRecSegment4DCollection> MuonDetLayerMeasurements::dtToken_
private

Definition at line 126 of file MuonDetLayerMeasurements.h.

Referenced by checkDTRecHits(), and MuonDetLayerMeasurements().

bool MuonDetLayerMeasurements::enableCSCMeasurement
private

Definition at line 132 of file MuonDetLayerMeasurements.h.

Referenced by recHits().

bool MuonDetLayerMeasurements::enableDTMeasurement
private

Definition at line 131 of file MuonDetLayerMeasurements.h.

Referenced by recHits().

bool MuonDetLayerMeasurements::enableRPCMeasurement
private

Definition at line 133 of file MuonDetLayerMeasurements.h.

Referenced by recHits().

edm::EDGetTokenT<RPCRecHitCollection> MuonDetLayerMeasurements::rpcToken_
private

Definition at line 128 of file MuonDetLayerMeasurements.h.

Referenced by checkRPCRecHits(), and MuonDetLayerMeasurements().

edm::Event::CacheIdentifier_t MuonDetLayerMeasurements::theCSCEventCacheID
private

Definition at line 146 of file MuonDetLayerMeasurements.h.

Referenced by checkCSCRecHits().

edm::Handle<CSCSegmentCollection> MuonDetLayerMeasurements::theCSCRecHits
private

Definition at line 137 of file MuonDetLayerMeasurements.h.

Referenced by checkCSCRecHits(), and recHits().

edm::Event::CacheIdentifier_t MuonDetLayerMeasurements::theDTEventCacheID
private

Definition at line 145 of file MuonDetLayerMeasurements.h.

Referenced by checkDTRecHits().

edm::Handle<DTRecSegment4DCollection> MuonDetLayerMeasurements::theDTRecHits
private

Definition at line 136 of file MuonDetLayerMeasurements.h.

Referenced by checkDTRecHits(), and recHits().

const edm::Event* MuonDetLayerMeasurements::theEvent
private
edm::Event::CacheIdentifier_t MuonDetLayerMeasurements::theRPCEventCacheID
private

Definition at line 147 of file MuonDetLayerMeasurements.h.

Referenced by checkRPCRecHits().

edm::Handle<RPCRecHitCollection> MuonDetLayerMeasurements::theRPCRecHits
private

Definition at line 138 of file MuonDetLayerMeasurements.h.

Referenced by checkRPCRecHits(), and recHits().