![]() |
![]() |
#include <DQM/L1TMonitorClient/interface/L1TDTTPGClient.h>
Definition at line 23 of file L1TDTTPGClient.h.
L1TDTTPGClient::L1TDTTPGClient | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 23 of file L1TDTTPGClient.cc.
References initialize(), and parameters_.
00024 { 00025 parameters_=ps; 00026 initialize(); 00027 }
L1TDTTPGClient::~L1TDTTPGClient | ( | ) | [virtual] |
Destructor.
Definition at line 29 of file L1TDTTPGClient.cc.
00029 { 00030 LogInfo("TriggerDQM")<<"[TriggerDQM]: ending... "; 00031 }
void L1TDTTPGClient::analyze | ( | const edm::Event & | e, | |
const edm::EventSetup & | c | |||
) | [protected, virtual] |
Fake Analyze.
Implements edm::EDAnalyzer.
Definition at line 120 of file L1TDTTPGClient.cc.
References counterEvt_, dttpgphmap2ndf, dttpgphmapbxf, dttpgphmapcorrf, dttpgthmapbxf, dttpgthmaphf, makeRatioHisto(), and prescaleEvt_.
00120 { 00121 // cout << "L1TDTTPGClient::analyze" << endl; 00122 counterEvt_++; 00123 if (prescaleEvt_<1) return; 00124 if (prescaleEvt_>0 && counterEvt_%prescaleEvt_ != 0) return; 00125 00126 string nName = "DT_TPG_phi_best_map_corr"; 00127 string dName = "DT_TPG_phi_best_map"; 00128 makeRatioHisto(dttpgphmapcorrf,nName,dName); 00129 dName = "DT_TPG_phi_map"; 00130 nName = "DT_TPG_phi_map_2nd"; 00131 makeRatioHisto(dttpgphmap2ndf,nName,dName); 00132 nName = "DT_TPG_phi_map_bx-1"; 00133 makeRatioHisto(dttpgphmapbxf[0],nName,dName); 00134 nName = "DT_TPG_phi_map_bx0"; 00135 makeRatioHisto(dttpgphmapbxf[1],nName,dName); 00136 nName = "DT_TPG_phi_map_bx+1"; 00137 makeRatioHisto(dttpgphmapbxf[2],nName,dName); 00138 00139 nName = "DT_TPG_theta_best_map_h"; 00140 dName = "DT_TPG_theta_best_map"; 00141 makeRatioHisto(dttpgthmaphf,nName,dName); 00142 dName = "DT_TPG_theta_map"; 00143 nName = "DT_TPG_theta_map_bx-1"; 00144 makeRatioHisto(dttpgthmapbxf[0],nName,dName); 00145 nName = "DT_TPG_theta_map_bx0"; 00146 makeRatioHisto(dttpgthmapbxf[1],nName,dName); 00147 nName = "DT_TPG_theta_map_bx+1"; 00148 makeRatioHisto(dttpgthmapbxf[2],nName,dName); 00149 00150 00151 }
void L1TDTTPGClient::beginJob | ( | const edm::EventSetup & | c | ) | [protected, virtual] |
BeginJob.
Reimplemented from edm::EDAnalyzer.
Definition at line 60 of file L1TDTTPGClient.cc.
References DQMStore::book2D(), dbe_, dttpgphmap2ndf, dttpgphmapbxf, dttpgphmapcorrf, dttpgthmapbxf, dttpgthmaphf, output_dir_, DQMStore::setCurrentFolder(), setMapPhLabel(), and setMapThLabel().
00060 { 00061 00062 LogInfo("TriggerDQM")<<"[TriggerDQM]: Begin Job"; 00063 00064 // get backendinterface 00065 dbe_ = Service<DQMStore>().operator->(); 00066 00067 dbe_->setCurrentFolder(output_dir_); 00068 00069 // booking 00070 00071 dttpgphmapcorrf = dbe_->book2D("DT_TPG_phi_map_corr_frac", 00072 "Fraction of correlated best triggers per station",20,1,21,12,0,12); 00073 dttpgphmap2ndf = dbe_->book2D("DT_TPG_phi_map_2nd_frac", 00074 "Fraction of second tracks per station",20,1,21,12,0,12); 00075 dttpgphmapbxf[0] = dbe_->book2D("DT_TPG_phi_map_bx-1_frac", 00076 "Fraction of triggers per station (BX=-1)",20,1,21,12,0,12); 00077 dttpgphmapbxf[1] = dbe_->book2D("DT_TPG_phi_map_bx0_frac", 00078 "Fraction of triggers per station (BX=0)",20,1,21,12,0,12); 00079 dttpgphmapbxf[2] = dbe_->book2D("DT_TPG_phi_map_bx+1_frac", 00080 "Fraction of triggers per station (BX=1)",20,1,21,12,0,12); 00081 setMapPhLabel(dttpgphmapcorrf); 00082 setMapPhLabel(dttpgphmap2ndf); 00083 setMapPhLabel(dttpgphmapbxf[0]); 00084 setMapPhLabel(dttpgphmapbxf[1]); 00085 setMapPhLabel(dttpgphmapbxf[2]); 00086 00087 dttpgthmaphf = dbe_->book2D("DT_TPG_theta_map_corr_frac", 00088 "Fraction of H quality best triggers per station",15,1,16,12,0,12); 00089 dttpgthmapbxf[0] = dbe_->book2D("DT_TPG_theta_map_bx-1_frac", 00090 "Fraction of triggers per station (BX=-1)",15,1,16,12,0,12); 00091 dttpgthmapbxf[1] = dbe_->book2D("DT_TPG_theta_map_bx0_frac", 00092 "Fraction of triggers per station (BX=0)",15,1,16,12,0,12); 00093 dttpgthmapbxf[2] = dbe_->book2D("DT_TPG_theta_map_bx+1_frac", 00094 "Fraction of triggers per station (BX=1)",15,1,16,12,0,12); 00095 setMapThLabel(dttpgthmaphf); 00096 setMapThLabel(dttpgthmapbxf[0]); 00097 setMapThLabel(dttpgthmapbxf[1]); 00098 setMapThLabel(dttpgthmapbxf[2]); 00099 00100 00101 00102 }
void L1TDTTPGClient::beginLuminosityBlock | ( | const edm::LuminosityBlock & | lumiSeg, | |
const edm::EventSetup & | context | |||
) | [protected, virtual] |
void L1TDTTPGClient::beginRun | ( | const edm::Run & | r, | |
const edm::EventSetup & | c | |||
) | [protected, virtual] |
void L1TDTTPGClient::endLuminosityBlock | ( | const edm::LuminosityBlock & | lumiSeg, | |
const edm::EventSetup & | c | |||
) | [protected, virtual] |
DQM Client Diagnostic.
Reimplemented from edm::EDAnalyzer.
Definition at line 115 of file L1TDTTPGClient.cc.
void L1TDTTPGClient::endRun | ( | const edm::Run & | r, | |
const edm::EventSetup & | c | |||
) | [protected, virtual] |
TH1F * L1TDTTPGClient::get1DHisto | ( | string | meName, | |
DQMStore * | dbi | |||
) | [private] |
Definition at line 189 of file L1TDTTPGClient.cc.
References DQMStore::get(), MonitorElement::getTH1F(), and NULL.
00190 { 00191 00192 MonitorElement * me_ = dbi->get(meName); 00193 00194 if (!me_) { 00195 LogInfo("TriggerDQM") << "ME NOT FOUND."; 00196 return NULL; 00197 } 00198 00199 return me_->getTH1F(); 00200 }
TProfile * L1TDTTPGClient::get1DProfile | ( | string | meName, | |
DQMStore * | dbi | |||
) | [private] |
Definition at line 233 of file L1TDTTPGClient.cc.
References DQMStore::get(), MonitorElement::getTProfile(), and NULL.
00234 { 00235 00236 00237 MonitorElement * me_ = dbi->get(meName); 00238 00239 if (!me_) { 00240 LogInfo("TriggerDQM") << "ME NOT FOUND."; 00241 return NULL; 00242 } 00243 00244 return me_->getTProfile(); 00245 }
TH2F * L1TDTTPGClient::get2DHisto | ( | string | meName, | |
DQMStore * | dbi | |||
) | [private] |
Definition at line 202 of file L1TDTTPGClient.cc.
References DQMStore::get(), MonitorElement::getTH2F(), and NULL.
Referenced by makeRatioHisto().
00203 { 00204 00205 00206 MonitorElement * me_ = dbi->get(meName); 00207 00208 if (!me_) { 00209 LogInfo("TriggerDQM") << "ME NOT FOUND."; 00210 return NULL; 00211 } 00212 00213 return me_->getTH2F(); 00214 }
TProfile2D * L1TDTTPGClient::get2DProfile | ( | string | meName, | |
DQMStore * | dbi | |||
) | [private] |
Definition at line 218 of file L1TDTTPGClient.cc.
References DQMStore::get(), MonitorElement::getTProfile2D(), and NULL.
00219 { 00220 00221 00222 MonitorElement * me_ = dbi->get(meName); 00223 00224 if (!me_) { 00225 LogInfo("TriggerDQM") << "ME NOT FOUND."; 00226 return NULL; 00227 } 00228 00229 return me_->getTProfile2D(); 00230 }
void L1TDTTPGClient::initialize | ( | ) | [private] |
Definition at line 34 of file L1TDTTPGClient.cc.
References counterEvt_, counterLS_, GenMuonPlsPt100GeV_cfg::cout, dbe_, lat::endl(), edm::ParameterSet::getUntrackedParameter(), input_dir_, monitorName_, output_dir_, parameters_, prescaleEvt_, and prescaleLS_.
Referenced by L1TDTTPGClient().
00034 { 00035 00036 counterLS_=0; 00037 counterEvt_=0; 00038 00039 // get back-end interface 00040 dbe_ = Service<DQMStore>().operator->(); 00041 00042 // base folder for the contents of this job 00043 monitorName_ = parameters_.getUntrackedParameter<string>("monitorName",""); 00044 cout << "Monitor name = " << monitorName_ << endl; 00045 prescaleLS_ = parameters_.getUntrackedParameter<int>("prescaleLS", -1); 00046 cout << "DQM lumi section prescale = " << prescaleLS_ << " lumi section(s)"<< endl; 00047 prescaleEvt_ = parameters_.getUntrackedParameter<int>("prescaleEvt", -1); 00048 cout << "DQM event prescale = " << prescaleEvt_ << " events(s)"<< endl; 00049 output_dir_ = parameters_.getUntrackedParameter<string>("output_dir",""); 00050 cout << "DQM output dir = " << output_dir_ << endl; 00051 input_dir_ = parameters_.getUntrackedParameter<string>("input_dir",""); 00052 cout << "DQM input dir = " << input_dir_ << endl; 00053 00054 LogInfo( "TriggerDQM"); 00055 00056 00057 }
void L1TDTTPGClient::makeRatioHisto | ( | MonitorElement * | ratioME, | |
string & | nName, | |||
string & | dName | |||
) | [private] |
Definition at line 161 of file L1TDTTPGClient.cc.
References dbe_, lat::endl(), get2DHisto(), MonitorElement::getName(), MonitorElement::getTH2F(), and input_dir_.
Referenced by analyze().
00162 { 00163 00164 TH2F *numerator; 00165 TH2F *denominator; 00166 00167 denominator = this->get2DHisto(input_dir_+"/"+dName,dbe_); 00168 numerator = this->get2DHisto(input_dir_+"/"+nName,dbe_); 00169 00170 if (numerator && denominator) { 00171 00172 TH2F * ratio = ratioME->getTH2F(); 00173 if (ratio) { 00174 ratio->Divide(numerator,denominator); 00175 } 00176 else { 00177 LogInfo("TriggerDQM") << "[TriggerDQM]: ratio histo named \"" << ratioME->getName() << "\" not found!" << endl; 00178 } 00179 } 00180 else { 00181 if (!numerator) 00182 LogInfo("TriggerDQM") << "[TriggerDQM]: numerator histo \"" << nName << "\" not found!" << endl; 00183 if (!denominator) 00184 LogInfo("TriggerDQM") << "[TriggerDQM]: denominator histo \"" << dName << "\" not found!" << endl; 00185 } 00186 00187 }
void L1TDTTPGClient::setMapPhLabel | ( | MonitorElement * | me | ) | [private] |
Definition at line 248 of file L1TDTTPGClient.cc.
References i, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), and muonGeometry::wheel.
Referenced by beginJob().
00249 { 00250 00251 me->setAxisTitle("DTTF Sector",2); 00252 for(int i=0;i<5;i++){ 00253 ostringstream wheel; 00254 wheel << i-2; 00255 me->setBinLabel(1+i*4,"Wheel "+ wheel.str(),1); 00256 } 00257 00258 }
void L1TDTTPGClient::setMapThLabel | ( | MonitorElement * | me | ) | [private] |
Definition at line 261 of file L1TDTTPGClient.cc.
References i, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), and muonGeometry::wheel.
Referenced by beginJob().
00262 { 00263 00264 me->setAxisTitle("DTTF Sector",2); 00265 for(int i=0;i<5;i++){ 00266 ostringstream wheel; 00267 wheel << i-2; 00268 me->setBinLabel(1+i*3,"Wheel "+ wheel.str(),1); 00269 } 00270 00271 }
int L1TDTTPGClient::counterEvt_ [private] |
int L1TDTTPGClient::counterLS_ [private] |
DQMStore* L1TDTTPGClient::dbe_ [private] |
Definition at line 69 of file L1TDTTPGClient.h.
Referenced by beginJob(), initialize(), and makeRatioHisto().
MonitorElement* L1TDTTPGClient::dttpgphmap2ndf [private] |
MonitorElement* L1TDTTPGClient::dttpgphmapbxf[3] [private] |
MonitorElement* L1TDTTPGClient::dttpgphmapcorrf [private] |
prescale on number of events
Definition at line 80 of file L1TDTTPGClient.h.
Referenced by analyze(), and beginJob().
MonitorElement* L1TDTTPGClient::dttpgthmapbxf[3] [private] |
MonitorElement* L1TDTTPGClient::dttpgthmaphf [private] |
std::string L1TDTTPGClient::input_dir_ [private] |
std::string L1TDTTPGClient::monitorName_ [private] |
std::string L1TDTTPGClient::output_dir_ [private] |
edm::ParameterSet L1TDTTPGClient::parameters_ [private] |
int L1TDTTPGClient::prescaleEvt_ [private] |
units of lumi sections
Definition at line 76 of file L1TDTTPGClient.h.
Referenced by analyze(), and initialize().
int L1TDTTPGClient::prescaleLS_ [private] |