21 |
|
|
22 |
|
ShallowTrackClustersProducer::ShallowTrackClustersProducer(const edm::ParameterSet& iConfig) |
23 |
|
: theTracksLabel( iConfig.getParameter<edm::InputTag>("Tracks") ), |
24 |
+ |
theClustersLabel( iConfig.getParameter<edm::InputTag>("Clusters") ), |
25 |
|
Suffix ( iConfig.getParameter<std::string>("Suffix") ), |
26 |
|
Prefix ( iConfig.getParameter<std::string>("Prefix") ) |
27 |
|
{ |
65 |
|
|
66 |
|
void ShallowTrackClustersProducer:: |
67 |
|
produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { |
68 |
< |
shallow::CLUSTERMAP clustermap = shallow::make_cluster_map(iEvent); |
68 |
> |
shallow::CLUSTERMAP clustermap = shallow::make_cluster_map(iEvent,theClustersLabel); |
69 |
|
|
70 |
|
int size = clustermap.size(); |
71 |
|
std::auto_ptr<std::vector<unsigned int> > trackmulti ( new std::vector<unsigned int>(size, 0) ); |
121 |
|
const TrajectoryStateOnSurface unbiased = combiner(measurement.forwardPredictedState(), measurement.backwardPredictedState()); |
122 |
|
const SiStripRecHit2D* hit = dynamic_cast<const SiStripRecHit2D*> ( measurement.recHit()->hit() ); |
123 |
|
|
124 |
< |
if(!hit) break; |
124 |
> |
if(!hit) continue; |
125 |
|
shallow::CLUSTERMAP::const_iterator cluster = clustermap.find( std::make_pair(hit->geographicalId().rawId(), hit->cluster()->firstStrip() )); |
126 |
< |
if(cluster == clustermap.end() ) break; |
126 |
> |
if(cluster == clustermap.end() ) throw cms::Exception("Logic Error") << "Cluster not found: this could be a configuration error" << std::endl; |
127 |
|
|
128 |
|
unsigned i = cluster->second; |
129 |
|
if( 0 == (trackmulti->at(i))++ ) { |