43 LogTrace(
"DTDQM|DTMonitorModule|DTTriggerEfficiencyTask") <<
"[DTTriggerEfficiencyTask]: Constructor" << endl;
64 LogError(
"DTDQM|DTMonitorModule|DTTriggerEfficiencyTask")
65 <<
"[DTTriggerEfficiencyTask]: Error, no trigger source (Twinmux) has been selected!!" << endl;
69 LogTrace(
"DTDQM|DTMonitorModule|DTTriggerEfficiencyTask")
70 <<
"[DTTriggerEfficiencyTask]: analyzed " <<
nevents <<
" events" << endl;
82 LogTrace(
"DTDQM|DTMonitorModule|DTTriggerEfficiencyTask") <<
"[DTTriggerEfficiencyTask]: bookHistograms" << endl;
85 for (
int wh = -2; wh <= 2; ++wh) {
86 vector<string>::const_iterator tagIt =
processTags.begin();
87 vector<string>::const_iterator tagEnd =
processTags.end();
88 for (; tagIt != tagEnd; ++tagIt) {
92 for (
int sect = 1; sect <= 12; ++sect) {
110 map<DTChamberId, const L1MuDTChambPhDigi*> phBestTM;
114 vector<L1MuDTChambPhDigi>
const* phTrigs = l1DTTPGPh->
getContainer();
116 vector<L1MuDTChambPhDigi>::const_iterator iph = phTrigs->begin();
117 vector<L1MuDTChambPhDigi>::const_iterator iphe = phTrigs->end();
118 for (; iph != iphe; ++iph) {
119 int phwheel = iph->whNum();
120 int phsec = iph->scNum() + 1;
121 int phst = iph->stNum();
122 int phcode = iph->code();
126 if (phcode < 7 && (phBestTM.find(chId) == phBestTM.end() || phcode > phBestTM[chId]->code()))
127 phBestTM[chId] = &(*iph);
131 vector<const DTRecSegment4D*> best4DSegments;
135 reco::MuonCollection::const_iterator
mu;
139 if (!((*mu).isStandAloneMuon())) {
144 const vector<reco::MuonChamberMatch> matchedChambers = (*mu).matches();
145 vector<reco::MuonChamberMatch>::const_iterator
chamber;
154 const vector<reco::MuonSegmentMatch> matchedSegments = (*chamber).segmentMatches;
155 vector<reco::MuonSegmentMatch>::const_iterator segment;
157 for (segment = matchedSegments.begin(); segment != matchedSegments.end(); ++segment) {
179 if ((*dtSegment).hasPhi()) {
180 best4DSegments.push_back(&(*dtSegment));
188 vector<const DTRecSegment4D*>::const_iterator btrack;
189 for (btrack = best4DSegments.begin(); btrack != best4DSegments.end(); ++btrack) {
190 int wheel = (*btrack)->chamberId().wheel();
191 int station = (*btrack)->chamberId().station();
195 int nHitsPhi = (*btrack)->phiSegment()->degreesOfFreedom() + 2;
197 uint32_t indexCh = dtChId.
rawId();
198 map<string, MonitorElement*>& innerChME =
chamberHistos[indexCh];
202 vector<string>::const_iterator tagIt =
processTags.begin();
203 vector<string>::const_iterator tagEnd =
processTags.end();
204 for (; tagIt != tagEnd; ++tagIt) {
205 int qual = phBestTM.find(dtChId) != phBestTM.end() ? phBestTM[dtChId]->code() : -1;
206 innerWhME.find((*tagIt) +
"_TrigEffDenum")->second->Fill(scsector,
station);
207 if (qual >= 0 && qual < 7) {
208 innerWhME.find((*tagIt) +
"_TrigEffNum")->second->Fill(scsector,
station);
210 innerWhME.find((*tagIt) +
"_TrigEffCorrNum")->second->Fill(scsector,
station);
214 innerChME.find((*tagIt) +
"_TrackPosvsAngle")->second->Fill(
xdir,
x);
215 if (qual >= 0 && qual < 7) {
216 innerChME.find((*tagIt) +
"_TrackPosvsAngleAnyQual")->second->Fill(
xdir,
x);
218 innerChME.find((*tagIt) +
"_TrackPosvsAngleCorr")->second->Fill(
xdir,
x);
231 std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->
getRecords();
232 std::vector<L1MuGMTReadoutRecord>::const_iterator igmtrr = gmt_records.begin();
233 std::vector<L1MuGMTReadoutRecord>::const_iterator egmtrr = gmt_records.end();
234 for (; igmtrr != egmtrr; igmtrr++) {
235 std::vector<L1MuGMTExtendedCand> candsGMT = igmtrr->getGMTCands();
236 std::vector<L1MuGMTExtendedCand>::const_iterator candGMTIt = candsGMT.begin();
237 std::vector<L1MuGMTExtendedCand>::const_iterator candGMTEnd = candsGMT.end();
239 for (; candGMTIt != candGMTEnd; ++candGMTIt) {
240 if (!candGMTIt->empty()) {
241 int quality = candGMTIt->quality();
256 int wh = dtCh.
wheel();
267 string bookingFolder =
268 hwFolder +
"Wheel" +
wheel.str() +
"/Sector" + sector.str() +
"/Station" +
station.str() +
"/" +
folder;
273 LogTrace(
"DTDQM|DTMonitorModule|DTTriggerEfficiencyTask")
274 <<
"[DTTriggerEfficiencyTask]: booking histos in " << bookingFolder << endl;
281 string histoLabel =
"Position vs Angle (phi)";
287 histoLabel =
"Position vs Angle (phi) for any qual triggers";
293 histoLabel =
"Position vs Angle (phi) for correlated triggers";
303 if (hTag.find(
"Summary") != string::npos) {
311 string hTagName =
"_W" + wh.str();
313 LogTrace(
"DTDQM|DTMonitorModule|DTTriggerEfficiencyTask")
314 <<
"[DTTriggerEfficiencyTask]: booking histos in " <<
basedir << endl;
316 string hName = hTag +
"_TrigEffDenum" + hTagName;
320 me->setBinLabel(1,
"MB1", 2);
321 me->setBinLabel(2,
"MB2", 2);
322 me->setBinLabel(3,
"MB3", 2);
323 me->setBinLabel(4,
"MB4", 2);
324 me->setAxisTitle(
"Sector", 1);
328 hName = hTag +
"_TrigEffNum" + hTagName;
329 me = ibooker.
book2D(hName.c_str(), hName.c_str(), 12, 1, 13, 4, 1, 5);
331 me->setBinLabel(1,
"MB1", 2);
332 me->setBinLabel(2,
"MB2", 2);
333 me->setBinLabel(3,
"MB3", 2);
334 me->setBinLabel(4,
"MB4", 2);
335 me->setAxisTitle(
"Sector", 1);
339 hName = hTag +
"_TrigEffCorrNum" + hTagName;
340 me = ibooker.
book2D(hName.c_str(), hName.c_str(), 12, 1, 13, 4, 1, 5);
342 me->setBinLabel(1,
"MB1", 2);
343 me->setBinLabel(2,
"MB2", 2);
344 me->setBinLabel(3,
"MB3", 2);
345 me->setBinLabel(4,
"MB4", 2);
346 me->setAxisTitle(
"Sector", 1);