48 std::map<unsigned, unsigned>
sumN_;
62 trigger_(iConfig.getParameter<
edm::
InputTag>(
"trigger")),
68 muonMatch_(iConfig.getParameter<
std::
string>(
"muonMatch")),
70 minID_(iConfig.getParameter<unsigned>(
"minID")),
72 maxID_(iConfig.getParameter<unsigned>(
"maxID")),
85 fileService->
make<TH2D>(
"ptTrigCand",
"Object vs. candidate p_{T} (GeV)", 60, 0., 300., 60, 0., 300.);
86 histos2D_[
"ptTrigCand"]->SetXTitle(
"candidate p_{T} (GeV)");
87 histos2D_[
"ptTrigCand"]->SetYTitle(
"object p_{T} (GeV)");
90 fileService->
make<TH2D>(
"etaTrigCand",
"Object vs. candidate #eta", 50, -2.5, 2.5, 50, -2.5, 2.5);
91 histos2D_[
"etaTrigCand"]->SetXTitle(
"candidate #eta");
92 histos2D_[
"etaTrigCand"]->SetYTitle(
"object #eta");
96 histos2D_[
"phiTrigCand"]->SetXTitle(
"candidate #phi");
97 histos2D_[
"phiTrigCand"]->SetYTitle(
"object #phi");
99 histos1D_[
"turnOn"] = fileService->
make<TH1D>(
"turnOn",
"p_{T} (GeV) of matched candidate", 10, 0., 50.);
100 histos1D_[
"turnOn"]->SetXTitle(
"candidate p_{T} (GeV)");
101 histos1D_[
"turnOn"]->SetYTitle(
"# of objects");
105 histos1D_[
"ptMean"]->SetXTitle(
"trigger object type");
106 histos1D_[
"ptMean"]->SetYTitle(
"mean p_{T} (GeV)");
125 const helper::TriggerMatchHelper matchHelper;
132 for (
size_t iMuon = 0; iMuon <
muons->size(); ++iMuon) {
136 if (trigRef.isAvailable() && trigRef.isNonnull()) {
137 histos2D_[
"ptTrigCand"]->Fill(
muons->at(iMuon).pt(), trigRef->pt());
138 histos2D_[
"etaTrigCand"]->Fill(
muons->at(iMuon).eta(), trigRef->eta());
139 histos2D_[
"phiTrigCand"]->Fill(
muons->at(iMuon).phi(), trigRef->phi());
154 if (candRefs.empty())
160 if (muonRef.isAvailable() && muonRef.isNonnull()) {
161 histos1D_[
"turnOn"]->Fill(muonRef->pt());
void beginJob() override
everythin that needs to be done before the event loop
static const std::string kSharedResource
std::map< unsigned, unsigned > sumN_
internals for meanPt histogram calculation
std::map< std::string, TH2D * > histos2D_
std::map< unsigned, double > sumPt_
muons
the two sets of parameters below are mutually exclusive, depending if RECO or ALCARECO is used the us...
std::map< std::string, TH1D * > histos1D_
histogram management
~PatTriggerAnalyzer() override
default destructor
PatTriggerAnalyzer(const edm::ParameterSet &iConfig)
default constructor
void endJob() override
everythin that needs to be done after the event loop
#define DEFINE_FWK_MODULE(type)
Analysis-level trigger event class.
unsigned minID_
minimal id for meanPt plot
edm::EDGetTokenT< pat::MuonCollection > muonsToken_
input for muons
std::vector< Muon > MuonCollection
edm::InputTag trigger_
input for patTrigger
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
everythin that needs to be done during the event loop
T * make(const Args &...args) const
make new ROOT object
unsigned maxID_
maximal id for meanPt plot
std::string muonMatch_
input for trigger match objects
edm::EDGetTokenT< pat::TriggerEvent > triggerEventToken_
input for patTriggerEvent