CMS 3D CMS Logo

rpcdqm::utils Class Reference

#include <DQM/RPCMonitorDigi/interface/utils.h>

List of all members.

Public Member Functions

int detId2RollNr (const RPCDetId &_id)

Private Attributes

int _cnr


Detailed Description

Definition at line 7 of file utils.h.


Member Function Documentation

int rpcdqm::utils::detId2RollNr ( const RPCDetId _id  )  [inline]

Definition at line 9 of file utils.h.

References _cnr, RPCDetId::layer(), RPCDetId::region(), RPCDetId::ring(), RPCDetId::roll(), RPCDetId::sector(), seg, RPCDetId::station(), and RPCDetId::subsector().

Referenced by RPCMonitorDigi::analyze(), and RPCDeadChannelTest::endLuminosityBlock().

00009                                           {
00010       if(_id.region()==0){//Barrel
00011         if( _id.station() ==1) {// Station1
00012           if(_id.layer() ==1) { //in
00013             if(_id.roll()==1) //forward
00014               _cnr = 1;//RB1inF
00015             else //backward
00016               _cnr = 2;//RB1inB
00017           } else {//out
00018             if(_id.roll()==1) 
00019               _cnr = 3;//RB1outF
00020             else 
00021               _cnr = 4;//RB1outB 
00022           }
00023         }else if (_id.station()==2) {//Station 2        
00024           if(_id.layer()==1) {
00025             if(_id.roll()==1)
00026               _cnr = 5;//RB2inF
00027             else if(_id.roll()==3)
00028               _cnr=6;//RB2inM
00029             else if(_id.roll()==2)
00030               _cnr=7;//RB2inB
00031           }else{
00032             if(_id.roll()==2)
00033               _cnr=7;
00034             else if(_id.roll()==1)
00035               _cnr=8;
00036             else if(_id.roll()==3)
00037               _cnr=9;     
00038           }
00039         }else  if(_id.station()==3){//Station 3
00040           if(_id.subsector()==1){
00041             if(_id.roll()==1)
00042               _cnr=10;
00043             else 
00044               _cnr=11;
00045           } else {
00046             if(_id.roll()==1)
00047               _cnr=12;
00048             else
00049               _cnr=13;
00050           }
00051         } else if(_id.station()==4) {//Station 4
00052           if (_id.sector()== 4) {         
00053             if ( _id.subsector()==1){
00054               if(_id.roll()==1)
00055                 _cnr=14;
00056               else
00057                 _cnr=15;
00058             }else if (_id.subsector()==2){
00059               if(_id.roll()==1)
00060                 _cnr=16;
00061               else
00062                 _cnr=17;
00063             }else  if ( _id.subsector()==3) {
00064               if(_id.roll()==1)
00065                 _cnr=18;
00066               else
00067                 _cnr=19;
00068             }else if ( _id.subsector()==4){
00069               if(_id.roll()==1)
00070                 _cnr=20;
00071               else
00072                 _cnr=21;
00073             }
00074           } else {
00075             if(_id.subsector()==1) {
00076               if(_id.roll()==1)
00077                 _cnr=14;
00078               else 
00079                 _cnr=15;
00080             } else {
00081               if(_id.roll()==1)
00082                 _cnr=16;
00083               else
00084                 _cnr=17;
00085             } 
00086           } 
00087         }
00088       }else{//Endcap
00089         int seg=0;
00090         int nseg=36;
00091         int nsub=6;
00092         if ( _id.ring()==1 &&  _id.station() > 1) {
00093           nsub=3;
00094           nseg=18;
00095         }
00096         
00097         //      seg =(_id.sector()-1)*nsub + _id.subsector() ;
00098           _cnr = (_id.subsector()-1)*3+_id.roll()+(_id.ring()-1)*nsub*3; 
00099       }
00100         return _cnr;
00101     }


Member Data Documentation

int rpcdqm::utils::_cnr [private]

Definition at line 104 of file utils.h.

Referenced by detId2RollNr().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:52:31 2009 for CMSSW by  doxygen 1.5.4