40 for (
int ieta = LowerEta; ieta != UpperEta + 1; ++ieta) {
41 if (ieta == 0 && ecap ==
'E')
continue;
43 (ieta < 0) ? eta_s +=
"C" : ((ieta > 0) ? eta_s +=
"A" : eta_s +=
"B");
50 for (
int iphi = 1; iphi <= 16; iphi++) {
55 if (ecap ==
'B' && (iphi == 11 || iphi == 15)) {
56 h->Fill(eta_s,
"I," + phi_s +
",R", 0);
57 h->Fill(eta_s,
"I," + phi_s +
",M", 0);
58 h->Fill(eta_s,
"M," + phi_s, 0);
59 h->Fill(eta_s,
"O," + phi_s, 0);
61 h->Fill(eta_s,
"I," + phi_s, 0);
62 h->Fill(eta_s,
"M," + phi_s, 0);
63 h->Fill(eta_s,
"O," + phi_s, 0);
64 if (iphi % 2 == 0 && ecap ==
'B')
65 h->Fill(eta_s,
"E," + phi_s, 0);
67 h->Fill(eta_s,
"E," + phi_s, 0);
71 h->LabelsDeflate(
"X");
72 h->LabelsDeflate(
"Y");
73 h->LabelsOption(
"a",
"Y");
76 return StatusCode::SUCCESS;
83 if (xAxis.substr(0, 2) ==
"BO" || xAxis.substr(0, 2) ==
"BI") {
86 }
else if (xAxis.substr(0, 2) ==
"BM" || xAxis.substr(0, 2) ==
"EO") {
89 }
else if (xAxis.substr(0, 2) ==
"EM" || xAxis.substr(0, 2) ==
"EI") {
99 for (
int ieta = LowerEta; ieta != UpperEta + 1; ++ieta) {
100 if (xAxis.substr(2, 1) ==
"A" && ieta < 0)
continue;
101 if (xAxis.substr(2, 1) ==
"C" && ieta == 0)
break;
102 if (ieta == 0 && xAxis.substr(0, 2) ==
"BO")
107 eta_s = xAxis.substr(0, 3);
109 h->Fill(eta_s, 1, 0);
112 bool barrelExtra = (xAxis ==
"BEA" || xAxis ==
"BEC");
115 for (
int iphi = 1; iphi <= 16; iphi++) {
122 if (xAxis.substr(0, 2) ==
"BI" && (iphi == 11 || iphi == 15)) {
123 h->Fill(eta_s, phi_s +
",1,R", 0);
124 h->Fill(eta_s, phi_s +
",2,R", 0);
125 h->Fill(eta_s, phi_s +
",1,M", 0);
126 h->Fill(eta_s, phi_s +
",2,M", 0);
128 h->Fill(eta_s, phi_s +
",1", 0);
129 h->Fill(eta_s, phi_s +
",2", 0);
131 }
else if (iphi % 2 == 0)
132 h->Fill(eta_s, phi_s +
",1", 0);
135 h->LabelsDeflate(
"X");
136 h->LabelsDeflate(
"Y");
139 return StatusCode::SUCCESS;
144 TString phiString =
"";
149 TString phiString_ml1 = phiString +
",1";
150 TString phiString_ml2 = phiString +
",2";
152 TString phiString_ml1_BIR = phiString +
",1,R";
153 TString phiString_ml2_BIR = phiString +
",2,R";
154 nHits_In->
Fill(
"EIC5", phiString_ml1_BIR, 0.);
155 nHits_In->
Fill(
"EIC5", phiString_ml2_BIR, 0.);
156 TString phiString_ml1_BIM = phiString +
",1,M";
157 TString phiString_ml2_BIM = phiString +
",2,M";
158 nHits_In->
Fill(
"EIC5", phiString_ml1_BIM, 0.);
159 nHits_In->
Fill(
"EIC5", phiString_ml2_BIM, 0.);
161 nHits_In->
Fill(
"EIC5", phiString_ml1, 0.);
162 nHits_In->
Fill(
"EIC5", phiString_ml2, 0.);
164 nHits_Mid->
Fill(
"EMC5", phiString_ml1, 0.);
165 nHits_Mid->
Fill(
"EMC5", phiString_ml2, 0.);
166 nHits_Out->
Fill(
"EOC6", phiString_ml1, 0.);
167 nHits_Out->
Fill(
"EOC6", phiString_ml2, 0.);
175 nHits_In->
Fill(etaIn,
"01,1", 0);
176 nHits_Mid->
Fill(etaMid,
"01,1", 0);
178 nHits_Out->
Fill(etaOut,
"01,1", 0);
180 nHits_In->
Fill(
"",
"01,1", 0);
181 nHits_Mid->
Fill(
"",
"01,1", 0);
182 nHits_Out->
Fill(
"",
"01,1", 0);
192 nHits_In->
Fill(etaIn,
"01,1", 0);
193 }
else if (
iEta < 0) {
195 nHits_In->
Fill(etaIn,
"01,1", 0);
197 nHits_In->
Fill(
" ",
"01,1", 0);
208 }
else if (
iEta == 0) {
210 }
else if (
iEta < 9) {
216 nHits_In->
Fill(etaIn,
"01,1", 0);
217 nHits_Mid->
Fill(etaMid,
"01,1", 0);
218 nHits_Out->
Fill(etaOut,
"01,1", 0);
220 nHits_In->
Fill(
" ",
"01,1", 0);
221 nHits_Mid->
Fill(
" ",
"01,1", 0);
222 nHits_Out->
Fill(
" ",
"01,1", 0);
231 nHits_In->
Fill(etaIn,
"01,1", 0);
232 }
else if (
iEta < 5) {
234 nHits_In->
Fill(etaIn,
"01,1", 0);
236 nHits_In->
Fill(
" ",
"01,1", 0);
244 nHits_In->
Fill(etaIn,
"01,1", 0);
245 nHits_Mid->
Fill(etaMid,
"01,1", 0);
247 nHits_Out->
Fill(etaOut,
"01,1", 0);
250 nHits_In->LabelsDeflate(
"X");
251 nHits_In->LabelsDeflate(
"Y");
252 nHits_In->LabelsOption(
"v",
"x");
254 nHits_Mid->LabelsDeflate(
"X");
255 nHits_Mid->LabelsDeflate(
"Y");
256 nHits_Mid->LabelsOption(
"v",
"x");
258 nHits_Out->LabelsDeflate(
"X");
259 nHits_Out->LabelsDeflate(
"Y");
260 nHits_Out->LabelsOption(
"v",
"x");
263 return StatusCode::SUCCESS;
269 if (hardware_name.substr(0, 4) ==
"BMS4" || hardware_name.substr(0, 4) ==
"BMS6") {
272 if (hardware_name.substr(0, 3) ==
"BIR" &&
numLayers <= 3) {
273 if (hardware_name.substr(5, 2) ==
"11" || hardware_name.substr(5, 2) ==
"15") {
274 if (hardware_name.substr(3, 1) ==
"1") tubeNum = tubePos + 6 +
numLayers * 30;
275 if (hardware_name.substr(3, 1) ==
"2") tubeNum = tubePos +
numLayers * 30;
276 if (hardware_name.substr(3, 1) ==
"4") tubeNum = tubePos + 3 +
numLayers * 30;
277 if (hardware_name.substr(3, 1) ==
"5") tubeNum = tubePos +
numLayers * 24;
280 if (hardware_name.substr(0, 3) ==
"BIR" && hardware_name.substr(3, 1) ==
"3") tubeNum = tubePos +
numLayers * 36;
281 if (hardware_name ==
"EEL1A05" || hardware_name ==
"EEL1C05")
287 if (hardware_name ==
"EEL1A05" || hardware_name ==
"EEL1C05") numTubes = 48;
292 if (hardware_name ==
"EEL1A05" || hardware_name ==
"EEL1C05")
numLayers = 3;
361 return StatusCode::SUCCESS;
364 std::set<Identifier> noisyTubes =
m_masked_tubes->getNoiseList(idHash);
365 for (
auto digcoll_id : noisyTubes) {
366 int mdtlayer =
m_idHelperSvc->mdtIdHelper().tubeLayer(digcoll_id);
367 if (
m_idHelperSvc->mdtIdHelper().multilayer(digcoll_id) == 2) {
368 if (hardware_name.at(1) ==
'I' && hardware_name.at(3) !=
'8')
378 return StatusCode::SUCCESS;
387 std::vector<Identifier>::const_iterator idfirst =
m_idHelperSvc->mdtIdHelper().module_begin();
388 std::vector<Identifier>::const_iterator idlast =
m_idHelperSvc->mdtIdHelper().module_end();
393 for (std::vector<Identifier>::const_iterator
i = idfirst;
i != idlast; ++
i) {
395 int gethash_code =
m_idHelperSvc->mdtIdHelper().get_hash(Id, Idhash, &mdtModuleContext);
399 std::string extid =
m_idHelperSvc->mdtIdHelper().show_to_string(Id);
401 if (gethash_code == 0) {
412 int TotmezzTubes = 8;
414 int Imezz = (
int)((
m_idHelperSvc->mdtIdHelper().tube(digcoll_id) - 1) / TotmezzTubes) +
425 if (hardware_name.substr(0, 4) ==
"BIS8") {
427 }
else if (hardware_name.substr(0, 4) ==
"BIR5") {
430 }
else if (hardware_name.substr(0, 4) ==
"BIR2" || hardware_name.substr(0, 4) ==
"BIR4") {
433 }
else if (hardware_name.substr(0, 4) ==
"BIR3") {
435 }
else if (hardware_name.substr(0, 4) ==
"BIR1") {
438 }
else if (hardware_name.substr(0, 4) ==
"BMS4" || hardware_name.substr(0, 4) ==
"BMS6") {
441 }
else if (hardware_name ==
"EEL1A05" || hardware_name ==
"EEL1C05") {
443 }
else if (hardware_name.substr(0, 3) ==
"BME") {
446 int numtubes =
m_idHelperSvc->mdtIdHelper().tubeMax(digcoll_id);
447 int numlayers =
m_idHelperSvc->mdtIdHelper().tubeLayerMax(digcoll_id);
448 int numML =
m_idHelperSvc->mdtIdHelper().numberOfMultilayers(digcoll_id);
449 tubeMax = numtubes * numlayers * numML;
456 if (
i ==
A)
return true;
471 bool filterresult(
true);
474 for (; filterresult && (ifilter != filterend); ++ifilter) { filterresult = (filterresult && (*ifilter)->accept()); }
493 if (!
chamber)
return StatusCode::FAILURE;
495 return StatusCode::SUCCESS;
499 if (region == 0 || region == 1) {
503 if (
phi < 11 && !isBIM)
504 return 18 * (
eta - 1) +
phi;
505 else if ((
phi == 10 && isBIM) || (
phi < 15 && !isBIM))
506 return 18 * (
eta - 1) +
phi + 1;
508 return 18 * (
eta - 1) +
phi + 2;
512 return 106 + (
phi / 2);
514 return 114 + (
phi / 2);
517 else if (
layer == 1) {
522 return 16 * (
eta - 1) +
phi - 1;
524 return 16 * (
eta - 1) +
phi;
526 }
else if (
layer == 2 && region == 0) {
527 if (
eta == 0 &&
phi == 11)
529 else if (
eta == 0 &&
phi == 13)
532 return 16 * (
eta - 1) +
phi + 2;
533 else if (
eta == 7 &&
phi == 11)
535 else if (
eta == 7 &&
phi == 13)
537 else if (
eta == 8 &&
phi == 11)
539 else if (
eta == 8 &&
phi == 13)
541 }
else if (
layer == 3 && region == 0) {
542 return 102 + 8 * (
eta - 1) + (
phi - 1) / 2;
543 }
else if (
layer == 2 && region == 1) {
545 return 16 * (
eta - 1) +
phi;
546 else if (
eta == 7 &&
phi == 11)
548 else if (
eta == 7 &&
phi == 13)
550 else if (
eta == 8 &&
phi == 11)
552 else if (
eta == 8 &&
phi == 13)
554 }
else if (
layer == 3 && region == 1) {
555 return 100 + 8 * (
eta - 1) + (
phi - 1) / 2;
565 return 16 * (
eta - 1) +
phi - run3_offset;
567 return 32 +
phi / 2 - run3_offset;
569 return 40 +
phi / 2 - run3_offset;
571 return 48 +
phi / 8 - run3_offset;
573 }
else if (
layer == 1) {
574 return 16 * (
eta - 1) +
phi;
575 }
else if (
layer == 2) {
576 return 16 * (
eta - 1) +
phi;
577 }
else if (
layer == 3 && region == 2) {
578 if (
eta == 1 &&
phi == 2)
return 96;
579 if (
eta == 1 &&
phi == 4)
return 97;
580 if (
eta == 1 &&
phi == 10)
return 98;
581 if (
eta == 1 &&
phi == 12)
return 99;
582 if (
eta == 2 &&
phi == 2)
return 100;
583 if (
eta == 2 &&
phi == 10)
return 101;
584 if (
eta == 2 &&
phi == 12)
return 102;
585 }
else if (
layer == 3 && region == 3) {
587 return 80 + 16 *
eta +
phi;
589 return 79 + 16 *
eta +
phi;
597 if (region == 0 || region == 1) {
600 h->SetBins(834, 1, 2502, 122, 0, 122);
601 h->GetYaxis()->SetBinLabel(1,
"BI1");
602 h->GetYaxis()->SetBinLabel(19,
"BI2");
603 h->GetYaxis()->SetBinLabel(37,
"BI3");
604 h->GetYaxis()->SetBinLabel(55,
"BI4");
605 h->GetYaxis()->SetBinLabel(73,
"BI5");
606 h->GetYaxis()->SetBinLabel(91,
"BI6");
607 h->GetYaxis()->SetBinLabel(107,
"BI7");
608 h->GetYaxis()->SetBinLabel(115,
"BI8");
610 h->GetYaxis()->SetTickLength(0);
611 for (
int i = 0;
i < 6;
i++) {
612 TLine*
l =
new TLine(1, 18 *
i, 50, 18 *
i);
613 h->GetListOfFunctions()->Add(
l);
615 TLine*
l2 =
new TLine(1, 106, 50, 106);
616 h->GetListOfFunctions()->Add(
l2);
617 TLine* l3 =
new TLine(1, 114, 50, 114);
618 h->GetListOfFunctions()->Add(l3);
619 for (
int i = 1;
i < 122;
i++) {
620 if (
i < 90 && (
i % 18 == 11 ||
i % 18 == 16)) {
621 TLine*
l =
new TLine(1,
i, 10,
i);
622 h->GetListOfFunctions()->Add(
l);
624 TLine*
l =
new TLine(1,
i, 20,
i);
625 h->GetListOfFunctions()->Add(
l);
630 else if (
layer == 1) {
631 h->SetBins(834, 1, 2502, 95, 0, 95);
635 h->GetYaxis()->SetBinLabel(1,
"BM1");
636 h->GetYaxis()->SetBinLabel(17,
"BM2");
637 h->GetYaxis()->SetBinLabel(33,
"BM3");
638 h->GetYaxis()->SetBinLabel(49,
"BM4");
639 h->GetYaxis()->SetBinLabel(65,
"BM5");
640 h->GetYaxis()->SetBinLabel(81,
"BM6");
642 h->GetYaxis()->SetTickLength(0);
643 for (
int i = 1;
i < 95;
i++) {
644 TLine*
l =
new TLine(1,
i, 20,
i);
645 h->GetListOfFunctions()->Add(
l);
647 TLine*
l1 =
new TLine(1, 16, 50, 16);
648 h->GetListOfFunctions()->Add(
l1);
649 TLine*
l2 =
new TLine(1, 32, 50, 32);
650 h->GetListOfFunctions()->Add(
l2);
651 TLine* l3 =
new TLine(1, 48, 50, 48);
652 h->GetListOfFunctions()->Add(l3);
653 TLine* l4 =
new TLine(1, 64, 50, 64);
654 h->GetListOfFunctions()->Add(l4);
655 TLine* l5 =
new TLine(1, 80, 50, 80);
656 h->GetListOfFunctions()->Add(l5);
659 else if (
layer == 2 && region == 0) {
660 h->SetBins(834, 1, 2502, 118, 0, 118);
662 h->GetYaxis()->SetBinLabel(1,
"BO0");
663 h->GetYaxis()->SetBinLabel(4,
"BO1");
664 h->GetYaxis()->SetBinLabel(19,
"BO2");
665 h->GetYaxis()->SetBinLabel(35,
"BO3");
666 h->GetYaxis()->SetBinLabel(51,
"BO4");
667 h->GetYaxis()->SetBinLabel(67,
"BO5");
668 h->GetYaxis()->SetBinLabel(83,
"BO6");
669 h->GetYaxis()->SetBinLabel(99,
"BO7,8");
671 h->GetYaxis()->SetBinLabel(103,
"BE1");
672 h->GetYaxis()->SetBinLabel(111,
"BE2");
674 h->GetYaxis()->SetTickLength(0);
675 for (
int i = 1;
i < 118;
i++) {
676 TLine*
l =
new TLine(1,
i, 20,
i);
677 h->GetListOfFunctions()->Add(
l);
679 TLine*
l1 =
new TLine(1, 2, 50, 2);
680 h->GetListOfFunctions()->Add(
l1);
681 TLine*
l2 =
new TLine(1, 18, 50, 18);
682 h->GetListOfFunctions()->Add(
l2);
683 TLine* l3 =
new TLine(1, 34, 50, 34);
684 h->GetListOfFunctions()->Add(l3);
685 TLine* l4 =
new TLine(1, 50, 50, 50);
686 h->GetListOfFunctions()->Add(l4);
687 TLine* l5 =
new TLine(1, 66, 50, 66);
688 h->GetListOfFunctions()->Add(l5);
689 TLine* l6 =
new TLine(1, 82, 50, 82);
690 h->GetListOfFunctions()->Add(l6);
691 TLine* l7 =
new TLine(1, 98, 50, 98);
692 h->GetListOfFunctions()->Add(l7);
693 TLine* l8 =
new TLine(1, 100, 50, 100);
694 h->GetListOfFunctions()->Add(l8);
695 TLine* l9 =
new TLine(1, 102, 50, 102);
696 h->GetListOfFunctions()->Add(l9);
697 TLine* l10 =
new TLine(1, 110, 50, 110);
698 h->GetListOfFunctions()->Add(l10);
701 else if (
layer == 2 && region == 1) {
702 h->SetBins(834, 1, 2502, 116, 0, 116);
704 h->GetYaxis()->SetBinLabel(1,
"BO1");
705 h->GetYaxis()->SetBinLabel(17,
"BO2");
706 h->GetYaxis()->SetBinLabel(33,
"BO3");
707 h->GetYaxis()->SetBinLabel(49,
"BO4");
708 h->GetYaxis()->SetBinLabel(65,
"BO5");
709 h->GetYaxis()->SetBinLabel(81,
"BO6");
710 h->GetYaxis()->SetBinLabel(97,
"BO7,8");
712 h->GetYaxis()->SetBinLabel(101,
"BE1");
713 h->GetYaxis()->SetBinLabel(109,
"BE2");
715 h->GetYaxis()->SetTickLength(0);
716 for (
int i = 1;
i < 116;
i++) {
717 TLine*
l =
new TLine(1,
i, 20,
i);
718 h->GetListOfFunctions()->Add(
l);
720 TLine*
l1 =
new TLine(1, 16, 50, 16);
721 h->GetListOfFunctions()->Add(
l1);
722 TLine*
l2 =
new TLine(1, 32, 50, 32);
723 h->GetListOfFunctions()->Add(
l2);
724 TLine* l3 =
new TLine(1, 48, 50, 48);
725 h->GetListOfFunctions()->Add(l3);
726 TLine* l4 =
new TLine(1, 64, 50, 64);
727 h->GetListOfFunctions()->Add(l4);
728 TLine* l5 =
new TLine(1, 80, 50, 80);
729 h->GetListOfFunctions()->Add(l5);
730 TLine* l6 =
new TLine(1, 96, 50, 96);
731 h->GetListOfFunctions()->Add(l6);
732 TLine* l7 =
new TLine(1, 98, 50, 98);
733 h->GetListOfFunctions()->Add(l7);
734 TLine* l8 =
new TLine(1, 100, 50, 100);
735 h->GetListOfFunctions()->Add(l8);
736 TLine* l9 =
new TLine(1, 108, 50, 108);
737 h->GetListOfFunctions()->Add(l9);
743 h->SetBins(834, 1, 2502, 50, 0, 50);
745 h->GetYaxis()->SetBinLabel(1,
"EI1");
746 h->GetYaxis()->SetBinLabel(17,
"EI2");
747 h->GetYaxis()->SetBinLabel(33,
"EI3");
748 h->GetYaxis()->SetBinLabel(41,
"EI4");
749 h->GetYaxis()->SetBinLabel(49,
"EI5");
751 h->GetYaxis()->SetTickLength(0);
752 for (
int i = 1;
i < 50;
i++) {
753 TLine*
l =
new TLine(1,
i, 20,
i);
754 h->GetListOfFunctions()->Add(
l);
756 TLine*
l1 =
new TLine(1, 16, 50, 16);
757 h->GetListOfFunctions()->Add(
l1);
758 TLine*
l2 =
new TLine(1, 32, 50, 32);
759 h->GetListOfFunctions()->Add(
l2);
760 TLine* l3 =
new TLine(1, 40, 50, 40);
761 h->GetListOfFunctions()->Add(l3);
762 TLine* l4 =
new TLine(1, 48, 50, 48);
763 h->GetListOfFunctions()->Add(l4);
766 else if (
layer == 1) {
767 h->SetBins(834, 1, 2502, 80, 0, 80);
769 h->GetYaxis()->SetBinLabel(1,
"EM1");
770 h->GetYaxis()->SetBinLabel(17,
"EM2");
771 h->GetYaxis()->SetBinLabel(33,
"EM3");
772 h->GetYaxis()->SetBinLabel(49,
"EM4");
773 h->GetYaxis()->SetBinLabel(65,
"EM5");
775 h->GetYaxis()->SetTickLength(0);
776 for (
int i = 1;
i < 80;
i++) {
777 TLine*
l =
new TLine(1,
i, 20,
i);
778 h->GetListOfFunctions()->Add(
l);
780 TLine*
l1 =
new TLine(1, 16, 50, 16);
781 h->GetListOfFunctions()->Add(
l1);
782 TLine*
l2 =
new TLine(1, 32, 50, 32);
783 h->GetListOfFunctions()->Add(
l2);
784 TLine* l3 =
new TLine(1, 48, 50, 48);
785 h->GetListOfFunctions()->Add(l3);
786 TLine* l4 =
new TLine(1, 64, 50, 64);
787 h->GetListOfFunctions()->Add(l4);
790 else if (
layer == 2) {
793 h->SetBins(834, 1, 2502, 103, 0, 103);
795 h->GetYaxis()->SetBinLabel(1,
"EO1");
796 h->GetYaxis()->SetBinLabel(17,
"EO2");
797 h->GetYaxis()->SetBinLabel(33,
"EO3");
798 h->GetYaxis()->SetBinLabel(49,
"EO4");
799 h->GetYaxis()->SetBinLabel(65,
"EO5");
800 h->GetYaxis()->SetBinLabel(81,
"EO6");
801 h->GetYaxis()->SetBinLabel(97,
"EE1,2");
803 h->GetYaxis()->SetTickLength(0);
804 for (
int i = 1;
i < 103;
i++) {
805 TLine*
l =
new TLine(1,
i, 20,
i);
806 h->GetListOfFunctions()->Add(
l);
808 TLine*
l1 =
new TLine(1, 16, 50, 16);
809 h->GetListOfFunctions()->Add(
l1);
810 TLine*
l2 =
new TLine(1, 32, 50, 32);
811 h->GetListOfFunctions()->Add(
l2);
812 TLine* l3 =
new TLine(1, 48, 50, 48);
813 h->GetListOfFunctions()->Add(l3);
814 TLine* l4 =
new TLine(1, 64, 50, 64);
815 h->GetListOfFunctions()->Add(l4);
816 TLine* l5 =
new TLine(1, 80, 50, 80);
817 h->GetListOfFunctions()->Add(l5);
818 TLine* l6 =
new TLine(1, 96, 50, 96);
819 h->GetListOfFunctions()->Add(l6);
820 TLine* l7 =
new TLine(1, 100, 50, 100);
821 h->GetListOfFunctions()->Add(l7);
822 }
else if (region == 3) {
823 h->SetBins(834, 1, 2502, 127, 0, 127);
825 h->GetYaxis()->SetBinLabel(1,
"EO1");
826 h->GetYaxis()->SetBinLabel(17,
"EO2");
827 h->GetYaxis()->SetBinLabel(33,
"EO3");
828 h->GetYaxis()->SetBinLabel(49,
"EO4");
829 h->GetYaxis()->SetBinLabel(65,
"EO5");
830 h->GetYaxis()->SetBinLabel(81,
"EO6");
831 h->GetYaxis()->SetBinLabel(97,
"EE1");
832 h->GetYaxis()->SetBinLabel(113,
"EE2");
834 h->GetYaxis()->SetTickLength(0);
835 for (
int i = 1;
i < 127;
i++) {
836 TLine*
l =
new TLine(1,
i, 20,
i);
837 h->GetListOfFunctions()->Add(
l);
839 TLine*
l1 =
new TLine(1, 16, 50, 16);
840 h->GetListOfFunctions()->Add(
l1);
841 TLine*
l2 =
new TLine(1, 32, 50, 32);
842 h->GetListOfFunctions()->Add(
l2);
843 TLine* l3 =
new TLine(1, 48, 50, 48);
844 h->GetListOfFunctions()->Add(l3);
845 TLine* l4 =
new TLine(1, 64, 50, 64);
846 h->GetListOfFunctions()->Add(l4);
847 TLine* l5 =
new TLine(1, 80, 50, 80);
848 h->GetListOfFunctions()->Add(l5);
849 TLine* l6 =
new TLine(1, 96, 50, 96);
850 h->GetListOfFunctions()->Add(l6);
851 TLine* l7 =
new TLine(1, 112, 50, 112);
852 h->GetListOfFunctions()->Add(l7);
857 return StatusCode::SUCCESS;
861 if (region == 0 || region == 1) {
864 h->SetBins(834, 1, 2502, 73, 0, 73);
865 h->GetYaxis()->SetBinLabel(1,
"BIL");
866 h->GetYaxis()->SetBinLabel(13,
"BIS");
867 h->GetYaxis()->SetBinLabel(25,
"BME");
868 h->GetYaxis()->SetBinLabel(26,
"BML");
869 h->GetYaxis()->SetBinLabel(38,
"BMS");
870 h->GetYaxis()->SetBinLabel(50,
"BOL");
871 h->GetYaxis()->SetBinLabel(62,
"BOS");
873 h->GetYaxis()->SetTickLength(0);
874 for (
int i = 0;
i < 73;
i++) {
875 TLine*
l =
new TLine(1,
i, 20,
i);
876 h->GetListOfFunctions()->Add(
l);
878 TLine*
l2 =
new TLine(1, 0, 50, 0);
879 h->GetListOfFunctions()->Add(
l2);
880 TLine* l3 =
new TLine(1, 12, 50, 12);
881 h->GetListOfFunctions()->Add(l3);
882 TLine* l4 =
new TLine(1, 24, 50, 24);
883 h->GetListOfFunctions()->Add(l4);
884 TLine* l5 =
new TLine(1, 25, 50, 25);
885 h->GetListOfFunctions()->Add(l5);
886 TLine* l6 =
new TLine(1, 37, 50, 37);
887 h->GetListOfFunctions()->Add(l6);
888 TLine* l8 =
new TLine(1, 49, 50, 49);
889 h->GetListOfFunctions()->Add(l8);
890 TLine* l9 =
new TLine(1, 61, 50, 61);
891 h->GetListOfFunctions()->Add(l9);
894 else if (crate == 1) {
895 h->SetBins(834, 1, 2502, 73, 0, 73);
897 h->GetYaxis()->SetBinLabel(1,
"BIL");
898 h->GetYaxis()->SetBinLabel(13,
"BIS");
899 h->GetYaxis()->SetBinLabel(25,
"BME");
900 h->GetYaxis()->SetBinLabel(37,
"BMS");
901 h->GetYaxis()->SetBinLabel(49,
"BOL");
902 h->GetYaxis()->SetBinLabel(61,
"BOS");
904 h->GetYaxis()->SetTickLength(0);
905 for (
int i = 1;
i < 73;
i++) {
906 TLine*
l =
new TLine(1,
i, 20,
i);
907 h->GetListOfFunctions()->Add(
l);
909 TLine*
l1 =
new TLine(1, 12, 50, 12);
910 h->GetListOfFunctions()->Add(
l1);
911 TLine*
l2 =
new TLine(1, 24, 50, 24);
912 h->GetListOfFunctions()->Add(
l2);
913 TLine* l3 =
new TLine(1, 36, 50, 36);
914 h->GetListOfFunctions()->Add(l3);
915 TLine* l4 =
new TLine(1, 48, 50, 48);
916 h->GetListOfFunctions()->Add(l4);
917 TLine* l6 =
new TLine(1, 60, 50, 60);
918 h->GetListOfFunctions()->Add(l6);
920 }
else if (crate == 2) {
922 h->SetBins(834, 1, 2502, 80, 0, 80);
923 h->GetYaxis()->SetBinLabel(1,
"BIL");
924 h->GetYaxis()->SetBinLabel(7,
"BIM");
925 h->GetYaxis()->SetBinLabel(12,
"BIR");
926 h->GetYaxis()->SetBinLabel(18,
"BIS");
927 h->GetYaxis()->SetBinLabel(30,
"BMF");
928 h->GetYaxis()->SetBinLabel(33,
"BMG");
929 h->GetYaxis()->SetBinLabel(36,
"BML");
930 h->GetYaxis()->SetBinLabel(48,
"BMS");
931 h->GetYaxis()->SetBinLabel(54,
"BOF");
932 h->GetYaxis()->SetBinLabel(58,
"BOG");
934 h->GetYaxis()->SetBinLabel(63,
"BOL");
935 h->GetYaxis()->SetBinLabel(75,
"BOS");
936 }
else if (region == 1) {
937 h->GetYaxis()->SetBinLabel(62,
"BOL");
938 h->GetYaxis()->SetBinLabel(74,
"BOS");
941 h->GetYaxis()->SetTickLength(0);
942 for (
int i = 0;
i < 80;
i++) {
943 TLine*
l =
new TLine(1,
i, 20,
i);
944 h->GetListOfFunctions()->Add(
l);
946 TLine*
l2 =
new TLine(1, 6, 50, 6);
947 h->GetListOfFunctions()->Add(
l2);
948 TLine* l3 =
new TLine(1, 11, 50, 11);
949 h->GetListOfFunctions()->Add(l3);
950 TLine* l3b =
new TLine(1, 17, 50, 17);
951 h->GetListOfFunctions()->Add(l3b);
954 TLine* l5 =
new TLine(1, 29, 50, 29);
955 h->GetListOfFunctions()->Add(l5);
956 TLine* l6 =
new TLine(1, 32, 50, 32);
957 h->GetListOfFunctions()->Add(l6);
958 TLine* l7 =
new TLine(1, 35, 50, 35);
959 h->GetListOfFunctions()->Add(l7);
960 TLine* l8 =
new TLine(1, 47, 50, 47);
961 h->GetListOfFunctions()->Add(l8);
962 TLine* l9 =
new TLine(1, 53, 50, 53);
963 h->GetListOfFunctions()->Add(l9);
964 TLine* l9b =
new TLine(1, 57, 50, 57);
965 h->GetListOfFunctions()->Add(l9b);
967 TLine* l10 =
new TLine(1, 62, 50, 62);
968 h->GetListOfFunctions()->Add(l10);
969 TLine* l11 =
new TLine(1, 74, 50, 74);
970 h->GetListOfFunctions()->Add(l11);
971 }
else if (region == 1) {
972 TLine* l10 =
new TLine(1, 61, 50, 61);
973 h->GetListOfFunctions()->Add(l10);
974 TLine* l11 =
new TLine(1, 73, 50, 73);
975 h->GetListOfFunctions()->Add(l11);
979 else if (crate == 3) {
981 h->SetBins(834, 1, 2502, 79, 0, 79);
982 h->GetYaxis()->SetBinLabel(1,
"BIL");
983 h->GetYaxis()->SetBinLabel(7,
"BIM");
984 h->GetYaxis()->SetBinLabel(12,
"BIR");
985 h->GetYaxis()->SetBinLabel(18,
"BIS");
986 h->GetYaxis()->SetBinLabel(30,
"BMF");
987 h->GetYaxis()->SetBinLabel(33,
"BMG");
988 h->GetYaxis()->SetBinLabel(36,
"BML");
989 h->GetYaxis()->SetBinLabel(47,
"BMS");
990 h->GetYaxis()->SetBinLabel(53,
"BOF");
991 h->GetYaxis()->SetBinLabel(57,
"BOG");
993 h->GetYaxis()->SetBinLabel(62,
"BOL");
994 h->GetYaxis()->SetBinLabel(75,
"BOS");
995 }
else if (region == 1) {
996 h->GetYaxis()->SetBinLabel(61,
"BOL");
997 h->GetYaxis()->SetBinLabel(74,
"BOS");
1001 h->GetYaxis()->SetTickLength(0);
1002 for (
int i = 0;
i < 79;
i++) {
1003 TLine*
l =
new TLine(1,
i, 20,
i);
1004 h->GetListOfFunctions()->Add(
l);
1006 TLine*
l2 =
new TLine(1, 6, 50, 6);
1007 h->GetListOfFunctions()->Add(
l2);
1008 TLine* l3 =
new TLine(1, 11, 50, 11);
1009 h->GetListOfFunctions()->Add(l3);
1010 TLine* l3b =
new TLine(1, 17, 50, 17);
1011 h->GetListOfFunctions()->Add(l3b);
1014 TLine* l5 =
new TLine(1, 29, 50, 29);
1015 h->GetListOfFunctions()->Add(l5);
1016 TLine* l6 =
new TLine(1, 32, 50, 32);
1017 h->GetListOfFunctions()->Add(l6);
1018 TLine* l7 =
new TLine(1, 35, 50, 35);
1019 h->GetListOfFunctions()->Add(l7);
1020 TLine* l8 =
new TLine(1, 46, 50, 46);
1021 h->GetListOfFunctions()->Add(l8);
1022 TLine* l9 =
new TLine(1, 52, 50, 52);
1023 h->GetListOfFunctions()->Add(l9);
1024 TLine* l9b =
new TLine(1, 56, 50, 56);
1025 h->GetListOfFunctions()->Add(l9b);
1027 TLine* l10 =
new TLine(1, 61, 50, 61);
1028 h->GetListOfFunctions()->Add(l10);
1029 TLine* l11 =
new TLine(1, 74, 50, 74);
1030 h->GetListOfFunctions()->Add(l11);
1031 }
else if (region == 1) {
1032 TLine* l10 =
new TLine(1, 60, 50, 60);
1033 h->GetListOfFunctions()->Add(l10);
1034 TLine* l11 =
new TLine(1, 73, 50, 73);
1035 h->GetListOfFunctions()->Add(l11);
1041 if (crate == 0 || crate == 2) {
1042 h->SetBins(834, 1, 2502, 73, 0, 73);
1044 h->GetYaxis()->SetBinLabel(1,
"BEE");
1045 h->GetYaxis()->SetBinLabel(5,
"BIS");
1046 h->GetYaxis()->SetBinLabel(9,
"EEL");
1047 h->GetYaxis()->SetBinLabel(13,
"EES");
1048 h->GetYaxis()->SetBinLabel(17,
"EIL");
1049 h->GetYaxis()->SetBinLabel(26,
"EIS");
1050 h->GetYaxis()->SetBinLabel(30,
"EML");
1051 h->GetYaxis()->SetBinLabel(40,
"EMS");
1052 h->GetYaxis()->SetBinLabel(50,
"EOL");
1053 h->GetYaxis()->SetBinLabel(62,
"EOS");
1055 h->GetYaxis()->SetTickLength(0);
1056 for (
int i = 1;
i < 73;
i++) {
1057 TLine*
l =
new TLine(1,
i, 20,
i);
1058 h->GetListOfFunctions()->Add(
l);
1060 TLine*
l2 =
new TLine(1, 4, 50, 4);
1061 h->GetListOfFunctions()->Add(
l2);
1062 TLine* l3 =
new TLine(1, 8, 50, 8);
1063 h->GetListOfFunctions()->Add(l3);
1064 TLine* l4 =
new TLine(1, 12, 50, 12);
1065 h->GetListOfFunctions()->Add(l4);
1066 TLine* l5 =
new TLine(1, 16, 50, 16);
1067 h->GetListOfFunctions()->Add(l5);
1068 TLine* l6 =
new TLine(1, 25, 50, 25);
1069 h->GetListOfFunctions()->Add(l6);
1070 TLine* l7 =
new TLine(1, 29, 50, 29);
1071 h->GetListOfFunctions()->Add(l7);
1072 TLine* l8 =
new TLine(1, 39, 50, 39);
1073 h->GetListOfFunctions()->Add(l8);
1074 TLine* l9 =
new TLine(1, 49, 50, 49);
1075 h->GetListOfFunctions()->Add(l9);
1076 TLine* l10 =
new TLine(1, 61, 50, 61);
1077 h->GetListOfFunctions()->Add(l10);
1078 }
else if (crate == 1) {
1079 h->SetBins(834, 1, 2502, 71, 0, 71);
1081 h->GetYaxis()->SetBinLabel(1,
"BEE");
1082 h->GetYaxis()->SetBinLabel(5,
"BIS");
1083 h->GetYaxis()->SetBinLabel(9,
"EEL");
1084 h->GetYaxis()->SetBinLabel(12,
"EES");
1085 h->GetYaxis()->SetBinLabel(16,
"EIL");
1086 h->GetYaxis()->SetBinLabel(24,
"EIS");
1087 h->GetYaxis()->SetBinLabel(28,
"EML");
1088 h->GetYaxis()->SetBinLabel(38,
"EMS");
1089 h->GetYaxis()->SetBinLabel(48,
"EOL");
1090 h->GetYaxis()->SetBinLabel(60,
"EOS");
1092 h->GetYaxis()->SetTickLength(0);
1093 for (
int i = 1;
i < 71;
i++) {
1094 TLine*
l =
new TLine(1,
i, 20,
i);
1095 h->GetListOfFunctions()->Add(
l);
1097 TLine*
l2 =
new TLine(1, 4, 50, 4);
1098 h->GetListOfFunctions()->Add(
l2);
1099 TLine* l3 =
new TLine(1, 8, 50, 8);
1100 h->GetListOfFunctions()->Add(l3);
1101 TLine* l4 =
new TLine(1, 11, 50, 11);
1102 h->GetListOfFunctions()->Add(l4);
1103 TLine* l5 =
new TLine(1, 15, 50, 15);
1104 h->GetListOfFunctions()->Add(l5);
1105 TLine* l6 =
new TLine(1, 23, 50, 23);
1106 h->GetListOfFunctions()->Add(l6);
1107 TLine* l7 =
new TLine(1, 27, 50, 27);
1108 h->GetListOfFunctions()->Add(l7);
1109 TLine* l8 =
new TLine(1, 37, 50, 37);
1110 h->GetListOfFunctions()->Add(l8);
1111 TLine* l9 =
new TLine(1, 47, 50, 47);
1112 h->GetListOfFunctions()->Add(l9);
1113 TLine* l10 =
new TLine(1, 59, 50, 59);
1114 h->GetListOfFunctions()->Add(l10);
1115 }
else if (crate == 3) {
1116 h->SetBins(834, 1, 2502, 72, 0, 72);
1118 h->GetYaxis()->SetBinLabel(1,
"BEE");
1119 h->GetYaxis()->SetBinLabel(5,
"BIS");
1120 h->GetYaxis()->SetBinLabel(9,
"EEL");
1121 h->GetYaxis()->SetBinLabel(13,
"EES");
1122 h->GetYaxis()->SetBinLabel(17,
"EIL");
1123 h->GetYaxis()->SetBinLabel(25,
"EIS");
1124 h->GetYaxis()->SetBinLabel(29,
"EML");
1125 h->GetYaxis()->SetBinLabel(39,
"EMS");
1126 h->GetYaxis()->SetBinLabel(49,
"EOL");
1127 h->GetYaxis()->SetBinLabel(61,
"EOS");
1129 h->GetYaxis()->SetTickLength(0);
1130 for (
int i = 1;
i < 72;
i++) {
1131 TLine*
l =
new TLine(1,
i, 20,
i);
1132 h->GetListOfFunctions()->Add(
l);
1134 TLine*
l2 =
new TLine(1, 4, 50, 4);
1135 h->GetListOfFunctions()->Add(
l2);
1136 TLine* l3 =
new TLine(1, 8, 50, 8);
1137 h->GetListOfFunctions()->Add(l3);
1138 TLine* l4 =
new TLine(1, 12, 50, 12);
1139 h->GetListOfFunctions()->Add(l4);
1140 TLine* l5 =
new TLine(1, 16, 50, 16);
1141 h->GetListOfFunctions()->Add(l5);
1142 TLine* l6 =
new TLine(1, 24, 50, 24);
1143 h->GetListOfFunctions()->Add(l6);
1144 TLine* l7 =
new TLine(1, 28, 50, 28);
1145 h->GetListOfFunctions()->Add(l7);
1146 TLine* l8 =
new TLine(1, 38, 50, 38);
1147 h->GetListOfFunctions()->Add(l8);
1148 TLine* l9 =
new TLine(1, 48, 50, 48);
1149 h->GetListOfFunctions()->Add(l9);
1150 TLine* l10 =
new TLine(1, 60, 50, 60);
1151 h->GetListOfFunctions()->Add(l10);
1155 return StatusCode::SUCCESS;
1160 std::string_view stName =
chamber.substr(0, 3);
1161 if (region == 0 || region == 1) {
1163 if (stName ==
"BIL")
1164 binNum = 2 *
eta + (
phi - 1) / 2 - 1;
1165 else if (stName ==
"BIS")
1166 binNum = 12 + 2 *
eta + (
phi - 2) / 2 - 1;
1167 else if (stName ==
"BME")
1169 else if (stName ==
"BML")
1170 binNum = 25 + 2 *
eta + (
phi - 1) / 2 - 1;
1171 else if (stName ==
"BMS")
1172 binNum = 37 + 2 *
eta + (
phi - 2) / 2 - 1;
1173 else if (stName ==
"BOL")
1174 binNum = 49 + 2 *
eta + (
phi - 1) / 2 - 1;
1175 else if (stName ==
"BOS")
1176 binNum = 61 + 2 *
eta + (
phi - 2) / 2 - 1;
1180 }
else if (crate == 2) {
1182 if (stName ==
"BIL")
1183 binNum = 2 *
eta + (
phi - 5) / 2 - 1;
1184 else if (stName ==
"BIS")
1185 binNum = 12 + 2 *
eta + (
phi - 6) / 2 - 1;
1186 else if (stName ==
"BML")
1187 binNum = 24 + 2 *
eta + (
phi - 5) / 2 - 1;
1188 else if (stName ==
"BMS")
1189 binNum = 36 + 2 *
eta + (
phi - 6) / 2 - 1;
1190 else if (stName ==
"BOL")
1191 binNum = 48 + 2 *
eta + (
phi - 5) / 2 - 1;
1192 else if (stName ==
"BOS")
1193 binNum = 60 + 2 *
eta + (
phi - 6) / 2 - 1;
1197 }
else if (crate == 3) {
1198 if (stName ==
"BIL")
1200 else if (stName ==
"BIM")
1202 else if (stName ==
"BIR")
1204 else if (stName ==
"BIS")
1205 binNum = 17 + 2 *
eta + (
phi - 10) / 2 - 1;
1206 else if (stName ==
"BMF")
1207 binNum = 29 + (
eta + 1) / 2;
1208 else if (stName ==
"BMG")
1209 binNum = 32 +
eta / 2;
1210 else if (stName ==
"BML")
1211 binNum = 35 + 2 *
eta + (
phi - 9) / 2 - 1;
1212 else if (stName ==
"BMS")
1214 else if (stName ==
"BOF")
1215 binNum = 53 + (
eta + 1) / 2;
1216 else if (
chamber.substr(0, 4) ==
"BOG0" && region == 0)
1218 else if (stName ==
"BOG")
1219 binNum = 58 +
eta / 2 - region;
1220 else if (stName ==
"BOL")
1221 binNum = 62 + 2 *
eta + (
phi - 9) / 2 - 1 - region;
1222 else if (stName ==
"BOS")
1223 binNum = 74 +
eta - region;
1227 }
else if (crate == 4) {
1229 if (stName ==
"BIL")
1231 else if (stName ==
"BIM")
1233 else if (stName ==
"BIR")
1235 else if (stName ==
"BIS")
1236 binNum = 17 + 2 *
eta + (
phi - 14) / 2 - 1;
1237 else if (stName ==
"BMF")
1238 binNum = 29 + (
eta + 1) / 2;
1239 else if (stName ==
"BMG")
1240 binNum = 32 +
eta / 2;
1241 else if (stName ==
"BML" &&
eta < 6)
1242 binNum = 35 + 2 *
eta + (
phi - 13) / 2 - 1;
1243 else if (
chamber.substr(0, 7) ==
"BML6A15" ||
chamber.substr(0, 7) ==
"BML6C15")
1245 else if (stName ==
"BMS")
1247 else if (stName ==
"BOF")
1248 binNum = 52 + (
eta + 1) / 2;
1249 else if (
chamber.substr(0, 4) ==
"BOG0" && region == 0)
1251 else if (stName ==
"BOG")
1252 binNum = 57 +
eta / 2 - region;
1253 else if (stName ==
"BOL")
1254 binNum = 61 + 2 *
eta + (
phi - 13) / 2 - 1 - region;
1255 else if (stName ==
"BOS")
1256 binNum = 74 +
eta - region;
1261 }
else if (region == 2 || region == 3) {
1263 if (stName ==
"BEE")
1264 binNum = 2 *
eta + (
phi - 2) / 2 - 1;
1265 else if (stName ==
"BIS")
1266 binNum = 4 + 2 * (
eta - 6) + (
phi - 2) / 2 - 1;
1267 else if (stName ==
"EEL")
1268 binNum = 8 + 2 *
eta + (
phi - 1) / 2 - 1;
1269 else if (stName ==
"EES")
1270 binNum = 12 + 2 *
eta + (
phi - 2) / 2 - 1;
1271 else if (stName ==
"EIL" &&
eta < 5)
1272 binNum = 16 + 2 *
eta + (
phi - 1) / 2 - 1;
1273 else if (stName ==
"EIL" &&
eta == 5)
1275 else if (stName ==
"EIS")
1276 binNum = 25 + 2 *
eta + (
phi - 2) / 2 - 1;
1277 else if (stName ==
"EML")
1278 binNum = 29 + 2 *
eta + (
phi - 1) / 2 - 1;
1279 else if (stName ==
"EMS")
1280 binNum = 39 + 2 *
eta + (
phi - 2) / 2 - 1;
1281 else if (stName ==
"EOL")
1282 binNum = 49 + 2 *
eta + (
phi - 1) / 2 - 1;
1283 else if (stName ==
"EOS")
1284 binNum = 61 + 2 *
eta + (
phi - 2) / 2 - 1;
1289 if (binNum > 8 && binNum < 23)
1290 binNum = binNum - 2;
1291 else if (binNum > 22 && binNum < 30)
1292 binNum = binNum - 8;
1293 else if (binNum > 29)
1294 binNum = binNum - 12;
1295 }
else if (region == 3) {
1296 if (binNum > 22 && binNum < 30)
1297 binNum = binNum - 6;
1298 else if (binNum > 29)
1299 binNum = binNum - 10;
1303 }
else if (crate == 2) {
1304 if (stName ==
"BEE")
1305 binNum = 2 *
eta + (
phi - 6) / 2 - 1;
1306 else if (stName ==
"BIS")
1307 binNum = 4 + 2 * (
eta - 6) + (
phi - 6) / 2 - 1;
1308 else if (
chamber.substr(0, 4) ==
"EEL1")
1309 binNum = 9 + (
phi - 3) / 2 - 1;
1310 else if (
chamber.substr(0, 4) ==
"EEL2")
1312 else if (stName ==
"EES")
1313 binNum = 11 + 2 *
eta + (
phi - 6) / 2 - 1;
1314 else if (stName ==
"EIL")
1315 binNum = 15 + 2 *
eta + (
phi - 5) / 2 - 1;
1316 else if (stName ==
"EIS")
1317 binNum = 23 + 2 *
eta + (
phi - 6) / 2 - 1;
1318 else if (stName ==
"EML")
1319 binNum = 27 + 2 *
eta + (
phi - 5) / 2 - 1;
1320 else if (stName ==
"EMS")
1321 binNum = 37 + 2 *
eta + (
phi - 6) / 2 - 1;
1322 else if (stName ==
"EOL")
1323 binNum = 47 + 2 *
eta + (
phi - 5) / 2 - 1;
1324 else if (stName ==
"EOS")
1325 binNum = 59 + 2 *
eta + (
phi - 6) / 2 - 1;
1330 if (binNum > 8 && binNum < 22)
1331 binNum = binNum - 2;
1332 else if (binNum > 21 && binNum < 28)
1333 binNum = binNum - 8;
1334 else if (binNum > 27)
1335 binNum = binNum - 12;
1336 }
else if (region == 3) {
1337 if (binNum > 21 && binNum < 28)
1338 binNum = binNum - 6;
1339 else if (binNum > 27)
1340 binNum = binNum - 10;
1344 }
else if (crate == 3) {
1346 if (stName ==
"BEE")
1347 binNum = 2 *
eta + (
phi - 10) / 2 - 1;
1348 else if (stName ==
"BIS")
1349 binNum = 4 + 2 * (
eta - 6) + (
phi - 10) / 2 - 1;
1350 else if (stName ==
"EEL")
1351 binNum = 8 + 2 *
eta + (
phi - 9) / 2 - 1;
1352 else if (stName ==
"EES")
1353 binNum = 12 + 2 *
eta + (
phi - 10) / 2 - 1;
1354 else if (stName ==
"EIL" &&
eta < 5)
1355 binNum = 16 + 2 *
eta + (
phi - 9) / 2 - 1;
1356 else if (
chamber.substr(0, 4) ==
"EIL5")
1358 else if (stName ==
"EIS")
1359 binNum = 25 + 2 *
eta + (
phi - 10) / 2 - 1;
1360 else if (stName ==
"EML")
1361 binNum = 29 + 2 *
eta + (
phi - 9) / 2 - 1;
1362 else if (stName ==
"EMS")
1363 binNum = 39 + 2 *
eta + (
phi - 10) / 2 - 1;
1364 else if (stName ==
"EOL")
1365 binNum = 49 + 2 *
eta + (
phi - 9) / 2 - 1;
1366 else if (stName ==
"EOS")
1367 binNum = 61 + 2 *
eta + (
phi - 10) / 2 - 1;
1372 if (binNum > 8 && binNum < 23)
1373 binNum = binNum - 2;
1374 else if (binNum > 22 && binNum < 30)
1375 binNum = binNum - 8;
1376 else if (binNum > 29)
1377 binNum = binNum - 12;
1380 if (binNum > 22 && binNum < 30)
1381 binNum = binNum - 6;
1382 else if (binNum > 29)
1383 binNum = binNum - 10;
1387 }
else if (crate == 4) {
1388 if (stName ==
"BEE")
1389 binNum = 2 *
eta + (
phi - 14) / 2 - 1;
1390 else if (stName ==
"BIS")
1391 binNum = 4 + 2 * (
eta - 6) + (
phi - 14) / 2 - 1;
1392 else if (stName ==
"EEL")
1393 binNum = 8 + 2 *
eta + (
phi - 13) / 2 - 1;
1394 else if (stName ==
"EES")
1395 binNum = 12 + 2 *
eta + (
phi - 14) / 2 - 1;
1396 else if (stName ==
"EIL")
1397 binNum = 16 + 2 *
eta + (
phi - 13) / 2 - 1;
1398 else if (stName ==
"EIS")
1399 binNum = 24 + 2 *
eta + (
phi - 14) / 2 - 1;
1400 else if (stName ==
"EML")
1401 binNum = 28 + 2 *
eta + (
phi - 13) / 2 - 1;
1402 else if (stName ==
"EMS")
1403 binNum = 38 + 2 *
eta + (
phi - 14) / 2 - 1;
1404 else if (stName ==
"EOL")
1405 binNum = 48 + 2 *
eta + (
phi - 13) / 2 - 1;
1406 else if (stName ==
"EOS")
1407 binNum = 60 + 2 *
eta + (
phi - 14) / 2 - 1;
1412 if (binNum > 8 && binNum < 23)
1413 binNum = binNum - 2;
1414 else if (binNum > 22 && binNum < 29)
1415 binNum = binNum - 8;
1416 else if (binNum > 28)
1417 binNum = binNum - 12;
1420 if (binNum > 22 && binNum < 28)
1421 binNum = binNum - 6;
1422 else if (binNum > 28)
1423 binNum = binNum - 10;