-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run3-hcx373 Correct the HcalTopology class for 2 new geometry modes #46308
Changes from all commits
90941f6
f728e88
3e95ab9
60631d4
3ba66a2
b08c25d
4ee85c5
1a6f87c
eb00e8c
d0937b8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,7 +72,7 @@ HcalTopology::HcalTopology(const HcalDDDRecConstants* hcons, const bool mergePos | |
HFSize_ = kHFSizePreLS1; // ieta * iphi * depth * 2 | ||
CALIBSize_ = kCALIBSizePreLS1; | ||
numberOfShapes_ = 87; | ||
} else if (mode_ == HcalTopologyMode::SLHC) { // need to know more eventually | ||
} else { // need to know more eventually | ||
topoVersion_ = 10; | ||
HBSize_ = nEtaHB_ * IPHI_MAX * maxDepthHB_ * 2; | ||
HESize_ = nEtaHE_ * maxPhiHE_ * maxDepthHE_ * 2; | ||
|
@@ -195,18 +195,14 @@ HcalTopology::HcalTopology(HcalTopologyMode::Mode mode, | |
HFSize_(kHFSizePreLS1), | ||
HTSize_(kHTSizePreLS1), | ||
CALIBSize_(kCALIBSizePreLS1), | ||
numberOfShapes_( | ||
((mode == HcalTopologyMode::SLHC) || (mode_ == HcalTopologyMode::Run3) || (mode_ == HcalTopologyMode::Run4)) | ||
? 500 | ||
: 87) { | ||
numberOfShapes_((mode_ == HcalTopologyMode::LHC) ? 87 : 500) { | ||
if (mode_ == HcalTopologyMode::LHC) { | ||
topoVersion_ = 0; //DL | ||
HBSize_ = kHBSizePreLS1; // qie-per-fiber * fiber/rm * rm/rbx * rbx/barrel * barrel/hcal | ||
HESize_ = kHESizePreLS1; // qie-per-fiber * fiber/rm * rm/rbx * rbx/endcap * endcap/hcal | ||
HOSize_ = kHOSizePreLS1; // ieta * iphi * 2 | ||
HFSize_ = kHFSizePreLS1; // phi * eta * depth * pm | ||
} else if ((mode_ == HcalTopologyMode::SLHC) || (mode_ == HcalTopologyMode::Run3) || | ||
(mode_ == HcalTopologyMode::Run4)) { // need to know more eventually | ||
} else { // need to know more eventually | ||
HBSize_ = maxDepthHB * 16 * IPHI_MAX * 2; | ||
HESize_ = maxDepthHE * (29 - 16 + 1) * maxPhiHE_ * 2; | ||
HOSize_ = 15 * IPHI_MAX * 2; // ieta * iphi * 2 | ||
|
@@ -571,8 +567,7 @@ bool HcalTopology::validRaw(const HcalDetId& id) const { | |
|
||
if (ok) { | ||
if (subdet == HcalBarrel) { | ||
if ((mode_ == HcalTopologyMode::SLHC) || (mode_ == HcalTopologyMode::H2HE) || (mode_ == HcalTopologyMode::Run3) || | ||
(mode_ == HcalTopologyMode::Run4)) { | ||
if (phase2() || (mode_ == HcalTopologyMode::H2HE)) { | ||
bsunanda marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, I understand now that this is the fix: previously Run3 was erroneously counted together with the Phase2 modes. |
||
if ((aieta > lastHBRing()) || (depth > hcons_->getMaxDepth(0, aieta, iphi, zside)) || | ||
(depth < hcons_->getMinDepth(0, aieta, iphi, zside))) | ||
ok = false; | ||
|
@@ -581,8 +576,7 @@ bool HcalTopology::validRaw(const HcalDetId& id) const { | |
ok = false; | ||
} | ||
} else if (subdet == HcalEndcap) { | ||
if ((mode_ == HcalTopologyMode::SLHC) || (mode_ == HcalTopologyMode::H2HE) || (mode_ == HcalTopologyMode::Run3) || | ||
(mode_ == HcalTopologyMode::Run4)) { | ||
if (phase2() || (mode_ == HcalTopologyMode::H2HE)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not include Run3 now: is it correct? (Just checking) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. The logic is with or without HE |
||
if ((depth > hcons_->getMaxDepth(1, aieta, iphi, zside)) || | ||
(depth < hcons_->getMinDepth(1, aieta, iphi, zside)) || (aieta < firstHERing()) || (aieta > lastHERing())) { | ||
ok = false; | ||
|
@@ -823,8 +817,7 @@ int HcalTopology::decAIEta(const HcalDetId& id, HcalDetId neighbors[2]) const { | |
void HcalTopology::depthBinInformation( | ||
HcalSubdetector subdet, int etaRing, int iphi, int zside, int& nDepthBins, int& startingBin) const { | ||
if (subdet == HcalBarrel) { | ||
if ((mode_ == HcalTopologyMode::SLHC) || (mode_ == HcalTopologyMode::H2HE) || (mode_ == HcalTopologyMode::Run3) || | ||
(mode_ == HcalTopologyMode::Run4)) { | ||
if (phase2() || (mode_ == HcalTopologyMode::H2HE)) { | ||
bsunanda marked this conversation as resolved.
Show resolved
Hide resolved
|
||
startingBin = hcons_->getMinDepth(0, etaRing, iphi, zside); | ||
if (etaRing == lastHBRing()) { | ||
nDepthBins = hcons_->getDepthEta16(1, iphi, zside) - startingBin + 1; | ||
|
@@ -841,8 +834,7 @@ void HcalTopology::depthBinInformation( | |
} | ||
} | ||
} else if (subdet == HcalEndcap) { | ||
if ((mode_ == HcalTopologyMode::SLHC) || (mode_ == HcalTopologyMode::H2HE) || (mode_ == HcalTopologyMode::Run3) || | ||
(mode_ == HcalTopologyMode::Run4)) { | ||
if (phase2() || (mode_ == HcalTopologyMode::H2HE)) { | ||
if (etaRing == firstHERing()) { | ||
startingBin = hcons_->getDepthEta16(2, iphi, zside); | ||
} else { | ||
|
@@ -896,17 +888,14 @@ bool HcalTopology::incrementDepth(HcalDetId& detId) const { | |
} else if (subdet == HcalBarrel && etaRing == lastHBRing()) { | ||
// overlap | ||
subdet = HcalEndcap; | ||
if ((mode_ == HcalTopologyMode::SLHC) || (mode_ == HcalTopologyMode::H2HE) || (mode_ == HcalTopologyMode::Run3) || | ||
(mode_ == HcalTopologyMode::Run4)) | ||
if (phase2() || (mode_ == HcalTopologyMode::H2HE)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not include Run3 now: is it correct? (Just checking) |
||
depth = hcons_->getDepthEta16(2, iphi, zside); | ||
} else if ((subdet == HcalEndcap) && (etaRing == lastHERing() - 1) && (mode_ != HcalTopologyMode::SLHC) && | ||
(mode_ != HcalTopologyMode::Run3) && (mode_ != HcalTopologyMode::Run4)) { | ||
} else if ((subdet == HcalEndcap) && (etaRing == lastHERing() - 1) && !phase2()) { | ||
// guard ring HF29 is behind HE 28 | ||
subdet = HcalForward; | ||
(ieta > 0) ? ++ieta : --ieta; | ||
depth = 1; | ||
} else if ((subdet == HcalEndcap) && (etaRing == lastHERing()) && (mode_ != HcalTopologyMode::SLHC) && | ||
(mode_ != HcalTopologyMode::Run3) && (mode_ != HcalTopologyMode::Run4)) { | ||
} else if ((subdet == HcalEndcap) && (etaRing == lastHERing()) && !phase2()) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please check There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
// split cells go to bigger granularity. Ring 29 -> 28 | ||
(ieta > 0) ? --ieta : ++ieta; | ||
} else { | ||
|
@@ -940,8 +929,7 @@ bool HcalTopology::decrementDepth(HcalDetId& detId) const { | |
} | ||
} | ||
} else if ((subdet == HcalEndcap) && (etaRing == lastHERing()) && (depth == hcons_->getDepthEta29(iphi, zside, 0)) && | ||
(mode_ != HcalTopologyMode::SLHC) && (mode_ != HcalTopologyMode::Run3) && | ||
(mode_ != HcalTopologyMode::Run4)) { | ||
!phase2()) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Run3 is not a part of Phase2 |
||
(ieta > 0) ? --ieta : ++ieta; | ||
} else if (depth <= 0) { | ||
if (subdet == HcalForward && etaRing == firstHFRing()) { | ||
|
@@ -1143,7 +1131,7 @@ std::pair<double, double> HcalTopology::etaRange(HcalSubdetector subdet, int ket | |
return std::pair<double, double>(etaTableHF[ii], etaTableHF[ii + 1]); | ||
} | ||
} else { | ||
int ietal = (mode_ == HcalTopologyMode::LHC && ieta == lastHERing_ - 1) ? (ieta + 1) : ieta; | ||
int ietal = (phase1() && ieta == lastHERing_ - 1) ? (ieta + 1) : ieta; | ||
if ((ietal < (int)(etaTable.size())) && (ieta > 0)) | ||
return std::pair<double, double>(etaTable[ieta - 1], etaTable[ietal]); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I want to reproduce what in L82 I should write here:
Could you please explain why they are different, if they need to be so? Or fix the wrong one, if they have to be the same?