|
|
Go to the documentation of this file.
16 #include "TGraphAsymmErrors.h"
53 void endJob()
override;
77 std::vector<reco::Particle>& HLTMu,
80 size_t dim = HLTMu.size();
84 double muRecoPt =
mu.pt();
85 hTrigMuonPtDenS_->Fill(muRecoPt);
89 for (
size_t k = 0;
k < dim;
k++) {
90 if ((
deltaR(HLTMu[
k],
mu) < DR) && (fabs(HLTMu[
k].
pt() -
mu.pt()) / HLTMu[
k].
pt() < DPtRel)) {
92 std::cout <<
" matching a muon " << std::endl;
93 std::cout <<
"muon reco pt : " << muRecoPt << std::endl;
94 std::cout <<
"muon reco eta " <<
mu.eta() << std::endl;
95 std::cout <<
"muon trigger pt " << HLTMu[
k].pt() << std::endl;
97 hTrigMuonPtNumS_->Fill(muRecoPt);
99 deltaPtOverPt_->Fill(fabs(HLTMu[
k].
pt() -
mu.pt()) / HLTMu[
k].
pt());
101 std::cout <<
"muon trigger eta : " << HLTMu[
k].eta() << std::endl;
103 std::cout <<
"deltaPtOverPt: " << fabs(HLTMu[
k].
pt() -
mu.pt()) / HLTMu[
k].
pt() << std::endl;
115 ptMuCut_(
cfg.getUntrackedParameter<double>(
"ptMuCut")),
116 etaMuCut_(
cfg.getUntrackedParameter<double>(
"etaMuCut")),
118 L3FilterName_(
cfg.getParameter<
std::
string>(
"L3FilterName")),
119 maxDPtRel_(
cfg.getParameter<double>(
"maxDPtRel")),
120 maxDeltaR_(
cfg.getParameter<double>(
"maxDeltaR")),
121 nbins_(
cfg.getParameter<double>(
"ptMax_")),
122 ptMax_(
cfg.getParameter<double>(
"ptMax_")) {
145 LogWarning(
"") <<
">>> TRIGGER collection does not exist !!!";
166 std::vector<reco::Particle> HLTMuMatched;
167 for (
size_t ia = 0; ia < handleTriggerEvent->
sizeFilters(); ++ia) {
170 size_t p = fullname.find_first_of(
':');
171 if (
p != std::string::npos) {
172 name = fullname.substr(0,
p);
178 for (trigger::Keys::const_iterator ki =
k.begin(); ki !=
k.end(); ++ki) {
180 HLTMuMatched.push_back(toc[*ki].particle());
190 LogError(
"") <<
">>> muon collection does not exist !!!";
194 std::vector<reco::Muon> highPtGlbMuons;
196 for (
unsigned int i = 0;
i <
muons->size();
i++) {
199 double eta =
mu.eta();
201 if (
mu.isGlobalMuon())
202 highPtGlbMuons.push_back(
mu);
205 unsigned int nHighPtGlbMu = highPtGlbMuons.size();
206 std::cout <<
"I've got " << nHighPtGlbMu <<
" nHighPtGlbMu" << std::endl;
209 if (nHighPtGlbMu > 10)
212 for (
unsigned int i = 0;
i < nHighPtGlbMu;
i++) {
edm::Handle< edm::TriggerResults > triggerResults_
trigger::size_type sizeFilters() const
const Keys & filterKeys(trigger::size_type index) const
bool IsMuMatchedToHLTMu(const reco::Candidate *dau, std::vector< reco::Particle > HLTMu, double DR, double DPtRel)
static const char *const trigNames[]
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
static const std::string triggerResults
const edm::InputTag filterTag(trigger::size_type index) const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< trigger::TriggerEvent > trigEvToken_
MuTriggerAnalyzer(const edm::ParameterSet &pset)
edm::EDGetTokenT< TriggerResults > trigToken_
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
std::vector< size_type > Keys
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
std::string L3FilterName_
const TriggerObjectCollection & getObjects() const
std::string const & triggerName(unsigned int index) const
bool IsMuMatchedToHLTMu(const reco::Muon &, std::vector< reco::Particle > &, double, double)
edm::EDGetTokenT< View< Muon > > muonToken_
T * make(const Args &... args) const
make new ROOT object
edm::TriggerNames const * trigNames_
edm::Handle< trigger::TriggerEvent > handleTriggerEvent_