#include <HcalObjRepresent.h>
Public Member Functions | |
ADataRepr (unsigned int d) | |
void | fillOneGain (std::vector< TH2F > &graphData, std::string units="") |
Public Attributes | |
std::stringstream | filename |
unsigned int | id |
unsigned int | nr |
std::stringstream | plotname |
std::stringstream | rootname |
Protected Member Functions | |
virtual void | doFillIn (std::vector< TH2F > &graphData)=0 |
Protected Attributes | |
int | depth |
HcalDetId | hcal_id |
int | ieta |
int | iphi |
unsigned int | m_total |
Private Member Functions | |
void | draw (std::vector< TH2F > &graphData, std::string filename) |
void | setBinLabels (std::vector< TH2F > &depth) |
void | setup (std::vector< TH2F > &depth, std::string name, std::string units="") |
Definition at line 749 of file HcalObjRepresent.h.
HcalObjRepresent::ADataRepr::ADataRepr | ( | unsigned int | d | ) | [inline] |
Definition at line 752 of file HcalObjRepresent.h.
:m_total(d){};
virtual void HcalObjRepresent::ADataRepr::doFillIn | ( | std::vector< TH2F > & | graphData | ) | [protected, pure virtual] |
Implemented in cond::HcalGainWidthsDataRepr, cond::HcalLUTCorrsDataRepr, cond::HcalLutMetadataDataRepr, cond::HcalPedestalsDataRepr, cond::HcalPFCorrsDataRepr, cond::HcalQIEDataDataRepr, cond::HcalRespCorrsDataRepr, cond::HcalTimeCorrsDataRepr, cond::HcalValidationCorrsDataRepr, and cond::HcalZSThresholdsDataRepr.
Referenced by fillOneGain().
void HcalObjRepresent::ADataRepr::draw | ( | std::vector< TH2F > & | graphData, |
std::string | filename | ||
) | [inline, private] |
Definition at line 807 of file HcalObjRepresent.h.
References svgfig::canvas().
Referenced by fillOneGain().
{ //Drawing... // use David's palette gStyle->SetPalette(1); const Int_t NCont = 999; gStyle->SetNumberContours(NCont); TCanvas canvas("CC map","CC map",840,369*4); TPad pad1("pad1","pad1", 0.0, 0.75, 1.0, 1.0); pad1.Draw(); TPad pad2("pad2","pad2", 0.0, 0.5, 1.0, 0.75); pad2.Draw(); TPad pad3("pad3","pad3", 0.0, 0.25, 1.0, 0.5); pad3.Draw(); TPad pad4("pad4","pad4", 0.0, 0.0, 1.0, 0.25); pad4.Draw(); pad1.cd(); graphData[0].SetStats(0); graphData[0].Draw("colz"); pad2.cd(); graphData[1].SetStats(0); graphData[1].Draw("colz"); pad3.cd(); graphData[2].SetStats(0); graphData[2].Draw("colz"); pad4.cd(); graphData[3].SetStats(0); graphData[3].Draw("colz"); canvas.SaveAs(filename.c_str()); }
void HcalObjRepresent::ADataRepr::fillOneGain | ( | std::vector< TH2F > & | graphData, |
std::string | units = "" |
||
) | [inline] |
Definition at line 756 of file HcalObjRepresent.h.
References doFillIn(), draw(), filename, HcalObjRepresent::FillUnphysicalHEHFBins(), m_total, nr, plotname, rootname, and setup().
Referenced by cond::PayLoadInspector< DataT >::plot().
{ std::stringstream ss(""); if (m_total == 1) ss << rootname.str() << " for HCAL depth "; else ss << rootname.str() << nr << " for HCAL depth "; setup(graphData, ss.str()); // Change the titles of each individual histogram for (unsigned int d=0;d < graphData.size();++d){ graphData[d].Reset(); ss.str(""); if (m_total == 1) ss << plotname.str() << " for HCAL depth " << d+1; else ss << plotname.str() << nr << " for HCAL depth " << d+1; //BUG CAN BE HERE: //if (ChannelStatus->depth[d]) graphData[d].SetTitle(ss.str().c_str()); // replace "setTitle" with "SetTitle", since you are using TH2F objects instead of MonitorElements ss.str(""); } //overload this function: doFillIn(graphData); FillUnphysicalHEHFBins(graphData); ss.str(""); if (m_total == 1) ss << filename.str() << ".png"; else ss << filename.str() << nr << ".png"; draw(graphData, ss.str()); //FOR DEBUGGING: //std::cout << "ieta: " << ieta << "; iphi: " << iphi << "; logstatus: " << logstatus << "; channelBits: " << channelBits<< std::endl; }
void HcalObjRepresent::ADataRepr::setBinLabels | ( | std::vector< TH2F > & | depth | ) | [inline, private] |
Definition at line 902 of file HcalObjRepresent.h.
Referenced by setup().
{ // Set labels for all depth histograms for (unsigned int i=0;i<depth.size();++i) { depth[i].SetXTitle("i#eta"); depth[i].SetYTitle("i#phi"); } std::stringstream label; // set label on every other bin for (int i=-41;i<=-29;i=i+2) { label<<i; depth[0].GetXaxis()->SetBinLabel(i+42,label.str().c_str()); depth[1].GetXaxis()->SetBinLabel(i+42,label.str().c_str()); label.str(""); } depth[0].GetXaxis()->SetBinLabel(14,"-29HE"); depth[1].GetXaxis()->SetBinLabel(14,"-29HE"); // offset by one for HE for (int i=-27;i<=27;i=i+2) { label<<i; depth[0].GetXaxis()->SetBinLabel(i+43,label.str().c_str()); label.str(""); } depth[0].GetXaxis()->SetBinLabel(72,"29HE"); for (int i=29;i<=41;i=i+2) { label<<i; depth[0].GetXaxis()->SetBinLabel(i+44,label.str().c_str()); label.str(""); } for (int i=16;i<=28;i=i+2) { label<<i-43; depth[1].GetXaxis()->SetBinLabel(i,label.str().c_str()); label.str(""); } depth[1].GetXaxis()->SetBinLabel(29,"NULL"); for (int i=15;i<=27;i=i+2) { label<<i; depth[1].GetXaxis()->SetBinLabel(i+15,label.str().c_str()); label.str(""); } depth[1].GetXaxis()->SetBinLabel(44,"29HE"); for (int i=29;i<=41;i=i+2) { label<<i; depth[1].GetXaxis()->SetBinLabel(i+16,label.str().c_str()); label.str(""); } // HE depth 3 labels; depth[2].GetXaxis()->SetBinLabel(1,"-28"); depth[2].GetXaxis()->SetBinLabel(2,"-27"); depth[2].GetXaxis()->SetBinLabel(3,"Null"); depth[2].GetXaxis()->SetBinLabel(4,"-16"); depth[2].GetXaxis()->SetBinLabel(5,"Null"); depth[2].GetXaxis()->SetBinLabel(6,"16"); depth[2].GetXaxis()->SetBinLabel(7,"Null"); depth[2].GetXaxis()->SetBinLabel(8,"27"); depth[2].GetXaxis()->SetBinLabel(9,"28"); }
void HcalObjRepresent::ADataRepr::setup | ( | std::vector< TH2F > & | depth, |
std::string | name, | ||
std::string | units = "" |
||
) | [inline, private] |
Definition at line 844 of file HcalObjRepresent.h.
References i, setBinLabels(), and fw3dlego::xbins.
Referenced by fillOneGain().
{ std::string unittitle, unitname; if (units.empty()) { unitname = units; unittitle = "No Units"; } else { unitname = " " + units; unittitle = units; } // Push back depth plots //1. create first plot depth.push_back(TH2F(("HB HE HF Depth 1 "+name+unitname).c_str(), (name+" Depth 1 -- HB HE HF ("+unittitle+")").c_str(), 85,-42.5,42.5, 72,0.5,72.5)); //2.1 prepare second plot float ybins[73]; for (int i=0;i<=72;i++) ybins[i]=(float)(i+0.5); float xbinsd2[]={-42.5,-41.5,-40.5,-39.5,-38.5,-37.5,-36.5,-35.5,-34.5,-33.5,-32.5,-31.5,-30.5,-29.5, -28.5,-27.5,-26.5,-25.5,-24.5,-23.5,-22.5,-21.5,-20.5,-19.5,-18.5,-17.5,-16.5, -15.5,-14.5, 14.5, 15.5, 16.5,17.5,18.5,19.5,20.5,21.5,22.5,23.5,24.5,25.5,26.5,27.5,28.5,29.5,30.5, 31.5,32.5,33.5,34.5,35.5,36.5,37.5,38.5,39.5,40.5,41.5,42.5}; //2.2 create second plot depth.push_back(TH2F(("HB HE HF Depth 2 "+name+unitname).c_str(), (name+" Depth 2 -- HB HE HF ("+unittitle+")").c_str(), 57, xbinsd2, 72, ybins)); //3.1 Set up variable-sized bins for HE depth 3 (MonitorElement also requires phi bins to be entered in array format) float xbins[]={-28.5,-27.5,-26.5,-16.5,-15.5, 15.5,16.5,26.5,27.5,28.5}; //3.2 depth.push_back(TH2F(("HE Depth 3 "+name+unitname).c_str(), (name+" Depth 3 -- HE ("+unittitle+")").c_str(), // Use variable-sized eta bins 9, xbins, 72, ybins)); //4.1 HO bins are fixed width, but cover a smaller eta range (-15 -> 15) depth.push_back(TH2F(("HO Depth 4 "+name+unitname).c_str(), (name+" Depth 4 -- HO ("+unittitle+")").c_str(), 31,-15.5,15.5, 72,0.5,72.5)); for (unsigned int i=0;i<depth.size();++i) depth[i].Draw("colz"); setBinLabels(depth); // set axis titles, special bins }
int HcalObjRepresent::ADataRepr::depth [protected] |
Definition at line 800 of file HcalObjRepresent.h.
std::stringstream HcalObjRepresent::ADataRepr::filename |
Definition at line 754 of file HcalObjRepresent.h.
Referenced by fillOneGain(), and cond::PayLoadInspector< DataT >::plot().
HcalDetId HcalObjRepresent::ADataRepr::hcal_id [protected] |
Definition at line 799 of file HcalObjRepresent.h.
unsigned int HcalObjRepresent::ADataRepr::id |
Definition at line 752 of file HcalObjRepresent.h.
Referenced by cond::PayLoadInspector< DataT >::plot().
int HcalObjRepresent::ADataRepr::ieta [protected] |
Definition at line 800 of file HcalObjRepresent.h.
int HcalObjRepresent::ADataRepr::iphi [protected] |
Definition at line 800 of file HcalObjRepresent.h.
unsigned int HcalObjRepresent::ADataRepr::m_total [protected] |
Definition at line 798 of file HcalObjRepresent.h.
Referenced by fillOneGain().
unsigned int HcalObjRepresent::ADataRepr::nr |
Definition at line 752 of file HcalObjRepresent.h.
Referenced by fillOneGain(), and cond::PayLoadInspector< DataT >::plot().
std::stringstream HcalObjRepresent::ADataRepr::plotname |
Definition at line 754 of file HcalObjRepresent.h.
Referenced by fillOneGain(), and cond::PayLoadInspector< DataT >::plot().
std::stringstream HcalObjRepresent::ADataRepr::rootname |
Definition at line 754 of file HcalObjRepresent.h.
Referenced by fillOneGain(), and cond::PayLoadInspector< DataT >::plot().