13 unsigned int layers[] = {3, 4};
16 for (
unsigned int idet = 0; idet < 2; ++idet) {
17 for (
unsigned int il = 0; il < layers[idet]; ++il) {
18 index = (idet+1)*10000 + (il+1)*1000;
19 if (
fVerbose)
cout <<
"Adding index = " << index << endl;
61 detNum = idet*10000 + il*1000;
64 cout <<
"detNum: " << detNum
65 <<
" detID: " <<
static_cast<int>(
detid)
76 std::map<int, int>::const_iterator countIt =
fCountMap.begin();
77 std::map<int, double>::const_iterator meanIt =
fMeanMap.begin();
78 std::map<int, double>::const_iterator rmsIt =
fRmsMap.begin();
80 ss <<
"subDet" << setw(15) <<
"layer" << setw(16);
81 if (mean) ss <<
"mean +- rms" << endl;
82 else ss <<
"count" << endl;
85 std::string oldDetector;
87 for (; countIt !=
fCountMap.end(); ++countIt, ++meanIt, ++rmsIt ) {
88 int count = countIt->second;
92 mean = (meanIt->second)/count;
93 rms = (rmsIt->second)/count - mean*mean;
101 switch ((countIt->first)/10000) {
109 if( detector != oldDetector ) {
110 ss << std::endl << detector;
111 oldDetector = detector;
116 int layer = (countIt->first)/1000 - (countIt->first)/10000*10;
118 ss << std::setw(15) << layer << std::setw(13) ;
119 if (
fComputeMean) ss << mean <<
" +- " << rms << std::endl;
120 else ss << countIt->second << std::endl;
void add(const DetId &detid, const float &value)
std::map< int, double > fMeanMap
void print(std::stringstream &ss, const bool mean=true) const
SiPixelDetSummary(int verbose=0)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
virtual std::string name() const
from base class
std::map< int, double > fRmsMap
int layerName() const
layer id
virtual std::string name() const
from base class
std::map< int, int > fCountMap
int diskName() const
disk id
HalfCylinder halfCylinder() const