123 tree_ =
fs_->
make<TTree>(
"L1UpgradeTfMuonTree",
"L1UpgradeTfMuonTree");
124 tree_->Branch(
"L1UpgradeBmtfMuon",
"L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat", &l1UpgradeBmtfData, 32000, 3);
125 tree_->Branch(
"L1UpgradeKBmtfMuon",
"L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat", &
l1UpgradeKBmtfData, 32000, 3);
126 tree_->Branch(
"L1UpgradeOmtfMuon",
"L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat", &
l1UpgradeOmtfData, 32000, 3);
127 tree_->Branch(
"L1UpgradeEmtfMuon",
"L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat", &
l1UpgradeEmtfData, 32000, 3);
150 if (algoFwVersion < 2499805536) {
175 iEvent.
getByToken(legacybmtfMuonToken, bmtfMuon);
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;
229 if (
feds_->FEDData(1376).size() > 0)
231 else if (
feds_->FEDData(1377).size() > 0)
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();
261 const uint32_t*
end = start + (packet.
payload().at(0).size() * 2);
264 return payload.getAlgorithmFWVersion();
267 edm::LogError(
"L1UpgradeTfMuonTreeProducer") <<
"AMC13 payload is empty, cannot extract AMC13 Packet.";
std::vector< amc::Packet > payload() const
T getUntrackedParameter(std::string const &, T const &) const
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeEmtf
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > bmtf2MuonToken_
L1UpgradeTfMuonTreeProducer(const edm::ParameterSet &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
L1Analysis::L1AnalysisL1UpgradeTfMuonDataFormat * l1UpgradeEmtfData
T * make(const Args &...args) const
make new ROOT object
void beginJob(void) override
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeOmtf
Log< level::Error, false > LogError
L1Analysis::L1AnalysisBMTFInputs l1UpgradeBmtfInputs
size_t size() const
Lenght of the data buffer in bytes.
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< FEDRawDataCollection > fedToken_
edm::Handle< FEDRawDataCollection > feds_
edm::EDGetTokenT< L1MuDTChambThContainer > bmtfThInputToken_
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > bmtfMuonToken_
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > omtfMuonToken_
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeBmtf
edm::EDGetTokenT< L1MuDTChambPhContainer > bmtfPhInputToken_
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)
T getParameter(std::string const &) const
L1Analysis::L1AnalysisBMTFInputsDataFormat * l1UpgradeBmtfInputsData
char data[epos_bytes_allocation]
L1AnalysisL1UpgradeTfMuonDataFormat * getData()
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
edm::EDGetTokenT< l1t::RegionalMuonCandBxCollection > emtfMuonToken_
L1Analysis::L1AnalysisL1UpgradeTfMuon l1UpgradeKBmtf
~L1UpgradeTfMuonTreeProducer() override
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_