20 const std::pair<std::string, std::string> & recordLabelPair)
29 boost::unordered_map<uint32_t, double>::const_iterator it =
delays_.find(detId);
41 std::vector<const SiStripBaseDelay*>::const_iterator it =
baseDelayVector_.begin();
45 if( (*it)->delaysSize() != (*(it+1))->delaysSize() ) {
46 std::cout <<
"makeDelay: Error, size of base delays is different!!" << std::endl;
79 std::vector<uint32_t> detIds;
80 (*it)->detIds(detIds);
81 std::vector<uint32_t>::const_iterator detIdIt = detIds.begin();
82 for( ; detIdIt != detIds.end(); ++detIdIt ) {
83 delays_[*detIdIt] = (*it)->delay(*detIdIt)*sumSign;
89 std::vector<uint32_t> detIds;
90 (*it)->detIds(detIds);
91 detIdIt = detIds.begin();
93 for( ; detIdIt != detIds.end(); ++detIdIt ) {
95 boost::unordered_map<uint32_t, double>::iterator delayIt =
delays_.find(*detIdIt);
96 if( delayIt !=
delays_.end() ) {
97 delays_[*detIdIt] += (*it)->delay(*detIdIt)*sumSign;
100 std::cout <<
"makeDelay: Warning, detId = " << *detIdIt <<
" not present, summing to 0..." <<
std::cout;
101 std::cout <<
"This means that the two baseDelay tags have different detIds. PLEASE, CHECK THAT THIS IS EXPECTED." <<
std::cout;
102 delays_[*detIdIt] = (*it)->delay(*detIdIt)*sumSign;
120 boost::unordered_map<uint32_t, double>::const_iterator it =
delays_.begin();
121 for( ; it !=
delays_.end(); ++it ) {
122 ss <<
"detId = " << it->first <<
" delay = " << it->second << std::endl;
129 boost::unordered_map<uint32_t, double>::const_iterator it =
delays_.begin();
130 for( ; it !=
delays_.end(); ++it ) {
131 summaryDelays.
add(it->first, it->second);
133 summaryDelays.
print(ss);
void printSummary(std::stringstream &ss) const
Prints the average value of the delays for all layers and wheels in the SiStripTracker.
void fillNewDelay(const SiStripBaseDelay &baseDelay, const int sumSign, const std::pair< std::string, std::string > &recordLabelPair)
std::vector< std::pair< std::string, std::string > > recordLabelPair_
std::vector< const SiStripBaseDelay * > baseDelayVector_
void printDebug(std::stringstream &ss) const
Prints the delays for all the detIds.
bool makeDelay()
Builds the boost::unordered_map.
void print(std::stringstream &ss, const bool mean=true) const
boost::unordered_map< uint32_t, double > delays_
float getDelay(const uint32_t detId) const
Return the delay combining all the baseDelays.
void clear()
Empty all the containers.
std::vector< int > sumSignVector_
void add(const DetId &detid, const float &value)
Used to compute the mean value of the value variable divided by subdetector, layer and mono/stereo...