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
14 changes: 14 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_nano.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ def next(self, index: int = None) -> None:
steps['ScoutingPFMonitor2024MINIAOD14.0'] = {'INPUT': InputInfo(location='STD', ls=lumis_Run2024D,
dataSet='/ScoutingPFMonitor/Run2024D-PromptReco-v1/MINIAOD')}

steps['L1Scouting2024RAW14.0'] = {'INPUT': InputInfo(location='STD', ls={386873: [[1, 332]]},
dataSet='/L1Scouting/Run2024I-v1/L1SCOUT')}

steps['L1ScoutingSelection2024RAW14.0'] = {'INPUT': InputInfo(location='STD', ls={386873: [[1, 332]]},
dataSet='/L1ScoutingSelection/Run2024I-v1/L1SCOUT')}

steps['ZMuSkim2024RAWRECO14.0'] = {'INPUT': InputInfo(location='STD', ls=lumis_Run2024D,
dataSet='/Muon0/Run2024D-ZMu-PromptReco-v1/RAW-RECO')}

Expand Down Expand Up @@ -261,6 +267,12 @@ def next(self, index: int = None) -> None:
steps['scoutingNANO_withPrompt_data14.0'] = merge([{'-s': 'NANO:@Prompt+@ScoutMonitor'},
steps['NANO_data14.0']])

steps['l1ScoutingNANO_data14.0'] = merge([{'-s': 'NANO:@L1Scout', '-n': '1000'},
steps['NANO_data14.0']])

steps['l1ScoutingSelectionNANO_data14.0'] = merge([{'-s': 'NANO:@L1ScoutSelect', '-n': '1000'},
steps['NANO_data14.0']])

# DPG custom NANO
steps['muDPGNANO_data14.0'] = merge([{'-s': 'RAW2DIGI,NANO:@MUDPG', '-n': '100'},
steps['NANO_data14.0']])
Expand Down Expand Up @@ -456,6 +468,8 @@ def next(self, index: int = None) -> None:
workflows[_wfn()] = ['lepTrackInfoNANOdata140Xrun3', ['MuonEG2024MINIAOD14.0', 'lepTrackInfoNANO_data14.0']]
workflows[_wfn()] = ['ScoutingNANOdata140Xrun3', ['ScoutingPFRun32024RAW14.0', 'scoutingNANO_data14.0']]
workflows[_wfn()] = ['ScoutingNANOwithPromptdata140Xrun3', ['ScoutingPFMonitor2024MINIAOD14.0', 'scoutingNANO_withPrompt_data14.0']]
workflows[_wfn()] = ['L1ScoutingNANOdata140Xrun3', ['L1Scouting2024RAW14.0', 'l1ScoutingNANO_data14.0']]
workflows[_wfn()] = ['L1ScoutingSelectionNANOdata140Xrun3', ['L1ScoutingSelection2024RAW14.0', 'l1ScoutingSelectionNANO_data14.0']]
Copy link
Contributor

@ftorrresd ftorrresd Jun 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like these two lines overflow the WF counter.

My naive suggestion for now would be to move the L1Scounting to a new series (2500.28x). I also leave it for the others to comment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patinkaew -- please, have a look at #48459

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ftorrresd thank you!
Sorry for a late reply, we had a discussion during L1Scouting Weekly today also and we are fine with moving to a new series. However, I think the new PR to extend the workflow numbers can work really well also. I will keep on eye on #48459 and once that is merged, I will rebase this PR.


