CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
RPCMultiplicityTest Class Reference

#include <RPCMultiplicityTest.h>

Inheritance diagram for RPCMultiplicityTest:
RPCClient

Public Member Functions

void beginJob (std::string &)
 
void clientOperation ()
 
void getMonitorElements (std::vector< MonitorElement * > &, std::vector< RPCDetId > &, std::string &)
 
void myBooker (DQMStore::IBooker &)
 
 RPCMultiplicityTest (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~RPCMultiplicityTest ()
 Destructor. More...
 
- Public Member Functions inherited from RPCClient
virtual ~RPCClient (void)
 

Protected Member Functions

void fillGlobalME (RPCDetId &detId, MonitorElement *myMe)
 

Private Attributes

std::string globalFolder_
 
MonitorElementMULTDDisk [10]
 
MonitorElementMULTDisk [10]
 
MonitorElementMULTDWheel [5]
 
MonitorElementMULTWheel [5]
 
std::vector< RPCDetIdmyDetIds_
 
std::vector< MonitorElement * > myNumDigiMe_
 
int numberOfDisks_
 
int numberOfRings_
 
int prescaleFactor_
 
bool testMode_
 
bool useRollInfo_
 

Detailed Description

Definition at line 7 of file RPCMultiplicityTest.h.

Constructor & Destructor Documentation

RPCMultiplicityTest::RPCMultiplicityTest ( const edm::ParameterSet ps)

Constructor.

Definition at line 16 of file RPCMultiplicityTest.cc.

References edm::ParameterSet::getUntrackedParameter(), numberOfDisks_, numberOfRings_, prescaleFactor_, testMode_, and useRollInfo_.

16  {
17 
18  edm::LogVerbatim ("multiplicity") << "[RPCMultiplicityTest]: Constructor";
19  useRollInfo_ = ps.getUntrackedParameter<bool>("UseRollInfo", false);
20  prescaleFactor_ = ps.getUntrackedParameter<int>("DiagnosticPrescale", 1);
21  numberOfDisks_ = ps.getUntrackedParameter<int>("NumberOfEndcapDisks", 4);
22  numberOfRings_ = ps.getUntrackedParameter<int>("NumberOfEndcapRings", 2);
23  testMode_ = ps.getUntrackedParameter<bool>("testMode", false);
24 
25 }
T getUntrackedParameter(std::string const &, T const &) const
RPCMultiplicityTest::~RPCMultiplicityTest ( )
virtual

Destructor.

Definition at line 27 of file RPCMultiplicityTest.cc.

27 {}

Member Function Documentation

void RPCMultiplicityTest::beginJob ( std::string &  workingFolder)
virtual

Implements RPCClient.

Definition at line 30 of file RPCMultiplicityTest.cc.

References globalFolder_.

30  {
31 
32  edm::LogVerbatim ("multiplicity") << "[RPCMultiplicityTest]: Begin job";
33  globalFolder_ = workingFolder;
34 
35 }
void RPCMultiplicityTest::clientOperation ( )
virtual

Implements RPCClient.

Definition at line 105 of file RPCMultiplicityTest.cc.

References fillGlobalME(), i, myDetIds_, and myNumDigiMe_.

105  {
106 
107  edm::LogVerbatim ("multiplicity") <<"[RPCMultiplicityTest]: Client Operation";
108 
109  //Loop on MEs
110  for (unsigned int i = 0 ; i<myNumDigiMe_.size();i++){
112  }//End loop on MEs
113 }
int i
Definition: DBlmapReader.cc:9
void fillGlobalME(RPCDetId &detId, MonitorElement *myMe)
std::vector< RPCDetId > myDetIds_
std::vector< MonitorElement * > myNumDigiMe_
void RPCMultiplicityTest::fillGlobalME ( RPCDetId detId,
MonitorElement myMe 
)
protected

Definition at line 118 of file RPCMultiplicityTest.cc.

References rpcdqm::utils::detId2RollNr(), MonitorElement::Fill(), MonitorElement::getMean(), timingPdfMaker::mean, MULTDDisk, MULTDisk, MULTDWheel, MULTWheel, NULL, numberOfDisks_, numberOfRings_, RPCDetId::region(), RPCDetId::ring(), RPCDetId::roll(), RPCDetId::sector(), RPCGeomServ::segment(), MonitorElement::setBinContent(), RPCDetId::station(), testMode_, and cuy::yBin.

Referenced by clientOperation().

118  {
119 
120  MonitorElement * MULT =NULL;
121  MonitorElement * MULTD = NULL;
122 
123  if (detId.region()==0) {
124  MULT = MULTWheel[detId.ring()+2];
125  if(testMode_) { MULTD = MULTDWheel[detId.ring()+2];}
126  }else{
127  if(-detId.station() + numberOfDisks_ >= 0 ){
128 
129  if(detId.region()<0){
130  MULT = MULTDisk[-detId.station() + numberOfDisks_];
131  if(testMode_) { MULTD = MULTDDisk[-detId.station()+ numberOfDisks_];}
132  }else{
133  MULT = MULTDisk[detId.station()+ numberOfDisks_ -1];
134  if(testMode_) { MULTD = MULTDDisk[detId.station()+ numberOfDisks_-1];}
135  }
136  }
137  }
138 
139  int xBin,yBin;
140  if(detId.region()==0){//Barrel
141  xBin= detId.sector();
142  rpcdqm::utils rollNumber;
143  yBin = rollNumber.detId2RollNr(detId);
144  }else{//Endcap
145  //get segment number
146  RPCGeomServ RPCServ(detId);
147  xBin = RPCServ.segment();
148  (numberOfRings_ == 3 ? yBin= detId.ring()*3-detId.roll()+1 : yBin= (detId.ring()-1)*3-detId.roll()+1);
149  }
150 
151  float mean = myMe->getMean();
152 
153  if(MULT) {MULT->setBinContent(xBin,yBin, mean );}
154  if(testMode_ && MULTD) {MULTD->Fill(mean);}
155 
156 }
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * MULTDDisk[10]
tuple yBin
Definition: cuy.py:891
MonitorElement * MULTDisk[10]
#define NULL
Definition: scimark2.h:8
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
void Fill(long long x)
int roll() const
Definition: RPCDetId.h:120
int ring() const
Definition: RPCDetId.h:72
MonitorElement * MULTDWheel[5]
MonitorElement * MULTWheel[5]
int detId2RollNr(const RPCDetId &_id)
Definition: utils.h:18
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:102
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63
int station() const
Definition: RPCDetId.h:96
void RPCMultiplicityTest::getMonitorElements ( std::vector< MonitorElement * > &  meVector,
std::vector< RPCDetId > &  detIdVector,
std::string &  clientHistoName 
)
virtual

Implements RPCClient.

Definition at line 89 of file RPCMultiplicityTest.cc.

References i, myDetIds_, myNumDigiMe_, and AlCaHLTBitMon_QueryRunRegistry::string.

89  {
90 
91  //Get NumberOfDigi ME for each roll
92  for (unsigned int i = 0 ; i<meVector.size(); i++){
93 
94  std::string meName = meVector[i]->getName();
95 
96  if(meName.find(clientHistoName) != std::string::npos){
97  myNumDigiMe_.push_back(meVector[i]);
98  myDetIds_.push_back(detIdVector[i]);
99  }
100  }
101 }
int i
Definition: DBlmapReader.cc:9
std::vector< RPCDetId > myDetIds_
std::vector< MonitorElement * > myNumDigiMe_
void RPCMultiplicityTest::myBooker ( DQMStore::IBooker ibooker)
virtual

Implements RPCClient.

Definition at line 38 of file RPCMultiplicityTest.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), ztail::d, globalFolder_, i, rpcdqm::utils::labelXAxisSector(), rpcdqm::utils::labelXAxisSegment(), rpcdqm::utils::labelYAxisRing(), rpcdqm::utils::labelYAxisRoll(), MULTDDisk, MULTDisk, MULTDWheel, MULTWheel, numberOfDisks_, numberOfRings_, hltrates_dqm_sourceclient-live_cfg::offset, DQMStore::IBooker::setCurrentFolder(), testMode_, and useRollInfo_.

