73 edm::LogInfo(
"SUSY_HLT_Muon_Hadronic") <<
"SUSY_HLT_Muon_Hadronic::analyze" << std::endl;
80 if (!pfMETCollection.
isValid()) {
81 edm::LogError(
"SUSY_HLT_Muon_Hadronic") <<
"invalid collection: PFMET" 90 if (!pfJetCollection.
isValid()) {
91 edm::LogError(
"SUSY_HLT_Muon_Hadronic") <<
"invalid collection: PFJets" 97 if (!caloJetCollection.
isValid()) {
98 edm::LogError(
"SUSY_HLT_Muon_Hadronic") <<
"invalid collection: CaloJets" 108 if (!MuonCollection.
isValid()) {
109 edm::LogError(
"SUSY_HLT_Mu_Hadronic") <<
"invalid collection: Muons " 120 edm::LogError(
"SUSY_HLT_Muon_Hadronic") <<
"invalid collection: TriggerResults" 126 if (!triggerSummary.
isValid()) {
127 edm::LogError(
"SUSY_HLT_Muon_Hadronic") <<
"invalid collection: TriggerSummary" 133 std::vector<Lepton> onlineMuons;
136 if (!(filterIndex >= triggerSummary->
sizeFilters())) {
138 for (
size_t j = 0; j < keys.size(); ++j) {
140 if (fabs(foundObject.
id()) == 13) {
145 theMuon.
pt = foundObject.
pt();
146 theMuon.
phi = foundObject.
phi();
147 theMuon.
eta = foundObject.
eta();
148 onlineMuons.push_back(theMuon);
153 bool hasFired =
false;
154 bool hasFiredAuxiliaryForMuonLeg =
false;
155 bool hasFiredAuxiliaryForHadronicLeg =
false;
157 unsigned int numTriggers = trigNames.
size();
158 for (
unsigned int hltIndex = 0; hltIndex < numTriggers; ++hltIndex) {
160 hltresults->
accept(hltIndex))
163 hltresults->
wasrun(hltIndex) && hltresults->
accept(hltIndex))
164 hasFiredAuxiliaryForMuonLeg =
true;
166 hltresults->
wasrun(hltIndex) && hltresults->
accept(hltIndex))
167 hasFiredAuxiliaryForHadronicLeg =
true;
170 if (hasFiredAuxiliaryForMuonLeg || hasFiredAuxiliaryForHadronicLeg || !
e.isRealData()) {
171 std::vector<Lepton> offlineMuons;
172 for (reco::MuonCollection::const_iterator
muon = MuonCollection->begin();
muon != MuonCollection->end(); ++
muon) {
179 offlineMuons.push_back(theMuon);
197 int indexOfMatchedMuon = -1;
198 int offlineCounter = 0;
199 for (std::vector<Lepton>::iterator offline_muon = offlineMuons.begin();
200 (offline_muon != offlineMuons.end() && indexOfMatchedMuon == -1);
202 for (std::vector<Lepton>::iterator online_muon = onlineMuons.begin(); online_muon != onlineMuons.end();
204 if (
sqrt((offline_muon->phi - online_muon->phi) * (offline_muon->phi - online_muon->phi) +
205 (offline_muon->eta - online_muon->eta) * (offline_muon->eta - online_muon->eta)) < 0.5) {
206 indexOfMatchedMuon = offlineCounter;
216 for (reco::PFJetCollection::const_iterator i_pfjet = pfJetCollection->begin(); i_pfjet != pfJetCollection->end();
222 pfHT += i_pfjet->pt();
224 for (reco::CaloJetCollection::const_iterator i_calojet = caloJetCollection->begin();
225 i_calojet != caloJetCollection->end();
231 caloHT += i_calojet->pt();
234 if ((hasFiredAuxiliaryForMuonLeg || !
e.isRealData()) && !offlineMuons.empty() &&
236 if (hasFired && indexOfMatchedMuon >= 0) {
244 if ((hasFiredAuxiliaryForHadronicLeg || !
e.isRealData()) && indexOfMatchedMuon >= 0 &&
251 if ((hasFiredAuxiliaryForHadronicLeg || !
e.isRealData()) && indexOfMatchedMuon >= 0 &&
bool wasrun() const
Was at least one path run?
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
trigger::size_type sizeFilters() const
bool accept() const
Has at least one path accepted the event?
const Keys & filterKeys(trigger::size_type index) const
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
edm::InputTag triggerFilter_
std::string triggerPathAuxiliaryForHadronic_
Strings::size_type size() const
MonitorElement * h_MuTurnOn_den
std::vector< Muon > MuonCollection
collection of Muon objects
MonitorElement * h_triggerMuEta
edm::EDGetTokenT< reco::PFJetCollection > thePfJetCollection_
Single trigger physics object (e.g., an isolated muon)
std::string triggerPathAuxiliaryForMuon_
MonitorElement * h_triggerMuPt
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollection_
const TriggerObjectCollection & getObjects() const
MonitorElement * h_pfMetTurnOn_num
MonitorElement * h_triggerMuPhi
MonitorElement * h_pfHTTurnOn_den
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
edm::EDGetTokenT< reco::MuonCollection > theMuonCollection_
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
static const char *const trigNames[]
std::string const & triggerName(unsigned int index) const
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
std::vector< size_type > Keys
MonitorElement * h_pfHTTurnOn_num
MonitorElement * h_MuTurnOn_num
MonitorElement * h_pfMetTurnOn_den
bool comparePt(Lepton a, Lepton b)