52 LogTrace(
"CSCRecHitDBuilder") <<
"[CSCRecHitDBuilder] build entered";
54 if ( !
geom_ )
throw cms::Exception(
"MissingGeometry") <<
"[CSCRecHitDBuilder::getLayer] Missing geometry" << std::endl;
65 std::vector<CSCRecHit2D> hitsInLayer;
68 int hits_in_layer = 0;
78 if ( rstripd.second == rstripd.first )
continue;
83 if ( layer_idx == 0 ) {
93 if ( rwired.second == rwired.first ) {
104 int chamber = sDetId.
chamber();
105 int layer = sDetId.
layer();
106 CSCDetId idw( endcap, 1, 1, chamber, layer );
108 rwired = wiredc->get( compId );
114 if (cscStripHit.empty())
continue;
128 LogTrace(
"CSCRecHitBuilder")<<
"[CSCRecHitDBuilder] found " << cscStripHit.size() <<
" strip and "
129 << cscWireHit.size() <<
" wire hits in layer " << sDetId;
131 for (
auto const & s_hit : cscStripHit) {
132 for (
auto const & w_hit : cscWireHit) {
136 if ( isInFiducial ) {
137 hitsInLayer.push_back( rechit );
146 LogTrace(
"CSCRecHitDBuilder") <<
"[CSCRecHitDBuilder] " << hits_in_layer <<
" rechits found in layer " << sDetId;
150 if (hits_in_layer > 0) {
151 oc.put( sDetId, hitsInLayer.begin(), hitsInLayer.end() );
159 LogTrace(
"CSCRecHitDBuilder") <<
"[CSCRecHitDBuilder] " << oc.size() <<
" 2d rechits created in this event.";
T getParameter(std::string const &) const
const CSCGeometry * geom_
std::vector< CSCStripHit > runStrip(const CSCDetId &id, const CSCLayer *layer, const CSCStripDigiCollection::Range &rstripd)
void setConditions(const CSCRecoConditions *reco)
Pass pointer to conditions data onwards.
const CSCLayer * getLayer(const CSCDetId &detId)
void build(const CSCStripDigiCollection *stripds, const CSCWireDigiCollection *wireds, CSCRecHit2DCollection &oc)
void setConditions(const CSCRecoConditions *reco)
CSCHitFromWireOnly * hitsFromWireOnly_
bool isHitInFiducial(const CSCLayer *layer, const CSCRecHit2D &rh)
Test if rechit is in fiducial volume.
CSCHitFromStripOnly * hitsFromStripOnly_
void setConditions(const CSCRecoConditions *reco)
std::vector< CSCWireHit > runWire(const CSCDetId &id, const CSCLayer *layer, const CSCWireDigiCollection::Range &rwired)
CSCRecHitDBuilder(const edm::ParameterSet &ps)
CSCRecHit2D hitFromStripAndWire(const CSCDetId &id, const CSCLayer *layer, const CSCWireHit &wHit, const CSCStripHit &sHit)
Make 2D hits when have both wire and strip hit available in same layer.
void setConditions(const CSCRecoConditions *reco)
CSCMake2DRecHit * make2DHits_
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to given DetId.
std::pair< const_iterator, const_iterator > Range