-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
[HGC trigger] FE customization, OOT subtraction, separate HFNose sequence #29762
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-29762/15209
|
A new Pull Request was created by @jbsauvan (Jean-Baptiste Sauvan) for master. It involves the following packages: L1Trigger/L1THGCal @cmsbuild, @rekovic, @benkrikler, @kpedro88 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
The tests are being triggered in jenkins. |
+1 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
@@ -85,6 +85,13 @@ class HGCalTriggerTools { | |||
|
|||
static constexpr unsigned kScintillatorPseudoThicknessIndex_ = 3; | |||
|
|||
enum SubDetectorType { |
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.
This seems redundant with the enums already defined in https://github.com/cms-sw/cmssw/blob/master/DataFormats/ForwardDetId/interface/ForwardSubdetector.h. Is there a reason for it to be separate?
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.
In this case the enum values are used to index vectors. So we need values 0,1,2
. The information encoded here is indeed redundant with enums in ForwardSubdetector.h
, but we would need to manipulate them further if ForwardSubdetector
or HGCalTriggerSubdetector
were used.
} | ||
|
||
if (coarsenTriggerCells_ || fixedDataSizePerHGCROC_) { | ||
for (int subdet = 0; subdet < kNSubDetectors_; subdet++) { | ||
if (selectionType[subdet] == "thresholdSelect") { |
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.
should these cases become a factory (as some other trigger algorithms are already)?
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.
I am planning to make a global refactoring of the code in the near future. And definitely something should be done to better manage all the different types of algorithms we have in various places.
hgcalBackEndLayer2ProducerHFNose = hgcalBackEndLayer2Producer.clone() | ||
hgcalBackEndLayer2ProducerHFNose.InputCluster = cms.InputTag('hgcalBackEndLayer1ProducerHFNose:HGCalBackendLayer1Processor2DClustering') | ||
|
||
binSumsNose = cms.vuint32(13,11,9,9) |
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.
probably doesn't need to be a separate variable (just put the values in binSumsHisto
a few lines below)
|
||
|
||
hgcalBackEndLayer2ProducerHFNose = hgcalBackEndLayer2Producer.clone() | ||
hgcalBackEndLayer2ProducerHFNose.InputCluster = cms.InputTag('hgcalBackEndLayer1ProducerHFNose:HGCalBackendLayer1Processor2DClustering') |
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.
actually all of these parameter changes can be done within the clone statement (preferable)
@@ -160,3 +161,9 @@ | |||
InputTriggerSums = cms.InputTag('hgcalVFEProducer:HGCalVFEProcessorSums'), | |||
ProcessorParameters = threshold_conc_proc.clone() | |||
) | |||
|
|||
|
|||
hgcalConcentratorProducerHFNose = hgcalConcentratorProducer.clone() |
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.
make parameter changes inside clone() statement
tdcLSB_sc_ = tdcsaturation_sc_ / pow(2., tdcnBits_sc_); | ||
linnBits_(conf.getParameter<uint32_t>("linnBits")), | ||
oot_coefficients_(conf.getParameter<std::vector<double>>("oot_coefficients")) { | ||
const int kOot_order = 2; |
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.
constexpr
} else { //ADC mode | ||
double data = frame[kIntimeSample].data(); | ||
// applies OOT PU subtraction only in the ADC mode | ||
if (!frame[kIntimeSample - 1].mode()) { |
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.
maybe define kSampleN1 and kSampleN2 to reduce repetition?
vector<int> hgcdigi_isadc(digi.size()); | ||
for (int i = 0; i < digi.size(); i++) { | ||
hgcdigi_data[i] = digi[i].data(); | ||
hgcdigi_isadc[i] = (digi[i].mode() ? 0 : 1); |
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.
could be just hgcdigi_isadc[i] = !digi[i].mode();
vector<int> hgcdigi_isadc(digi.size()); | ||
for (int i = 0; i < digi.size(); i++) { | ||
hgcdigi_data[i] = digi[i].data(); | ||
hgcdigi_isadc[i] = (digi[i].mode() ? 0 : 1); |
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.
could be just hgcdigi_isadc[i] = !digi[i].mode();
vector<int> bhdigi_isadc(digi.size()); | ||
for (int i = 0; i < digi.size(); i++) { | ||
bhdigi_data[i] = digi[i].data(); | ||
bhdigi_isadc[i] = (digi[i].mode() ? 0 : 1); |
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.
could be just hgcdigi_isadc[i] = !digi[i].mode();
please test |
The tests are being triggered in jenkins. |
+1 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+upgrade |
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
PR validation: