Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions DataFormats/Scouting/interface/Run3ScoutingHBHERecHit.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@

class Run3ScoutingHBHERecHit {
public:
Run3ScoutingHBHERecHit(float energy, unsigned int detId) : energy_{energy}, detId_{detId} {}
Run3ScoutingHBHERecHit(float energy, float time, unsigned int detId) : energy_{energy}, time_{time}, detId_{detId} {}

Run3ScoutingHBHERecHit() : energy_{0}, detId_{0} {}
Run3ScoutingHBHERecHit() : energy_{0}, time_{0}, detId_{0} {}

float energy() const { return energy_; }
float time() const { return time_; }
unsigned int detId() const { return detId_; }

private:
float energy_;
float time_;
unsigned int detId_;
};

Expand Down
3 changes: 2 additions & 1 deletion DataFormats/Scouting/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@
<class name="Run3ScoutingEERecHit" ClassVersion="3">
<version ClassVersion="3" checksum="343593247"/>
</class>
<class name="Run3ScoutingHBHERecHit" ClassVersion="3">
<class name="Run3ScoutingHBHERecHit" ClassVersion="4">
<version ClassVersion="3" checksum="1840081356"/>
<version ClassVersion="4" checksum="3439505242"/>
</class>
<class name="ScoutingCaloJet" ClassVersion="3">
<version ClassVersion="2" checksum="2705685116"/>
Expand Down
9 changes: 7 additions & 2 deletions DataFormats/Scouting/test/TestReadRun3Scouting.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ namespace edmtest {
if (expectedEERecHitIntegralValues_.size() != 1) {
throwWithMessageFromConstructor("test configuration error, expectedEERecHitIntegralValues must have size 1");
}
if (expectedHBHERecHitFloatingPointValues_.size() != 1) {
if (expectedHBHERecHitFloatingPointValues_.size() != 2) {
throwWithMessageFromConstructor(
"test configuration error, expectedHBHERecHitFloatingPointValues must have size 1");
"test configuration error, expectedHBHERecHitFloatingPointValues must have size 2");
}
if (expectedHBHERecHitIntegralValues_.size() != 1) {
throwWithMessageFromConstructor("test configuration error, expectedHBHERecHitIntegralValues must have size 1");
Expand Down Expand Up @@ -1328,6 +1328,11 @@ namespace edmtest {
if (hbheRecHit.detId() != static_cast<unsigned int>(expectedHBHERecHitIntegralValues_[0] + iOffset)) {
throwWithMessage("analyzeHBHERecHits, detId does not equal expected value");
}
if (inputHBHERecHitClassVersion_ == 4) {
if (hbheRecHit.time() != expectedHBHERecHitFloatingPointValues_[1] + offset) {
throwWithMessage("analyzeHBHERecHits, time does not equal expected value");
}
}
++i;
}
}
Expand Down
5 changes: 3 additions & 2 deletions DataFormats/Scouting/test/TestWriteRun3Scouting.cc
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ namespace edmtest {
if (eeRecHitsIntegralValues_.size() != 1) {
throwWithMessage("eeRecHitsIntegralValues must have 1 elements and it does not");
}
if (hbheRecHitsFloatingPointValues_.size() != 1) {
throwWithMessage("hbheRecHitsFloatingPointValues must have 1 elements and it does not");
if (hbheRecHitsFloatingPointValues_.size() != 2) {
throwWithMessage("hbheRecHitsFloatingPointValues must have 2 elements and it does not");
}
if (hbheRecHitsIntegralValues_.size() != 1) {
throwWithMessage("hbheRecHitsIntegralValues must have 1 elements and it does not");
Expand Down Expand Up @@ -696,6 +696,7 @@ namespace edmtest {
int iOffset = static_cast<int>(iEvent.id().event() + i);

run3ScoutingHBHERecHits->emplace_back(static_cast<float>(hbheRecHitsFloatingPointValues_[0] + offset),
static_cast<float>(hbheRecHitsFloatingPointValues_[1] + offset),
static_cast<unsigned int>(hbheRecHitsIntegralValues_[0] + iOffset));
}
iEvent.put(hbheRecHitsPutToken_, std::move(run3ScoutingHBHERecHits));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
17
),
hbheRecHitsFloatingPointValues = cms.vdouble(
18.0
18.0, 28.0
),
hbheRecHitsIntegralValues = cms.vint32(
18
Expand Down
4 changes: 2 additions & 2 deletions DataFormats/Scouting/test/test_readRun3Scouting_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
parser.add_argument("--vertexVersion", type=int, help="vertex data format version (default: 4)", default=4)
parser.add_argument("--ebRecHitVersion", type=int, help="EBRecHit data format version (default: 3)", default=3)
parser.add_argument("--eeRecHitVersion", type=int, help="EERecHit data format version (default: 3)", default=3)
parser.add_argument("--hbheRecHitVersion", type=int, help="HBHERecHit data format version (default: 3)", default=3)
parser.add_argument("--hbheRecHitVersion", type=int, help="HBHERecHit data format version (default: 4)", default=4)
parser.add_argument("--inputFile", type=str, help="Input file name (default: testRun3Scouting.root)", default="testRun3Scouting.root")
parser.add_argument("--outputFileName", type=str, help="Output file name (default: testRun3Scouting2.root)", default="testRun3Scouting2.root")
parser.add_argument("-f", "--fixStreamerInfo", action="store_true")
Expand Down Expand Up @@ -132,7 +132,7 @@
eeRecHitsTag = cms.InputTag("run3ScoutingProducer", "", "PROD"),
hbheRecHitClassVersion = cms.int32(args.hbheRecHitVersion),
expectedHBHERecHitFloatingPointValues = cms.vdouble(
18.0
18.0, 28.0
),
expectedHBHERecHitIntegralValues = cms.vint32(
18
Expand Down
4 changes: 3 additions & 1 deletion HLTrigger/special/plugins/HLTScoutingRecHitProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ void HLTScoutingRecHitProducer::produceHcal(edm::Event& iEvent,
}

run3ScoutHBHERecHits->emplace_back(
MiniFloatConverter::reduceMantissaToNbitsRounding(rh.energy(), mantissaPrecision), rh.detId());
MiniFloatConverter::reduceMantissaToNbitsRounding(rh.energy(), mantissaPrecision),
MiniFloatConverter::reduceMantissaToNbitsRounding(rh.time(), mantissaPrecision),
rh.detId());
}

iEvent.put(std::move(run3ScoutHBHERecHits), "HBHE" + tag);
Expand Down