37 setConfig(ps,
"DTTriggerEfficiency");
38 baseFolderTM =
"DT/03-LocalTrigger-TM/";
53 Bookings(ibooker, igetter);
56 for (vector<string>::const_iterator iTr = trigSources.begin(); iTr != trigSources.end(); ++iTr) {
58 for (vector<string>::const_iterator iHw =
hwSources.begin(); iHw !=
hwSources.end(); ++iHw) {
61 if (globalEffDistr.find(
fullName(
"TrigEffPhi")) == globalEffDistr.end()) {
65 for (
int wh = -2; wh <= 2; ++wh) {
66 TH2F* TrigEffDenum = getHisto<TH2F>(igetter.
get(getMEName(
"TrigEffDenum",
"Task", wh)));
67 TH2F* TrigEffNum = getHisto<TH2F>(igetter.
get(getMEName(
"TrigEffNum",
"Task", wh)));
68 TH2F* TrigEffCorrNum = getHisto<TH2F>(igetter.
get(getMEName(
"TrigEffCorrNum",
"Task", wh)));
70 if (TrigEffDenum && TrigEffNum && TrigEffCorrNum && TrigEffDenum->GetEntries() > 1) {
71 if (whME[wh].
find(
fullName(
"TrigEffPhi")) == whME[wh].end()) {
72 bookWheelHistos(ibooker, wh,
"TrigEffPhi",
"");
73 bookWheelHistos(ibooker, wh,
"TrigEffCorrPhi",
"");
85 makeEfficiencyME(TrigEffNum, TrigEffDenum, Eff2DWh_TrigEffPhi, Eff1DWh_TrigEffPhi, Eff1DAll_TrigEffPhi);
87 TrigEffCorrNum, TrigEffDenum, Eff2DWh_TrigEffCorrPhi, Eff1DWh_TrigEffCorrPhi, Eff1DAll_TrigEffCorrPhi);
92 for (
int sect = 1; sect <= 12; ++sect) {
94 uint32_t indexCh = chId.
rawId();
98 TH2F* TrackPosvsAngle = getHisto<TH2F>(igetter.
get(getMEName(
"TrackPosvsAngle",
"Segment", chId)));
99 TH2F* TrackPosvsAngleAnyQual =
100 getHisto<TH2F>(igetter.
get(getMEName(
"TrackPosvsAngleAnyQual",
"Segment", chId)));
101 TH2F* TrackPosvsAngleCorr =
102 getHisto<TH2F>(igetter.
get(getMEName(
"TrackPosvsAngleCorr",
"Segment", chId)));
104 if (TrackPosvsAngle && TrackPosvsAngleAnyQual && TrackPosvsAngleCorr &&
105 TrackPosvsAngle->GetEntries() > 1) {
106 if (chambME[indexCh].
find(
fullName(
"TrigEffAnglePhi")) == chambME[indexCh].end()) {
107 bookChambHistos(ibooker, chId,
"TrigEffPosvsAnglePhi",
"Segment");
108 bookChambHistos(ibooker, chId,
"TrigEffPosvsAngleCorrPhi",
"Segment");
111 std::map<std::string, MonitorElement*>* innerME = &(chambME[indexCh]);
113 TrackPosvsAngleAnyQual, TrackPosvsAngle, innerME->find(
fullName(
"TrigEffPosvsAnglePhi"))->second);
115 TrackPosvsAngleCorr, TrackPosvsAngle, innerME->find(
fullName(
"TrigEffPosvsAngleCorrPhi"))->second);
135 for (
int binx = 1; binx <= nbinsx; ++binx) {
136 for (
int biny = 1; biny <= nbinsy; ++biny) {
138 float bineff =
efficiency->GetBinContent(binx, biny);
140 result1DWh->
Fill(bineff);
141 result1D->
Fill(bineff);
161 for (
int binx = 1; binx <= nbinsx; ++binx) {
162 for (
int biny = 1; biny <= nbinsy; ++biny) {
164 float bineff =
efficiency->GetBinContent(binx, biny);
200 string hname = fullTag +
"_All";
202 globalEffDistr[fullTag] = ibooker.
book1D(hname.c_str(), hname.c_str(), 51, 0., 1.02);
210 if (hTag.find(
"Summary") != string::npos) {
213 basedir = topFolder() +
"Wheel" + wh.str() +
"/";
222 string hname = fullTag +
"_W" + wh.str();
224 string hnameAll = fullTag +
"_All_W" + wh.str();
228 (EffDistrPerWh[
wheel])[fullTag] = ibooker.
book1D(hnameAll.c_str(), hnameAll.c_str(), 51, 0., 1.02);
230 if (hTag.find(
"Phi") != string::npos || hTag.find(
"Summary") != string::npos) {
234 me->setBinLabel(1,
"MB1", 2);
235 me->setBinLabel(2,
"MB2", 2);
236 me->setBinLabel(3,
"MB3", 2);
237 me->setBinLabel(4,
"MB4", 2);
238 me->setAxisTitle(
"Sector", 1);
244 if (hTag.find(
"Theta") != string::npos) {
248 me->setBinLabel(1,
"MB1", 2);
249 me->setBinLabel(2,
"MB2", 2);
250 me->setBinLabel(3,
"MB3", 2);
251 me->setAxisTitle(
"Sector", 1);
267 sector << chambId.
sector();
278 uint32_t indexChId = chambId.
rawId();
281 trigGeomUtils->phiRange(chambId,
min,
max,
nbins, 20);
282 if (htype.find(
"TrigEffPosvsAnglePhi") == 0) {
283 chambME[indexChId][fullType] = ibooker.
book2D(
284 HistoName.c_str(),
"Trigger efficiency (any qual.) position vs angle (Phi)", 12, -30., 30.,
nbins,
min,
max);
287 if (htype.find(
"TrigEffPosvsAngleCorrPhi") == 0) {
288 chambME[indexChId][fullType] = ibooker.
book2D(
289 HistoName.c_str(),
"Trigger efficiency (correlated) pos vs angle (Phi)", 12, -30., 30.,
nbins,
min,
max);
295 vector<string>::const_iterator iTr = trigSources.begin();
296 vector<string>::const_iterator trEnd = trigSources.end();
297 vector<string>::const_iterator iHw =
hwSources.begin();
298 vector<string>::const_iterator hwEnd =
hwSources.end();
301 if (
parameters.getUntrackedParameter<
bool>(
"staticBooking",
true)) {
302 for (; iTr != trEnd; ++iTr) {
304 for (; iHw != hwEnd; ++iHw) {
310 for (
int wh = -2; wh <= 2; ++wh) {
312 for (
int sect = 1; sect <= 12; ++sect) {
316 bookChambHistos(ibooker, chId,
"TrigEffPosvsAnglePhi",
"Segment");
317 bookChambHistos(ibooker, chId,
"TrigEffPosvsAngleCorrPhi",
"Segment");
322 bookWheelHistos(ibooker, wh,
"TrigEffPhi",
"");
323 bookWheelHistos(ibooker, wh,
"TrigEffCorrPhi",
"");