62 wds_token = consumes<CSCWireDigiCollection>(
edm::InputTag(
"simMuonCSCDigis",
"MuonCSCWireDigi"));
63 sds_token = consumes<CSCStripDigiCollection>(
edm::InputTag(
"simMuonCSCDigis",
"MuonCSCStripDigi"));
64 wdr_token = consumes<CSCWireDigiCollection>(
edm::InputTag(
"muonCSCDigis",
"MuonCSCWireDigi"));
65 sdr_token = consumes<CSCStripDigiCollection>(
edm::InputTag(
"muonCSCDigis",
"MuonCSCStripDigi"));
67 rh_token = consumes<CSCRecHit2DCollection>(
pset.getParameter<
InputTag>(
"cscRecHitTag"));
68 seg_token = consumes<CSCSegmentCollection>(
pset.getParameter<
InputTag>(
"cscSegmentTag"));
70 sam_token = consumes<reco::TrackCollection>(
pset.getParameter<
InputTag>(
"SAMuonTag"));
71 trk_token = consumes<reco::TrackCollection>(
pset.getParameter<
InputTag>(
"trackTag"));
72 glm_token = consumes<reco::MuonCollection>(
pset.getParameter<
InputTag>(
"GLBMuonTag"));
83 makeHistogramsForMessyEvents =
pset.getUntrackedParameter<
bool>(
"makeHistogramsForMessyEvebts",
false);
90 pMin =
pset.getUntrackedParameter<
double>(
"pMin", 3.);
91 zLengthMin =
pset.getUntrackedParameter<
double>(
"zLengthMin", 200.);
92 nCSCHitsMin =
pset.getUntrackedParameter<
int>(
"nCSCHitsMin", 9);
93 zInnerMax =
pset.getUntrackedParameter<
double>(
"zInnerMax", 9000.);
94 nTrHitsMin =
pset.getUntrackedParameter<
int>(
"nTrHitsMin", 8);
95 zLengthTrMin =
pset.getUntrackedParameter<
double>(
"zLengthTrMin", 180.);
96 rExtMax =
pset.getUntrackedParameter<
double>(
"rExtMax", 3000.);
97 redChiSqMax =
pset.getUntrackedParameter<
double>(
"redChiSqMax", 20.);
98 nValidHitsMin =
pset.getUntrackedParameter<
int>(
"nValidHitsMin", 8);
100 LogInfo(
"[CSCSkim] Setup") <<
"\n\t===== CSCSkim =====\n"
101 <<
"\t\ttype of skim ...............................\t" <<
typeOfSkim
104 <<
"\n\t\tminimum number of segments ...............\t" <<
minimumSegments
106 <<
"\n\t\tmake histograms...........................\t" <<
makeHistograms
107 <<
"\n\t\t..for messy events........................\t" << makeHistogramsForMessyEvents
108 <<
"\n\t===================\n\n";
123 nEventsChambersBothSides = 0;
124 nEventsOverlappingChambers = 0;
126 nEventsCertainChamber = 0;
127 nEventsDTOverlap = 0;
129 nEventsLongSATrack = 0;
130 nEventsForBFieldStudies = 0;
137 theHistogramFile->cd();
141 hxnRecHits =
new TH1F(
"hxnRecHits",
"n RecHits", 61, -0.5, 60.5);
142 hxnSegments =
new TH1F(
"hxnSegments",
"n Segments", 11, -0.5, 10.5);
143 hxnHitChambers =
new TH1F(
"hxnHitsChambers",
"n chambers with hits", 11, -0.5, 10.5);
144 hxnRecHitsSel =
new TH1F(
"hxnRecHitsSel",
"n RecHits selected", 61, -0.5, 60.5);
146 xxP =
new TH1F(
"xxP",
"P global", 100, 0., 200.);
147 xxnValidHits =
new TH1F(
"xxnValidHits",
"n valid hits global", 61, -0.5, 60.5);
148 xxnTrackerHits =
new TH1F(
"xxnTrackerHits",
"n tracker hits global", 61, -0.5, 60.5);
149 xxnCSCHits =
new TH1F(
"xxnCSCHits",
"n CSC hits global", 41, -0.5, 40.5);
150 xxredChiSq =
new TH1F(
"xxredChiSq",
"red chisq global", 100, 0., 100.);
152 if (makeHistogramsForMessyEvents) {
154 mevnRecHits0 =
new TH1F(
"mevnRecHits0",
"n RecHits", 121, -0.5, 120.5);
155 mevnChambers0 =
new TH1F(
"mevnChambers0",
"n chambers with hits", 21, -0.5, 20.5);
156 mevnSegments0 =
new TH1F(
"mevnSegments0",
"n Segments", 21, -0.5, 20.5);
157 mevnRecHits1 =
new TH1F(
"mevnRecHits1",
"n RecHits", 100, 0., 300.);
158 mevnChambers1 =
new TH1F(
"mevnChambers1",
"n chambers with hits", 50, 0., 50.);
159 mevnSegments1 =
new TH1F(
"mevnSegments1",
"n Segments", 30, 0., 30.);
171 if (nEventsAnalyzed > 0) {
175 LogInfo(
"[CSCSkim] Summary") <<
"\n\n\t====== CSCSkim ==========================================================\n"
176 <<
"\t\ttype of skim ...............................\t" <<
typeOfSkim <<
"\n"
177 <<
"\t\tevents analyzed ..............\t" << nEventsAnalyzed <<
"\n"
178 <<
"\t\tevents selected ..............\t" << nEventsSelected
179 <<
"\tfraction= " <<
fraction << std::endl
180 <<
"\t\tevents chambers both sides ...\t" << nEventsChambersBothSides <<
"\n"
181 <<
"\t\tevents w/ overlaps .......... \t" << nEventsOverlappingChambers <<
"\n"
182 <<
"\t\tevents lots of hit chambers . \t" << nEventsMessy <<
"\n"
183 <<
"\t\tevents from certain chamber . \t" << nEventsCertainChamber <<
"\n"
184 <<
"\t\tevents in DT-CSC overlap .... \t" << nEventsDTOverlap <<
"\n"
185 <<
"\t\tevents halo-like ............ \t" << nEventsHaloLike <<
"\n"
186 <<
"\t\tevents w/ long SA track ..... \t" << nEventsLongSATrack <<
"\n"
187 <<
"\t\tevents good for BField ..... \t" << nEventsForBFieldStudies <<
"\n"
188 <<
"\t=========================================================================\n\n";
192 LogDebug(
"[CSCSkim]") <<
"======= write out my histograms ====\n";
193 theHistogramFile->cd();
196 hxnSegments->Write();
197 hxnHitChambers->Write();
198 hxnRecHitsSel->Write();
200 if (makeHistogramsForMessyEvents) {
201 mevnRecHits0->Write();
202 mevnChambers0->Write();
203 mevnSegments0->Write();
204 mevnRecHits1->Write();
205 mevnChambers1->Write();
206 mevnSegments1->Write();
208 theHistogramFile->Close();
219 iRun =
event.id().run();
220 iEvent =
event.id().event();
222 LogDebug(
"[CSCSkim] EventInfo") <<
"Run: " << iRun <<
"\tEvent: " <<
iEvent <<
"\tn Analyzed: " << nEventsAnalyzed;
232 if (
event.eventAuxiliary().isRealData()) {
233 event.getByToken(wdr_token,
wires);
234 event.getByToken(sdr_token,
strips);
236 event.getByToken(wds_token,
wires);
237 event.getByToken(sds_token,
strips);
242 event.getByToken(rh_token, cscRecHits);
251 event.getByToken(sam_token, saMuons);
258 event.getByToken(sam_token, saMuons);
259 event.getByToken(trk_token,
tracks);
260 event.getByToken(glm_token, gMuons);
268 bool basicEvent =
false;
270 basicEvent = doCSCSkimming(cscRecHits,
cscSegments);
274 bool goodOverlapEvent =
false;
277 if (goodOverlapEvent) {
278 nEventsOverlappingChambers++;
283 bool messyEvent =
false;
285 messyEvent = doMessyEventSkimming(cscRecHits,
cscSegments);
292 bool hasChamber =
false;
294 hasChamber = doCertainChamberSelection(
wires,
strips);
296 nEventsCertainChamber++;
301 bool DTOverlapCandidate =
false;
304 if (DTOverlapCandidate) {
310 bool HaloLike =
false;
319 bool LongSATrack =
false;
321 LongSATrack = doLongSATrack(saMuons);
323 nEventsLongSATrack++;
328 bool GoodForBFieldStudy =
false;
330 GoodForBFieldStudy = doBFieldStudySelection(saMuons,
tracks, gMuons);
331 if (GoodForBFieldStudy) {
332 nEventsForBFieldStudies++;
337 bool selectThisEvent =
false;
339 selectThisEvent = basicEvent;
342 selectThisEvent = goodOverlapEvent;
345 selectThisEvent = messyEvent;
348 selectThisEvent = hasChamber;
351 selectThisEvent = DTOverlapCandidate;
354 selectThisEvent = HaloLike;
357 selectThisEvent = LongSATrack;
360 selectThisEvent = GoodForBFieldStudy;
363 if (selectThisEvent) {
367 return selectThisEvent;
379 int nRecHits = cscRecHits->size();
383 for (
int i = 0;
i < 600;
i++) {
392 for (recIt = cscRecHits->begin(); recIt != cscRecHits->end(); recIt++) {
395 int kEndcap = idrec.
endcap();
396 int kRing = idrec.
ring();
397 int kStation = idrec.
station();
398 int kChamber = idrec.
chamber();
402 int kSerial = chamberSerial(kEndcap, kStation, kRing, kChamber);
407 cntRecHit[kSerial] += kDigit;
415 int nChambersWithMinimalHits = 0;
416 int nChambersWithMinimalHitsPOS = 0;
417 int nChambersWithMinimalHitsNEG = 0;
419 for (
int i = 0;
i < 600;
i++) {
420 if (cntRecHit[
i] > 0) {
421 int nLayersWithHits = 0;
423 for (
int j = 5;
j > -1;
j--) {
424 float digit =
dummy /
pow((
float)10., (
float)
j);
425 int kCount = (
int)digit;
432 nChambersWithMinimalHitsPOS++;
434 nChambersWithMinimalHitsNEG++;
439 nChambersWithMinimalHits = nChambersWithMinimalHitsPOS + nChambersWithMinimalHitsNEG;
450 hxnRecHits->Fill(nRecHits);
452 hxnSegments->Fill(nSegments);
453 hxnHitChambers->Fill(nChambersWithMinimalHits);
455 if (nChambersWithMinimalHits > 0) {
456 hxnRecHitsSel->Fill(nRecHits);
465 bool chambersOnBothSides =
468 if (chambersOnBothSides) {
469 nEventsChambersBothSides++;
472 bool selectEvent =
false;
474 selectEvent = basicEvent;
477 selectEvent = chambersOnBothSides;
481 LogDebug(
"[CSCSkim]") <<
"----- nRecHits = " << nRecHits
482 <<
"\tnChambersWithMinimalHits = " << nChambersWithMinimalHits <<
"\tnSegments = " << nSegments
483 <<
"\tselect? " << selectEvent << std::endl;
512 const int nhitsMinimum = 4;
513 const float chisqMaximum = 100.;
514 const int nAllMaximum = 3;
522 for (
int i = 0;
i < 600;
i++) {
533 int kEndcap =
id.
endcap();
534 int kStation =
id.station();
535 int kRing =
id.ring();
536 int kChamber =
id.chamber();
537 int kSerial = chamberSerial(kEndcap, kStation, kRing, kChamber);
540 float chisq = (*it).chi2();
541 int nhits = (*it).nRecHits();
544 bool goodSegment = (
nhits >= nhitsMinimum) && (chisq < chisqMaximum);
568 bool messyChamber =
false;
569 for (
int i = 0;
i < 600;
i++) {
570 if (nAll[
i] > nAllMaximum)
576 bool consecutiveChambers =
false;
577 for (
int i = 0;
i < 599;
i++) {
578 if ((nGood[
i] > 0) && (nGood[
i + 1] > 0))
579 consecutiveChambers =
true;
582 bool selectThisEvent = !messyChamber && consecutiveChambers;
584 return selectThisEvent;
596 int nRecHits = cscRecHits->size();
600 for (
int i = 0;
i < 600;
i++) {
609 for (recIt = cscRecHits->begin(); recIt != cscRecHits->end(); recIt++) {
612 int kEndcap = idrec.
endcap();
613 int kRing = idrec.
ring();
614 int kStation = idrec.
station();
615 int kChamber = idrec.
chamber();
619 int kSerial = chamberSerial(kEndcap, kStation, kRing, kChamber);
624 cntRecHit[kSerial] += kDigit;
632 int nChambersWithMinimalHits = 0;
633 int nChambersWithMinimalHitsPOS = 0;
634 int nChambersWithMinimalHitsNEG = 0;
636 for (
int i = 0;
i < 600;
i++) {
637 if (cntRecHit[
i] > 0) {
638 int nLayersWithHits = 0;
640 for (
int j = 5;
j > -1;
j--) {
641 float digit =
dummy /
pow((
float)10., (
float)
j);
642 int kCount = (
int)digit;
649 nChambersWithMinimalHitsPOS++;
651 nChambersWithMinimalHitsNEG++;
656 nChambersWithMinimalHits = nChambersWithMinimalHitsPOS + nChambersWithMinimalHitsNEG;
666 if (makeHistogramsForMessyEvents) {
668 mevnRecHits0->Fill(nRecHits);
669 mevnChambers0->Fill(nChambersWithMinimalHits);
670 mevnSegments0->Fill(nSegments);
673 double dummy = (double)nRecHits;
676 mevnRecHits1->Fill(
dummy);
677 dummy = (double)nChambersWithMinimalHits;
680 mevnChambers1->Fill(
dummy);
681 dummy = (double)nSegments;
684 mevnSegments1->Fill(
dummy);
692 bool selectEvent =
false;
693 if ((nRecHits > 54) && (nChambersWithMinimalHits > 5)) {
698 LogDebug(
"[CSCSkim]") <<
"----- nRecHits = " << nRecHits
699 <<
"\tnChambersWithMinimalHits = " << nChambersWithMinimalHits <<
"\tnSegments = " << nSegments
700 <<
"\tselect? " << selectEvent << std::endl;
732 bool certainChamberIsPresentInWires =
false;
735 int kEndcap =
id.
endcap();
736 int kRing =
id.ring();
737 int kStation =
id.station();
738 int kChamber =
id.chamber();
740 certainChamberIsPresentInWires =
true;
745 bool certainChamberIsPresentInStrips =
false;
748 int kEndcap =
id.
endcap();
749 int kRing =
id.ring();
750 int kStation =
id.station();
751 int kChamber =
id.chamber();
753 certainChamberIsPresentInStrips =
true;
757 bool certainChamberIsPresent = certainChamberIsPresentInWires || certainChamberIsPresentInStrips;
759 return certainChamberIsPresent;
768 const float chisqMax = 100.;
769 const int nhitsMin = 5;
770 const int maxNSegments = 3;
773 bool DTOverlapCandidate =
false;
780 for (
int i = 0;
i < 36; ++
i) {
795 return DTOverlapCandidate;
800 int kEndcap =
id.
endcap();
801 int kStation =
id.station();
802 int kRing =
id.ring();
803 int kChamber =
id.chamber();
805 float chisq = (*it).chi2();
806 int nhits = (*it).nRecHits();
807 bool goodSegment = (chisq < chisqMax) && (
nhits >= nhitsMin);
809 if ((kStation == 1) && (kRing == 3)) {
811 cntMEP13[kChamber - 1]++;
814 cntMEN13[kChamber - 1]++;
817 if ((kStation == 2) && (kRing == 2)) {
819 cntMEP22[kChamber - 1]++;
822 cntMEN22[kChamber - 1]++;
825 if ((kStation == 3) && (kRing == 2)) {
827 cntMEP32[kChamber - 1]++;
830 cntMEN32[kChamber - 1]++;
839 bool tooManySegments =
false;
840 for (
int i = 0;
i < 36; ++
i) {
841 if ((cntMEP13[
i] > maxNSegments) || (cntMEN13[
i] > maxNSegments) || (cntMEP22[
i] > maxNSegments) ||
842 (cntMEN22[
i] > maxNSegments) || (cntMEP32[
i] > maxNSegments) || (cntMEN32[
i] > maxNSegments))
843 tooManySegments =
true;
845 if (tooManySegments) {
846 return DTOverlapCandidate;
852 bool matchup =
false;
853 for (
int i = 0;
i < 36; ++
i) {
854 if ((cntMEP13[
i] > 0) && (cntMEP22[
i] + cntMEP32[
i] > 0)) {
857 if ((cntMEN13[
i] > 0) && (cntMEN22[
i] + cntMEN32[
i] > 0)) {
876 DTOverlapCandidate = matchup;
877 return DTOverlapCandidate;
887 const float chisqMax = 100.;
888 const int nhitsMin = 5;
889 const int maxNSegments = 3;
892 bool HaloLike =
false;
903 for (
int i = 0;
i < 36; ++
i) {
926 int kEndcap =
id.
endcap();
927 int kStation =
id.station();
928 int kRing =
id.ring();
929 int kChamber =
id.chamber();
931 float chisq = (*it).chi2();
932 int nhits = (*it).nRecHits();
933 bool goodSegment = (chisq < chisqMax) && (
nhits >= nhitsMin);
935 if ((kStation == 1) && (kRing == 1)) {
937 cntMEP11[kChamber - 1]++;
940 cntMEN11[kChamber - 1]++;
943 if ((kStation == 1) && (kRing == 2)) {
945 cntMEP12[kChamber - 1]++;
948 cntMEN12[kChamber - 1]++;
951 if ((kStation == 2) && (kRing == 1)) {
953 cntMEP21[kChamber - 1]++;
956 cntMEN21[kChamber - 1]++;
959 if ((kStation == 3) && (kRing == 1)) {
961 cntMEP31[kChamber - 1]++;
964 cntMEN31[kChamber - 1]++;
967 if ((kStation == 4) && (kRing == 1)) {
969 cntMEP41[kChamber - 1]++;
972 cntMEN41[kChamber - 1]++;
981 bool tooManySegments =
false;
982 for (
int i = 0;
i < 36; ++
i) {
983 if ((cntMEP11[
i] > 3 * maxNSegments) || (cntMEN11[
i] > 3 * maxNSegments) || (cntMEP12[
i] > maxNSegments) ||
984 (cntMEN12[
i] > maxNSegments) || (cntMEP21[
i] > maxNSegments) || (cntMEN21[
i] > maxNSegments) ||
985 (cntMEP31[
i] > maxNSegments) || (cntMEN31[
i] > maxNSegments) || (cntMEP41[
i] > maxNSegments) ||
986 (cntMEN41[
i] > maxNSegments))
987 tooManySegments =
true;
989 if (tooManySegments) {
996 bool matchup =
false;
997 for (
int i = 0;
i < 36; ++
i) {
998 if ((cntMEP11[
i] + cntMEP12[
i] > 0) && (cntMEP21[
i] > 0) && (cntMEP31[
i] > 0) && (cntMEP41[
i] > 0)) {
1001 if ((cntMEN11[
i] + cntMEN12[
i] > 0) && (cntMEN21[
i] > 0) && (cntMEN31[
i] > 0) && (cntMEN41[
i] > 0)) {
1045 const float zDistanceMax = 2500.;
1046 const float zDistanceMin = 700.;
1047 const int nCSCHitsMin = 25;
1048 const int nCSCHitsMax = 50;
1049 const float zInnerMax = 80000.;
1051 const int nNiceMuonsMin = 1;
1059 for (reco::TrackCollection::const_iterator
muon = saMuons->begin();
muon != saMuons->end(); ++
muon) {
1062 GlobalVector im(innerMo.x(), innerMo.y(), innerMo.z());
1064 GlobalPoint ip(innerPo.x(), innerPo.y(), innerPo.z());
1066 GlobalPoint op(outerPo.x(), outerPo.y(), outerPo.z());
1067 float zInner = ip.
z();
1068 float zOuter = op.z();
1069 float zDistance = fabs(zOuter - zInner);
1075 const DetId detId((*hit)->geographicalId());
1090 if ((zDistance < zDistanceMax) && (zDistance > zDistanceMin) && (nCSCHits > nCSCHitsMin) &&
1091 (nCSCHits < nCSCHitsMax) && (
min(fabs(zInner), fabs(zOuter)) < zInnerMax) &&
1092 (fabs(innerMo.z()) > 0.000000001)) {
1097 bool select = (nNiceMuons >= nNiceMuonsMin);
1113 bool acceptThisEvent =
false;
1118 int nGoodSAMuons = 0;
1119 for (reco::TrackCollection::const_iterator
muon = saMuons->begin();
muon != saMuons->end(); ++
muon) {
1120 float preco =
muon->p();
1123 GlobalPoint iPnt(innerPo.x(), innerPo.y(), innerPo.z());
1125 GlobalPoint oPnt(outerPo.x(), outerPo.y(), outerPo.z());
1126 float zLength =
abs(iPnt.z() - oPnt.z());
1129 GlobalVector iP(innerMom.x(), innerMom.y(), innerMom.z());
1131 GlobalVector oP(outerMom.x(), outerMom.y(), outerMom.z());
1133 const float zRef = 300.;
1134 float xExt = 10000.;
1135 float yExt = 10000.;
1136 if (
abs(oPnt.z()) <
abs(iPnt.z())) {
1139 deltaZ = zRef - oPnt.
z();
1141 deltaZ = -zRef - oPnt.z();
1143 xExt = oPnt.x() + deltaZ * oP.x() / oP.z();
1144 yExt = oPnt.y() + deltaZ * oP.y() / oP.z();
1148 deltaZ = zRef - iPnt.z();
1150 deltaZ = -zRef - iPnt.z();
1152 xExt = iPnt.x() + deltaZ * iP.x() / iP.z();
1153 yExt = iPnt.y() + deltaZ * iP.y() / iP.z();
1155 float rExt =
sqrt(xExt * xExt + yExt * yExt);
1162 const DetId detId((*hit)->geographicalId());
1173 if (nCSCHits >= nCSCHitsMin) {
1174 if (
abs(iPnt.z()) <
abs(iPnt.z())) {
1181 bool goodSAMuon = (preco >
pMin) && (zLength > zLengthMin) && (nCSCHits >= nCSCHitsMin) && (zInner < zInnerMax) &&
1193 int nGoodTracks = 0;
1195 float preco =
track->p();
1196 int n =
track->recHitsSize();
1199 GlobalPoint iPnt(innerPo.x(), innerPo.y(), innerPo.z());
1201 GlobalPoint oPnt(outerPo.x(), outerPo.y(), outerPo.z());
1202 float zLength =
abs(iPnt.z() - oPnt.z());
1205 GlobalVector iP(innerMom.x(), innerMom.y(), innerMom.z());
1207 GlobalVector oP(outerMom.x(), outerMom.y(), outerMom.z());
1209 const float zRef = 300.;
1210 float xExt = 10000.;
1211 float yExt = 10000.;
1212 if (
abs(oPnt.z()) >
abs(iPnt.z())) {
1215 deltaZ = zRef - oPnt.
z();
1217 deltaZ = -zRef - oPnt.z();
1219 xExt = oPnt.x() + deltaZ * oP.x() / oP.z();
1220 yExt = oPnt.y() + deltaZ * oP.y() / oP.z();
1224 deltaZ = zRef - iPnt.z();
1226 deltaZ = -zRef - iPnt.z();
1228 xExt = iPnt.x() + deltaZ * iP.x() / iP.z();
1229 yExt = iPnt.y() + deltaZ * iP.y() / iP.z();
1231 float rExt =
sqrt(xExt * xExt + yExt * yExt);
1233 bool goodTrack = (preco >
pMin) && (
n >= nTrHitsMin) && (zLength > zLengthTrMin) && (rExt < rExtMax);
1244 int nGoodGlobalMuons = 0;
1245 for (reco::MuonCollection::const_iterator global = gMuons->begin(); global != gMuons->end(); ++global) {
1246 if (global->isGlobalMuon()) {
1247 float pDef = global->p();
1248 float redChiSq = global->globalTrack()->normalizedChi2();
1252 int nTrackerHits =
hp.numberOfValidTrackerHits();
1259 hit != (global->globalTrack())->recHitsEnd();
1261 const DetId detId((*hit)->geographicalId());
1271 bool goodGlobalMuon =
1272 (pDef >
pMin) && (nTrackerHits >= nValidHitsMin) && (nCSCHits >= nCSCHitsMin) && (redChiSq < redChiSqMax);
1274 if (goodGlobalMuon) {
1285 acceptThisEvent = ((nGoodSAMuons > 0) && (nGoodTracks > 0)) || (nGoodGlobalMuons > 0);
1287 return acceptThisEvent;
1295 int kSerial = kChamber;
1296 if (kStation == 1 && kRing == 1) {
1299 if (kStation == 1 && kRing == 2) {
1300 kSerial = kChamber + 36;
1302 if (kStation == 1 && kRing == 3) {
1303 kSerial = kChamber + 72;
1305 if (kStation == 1 && kRing == 4) {
1308 if (kStation == 2 && kRing == 1) {
1309 kSerial = kChamber + 108;
1311 if (kStation == 2 && kRing == 2) {
1312 kSerial = kChamber + 126;
1314 if (kStation == 3 && kRing == 1) {
1315 kSerial = kChamber + 162;
1317 if (kStation == 3 && kRing == 2) {
1318 kSerial = kChamber + 180;
1320 if (kStation == 4 && kRing == 1) {
1321 kSerial = kChamber + 216;
1323 if (kStation == 4 && kRing == 2) {
1324 kSerial = kChamber + 234;
1327 kSerial = kSerial + 300;