#include <utils.h>
Public Member Functions | |
std::string | detId2ChamberLabel (const RPCDetId &_id) |
int | detId2ChamberNr (const RPCDetId &_id) |
int | detId2RollNr (const RPCDetId &_id) |
void | doEndcapLabeling () |
void | dolabeling () |
void | fillvect () |
void | labelXAxisSector (MonitorElement *myMe) |
void | labelXAxisSegment (MonitorElement *myMe) |
void | labelYAxisRing (MonitorElement *myMe, int numberOfRings) |
void | labelYAxisRoll (MonitorElement *myMe, int region, int ring) |
std::vector< int > | SectorStrips1 () |
std::vector< int > | SectorStrips2 () |
std::string | YLabel (int i) |
Private Attributes | |
int | _cnr |
int | ch |
std::string | ChLabel |
std::vector< std::string > | endcapYLabels_ |
std::vector< int > | Wvector1 |
std::vector< int > | Wvector2 |
std::string | ylabel [22] |
std::string rpcdqm::utils::detId2ChamberLabel | ( | const RPCDetId & | _id | ) | [inline] |
Definition at line 334 of file utils.h.
References ChLabel, RPCDetId::layer(), RPCDetId::region(), RPCDetId::sector(), RPCDetId::station(), and RPCDetId::subsector().
{ if(_id.region()==0){//Barrel if( _id.station() ==1) {// Station1 if(_id.layer() ==1) { ChLabel="RB1in"; } else { ChLabel="RB1out"; } }else if (_id.station()==2) {//Station 2 if(_id.layer()==1) { ChLabel="RB2in"; }else{ ChLabel="RB2out"; } }else if(_id.station()==3){//Station 3 if(_id.subsector()==1){ ChLabel="RB3+"; } else { ChLabel="RB3-"; } } else if(_id.station()==4) {//Station 4 if (_id.sector()== 4) { if ( _id.subsector()==1){ ChLabel="RB4-"; }else if (_id.subsector()==2){ ChLabel="RB4+"; }else if ( _id.subsector()==3) { ChLabel="RB4--"; }else if ( _id.subsector()==4){ ChLabel="RB4++"; } } else { if(_id.subsector()==1) ChLabel="RB4-"; else ChLabel="RB4-"; } } }else{//Endcap } return ChLabel; }
int rpcdqm::utils::detId2ChamberNr | ( | const RPCDetId & | _id | ) | [inline] |
Definition at line 282 of file utils.h.
References ch, RPCDetId::layer(), RPCDetId::region(), RPCDetId::sector(), RPCDetId::station(), and RPCDetId::subsector().
{ if(_id.region()==0){//Barrel if( _id.station() ==1) {// Station1 if(_id.layer() ==1) { ch=1; //RB1in } else { ch=2; //RB1out } }else if (_id.station()==2) {//Station 2 if(_id.layer()==1) { ch=3;//RB2in }else{ ch=4; //RB2out } }else if(_id.station()==3){//Station 3 if(_id.subsector()==1){ ch=5; //RB3+ } else { ch=6; //RB3- } } else if(_id.station()==4) {//Station 4 if (_id.sector()== 4) { if ( _id.subsector()==1){ ch=7; //RB4- }else if (_id.subsector()==2){ ch=8; //RB4+ }else if ( _id.subsector()==3) { ch=9; //RB4-- }else if ( _id.subsector()==4){ ch=10; //RB4++ } } else { if(_id.subsector()==1) ch= 7; //RB4- else ch= 8; //RB4+ } } }else{//Endcap } return ch; }
int rpcdqm::utils::detId2RollNr | ( | const RPCDetId & | _id | ) | [inline] |
Definition at line 18 of file utils.h.
References _cnr, RPCDetId::layer(), RPCDetId::region(), RPCDetId::ring(), RPCDetId::roll(), RPCDetId::sector(), RPCDetId::station(), and RPCDetId::subsector().
Referenced by RPCDeadChannelTest::clientOperation(), RPCClusterSizeTest::clientOperation(), RPCEfficiencySecond::endRun(), RPCNoisyStripTest::fillGlobalME(), RPCMultiplicityTest::fillGlobalME(), RPCOccupancyTest::fillGlobalME(), and RPCMonitorDigi::performSourceOperation().
{ if(_id.region()==0){//Barrel if( _id.station() ==1) {// Station1 if(_id.layer() ==1) { //in if(_id.roll()==1) //forward _cnr = 1;//RB1inF else //backward _cnr = 2;//RB1inB } else {//out if(_id.roll()==1) _cnr = 3;//RB1outF else _cnr = 4;//RB1outB } }else if (_id.station()==2) {//Station 2 if(_id.layer()==1) { if(_id.roll()==1) _cnr = 5;//RB2inB else if(_id.roll()==3) _cnr=6;//RB2inF else if(_id.roll()==2) _cnr=7;//RB2inM }else{ if(_id.roll()==2) _cnr=7;//RB2outM else if(_id.roll()==1) _cnr=8;//RB2outB else if(_id.roll()==3) _cnr=9;//RB2outF } }else if(_id.station()==3){//Station 3 if(_id.subsector()==1){ if(_id.roll()==1) _cnr=10;//RB3-B else _cnr=11;//RB3-F } else { if(_id.roll()==1) _cnr=12;//RB3+B else _cnr=13;//RB3+F } } else if(_id.station()==4) {//Station 4 if (_id.sector()== 4) { if ( _id.subsector()==2){//RB4-- if(_id.roll()==1) _cnr=14; else _cnr=15; }else if (_id.subsector()==3){//RB4- if(_id.roll()==1) _cnr=16; else _cnr=17; }else if ( _id.subsector()==1) {//RB4+ if(_id.roll()==1) _cnr=18; else _cnr=19; }else if ( _id.subsector()==4){//RB4++ if(_id.roll()==1) _cnr=20; else _cnr=21; } } else { if(_id.subsector()==1) { if(_id.roll()==1) _cnr=14; else _cnr=15; } else { if(_id.roll()==1) _cnr=16; else _cnr=17; } } } }else{//Endcap int nseg=36; int nsub=6; if ( _id.ring()==1 && _id.station() > 1) { nsub=3; nseg=18; } _cnr = (_id.subsector()-1)*3+_id.roll()+(_id.ring()-1)*nsub*3; } return _cnr; }
void rpcdqm::utils::doEndcapLabeling | ( | ) | [inline] |
Definition at line 178 of file utils.h.
References ch, endcapYLabels_, csvReporter::r, and relativeConstraints::ring.
Referenced by labelYAxisRoll().
{ std::string rolls[3]; rolls[0]="A"; rolls[1]="B"; rolls[2]="C"; endcapYLabels_.clear(); std::stringstream myLabel; for(int ring = 1 ; ring <=3; ring ++){ for(int ch = 1; ch<=6; ch++){ for(int r=0; r<3; r++){ myLabel.str(""); myLabel<<"R"<<ring<<"_C"<<ch<<"_"<<rolls[r]; endcapYLabels_.push_back(myLabel.str()); } } } }
void rpcdqm::utils::dolabeling | ( | ) | [inline] |
Definition at line 149 of file utils.h.
References ylabel.
Referenced by labelYAxisRoll().
{ ylabel[1] = "RB1in_B"; ylabel[2] = "RB1in_F"; ylabel[3] = "RB1out_B"; ylabel[4] = "RB1out_F"; ylabel[5] = "RB2in_B"; ylabel[6] = "RB2in_F"; ylabel[7] = "RB2in_M"; ylabel[0] = "RB2out_M"; ylabel[8] = "RB2out_B"; ylabel[9] = "RB2out_F"; ylabel[10] = "RB3-_B"; ylabel[11] = "RB3-_F"; ylabel[12] = "RB3+_B"; ylabel[13] = "RB3+_F"; ylabel[14] = "RB4,-_B"; ylabel[15] = "RB4,-_F"; ylabel[16] = "RB4+_B"; ylabel[17] = "RB4+_F"; ylabel[18] = "RB4--_B"; ylabel[19] = "RB4--_F"; ylabel[20] = "RB4++_B"; ylabel[21] = "RB4++_F"; }
void rpcdqm::utils::fillvect | ( | ) | [inline] |
Definition at line 109 of file utils.h.
References Wvector1, and Wvector2.
{ Wvector2.push_back(0); //Sec 0 - doen't exist ;) Wvector2.push_back(1140); //Sec1 Wvector2.push_back(1140); //Sec2 Wvector2.push_back(1140); //Sec3 Wvector2.push_back(1236); //Sec4 Wvector2.push_back(1140); //Sec5 Wvector2.push_back(1140); //Sec6 Wvector2.push_back(1140); //Sec7 Wvector2.push_back(1116); //Sec8 Wvector2.push_back(1044); //Sec9 Wvector2.push_back(1188); //Sec10 Wvector2.push_back(1044); //Sec11 Wvector2.push_back(1166); //Sec12 Wvector1.push_back(0); //Sec 0 - doen't exist ;) Wvector1.push_back(1146); //Sec1 Wvector1.push_back(1146); //Sec2 Wvector1.push_back(1146); //Sec3 Wvector1.push_back(1242); //Sec4 Wvector1.push_back(1146); //Sec5 Wvector1.push_back(1146); //Sec6 Wvector1.push_back(1146); //Sec7 Wvector1.push_back(1122); //Sec8 Wvector1.push_back(1050); //Sec9 Wvector1.push_back(1194); //Sec10 Wvector1.push_back(1050); //Sec11 Wvector1.push_back(1122); //Sec12 }
void rpcdqm::utils::labelXAxisSector | ( | MonitorElement * | myMe | ) | [inline] |
Definition at line 206 of file utils.h.
References MonitorElement::getNbinsX(), MonitorElement::setBinLabel(), and x.
Referenced by RPCMon_SS_Dbx_Global::analyze(), RPCEfficiencySecond::beginRun(), RPCOccupancyTest::beginRun(), RPCMultiplicityTest::beginRun(), RPCChamberQuality::beginRun(), RPCDeadChannelTest::beginRun(), RPCClusterSizeTest::beginRun(), RPCNoisyStripTest::beginRun(), and RPCMonitorDigi::bookWheelDiskME().
void rpcdqm::utils::labelXAxisSegment | ( | MonitorElement * | myMe | ) | [inline] |
Definition at line 221 of file utils.h.
References MonitorElement::getNbinsX(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), and x.
Referenced by RPCMon_SS_Dbx_Global::analyze(), RPCEfficiencySecond::beginRun(), RPCOccupancyTest::beginRun(), RPCMultiplicityTest::beginRun(), RPCChamberQuality::beginRun(), RPCDeadChannelTest::beginRun(), RPCClusterSizeTest::beginRun(), RPCNoisyStripTest::beginRun(), and RPCMonitorDigi::bookWheelDiskME().
{ //before do some checks if (!myMe) return; std::stringstream xLabel; myMe->setAxisTitle("Segments", 1); for(int x = 1; x<= myMe->getNbinsX(); x++){ xLabel.str(""); xLabel<<x; myMe->setBinLabel(x, xLabel.str(), 1); } }
void rpcdqm::utils::labelYAxisRing | ( | MonitorElement * | myMe, |
int | numberOfRings | ||
) | [inline] |
Definition at line 266 of file utils.h.
References MonitorElement::getNbinsY(), L1TDQM_cfg::labels, MonitorElement::setBinLabel(), and detailsBasic3DVector::y.
Referenced by RPCMon_SS_Dbx_Global::analyze(), RPCEfficiencySecond::beginRun(), RPCOccupancyTest::beginRun(), RPCMultiplicityTest::beginRun(), RPCChamberQuality::beginRun(), RPCDeadChannelTest::beginRun(), RPCClusterSizeTest::beginRun(), RPCNoisyStripTest::beginRun(), and RPCMonitorDigi::bookWheelDiskME().
{ //before do some checks if (!myMe) return; std::string labels[9]= {"C", "Ring1 B", "A","C", "Ring2 B", "A","C", "Ring3 B", "A"}; int startBin ; (numberOfRings == 2 ? startBin = 3: startBin = 0); //set bin labels for(int y =1 ;y<= myMe->getNbinsY() && y<=9; y++ ) myMe->setBinLabel(y,labels[y-1+startBin],2); }
void rpcdqm::utils::labelYAxisRoll | ( | MonitorElement * | myMe, |
int | region, | ||
int | ring | ||
) | [inline] |
Definition at line 239 of file utils.h.
References doEndcapLabeling(), dolabeling(), endcapYLabels_, MonitorElement::getNbinsY(), MonitorElement::setBinLabel(), detailsBasic3DVector::y, and ylabel.
Referenced by RPCMon_SS_Dbx_Global::analyze(), RPCOccupancyTest::beginRun(), RPCEfficiencySecond::beginRun(), RPCMultiplicityTest::beginRun(), RPCDeadChannelTest::beginRun(), RPCChamberQuality::beginRun(), RPCClusterSizeTest::beginRun(), RPCNoisyStripTest::beginRun(), RPCMonitorDigi::bookSectorRingME(), and RPCMonitorDigi::bookWheelDiskME().
{ //before do some checks if (!myMe) return; //set bin labels if(region == 0){ //initialize label vector this->dolabeling(); if(ring == -2 || ring == 2) ylabel[7]=ylabel[0]; for(int y = 1; y<= myMe->getNbinsY() && y<22; y++) myMe->setBinLabel(y, ylabel[y], 2); }else{//Endcap this->doEndcapLabeling(); for(int y = 1; y<= myMe->getNbinsY() && y<(int)endcapYLabels_.size(); y++) myMe->setBinLabel(y, endcapYLabels_[y], 2); } }
std::vector<int> rpcdqm::utils::SectorStrips1 | ( | ) | [inline] |
std::vector<int> rpcdqm::utils::SectorStrips2 | ( | ) | [inline] |
std::string rpcdqm::utils::YLabel | ( | int | i | ) | [inline] |
int rpcdqm::utils::_cnr [private] |
Definition at line 386 of file utils.h.
Referenced by detId2RollNr().
int rpcdqm::utils::ch [private] |
Definition at line 387 of file utils.h.
Referenced by detId2ChamberNr(), and doEndcapLabeling().
std::string rpcdqm::utils::ChLabel [private] |
Definition at line 389 of file utils.h.
Referenced by detId2ChamberLabel().
std::vector<std::string> rpcdqm::utils::endcapYLabels_ [private] |
Definition at line 388 of file utils.h.
Referenced by doEndcapLabeling(), and labelYAxisRoll().
std::vector<int> rpcdqm::utils::Wvector1 [private] |
Definition at line 391 of file utils.h.
Referenced by fillvect(), and SectorStrips1().
std::vector<int> rpcdqm::utils::Wvector2 [private] |
Definition at line 390 of file utils.h.
Referenced by fillvect(), and SectorStrips2().
std::string rpcdqm::utils::ylabel[22] [private] |
Definition at line 392 of file utils.h.
Referenced by dolabeling(), labelYAxisRoll(), and YLabel().