23 using namespace HcalObjRepresent;
53 short unsigned int bitMap[9];
55 statusBitArray[1] =
std::string(
"cell is masked/to be masked at RecHit Level" );
56 statusBitArray[5] =
std::string(
"cell is dead (from DQM algo)");
57 statusBitArray[6] =
std::string(
"cell is hot (from DQM algo)" );
58 statusBitArray[7] =
std::string(
"cell has stability error");
59 statusBitArray[8] =
std::string(
"cell has timing error" );
60 statusBitArray[15] =
std::string(
"cell is masked from the Trigger ");
61 statusBitArray[18] =
std::string(
"cell is always excluded from the CaloTower regardless of other bit settings.");
62 statusBitArray[19] =
std::string(
"cell is counted as problematic within the tower.");
77 HcalChannelQuality::tAllContWithNames::const_iterator
iter;
78 std::vector<HcalChannelStatus>::const_iterator contIter;
79 ss <<
"Total HCAL containers: " << allContainers.size() << std::endl;
82 for (iter = allContainers.begin(); iter != allContainers.end(); ++
iter){
83 ss <<
"---------------------------------------------" << std::endl;
84 ss <<
"Detector: " << (*iter).first <<
"; Total values: "<< (*iter).second.size() << std::endl;
86 for (contIter = (*iter).second.begin(); contIter != (*iter).second.end(); ++contIter){
89 if ((*contIter).getValue() != 0){
90 ss <<
" Id["<< j <<
"]: " <<
91 " rawId: " << (uint32_t)(*contIter).rawId() <<
" "<<
HcalDetId((uint32_t)(*contIter).rawId())<<
"; Channel bits: " <<
92 (uint32_t)(*contIter).getValue()<<
"; Binary format: " <<
IntToBinary((uint32_t)(*contIter).getValue()) <<
"; Errors: "
93 <<
getBitsSummary((uint32_t)((*contIter).getValue()), statusBitArray, bitMap);
104 std::vector<int>
const&,
105 std::vector<float>
const& )
const
107 std::vector<TH2F> graphData;
108 setup(graphData,
"ChannelStatus");
112 for (
unsigned int d=0;d < graphData.size();++d){
113 graphData[d].Reset();
114 x <<
"1+log2(status) for HCAL depth " << d+1;
118 graphData[d].SetTitle(x.str().c_str());
123 int ieta, depth, iphi, channelBits;
131 HcalChannelQuality::tAllContWithNames::const_iterator
iter;
132 std::vector<HcalChannelStatus>::const_iterator contIter;
135 for (iter = allContainers.begin(); iter != allContainers.end(); ++
iter){
136 for (contIter = (*iter).second.begin(); contIter != (*iter).second.end(); ++contIter){
137 hcal_id =
HcalDetId((uint32_t)(*contIter).rawId());
139 channelBits = (uint32_t)(*contIter).getValue();
140 if (channelBits == 0)
143 depth = hcal_id.
depth();
144 if (depth<1 || depth>4)
151 ieta>0 ? ++ieta : --ieta;
153 logstatus = log2(1.*channelBits)+1;
155 graphData[depth-1].Fill(ieta,iphi,logstatus);
167 gStyle->SetPalette(1);
168 const Int_t NCont = 999;
169 gStyle->SetNumberContours(NCont);
170 TCanvas
canvas(
"CC map",
"CC map",840,369*4);
172 TPad pad1(
"pad1",
"pad1", 0.0, 0.75, 1.0, 1.0);
174 TPad pad2(
"pad2",
"pad2", 0.0, 0.5, 1.0, 0.75);
176 TPad pad3(
"pad3",
"pad3", 0.0, 0.25, 1.0, 0.5);
178 TPad pad4(
"pad4",
"pad4", 0.0, 0.0, 1.0, 0.25);
183 graphData[0].SetStats(0);
184 graphData[0].Draw(
"colz");
187 graphData[1].SetStats(0);
188 graphData[1].Draw(
"colz");
191 graphData[2].SetStats(0);
192 graphData[2].Draw(
"colz");
195 graphData[3].SetStats(0);
196 graphData[3].Draw(
"colz");
199 std::stringstream
ss;
200 ss <<filename <<
".png";
202 canvas.SaveAs((ss.str()).c_str());
204 return (ss.str()).c_str();
HcalSubdetector subdet() const
get the subdetector
std::string getBitsSummary(uint32_t bits, std::string statusBitArray[], short unsigned int bitMap[])
#define PYTHON_WRAPPER(_class, _name)
std::string IntToBinary(unsigned int number)
int depth() const
get the tower depth
int ieta() const
get the cell ieta
int iphi() const
get the cell iphi
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
std::vector< tHcalCont > tAllContWithNames