4 #include <cp3_llbb/Framework/interface/LeptonsProducer.h>
5 #include <cp3_llbb/Framework/interface/ScaleFactors.h>
7 #include <DataFormats/VertexReco/interface/Vertex.h>
8 #include <DataFormats/PatCandidates/interface/Muon.h>
14 MuonsProducer(
const std::string& name,
const ROOT::TreeGroup&
tree,
const edm::ParameterSet& config):
17 ScaleFactors::create_branches(config);
22 virtual void doConsumes(
const edm::ParameterSet& config, edm::ConsumesCollector&& collector)
override {
25 m_vertices_token = collector.consumes<std::vector<reco::Vertex>>(config.getUntrackedParameter<edm::InputTag>(
"vertices", edm::InputTag(
"offlineSlimmedPrimaryVertices")));
28 virtual void produce(edm::Event& event,
const edm::EventSetup& eventSetup)
override;
32 edm::EDGetTokenT<std::vector<reco::Vertex>> m_vertices_token;
35 std::vector<bool>& isLoose =
tree[
"isLoose"].write<std::vector<bool>>();
36 std::vector<bool>& isSoft =
tree[
"isSoft"].write<std::vector<bool>>();
37 std::vector<bool>& isMedium =
tree[
"isMedium"].write<std::vector<bool>>();
38 std::vector<bool>& isMedium2016 =
tree[
"isMedium2016"].write<std::vector<bool>>();
39 std::vector<bool>& isTight =
tree[
"isTight"].write<std::vector<bool>>();
40 std::vector<bool>& isHighPt =
tree[
"isHighPt"].write<std::vector<bool>>();
42 BRANCH(dxy, std::vector<float>);
43 BRANCH(dz, std::vector<float>);
44 BRANCH(dca, std::vector<float>);
ROOT::TreeGroup tree
Access point to output tree.
Definition: Producer.h:132
Definition: LeptonsProducer.h:10
virtual void doConsumes(const edm::ParameterSet &config, edm::ConsumesCollector &&collector) override
Hook for the CMSSW consumes interface.
Definition: LeptonsProducer.h:22
Definition: MuonsProducer.h:12
virtual void produce(edm::Event &event, const edm::EventSetup &eventSetup) override
Main method of the producer, called for each event.
Definition: MuonsProducer.cc:19
virtual void doConsumes(const edm::ParameterSet &config, edm::ConsumesCollector &&collector) override
Hook for the CMSSW consumes interface.
Definition: MuonsProducer.h:22
Definition: ScaleFactors.h:13