112 m_muonCollectionTag(
cfg.getParameter<
edm::
InputTag>(
"muonCollectionTag")),
113 m_minTrackPt(
cfg.getParameter<double>(
"minTrackPt")),
114 m_minTrackP(
cfg.getParameter<double>(
"minTrackP")),
115 m_maxDxy(
cfg.getParameter<double>(
"maxDxy")),
116 m_minTrackerHits(
cfg.getParameter<
int>(
"minTrackerHits")),
117 m_maxTrackerRedChi2(
cfg.getParameter<double>(
"maxTrackerRedChi2")),
118 m_allowTIDTEC(
cfg.getParameter<
bool>(
"allowTIDTEC")),
119 m_minNCrossedChambers(
cfg.getParameter<
int>(
"minNCrossedChambers")),
120 m_minDT13Hits(
cfg.getParameter<
int>(
"minDT13Hits")),
121 m_minDT2Hits(
cfg.getParameter<
int>(
"minDT2Hits")),
122 m_minCSCHits(
cfg.getParameter<
int>(
"minCSCHits")),
123 m_doDT(
cfg.getParameter<
bool>(
"doDT")),
124 m_doCSC(
cfg.getParameter<
bool>(
"doCSC")) {}
127 char name[225],
pos[228], neg[228];
133 char wheel_label[][2] = {
"A",
"B",
"C",
"D",
"E"};
134 for (
int sector = 1; sector <= 12; sector++) {
135 char wheel_sector[50];
136 sprintf(wheel_sector,
"%s_%02d", wheel_label[
wheel + 2], sector);
141 sprintf(
name,
"dt13_resid_%s_12", wheel_sector);
143 sprintf(neg,
"neg%s",
name);
149 sprintf(
name,
"dt13_resid_%s_23", wheel_sector);
151 sprintf(neg,
"neg%s",
name);
157 sprintf(
name,
"dt13_resid_%s_34", wheel_sector);
159 sprintf(neg,
"neg%s",
name);
165 sprintf(
name,
"dt2_resid_%s_12", wheel_sector);
167 sprintf(neg,
"neg%s",
name);
173 sprintf(
name,
"dt2_resid_%s_23", wheel_sector);
175 sprintf(neg,
"neg%s",
name);
181 sprintf(
name,
"dt13_slope_%s_12", wheel_sector);
183 sprintf(neg,
"neg%s",
name);
189 sprintf(
name,
"dt13_slope_%s_23", wheel_sector);
191 sprintf(neg,
"neg%s",
name);
197 sprintf(
name,
"dt13_slope_%s_34", wheel_sector);
199 sprintf(neg,
"neg%s",
name);
205 sprintf(
name,
"dt2_slope_%s_12", wheel_sector);
207 sprintf(neg,
"neg%s",
name);
213 sprintf(
name,
"dt2_slope_%s_23", wheel_sector);
215 sprintf(neg,
"neg%s",
name);
233 sprintf(ec_chamber,
"%s_%02d", endcapletter.c_str(),
chamber);
238 sprintf(
name,
"cscouter_resid_%s_12", ec_chamber);
240 sprintf(neg,
"neg%s",
name);
246 sprintf(
name,
"cscouter_resid_%s_23", ec_chamber);
248 sprintf(neg,
"neg%s",
name);
254 sprintf(
name,
"cscouter_slope_%s_12", ec_chamber);
256 sprintf(neg,
"neg%s",
name);
262 sprintf(
name,
"cscouter_slope_%s_23", ec_chamber);
264 sprintf(neg,
"neg%s",
name);
273 sprintf(ec_chamber,
"%s_%02d", endcapletter.c_str(),
chamber);
278 sprintf(
name,
"cscinner_resid_%s_12", ec_chamber);
280 sprintf(neg,
"neg%s",
name);
286 sprintf(
name,
"cscinner_resid_%s_23", ec_chamber);
288 sprintf(neg,
"neg%s",
name);
294 sprintf(
name,
"cscinner_resid_%s_34", ec_chamber);
296 sprintf(neg,
"neg%s",
name);
302 sprintf(
name,
"cscinner_slope_%s_12", ec_chamber);
304 sprintf(neg,
"neg%s",
name);
310 sprintf(
name,
"cscinner_slope_%s_23", ec_chamber);
312 sprintf(neg,
"neg%s",
name);
318 sprintf(
name,
"cscinner_slope_%s_34", ec_chamber);
320 sprintf(neg,
"neg%s",
name);
329 for (
int e = 1;
e <= 2;
e++)
330 for (
int s = 1;
s <= 12;
s++) {
331 char endcap_sector[50];
333 sprintf(endcap_sector,
"Wp2S%02d",
s);
335 sprintf(endcap_sector,
"Wm2S%02d",
s);
340 sprintf(
pos,
"pos_x_dt1_csc1_%s", endcap_sector);
341 sprintf(neg,
"neg_x_dt1_csc1_%s", endcap_sector);
345 sprintf(
pos,
"pos_x_dt1_csc2_%s", endcap_sector);
346 sprintf(neg,
"neg_x_dt1_csc2_%s", endcap_sector);
350 sprintf(
pos,
"pos_x_dt2_csc1_%s", endcap_sector);
351 sprintf(neg,
"neg_x_dt2_csc1_%s", endcap_sector);
377 for (ConstTrajTrackPairCollection::const_iterator trajtrack = trajtracks.begin(); trajtrack != trajtracks.end();
393 if (!(
muon->isTrackerMuon() &&
muon->innerTrack().isNonnull()))
414 std::vector<DetId> chamberIds = mrft.
chamberIds();
415 for (
unsigned ch = 0; ch < chamberIds.size(); ch++)
426 for (std::vector<DetId>::const_iterator chamberId = chamberIds.begin(); chamberId != chamberIds.end(); ++chamberId) {
437 for (std::vector<DetId>::const_iterator otherId = chamberIds.begin(); otherId != chamberIds.end(); ++otherId) {
440 if (thisid.rawId() != thatid.rawId() && thisid.wheel() == thatid.wheel() &&
441 thisid.sector() == thatid.sector()) {
451 if (thatid.station() - thisid.station() == 1)
452 st = thisid.station();
454 m_dt13_resid[thisid.wheel() + 2][thisid.sector() - 1][st - 1]->Fill(qoverpt, residdiff);
455 m_dt13_slope[thisid.wheel() + 2][thisid.sector() - 1][st - 1]->Fill(qoverpt, slopediff);
457 m_posdt13_resid[thisid.wheel() + 2][thisid.sector() - 1][st - 1]->Fill(residdiff);
458 m_posdt13_slope[thisid.wheel() + 2][thisid.sector() - 1][st - 1]->Fill(slopediff);
460 m_negdt13_resid[thisid.wheel() + 2][thisid.sector() - 1][st - 1]->Fill(residdiff);
461 m_negdt13_slope[thisid.wheel() + 2][thisid.sector() - 1][st - 1]->Fill(slopediff);
470 if (!(
abs(thisid.wheel()) == 2 && (thisid.station() == 1 || thisid.station() == 2)))
475 if (!((thatid.station() == 1 && thatid.ring() == 3) || (thatid.station() == 2 && thatid.ring() == 2)))
490 if (thisid.station() == 1 && thatid.station() == 1) {
495 }
else if (thisid.station() == 1 && thatid.station() == 2) {
500 }
else if (thisid.station() == 2 && thatid.station() == 1) {
514 for (std::vector<DetId>::const_iterator otherId = chamberIds.begin(); otherId != chamberIds.end(); ++otherId) {
517 if (thisid.rawId() != thatid.rawId() && thisid.wheel() == thatid.wheel() &&
518 thisid.sector() == thatid.sector()) {
528 if (thatid.station() - thisid.station() == 1)
529 st = thisid.station();
531 m_dt2_resid[thisid.wheel() + 2][thisid.sector() - 1][st - 1]->Fill(qoverpt, residdiff);
532 m_dt2_slope[thisid.wheel() + 2][thisid.sector() - 1][st - 1]->Fill(qoverpt, slopediff);
534 m_posdt2_resid[thisid.wheel() + 2][thisid.sector() - 1][st - 1]->Fill(residdiff);
535 m_posdt2_slope[thisid.wheel() + 2][thisid.sector() - 1][st - 1]->Fill(slopediff);
537 m_negdt2_resid[thisid.wheel() + 2][thisid.sector() - 1][st - 1]->Fill(residdiff);
538 m_negdt2_slope[thisid.wheel() + 2][thisid.sector() - 1][st - 1]->Fill(slopediff);
552 CSCDetId thisid(chamberId->rawId());
553 for (std::vector<DetId>::const_iterator otherId = chamberIds.begin(); otherId != chamberIds.end(); ++otherId) {
556 if (thisid.rawId() != thatid.rawId() && thisid.endcap() == thatid.endcap()) {
565 int thischamber = thisid.chamber();
566 int thisring = thisid.ring();
567 if (thisid.station() == 1 && (thisring == 1 || thisring == 4)) {
568 thischamber = (thischamber - 1) / 2 + 1;
572 if (thisring == thatid.ring() && thischamber == thatid.chamber()) {
573 bool inner = (thisring == 1);
574 bool outer = (thisring == 2);
576 if (thatid.station() - thisid.station() == 1 && (
inner || thisid.station() < 3))
577 st = thisid.station();
579 if (
outer && st > 0) {
580 m_cscouter_resid[thisid.endcap() - 1][thischamber - 1][st - 1]->Fill(qoverpz, residdiff);
581 m_cscouter_slope[thisid.endcap() - 1][thischamber - 1][st - 1]->Fill(qoverpz, slopediff);
590 if (
inner && st > 0) {
591 m_cscinner_resid[thisid.endcap() - 1][thischamber - 1][st - 1]->Fill(qoverpz, residdiff);
592 m_cscinner_slope[thisid.endcap() - 1][thischamber - 1][st - 1]->Fill(qoverpz, slopediff);
615 "AlignmentMonitorSegmentDifferences");