16 #include <unordered_map> 55 std::unordered_map<std::string, std::vector<int>>
data_;
59 {
"GTTPromptJet", {
"Pt",
"Eta",
"Phi"}},
60 {
"GTTDisplacedJet", {
"Pt",
"Eta",
"Phi"}},
61 {
"GTTPrimaryVertex", {
"Z0"}},
62 {
"GMTSaPromptMuon", {
"Pt",
"Eta",
"Phi",
"Z0"}},
63 {
"GMTSaDisplacedMuon", {
"Pt",
"Eta",
"Phi",
"Z0"}},
64 {
"GMTTkMuon", {
"Pt",
"Eta",
"Phi",
"Z0"}},
65 {
"CL2Jet", {
"Pt",
"Eta",
"Phi",
"Z0"}},
66 {
"CL2Photon", {
"Pt",
"Eta",
"Phi"}},
67 {
"CL2Electron", {
"Pt",
"Eta",
"Phi",
"Z0"}},
68 {
"CL2EtSum", {
"Pt",
"Phi",
"ScaSumPt"}},
69 {
"CL2HtSum", {
"Pt",
"Phi",
"ScaSumPt"}}};
73 maxNTuples_(
config.getParameter<unsigned>(
"maxNTuples")),
85 tree_(fs_->
make<TTree>(
"L1PhaseIITree",
"L1PhaseIITree")) {
97 desc.add<
unsigned>(
"maxNTuples");
108 else if (
var ==
"Eta")
110 else if (
var ==
"Phi")
112 else if (
var ==
"Z0")
114 else if (
var ==
"D0")
116 else if (
var ==
"ScaSumPt")
117 data_.at(
name).push_back(
object.hwSca_sum());
124 fillData(gttPromptJets,
"GTTPromptJet");
127 fillData(gttDisplacedJets,
"GTTDisplacedJet");
130 fillData(gttPrimaryVertices,
"GTTPrimaryVertex");
133 fillData(gmtSaPromptMuons,
"GMTSaPromptMuon");
136 fillData(gmtSaDisplacedMuons,
"GMTSaDisplacedMuon");
148 fillData(cl2Electrons,
"CL2Electron");
std::vector< P2GTCandidate > P2GTCandidateCollection
const edm::EDGetTokenT< P2GTCandidateCollection > gttPromptJetToken_
S make(const edm::ParameterSet &cfg)
void analyze(const edm::Event &, const edm::EventSetup &) override
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
const edm::EDGetTokenT< P2GTCandidateCollection > cl2ElectronToken_
const edm::EDGetTokenT< P2GTCandidateCollection > cl2HtSumToken_
void addDefault(ParameterSetDescription const &psetDescription)
const edm::Service< TFileService > fs_
const edm::EDGetTokenT< P2GTCandidateCollection > gmtSaDisplacedMuonToken_
const edm::EDGetTokenT< P2GTCandidateCollection > gttPrimaryVertexToken_
const std::string producerName_
void fillData(const l1t::P2GTCandidateCollection &collection, const std::string &instanceName)
#define DEFINE_FWK_MODULE(type)
const edm::EDGetTokenT< P2GTCandidateCollection > cl2PhotonToken_
const edm::EDGetTokenT< P2GTCandidateCollection > gttDisplacedJetToken_
std::unordered_map< std::string, std::vector< int > > data_
const edm::EDGetTokenT< P2GTCandidateCollection > cl2EtSumToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const unsigned maxNTuples_
const edm::EDGetTokenT< P2GTCandidateCollection > gmtSaPromptMuonToken_
static const std::map< std::string, std::vector< std::string > > NTUPLE_VARIABLES
L1GTNTupleProducer(const edm::ParameterSet &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const edm::EDGetTokenT< P2GTCandidateCollection > cl2JetToken_
const edm::EDGetTokenT< P2GTCandidateCollection > gmtTkMuonToken_