52 LogTrace(
"CSCRecHitDBuilder") <<
"[CSCRecHitDBuilder] build entered";
54 std::vector<CSCDetId> stripLayer;
55 std::vector<CSCDetId>::const_iterator sIt;
56 std::vector<CSCDetId> wireLayer;
57 std::vector<CSCDetId>::const_iterator wIt;
68 if ( rwired.second == rwired.first ) {
74 if ( rhv.size() > 0 ) wireLayer.push_back(
id );
77 clean_woc.put(
id, rhv.begin(), rhv.end() );
80 LogTrace(
"CSCRecHitBuilder") <<
"[CSCRecHitDBuilder] wire hits created";
91 if ( rstripd.second == rstripd.first )
continue;
95 if ( rhv.size() > 0 ) stripLayer.push_back(
id );
98 clean_soc.put(
id, rhv.begin(), rhv.end() );
101 LogTrace(
"CSCRecHitDBuilder") <<
"[CSCRecHitDBuilder] strip hits created";
110 std::vector<CSCRecHit2D> hitsInLayer;
113 int hits_in_layer = 0;
117 for ( sIt=stripLayer.begin(); sIt != stripLayer.end(); ++sIt ) {
122 std::vector<CSCStripHit> cscStripHit;
129 cscStripHit.push_back(*clean_soc);
135 if ( layer_idx == 0 ) {
144 if ( rwired.second == rwired.first ) {
155 int chamber = sDetId.
chamber();
156 int layer = sDetId.
layer();
157 CSCDetId idw( endcap, 1, 1, chamber, layer );
162 for ( wIt=wireLayer.begin(); wIt != wireLayer.end(); ++wIt ) {
169 (wDetId.
ring() == compId.
ring() ) &&
174 std::vector<CSCWireHit> cscWireHit;
180 cscWireHit.push_back(*clean_woc);
185 LogTrace(
"CSCRecHitBuilder")<<
"[CSCRecHitDBuilder] found " << cscStripHit.size() <<
" strip and "
186 << cscWireHit.size() <<
" wire hits in layer " << sDetId;
188 for (
unsigned i = 0;
i != cscStripHit.size(); ++
i ) {
190 for (
unsigned j = 0;
j != cscWireHit.size(); ++
j ) {
195 if ( isInFiducial ) {
196 hitsInLayer.push_back( rechit );
204 LogTrace(
"CSCRecHitDBuilder") <<
"[CSCRecHitDBuilder] " << hits_in_layer <<
" rechits found in layer " << sDetId;
207 if (hits_in_layer > 0) {
208 oc.put( sDetId, hitsInLayer.begin(), hitsInLayer.end() );
216 LogTrace(
"CSCRecHitDBuilder") <<
"[CSCRecHitDBuilder] " << oc.size() <<
" 2d rechits created in this event.";
222 if ( !
geom_ )
throw cms::Exception(
"MissingGeometry") <<
"[CSCRecHitDBuilder::getLayer] Missing geometry" << std::endl;
T getParameter(std::string const &) const
std::pair< const_iterator, const_iterator > range
iterator range
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)
C::const_iterator const_iterator
constant access iterator type
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.
static std::pair< CSCDetId, CSCDetIdSameDetLayerCompare > cscDetLayer(CSCDetId id)
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