38  {
39 
40 
42 
43  std::stringstream histoName;
44  rpcdqm::utils rpcUtils;
45 
46  for (int i = -2; i<=2;i++ ){//loop on wheels and disks
47 
48  histoName.str("");
49  histoName<<"NumberOfDigi_Mean_Roll_vs_Sector_Wheel"<<i;
50 
51  MULTWheel[i+2] = ibooker.book2D(histoName.str().c_str(), histoName.str().c_str(), 12, 0.5, 12.5, 21, 0.5, 21.5);
52 
53  rpcUtils.labelXAxisSector( MULTWheel[i+2]);
54  rpcUtils.labelYAxisRoll( MULTWheel[i+2], 0, i,useRollInfo_ );
55 
56  if(testMode_){
57  histoName.str("");
58  histoName<<"NumberOfDigi_Mean_Distribution_Wheel"<<i;
59  MULTDWheel[i+2] = ibooker.book1D(histoName.str().c_str(), histoName.str().c_str(), 100, 0.5, 50.5);
60  }
61 
62  }//end wheels
63 
64  for(int d = -numberOfDisks_; d<=numberOfDisks_; d++ ){
65  if (d == 0 )continue;
66 
67  int offset = numberOfDisks_;
68  if (d>0) offset --; //used to skip case equale to zero
69 
70  histoName.str("");
71  histoName<<"NumberOfDigi_Mean_Ring_vs_Segment_Disk"<<d;
72  MULTDisk[d+offset] = ibooker.book2D(histoName.str().c_str(), histoName.str().c_str(),36, 0.5, 36.5, 3*numberOfRings_, 0.5,3*numberOfRings_+ 0.5);
73  rpcUtils.labelXAxisSegment(MULTDisk[d+offset]);
74  rpcUtils.labelYAxisRing(MULTDisk[d+offset], numberOfRings_,useRollInfo_ );
75 
76  if(testMode_){
77  histoName.str("");
78  histoName<<"NumberOfDigi_Mean_Distribution_Disk"<<d;
79  MULTDDisk[d+offset] = ibooker.book1D(histoName.str().c_str(), histoName.str().c_str(), 100, 0.5, 50.5);
80  }
81  }//end loop on wheels and disks
82 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * MULTDDisk[10]
MonitorElement * MULTDisk[10]
void labelXAxisSegment(MonitorElement *myMe)
Definition: utils.h:250
void labelYAxisRoll(MonitorElement *myMe, int region, int ring, bool useRollInfo)
Definition: utils.h:268
tuple d
Definition: ztail.py:151
void labelYAxisRing(MonitorElement *myMe, int numberOfRings, bool useRollInfo)
Definition: utils.h:295
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * MULTDWheel[5]
MonitorElement * MULTWheel[5]
void labelXAxisSector(MonitorElement *myMe)
Definition: utils.h:236
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133

Member Data Documentation

std::string RPCMultiplicityTest::globalFolder_
private

Definition at line 28 of file RPCMultiplicityTest.h.

Referenced by beginJob(), and myBooker().

MonitorElement* RPCMultiplicityTest::MULTDDisk[10]
private

Definition at line 38 of file RPCMultiplicityTest.h.

Referenced by fillGlobalME(), and myBooker().

MonitorElement* RPCMultiplicityTest::MULTDisk[10]
private

Definition at line 37 of file RPCMultiplicityTest.h.

Referenced by fillGlobalME(), and myBooker().

MonitorElement* RPCMultiplicityTest::MULTDWheel[5]
private

Definition at line 36 of file RPCMultiplicityTest.h.

Referenced by fillGlobalME(), and myBooker().

MonitorElement* RPCMultiplicityTest::MULTWheel[5]
private

Definition at line 35 of file RPCMultiplicityTest.h.

Referenced by fillGlobalME(), and myBooker().

std::vector<RPCDetId> RPCMultiplicityTest::myDetIds_
private

Definition at line 33 of file RPCMultiplicityTest.h.

Referenced by clientOperation(), and getMonitorElements().

std::vector<MonitorElement *> RPCMultiplicityTest::myNumDigiMe_
private

Definition at line 32 of file RPCMultiplicityTest.h.

Referenced by clientOperation(), and getMonitorElements().

int RPCMultiplicityTest::numberOfDisks_
private

Definition at line 29 of file RPCMultiplicityTest.h.

Referenced by fillGlobalME(), myBooker(), and RPCMultiplicityTest().

int RPCMultiplicityTest::numberOfRings_
private

Definition at line 30 of file RPCMultiplicityTest.h.

Referenced by fillGlobalME(), myBooker(), and RPCMultiplicityTest().

int RPCMultiplicityTest::prescaleFactor_
private

Definition at line 27 of file RPCMultiplicityTest.h.

Referenced by RPCMultiplicityTest().

bool RPCMultiplicityTest::testMode_
private

Definition at line 34 of file RPCMultiplicityTest.h.

Referenced by fillGlobalME(), myBooker(), and RPCMultiplicityTest().

bool RPCMultiplicityTest::useRollInfo_
private

Definition at line 31 of file RPCMultiplicityTest.h.

Referenced by myBooker(), and RPCMultiplicityTest().