Skip to content

Commit 6426a97

Browse files
authored
Merge pull request #46036 from aloeliger/CICADA_L1TNtuples_dataformat
CICADA L1TTtuples Data Format Update
2 parents 79c1e01 + b1a0a08 commit 6426a97

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

L1Trigger/L1TNtuples/plugins/L1CaloSummaryTreeProducer.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include "DataFormats/L1CaloTrigger/interface/L1CaloCollections.h"
2323
#include "DataFormats/L1CaloTrigger/interface/L1CaloRegion.h"
24+
#include "DataFormats/L1CaloTrigger/interface/CICADA.h"
2425

2526
class L1CaloSummaryTreeProducer : public edm::one::EDAnalyzer<edm::one::SharedResources> {
2627
public:
@@ -36,14 +37,14 @@ class L1CaloSummaryTreeProducer : public edm::one::EDAnalyzer<edm::one::SharedRe
3637
L1Analysis::L1AnalysisCaloSummaryDataFormat* caloSummaryData_;
3738

3839
private:
39-
const edm::EDGetTokenT<float> scoreToken_;
40+
const edm::EDGetTokenT<l1t::CICADABxCollection> scoreToken_;
4041
const edm::EDGetTokenT<L1CaloRegionCollection> regionToken_;
4142
edm::Service<TFileService> fs_;
4243
TTree* tree_;
4344
};
4445

4546
L1CaloSummaryTreeProducer::L1CaloSummaryTreeProducer(const edm::ParameterSet& iConfig)
46-
: scoreToken_(consumes<float>(iConfig.getUntrackedParameter<edm::InputTag>("scoreToken"))),
47+
: scoreToken_(consumes<l1t::CICADABxCollection>(iConfig.getUntrackedParameter<edm::InputTag>("scoreToken"))),
4748
regionToken_(consumes<L1CaloRegionCollection>(iConfig.getUntrackedParameter<edm::InputTag>("regionToken"))) {
4849
usesResource(TFileService::kSharedResource);
4950
tree_ = fs_->make<TTree>("L1CaloSummaryTree", "L1CaloSummaryTree");
@@ -67,10 +68,10 @@ void L1CaloSummaryTreeProducer::analyze(const edm::Event& iEvent, const edm::Eve
6768
edm::LogWarning("L1Ntuple") << "Could not find region regions. CICADA model input will not be filled";
6869
}
6970

70-
edm::Handle<float> score;
71+
edm::Handle<l1t::CICADABxCollection> score;
7172
iEvent.getByToken(scoreToken_, score);
7273
if (score.isValid())
73-
caloSummaryData_->CICADAScore = *score;
74+
caloSummaryData_->CICADAScore = score->at(0, 0);
7475
else
7576
edm::LogWarning("L1Ntuple") << "Could not find a proper CICADA score. CICADA score will not be filled.";
7677

0 commit comments

Comments
 (0)