27 std::vector<edm::ParameterSet> algoPSets = ps.
getParameter<std::vector<edm::ParameterSet> >(
"algo_psets");
33 LogDebug(
"CSCSegment|CSC")<<
"CSCSegmentBuilder algorithm name: " <<
algoName;
36 std::vector<edm::ParameterSet> segAlgoPSet = 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 create(algoName, segAlgoPSet[algoToType[j]-1]));
56 edm::LogVerbatim(
"CSCSegment|CSC")<<
"using algorithm #" << algoToType[j] <<
" for chamber type " << chType[j];
64 LogDebug(
"CSCSegment|CSC")<<
"Total number of rechits in this event: " << recHits->size();
67 std::vector<CSCDetId>::const_iterator chIt;
72 for(chIt=chambers.begin(); chIt != chambers.end(); ++chIt)
73 if (((*it2).cscDetId().chamber() == (*chIt).chamber()) &&
74 ((*it2).cscDetId().station() == (*chIt).station()) &&
75 ((*it2).cscDetId().ring() == (*chIt).ring()) &&
76 ((*it2).cscDetId().endcap() == (*chIt).endcap()))
80 chambers.push_back((*it2).cscDetId().chamberId());
83 for(chIt=chambers.begin(); chIt != chambers.end(); ++chIt) {
85 std::vector<const CSCRecHit2D*> cscRecHits;
91 std::vector<int> hitPerLayer(6);
94 hitPerLayer[(*rechit).cscDetId().layer()-1]++;
95 cscRecHits.push_back(&(*rechit));
98 LogDebug(
"CSCSegment|CSC") <<
"found " << cscRecHits.size() <<
" rechits in chamber " << *chIt;
103 LogDebug(
"CSCSegment|CSC") <<
"found " << segv.size() <<
" segments in chamber " << *chIt;
106 oc.put((*chIt), segv.begin(), segv.end());
CSCSegmentBuilder(const edm::ParameterSet &)
T getParameter(std::string const &) const
void build(const CSCRecHit2DCollection *rechits, CSCSegmentCollection &oc)
std::pair< const_iterator, const_iterator > range
iterator range
def create(alignables, pedeDump, additionalData, outputFile, config)
std::string chamberTypeName() const
const CSCGeometry * geom_
C::const_iterator const_iterator
constant access iterator type
const CSCChamberSpecs * specs() const
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
~CSCSegmentBuilder()
Destructor.
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
std::map< std::string, std::unique_ptr< CSCSegmentAlgorithm > > algoMap
static char chambers[264][20]
void setGeometry(const CSCGeometry *geom)
T get(const Candidate &c)
static std::pair< CSCDetId, CSCDetIdSameChamberComparator > cscChamber(CSCDetId id)
Returns a valid DetId + a valid comparator for the RangeMap.