# DPG custom NANOs, data
_wfn.subnext()
Expand Down
3 changes: 3 additions & 0 deletions DataFormats/L1Scouting/interface/OrbitCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ class OrbitCollection {
T& operator[](std::size_t i) { return data_[i]; }
const T& operator[](std::size_t i) const { return data_[i]; }

//used by OrbitFlatTable
const std::vector<unsigned>& bxOffsets() const { return bxOffsets_; };

// used by ROOT storage
CMS_CLASS_VERSION(3)

Expand Down
2 changes: 1 addition & 1 deletion DataFormats/L1Scouting/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@
<class name="edm::Wrapper<l1ScoutingRun3::JetOrbitCollection>"/>
<class name="edm::Wrapper<l1ScoutingRun3::MuonOrbitCollection>"/>
<class name="edm::Wrapper<l1ScoutingRun3::TauOrbitCollection>"/>

</lcgdict>
3 changes: 2 additions & 1 deletion DataFormats/NanoAOD/interface/FlatTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ namespace nanoaod {
: name(aname), doc(docString), type(atype), firstIndex(anIndex) {}
};

private:
protected:
template <typename T>
auto beginData(unsigned int column) const {
return bigVector<T>().cbegin() + columns_[column].firstIndex;
Expand All @@ -194,6 +194,7 @@ namespace nanoaod {
return bigVector<T>().begin() + columns_[column].firstIndex;
}

private:
template <typename T>
auto const &bigVector() const {
return bigVectorImpl<T>(*this);
Expand Down
102 changes: 102 additions & 0 deletions DataFormats/NanoAOD/interface/OrbitFlatTable.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
#ifndef DataFormats_L1Scouting_OrbitFlatTable_h
#define DataFormats_L1Scouting_OrbitFlatTable_h

/**
* A cross-breed of a FlatTable and an OrbitCollection
*/

#include "DataFormats/NanoAOD/interface/FlatTable.h"

#include <cstdint>
#include <vector>
#include <string>
#include <type_traits>

namespace l1ScoutingRun3 {

class OrbitFlatTable : public nanoaod::FlatTable {
public:
static constexpr unsigned int NBX = 3564;

OrbitFlatTable() : nanoaod::FlatTable(), bxOffsets_(orbitBufferSize_ + 1, 0) {}

OrbitFlatTable(std::vector<unsigned> bxOffsets,
const std::string &name,
bool singleton = false,
bool extension = false)
: nanoaod::FlatTable(bxOffsets.back(), name, singleton, extension), bxOffsets_(bxOffsets) {
if (bxOffsets.size() != orbitBufferSize_ + 1) {
throw cms::Exception("LogicError") << "Mismatch between bxOffsets.size() " << bxOffsets.size()
<< " and orbitBufferSize_ + 1" << (orbitBufferSize_ + 1);
}
}

~OrbitFlatTable() {}

using FlatTable::nRows;
using FlatTable::size;

/// number of rows for single BX
unsigned int nRows(unsigned bx) const {
if (bx >= orbitBufferSize_)
throwBadBx(bx);
return bxOffsets_[bx + 1] - bxOffsets_[bx];
};
unsigned int size(unsigned bx) const { return nRows(bx); }

/// get a column by index (const)
template <typename T>
auto columnData(unsigned int column) const {
return nanoaod::FlatTable::columnData<T>(column);
}

/// get a column by index and bx (const)
template <typename T>
auto columnData(unsigned int column, unsigned bx) const {
if (bx >= orbitBufferSize_)
throwBadBx(bx);
auto begin = beginData<T>(column);
return std::span(begin + bxOffsets_[bx], begin + bxOffsets_[bx + 1]);
}

/// get a column by index (non-const)
template <typename T>
auto columnData(unsigned int column) {
return nanoaod::FlatTable::columnData<T>(column);
}

/// get a column by index and bx (non-const)
template <typename T>
auto columnData(unsigned int column, unsigned bx) {
if (bx >= orbitBufferSize_)
throwBadBx(bx);
auto begin = beginData<T>(column);
return std::span(begin + bxOffsets_[bx], begin + bxOffsets_[bx + 1]);
}

/// get a column value for singleton (const)
template <typename T>
const auto &columValue(unsigned int column, unsigned bx) const {
if (!singleton())
throw cms::Exception("LogicError", "columnValue works only for singleton tables");
if (bx >= orbitBufferSize_ || bxOffsets_[bx + 1] == bxOffsets_[bx])
throwBadBx(bx);
auto begin = beginData<T>(column);
return *(begin + bxOffsets_[bx]);
}

private:
std::vector<unsigned> bxOffsets_;

// there are 3564 BX in one orbtit [1,3564], one extra
// count added to keep first entry of the vector
static constexpr int orbitBufferSize_ = NBX + 1;

[[noreturn]] void throwBadBx(unsigned bx) const {
throw cms::Exception("OrbitFlatTable") << "Trying to access bad bx " << bx;
}
};

} // namespace l1ScoutingRun3

#endif
1 change: 1 addition & 0 deletions DataFormats/NanoAOD/src/classes.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "Rtypes.h"

#include "DataFormats/NanoAOD/interface/FlatTable.h"
#include "DataFormats/NanoAOD/interface/OrbitFlatTable.h"
#include "DataFormats/NanoAOD/interface/MergeableCounterTable.h"
#include "DataFormats/NanoAOD/interface/UniqueString.h"
#include "DataFormats/Common/interface/Wrapper.h"
5 changes: 5 additions & 0 deletions DataFormats/NanoAOD/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,10 @@
<version ClassVersion="3" checksum="2793726511"/>
</class>
<class name="edm::Wrapper<nanoaod::UniqueString>" />

<class name="l1ScoutingRun3::OrbitFlatTable" ClassVersion="3">
<version ClassVersion="3" checksum="1910072015"/>
</class>
<class name="edm::Wrapper<l1ScoutingRun3::OrbitFlatTable>"/>
</lcgdict>

7 changes: 7 additions & 0 deletions L1TriggerScouting/Utilities/plugins/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<use name="tbb"/>
<use name="FWCore/Framework"/>
<use name="FWCore/ParameterSet"/>
<use name="FWCore/PluginManager"/>
<use name="IOPool/Provenance"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/L1Trigger"/>
<use name="DataFormats/L1Scouting"/>
<use name="DataFormats/NanoAOD"/>
<use name="PhysicsTools/NanoAOD"/>
<use name="EventFilter/Utilities"/>
<use name="L1TriggerScouting/Utilities"/>
<use name="CommonTools/Utils"/>
<use name="Utilities/General"/>
<flags EDM_PLUGIN="1"/>
Loading