26 std::vector<edm::ParameterSet> algoPSets = ps.
getParameter<std::vector<edm::ParameterSet> >(
"algo_psets");
32 LogDebug(
"CSCSegment|CSC") <<
"CSCSegmentBuilder algorithm name: " <<
algoName;
35 std::vector<edm::ParameterSet> segAlgoPSet =
36 algoPSets[chosenAlgo].getParameter<std::vector<edm::ParameterSet> >(
"algo_psets");
39 std::vector<std::string> chType = algoPSets[chosenAlgo].getParameter<std::vector<std::string> >(
"chamber_types");
40 LogDebug(
"CSCSegment|CSC") <<
"No. of chamber types to handle: " << chType.size();
43 std::vector<int> algoToType = algoPSets[chosenAlgo].getParameter<std::vector<int> >(
"parameters_per_chamber_type");
46 if (algoToType.size() != chType.size()) {
48 <<
"#dim algosToType=" << algoToType.size() <<
", #dim chType=" << chType.size() << std::endl;
53 for (
size_t j = 0;
j < chType.size(); ++
j) {
55 edm::LogVerbatim(
"CSCSegment|CSC") <<
"using algorithm #" << algoToType[
j] <<
" for chamber type " << chType[
j];
62 LogDebug(
"CSCSegment|CSC") <<
"Total number of rechits in this event: " <<
recHits->size();
65 std::vector<CSCDetId>::const_iterator chIt;
70 if (((*it2).cscDetId().chamber() == (*chIt).chamber()) && ((*it2).cscDetId().station() == (*chIt).station()) &&
71 ((*it2).cscDetId().ring() == (*chIt).ring()) && ((*it2).cscDetId().endcap() == (*chIt).endcap()))
75 chambers.push_back((*it2).cscDetId().chamberId());
79 std::vector<const CSCRecHit2D*> cscRecHits;
85 std::vector<int> hitPerLayer(6);
87 hitPerLayer[(*rechit).cscDetId().layer() - 1]++;
88 cscRecHits.push_back(&(*rechit));
91 LogDebug(
"CSCSegment|CSC") <<
"found " << cscRecHits.size() <<
" rechits in chamber " << *chIt;
94 std::vector<CSCSegment> segv =
algoMap[
chamber->specs()->chamberTypeName()]->run(
chamber, cscRecHits);
96 LogDebug(
"CSCSegment|CSC") <<
"found " << segv.size() <<
" segments in chamber " << *chIt;
99 oc.put((*chIt), segv.begin(), segv.end());