123 cmsME.find(
fullName(
"PhiPercentageSummary"))->second->Reset();
124 cmsME.find(
fullName(
"PhibPercentageSummary"))->second->Reset();
130 for (vector<string>::const_iterator iHw =
hwSources.begin(); iHw !=
hwSources.end(); ++iHw){
132 vector<const DTChamber*>::const_iterator chIt =
muonGeom->
chambers().begin();
133 vector<const DTChamber*>::const_iterator chEnd =
muonGeom->
chambers().end();
134 for (; chIt != chEnd; ++chIt) {
137 int wh = chId.
wheel();
138 int sect = chId.sector();
139 int stat = chId.station();
141 std::map<std::string,MonitorElement*> &innerME =
whME[wh];
144 TH1F * PhiResidual = getHisto<TH1F>(igetter.
get(
getMEName(
"PhiResidual",
"Segment", chId)));
146 if (PhiResidual && PhiResidual->GetEntries()>10) {
148 if( innerME.find(
fullName(
"PhiResidualPercentage")) == innerME.end() ){
152 float rangeBin =
validRange/(PhiResidual->GetBinWidth(1));
153 float center = (PhiResidual->GetNbinsX())/2.;
154 float perc = (PhiResidual->Integral(floor(center-rangeBin),ceil(center+rangeBin)))/(PhiResidual->Integral());
165 if ((phiSummary==0)||(phiSummary==3)){
167 if( innerME.find(
fullName(
"PhiResidualMean")) == innerME.end() ){
172 float center = (PhiResidual->GetNbinsX())/2.;
173 float rangeBin =
validRange/(PhiResidual->GetBinWidth(1));
174 PhiResidual->GetXaxis()->SetRange(floor(center-rangeBin),ceil(center+rangeBin));
175 float max = PhiResidual->GetMaximumBin();
176 float maxBin = PhiResidual->GetXaxis()->FindBin(max);
177 float nBinMax = 0.5/(PhiResidual->GetBinWidth(1));
178 PhiResidual->GetXaxis()->SetRange(floor(maxBin-nBinMax),ceil(maxBin+nBinMax));
179 float Mean = PhiResidual->GetMean();
180 float rms = PhiResidual->GetRMS();
187 TH2F * TrackPhitkvsPhitrig = getHisto<TH2F>(igetter.
get(
getMEName(
"PhitkvsPhitrig",
"Segment", chId)));
189 if (TrackPhitkvsPhitrig && TrackPhitkvsPhitrig->GetEntries()>100) {
190 float corr = TrackPhitkvsPhitrig->GetCorrelationFactor();
191 if( innerME.find(
fullName(
"CorrelationFactorPhi")) == innerME.end() ){
201 TH1F * PhibResidual = getHisto<TH1F>(igetter.
get(
getMEName(
"PhibResidual",
"Segment", chId)));
202 int phibSummary = stat==3 ? -1 : 1;
204 if (stat != 3 && PhibResidual && PhibResidual->GetEntries()>10) {
206 if( innerME.find(
fullName(
"PhibResidualPercentage")) == innerME.end() ){
210 float rangeBin =
validRange/(PhibResidual->GetBinWidth(1));
211 float center = (PhibResidual->GetNbinsX())/2.;
212 float perc = (PhibResidual->Integral(floor(center-rangeBin),ceil(center+rangeBin)))/(PhibResidual->Integral());
224 if ((phibSummary==0)||(phibSummary==3)){
226 if( innerME.find(
fullName(
"PhibResidualMean")) == innerME.end() ){
231 float center = (PhibResidual->GetNbinsX())/2.;
232 float rangeBin =
validRange/(PhibResidual->GetBinWidth(1));
233 PhibResidual->GetXaxis()->SetRange(floor(center-rangeBin),ceil(center+rangeBin));
234 float max = PhibResidual->GetMaximumBin();
235 float maxBin = PhibResidual->GetXaxis()->FindBin(max);
236 float nBinMax = 0.5/(PhibResidual->GetBinWidth(1));
237 PhibResidual->GetXaxis()->SetRange(floor(maxBin-nBinMax),ceil(maxBin+nBinMax));
238 float Mean = PhibResidual->GetMean();
239 float rms = PhibResidual->GetRMS();
245 TH2F * TrackPhibtkvsPhibtrig = getHisto<TH2F>(igetter.
get(
getMEName(
"PhibtkvsPhibtrig",
"Segment", chId)));
246 if (TrackPhibtkvsPhibtrig && TrackPhibtkvsPhibtrig->GetEntries()>100) {
248 float corr = TrackPhibtkvsPhibtrig->GetCorrelationFactor();
249 if( innerME.find(
fullName(
"CorrelationFactorPhib")) == innerME.end() ){
265 for (vector<string>::const_iterator iHw =
hwSources.begin(); iHw !=
hwSources.end(); ++iHw){
267 for (
int wh=-2; wh<=2; ++wh){
269 std::map<std::string,MonitorElement*> *innerME = &(
whME[wh]);
271 TH2F* phiWhSummary = getHisto<TH2F>(innerME->find(
fullName(
"PhiLutSummary"))->second);
272 TH2F* phibWhSummary = getHisto<TH2F>(innerME->find(
fullName(
"PhibLutSummary"))->second);
274 for (
int sect=1; sect<=12; ++sect){
276 int phiSectorTotal = 0;
277 int phibSectorTotal = 0;
284 for (
int stat=1; stat<=4; ++
stat){
285 if (phiWhSummary->GetBinContent(sect,stat)==2){
289 if (phiWhSummary->GetBinContent(sect,stat)==1)
291 if (phibWhSummary->GetBinContent(sect,stat)==2) {
295 if (phibWhSummary->GetBinContent(sect,stat)==1)
299 phiStatus=phiSectorTotal;
303 phibStatus=phibSectorTotal;
std::vector< std::string > trigSources
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
std::map< int, std::map< std::string, MonitorElement * > > whME
MonitorElement * get(const std::string &path)
int performLutTest(double perc, double threshold1, double threshold2)
Perform Lut Test logical operations.
void fillWhPlot(MonitorElement *plot, int sect, int stat, float value, bool lessIsBest=true)
Fill summary plots managing double MB4 chambers.
edm::ESHandle< DTGeometry > muonGeom
std::string getMEName(std::string histoTag, std::string subfolder, const DTChamberId &chambid)
Get the ME name (by chamber)
std::map< std::string, MonitorElement * > cmsME
void Bookings(DQMStore::IBooker &, DQMStore::IGetter &)
std::vector< std::string > hwSources
int wheel() const
Return the wheel number.
void bookWheelHistos(DQMStore::IBooker &, int wheel, std::string hTag, std::string folder="")
Book the new MEs (for each wheel)
std::string fullName(std::string htype)
Create fullname from histo partial name.
const int wheelArrayShift