73 edm::LogInfo(
"SUSY_HLT_DoubleMuon_Hadronic") <<
"SUSY_HLT_DoubleMuon_Hadronic::analyze" << std::endl;
80 if (!pfJetCollection.
isValid()) {
81 edm::LogError(
"SUSY_HLT_DoubleMuon_Hadronic") <<
"invalid collection: PFJets" 87 if (!caloJetCollection.
isValid()) {
88 edm::LogError(
"SUSY_HLT_DoubleMuon_Hadronic") <<
"invalid collection: CaloJets" 98 if (!MuonCollection.
isValid()) {
99 edm::LogError(
"SUSY_HLT_DoubleMuon_Hadronic") <<
"invalid collection: Muons " 110 edm::LogError(
"SUSY_HLT_DoubleMuon_Hadronic") <<
"invalid collection: TriggerResults" 116 if (!triggerSummary.
isValid()) {
117 edm::LogError(
"SUSY_HLT_DoubleMuon_Hadronic") <<
"invalid collection: TriggerSummary" 123 std::vector<float> ptMuon, etaMuon, phiMuon;
126 if (!(filterIndex >= triggerSummary->
sizeFilters())) {
128 for (
size_t j = 0; j < keys.size(); ++j) {
130 if (fabs(foundObject.
id()) == 13) {
134 ptMuon.push_back(foundObject.
pt());
135 etaMuon.push_back(foundObject.
eta());
136 phiMuon.push_back(foundObject.
phi());
139 if (ptMuon.size() >= 2) {
151 bool hasFired =
false;
152 bool hasFiredAuxiliaryForMuonLeg =
false;
153 bool hasFiredAuxiliaryForHadronicLeg =
false;
155 unsigned int numTriggers = trigNames.
size();
156 for (
unsigned int hltIndex = 0; hltIndex < numTriggers; ++hltIndex) {
158 hltresults->
accept(hltIndex))
161 hltresults->
wasrun(hltIndex) && hltresults->
accept(hltIndex))
162 hasFiredAuxiliaryForMuonLeg =
true;
164 hltresults->
wasrun(hltIndex) && hltresults->
accept(hltIndex))
165 hasFiredAuxiliaryForHadronicLeg =
true;
168 if (hasFiredAuxiliaryForMuonLeg || hasFiredAuxiliaryForHadronicLeg) {
170 int indexOfMatchedMuon[2] = {-1};
171 int matchedCounter = 0;
172 int offlineCounter = 0;
173 for (reco::MuonCollection::const_iterator
muon = MuonCollection->begin();
174 (
muon != MuonCollection->end() && matchedCounter < 2);
176 for (
size_t off_i = 0; off_i < ptMuon.size(); ++off_i) {
177 if (
sqrt((
muon->phi() - phiMuon[off_i]) * (
muon->phi() - phiMuon[off_i]) +
178 (
muon->eta() - etaMuon[off_i]) * (
muon->eta() - etaMuon[off_i])) < 0.5) {
179 indexOfMatchedMuon[matchedCounter] = offlineCounter;
189 for (reco::PFJetCollection::const_iterator i_pfjet = pfJetCollection->begin(); i_pfjet != pfJetCollection->end();
195 pfHT += i_pfjet->pt();
197 for (reco::CaloJetCollection::const_iterator i_calojet = caloJetCollection->begin();
198 i_calojet != caloJetCollection->end();
204 caloHT += i_calojet->pt();
207 if (hasFiredAuxiliaryForMuonLeg && MuonCollection->size() > 1) {
208 if (hasFired && indexOfMatchedMuon[1] >= 0) {
213 if (hasFiredAuxiliaryForHadronicLeg) {
MonitorElement * h_pfHTTurnOn_num
MonitorElement * h_MuTurnOn_den
bool wasrun() const
Was at least one path run?
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > PtEtaPhiMLorentzVectorD
Lorentz vector with cartesian internal representation.
trigger::size_type sizeFilters() const
MonitorElement * h_triggerMuPhi
std::string triggerPathAuxiliaryForHadronic_
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
bool accept() const
Has at least one path accepted the event?
MonitorElement * h_MuTurnOn_num
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::EDGetTokenT< reco::PFJetCollection > thePfJetCollection_
Strings::size_type size() const
std::string triggerPathAuxiliaryForMuon_
std::vector< Muon > MuonCollection
collection of Muon objects
Single trigger physics object (e.g., an isolated muon)
edm::InputTag triggerFilter_
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
edm::EDGetTokenT< reco::MuonCollection > theMuonCollection_
const TriggerObjectCollection & getObjects() const
MonitorElement * h_triggerMuPt
MonitorElement * h_triggerDoubleMuMass
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
static const char *const trigNames[]
MonitorElement * h_pfHTTurnOn_den
std::string const & triggerName(unsigned int index) const
std::vector< size_type > Keys
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollection_
MonitorElement * h_triggerMuEta