102 cmsME.find(
fullName(
"PhiPercentageSummary"))->second->Reset();
103 cmsME.find(
fullName(
"PhibPercentageSummary"))->second->Reset();
109 for (vector<string>::const_iterator iHw =
hwSources.begin(); iHw !=
hwSources.end(); ++iHw) {
111 vector<const DTChamber*>::const_iterator chIt =
muonGeom->
chambers().begin();
112 vector<const DTChamber*>::const_iterator chEnd =
muonGeom->
chambers().end();
113 for (; chIt != chEnd; ++chIt) {
115 int wh = chId.
wheel();
116 int sect = chId.sector();
117 int stat = chId.station();
119 std::map<std::string, MonitorElement*>& innerME =
whME[wh];
122 TH1F* PhiResidual = getHisto<TH1F>(igetter.get(
getMEName(
"PhiResidual",
"Segment", chId)));
124 if (PhiResidual && PhiResidual->GetEntries() > 10) {
125 if (innerME.find(
fullName(
"PhiResidualPercentage")) == innerME.end()) {
129 float rangeBin =
validRange / (PhiResidual->GetBinWidth(1));
130 float center = (PhiResidual->GetNbinsX()) / 2.;
132 (PhiResidual->Integral(floor(center - rangeBin),
ceil(center + rangeBin))) / (PhiResidual->Integral());
136 cmsME.find(
fullName(
"PhiPercentageSummary"))->second->Fill(perc);
142 if ((phiSummary == 0) || (phiSummary == 3)) {
144 if (innerME.find(
fullName(
"PhiResidualMean")) == innerME.end()) {
149 float center = (PhiResidual->GetNbinsX()) / 2.;
150 float rangeBin =
validRange / (PhiResidual->GetBinWidth(1));
151 PhiResidual->GetXaxis()->SetRange(floor(center - rangeBin),
ceil(center + rangeBin));
152 float max = PhiResidual->GetMaximumBin();
153 float maxBin = PhiResidual->GetXaxis()->FindBin(max);
154 float nBinMax = 0.5 / (PhiResidual->GetBinWidth(1));
155 PhiResidual->GetXaxis()->SetRange(floor(maxBin - nBinMax),
ceil(maxBin + nBinMax));
156 float Mean = PhiResidual->GetMean();
157 float rms = PhiResidual->GetRMS();
163 TH2F* TrackPhitkvsPhitrig = getHisto<TH2F>(igetter.get(
getMEName(
"PhitkvsPhitrig",
"Segment", chId)));
165 if (TrackPhitkvsPhitrig && TrackPhitkvsPhitrig->GetEntries() > 100) {
166 float corr = TrackPhitkvsPhitrig->GetCorrelationFactor();
167 if (innerME.find(
fullName(
"CorrelationFactorPhi")) == innerME.end()) {
175 TH1F* PhibResidual = getHisto<TH1F>(igetter.get(
getMEName(
"PhibResidual",
"Segment", chId)));
176 int phibSummary = stat == 3 ? -1 : 1;
178 if (stat != 3 && PhibResidual &&
179 PhibResidual->GetEntries() > 10) {
181 if (innerME.find(
fullName(
"PhibResidualPercentage")) == innerME.end()) {
185 float rangeBin =
validRange / (PhibResidual->GetBinWidth(1));
186 float center = (PhibResidual->GetNbinsX()) / 2.;
188 (PhibResidual->Integral(floor(center - rangeBin),
ceil(center + rangeBin))) / (PhibResidual->Integral());
193 cmsME.find(
fullName(
"PhibPercentageSummary"))->second->Fill(perc);
199 if ((phibSummary == 0) || (phibSummary == 3)) {
200 if (innerME.find(
fullName(
"PhibResidualMean")) == innerME.end()) {
205 float center = (PhibResidual->GetNbinsX()) / 2.;
206 float rangeBin =
validRange / (PhibResidual->GetBinWidth(1));
207 PhibResidual->GetXaxis()->SetRange(floor(center - rangeBin),
ceil(center + rangeBin));
208 float max = PhibResidual->GetMaximumBin();
209 float maxBin = PhibResidual->GetXaxis()->FindBin(max);
210 float nBinMax = 0.5 / (PhibResidual->GetBinWidth(1));
211 PhibResidual->GetXaxis()->SetRange(floor(maxBin - nBinMax),
ceil(maxBin + nBinMax));
212 float Mean = PhibResidual->GetMean();
213 float rms = PhibResidual->GetRMS();
219 TH2F* TrackPhibtkvsPhibtrig = getHisto<TH2F>(igetter.get(
getMEName(
"PhibtkvsPhibtrig",
"Segment", chId)));
220 if (TrackPhibtkvsPhibtrig && TrackPhibtkvsPhibtrig->GetEntries() > 100) {
221 float corr = TrackPhibtkvsPhibtrig->GetCorrelationFactor();
222 if (innerME.find(
fullName(
"CorrelationFactorPhib")) == innerME.end()) {
236 for (vector<string>::const_iterator iHw =
hwSources.begin(); iHw !=
hwSources.end(); ++iHw) {
238 for (
int wh = -2; wh <= 2; ++wh) {
239 std::map<std::string, MonitorElement*>* innerME = &(
whME[wh]);
241 TH2F* phiWhSummary = getHisto<TH2F>(innerME->find(
fullName(
"PhiLutSummary"))->second);
242 TH2F* phibWhSummary = getHisto<TH2F>(innerME->find(
fullName(
"PhibLutSummary"))->second);
244 for (
int sect = 1; sect <= 12; ++sect) {
245 int phiSectorTotal = 0;
246 int phibSectorTotal = 0;
253 for (
int stat = 1; stat <= 4; ++
stat) {
254 if (phiWhSummary->GetBinContent(sect, stat) == 2) {
258 if (phiWhSummary->GetBinContent(sect, stat) == 1)
260 if (phibWhSummary->GetBinContent(sect, stat) == 2) {
261 phibSectorTotal += 1;
264 if (phibWhSummary->GetBinContent(sect, stat) == 1)
268 phiStatus = phiSectorTotal;
272 phibStatus = phibSectorTotal;
std::vector< std::string > trigSources
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
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.
constexpr int32_t ceil(float num)
edm::ESHandle< DTGeometry > muonGeom
std::map< int, std::map< std::string, MonitorElement * > > whME
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