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
HCAL LUT generation and validation #19864
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
567427e
updates needed for online HCAL TP LUT generation
akhukhun 8bac8b6
cleanup and move to modern EDanalyzer.
akhukhun 42097b6
cleanup and some git test
akhukhun f2a4164
increase precision of L1TriggerObject to remove mismatches due to rou…
akhukhun 4eb3dc9
a little more cleanup
akhukhun dde3c29
some more cleanup
akhukhun bc6ca06
move HcalLutAnalyzer to plugins
akhukhun File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,7 @@ HcaluLUTTPGCoder::HcaluLUTTPGCoder(const HcalTopology* top) : topo_(top), LUTGen | |
inputLUT_ = std::vector<HcaluLUTTPGCoder::Lut>(nluts,HcaluLUTTPGCoder::Lut(INPUT_LUT_SIZE, 0)); | ||
upgradeQIE10LUT_ = std::vector<HcaluLUTTPGCoder::Lut>(nluts,HcaluLUTTPGCoder::Lut(UPGRADE_LUT_SIZE, 0)); | ||
upgradeQIE11LUT_ = std::vector<HcaluLUTTPGCoder::Lut>(nluts,HcaluLUTTPGCoder::Lut(UPGRADE_LUT_SIZE, 0)); | ||
QIEType_ = std::vector<int> (nluts, 0); | ||
gain_ = std::vector<float>(nluts, 0.); | ||
ped_ = std::vector<float>(nluts, 0.); | ||
} | ||
|
@@ -267,9 +268,11 @@ void HcaluLUTTPGCoder::update(const HcalDbService& conditions) { | |
float gain = 0; | ||
uint32_t status = 0; | ||
|
||
QIEType_[lutId]=conditions.getHcalQIEType(cell)->getValue(); | ||
|
||
if (LUTGenerationMode_){ | ||
const HcalCalibrations& calibrations = conditions.getHcalCalibrations(cell); | ||
for (int capId = 0; capId < 4; ++capId){ | ||
for (auto capId : {0,1,2,3}){ | ||
ped += calibrations.pedestal(capId); | ||
gain += calibrations.LUTrespcorrgain(capId); | ||
} | ||
|
@@ -409,6 +412,16 @@ std::vector<unsigned short> HcaluLUTTPGCoder::getLinearizationLUTWithMSB(const H | |
return inputLUT_.at(lutId); | ||
} | ||
|
||
std::vector<unsigned short> HcaluLUTTPGCoder::getLinearizationLUT(HcalDetId id) const{ | ||
|
||
int lutId = getLUTId(id); | ||
int type=QIEType_[lutId]; | ||
const std::vector<Lut>& lut= type==0 ? inputLUT_ : | ||
type==1 ? upgradeQIE10LUT_ : | ||
upgradeQIE11LUT_ ; | ||
return lut.at(lutId); | ||
} | ||
|
||
void HcaluLUTTPGCoder::lookupMSB(const HBHEDataFrame& df, std::vector<bool>& msb) const{ | ||
msb.resize(df.size()); | ||
for (int i=0; i<df.size(); ++i) | ||
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. use range-based loop. |
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
please use range-based loop.