124 tree_ =
fs_->
make<TTree>(
"L1UpgradeTfMuonTree",
"L1UpgradeTfMuonTree");
125 tree_->Branch(
"L1UpgradeBmtfMuon",
"L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat", &
l1UpgradeBmtfData, 32000, 3);
126 tree_->Branch(
"L1UpgradeKBmtfMuon",
"L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat", &
l1UpgradeKBmtfData, 32000, 3);
127 tree_->Branch(
"L1UpgradeOmtfMuon",
"L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat", &
l1UpgradeOmtfData, 32000, 3);
128 tree_->Branch(
"L1UpgradeEmtfMuon",
"L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat", &
l1UpgradeEmtfData, 32000, 3);
149 if (algoFwVersion < 2499805536) {
175 iEvent.getByToken(legacybmtfMuonToken, bmtfMuon);
176 iEvent.getByToken(kbmtfMuonToken, kbmtfMuon);
185 edm::LogWarning(
"MissingProduct") <<
"L1Upgrade BMTF muons not found. Branch will not be filled" << std::endl;
191 edm::LogWarning(
"MissingProduct") <<
"L1Upgrade kBMTF muons not found. Branch will not be filled" << std::endl;
197 edm::LogWarning(
"MissingProduct") <<
"L1Upgrade OMTF muons not found. Branch will not be filled" << std::endl;
203 edm::LogWarning(
"MissingProduct") <<
"L1Upgrade EMTF muons not found. Branch will not be filled" << std::endl;
209 edm::LogWarning(
"MissingProduct") <<
"L1Upgrade BMTF Ph Inputs not found. Branch will not be filled" << std::endl;
214 edm::LogWarning(
"MissingProduct") <<
"L1Upgrade BMTF Th Inputs not found. Branch will not be filled" << std::endl;
235 <<
"Both BMTF feds (1376, 1377) seem empty, will lead to unexpected results in tree from data.";
240 edm::LogInfo(
"L1UpgradeTfMuonTreeProducer") <<
"L1T Rcd taken from the FEDData.";
241 edm::LogInfo(
"L1UpgradeTfMuonTreeProducer") <<
"l1tRcd.size=" << l1tRcd.
size() <<
" for fed:" << nonEmptyFed;
243 const unsigned char*
data = l1tRcd.
data();
254 edm::LogError(
"L1UpgradeTfMuonTreeProducer") <<
"Could not extract AMC13 Packet.";
258 if (!packet.
payload().empty()) {
260 const uint32_t*
start = (
const uint32_t*)payload64.get();
264 return payload.getAlgorithmFWVersion();
267 edm::LogError(
"L1UpgradeTfMuonTreeProducer") <<
"AMC13 payload is empty, cannot extract AMC13 Packet.";
static const std::string kSharedResource
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeEmtf
T getParameter(std::string const &) const
~L1UpgradeTfMuonTreeProducer() override=default
L1UpgradeTfMuonTreeProducer(const edm::ParameterSet &)
BXVector< RegionalMuonCand > RegionalMuonCandBxCollection
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat * l1UpgradeEmtfData
size_t size() const
Lenght of the data buffer in bytes.
const edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > emtfMuonToken_
void beginJob(void) override
const edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > bmtfMuonToken_
const edm::EDGetTokenT< L1MuDTChambThContainer > bmtfThInputToken_
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeOmtf
Log< level::Error, false > LogError
L1Analysis::L1AnalysisBMTFInputs l1UpgradeBmtfInputs
void analyze(const edm::Event &, const edm::EventSetup &) override
const edm::EDGetTokenT< FEDRawDataCollection > fedToken_
edm::Handle< FEDRawDataCollection > feds_
const edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > omtfMuonToken_
const edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > bmtf2MuonToken_
#define DEFINE_FWK_MODULE(type)
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeBmtf
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat * l1UpgradeBmtfData
Log< level::Info, false > LogInfo
unsigned long long uint64_t
bool parse(const uint64_t *start, const uint64_t *data, unsigned int size, unsigned int lv1, unsigned int bx, bool legacy_mc=false, bool mtf7_mode=false)
L1Analysis::L1AnalysisBMTFInputsDataFormat * l1UpgradeBmtfInputsData
const edm::EDGetTokenT< L1MuDTChambPhContainer > bmtfPhInputToken_
char data[epos_bytes_allocation]
std::vector< amc::Packet > payload() const
L1AnalysisL1UpgradeTfMuonDataFormat * getData()
T * make(const Args &...args) const
make new ROOT object
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeKBmtf
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat * l1UpgradeOmtfData
Log< level::Warning, false > LogWarning
edm::Service< TFileService > fs_
unsigned getAlgoFwVersion()
void SetTfMuon(const l1t::RegionalMuonCandBxCollection &muon, unsigned maxL1UpgradeTfMuon)
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat * l1UpgradeKBmtfData
unsigned maxL1UpgradeTfMuon_