71 edm::LogInfo(
"SUSY_HLT_MuEle_Hadronic") <<
"SUSY_HLT_MuEle_Hadronic::analyze" << std::endl;
78 if (!pfJetCollection.
isValid()) {
79 edm::LogError(
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: PFJets" 85 if (!caloJetCollection.
isValid()) {
86 edm::LogError(
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: CaloJets" 96 if (!MuonCollection.
isValid()) {
97 edm::LogError(
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: Muons " 107 if (!ElectronCollection.
isValid()) {
108 edm::LogError(
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: Electrons " 119 edm::LogError(
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: TriggerResults" 125 if (!triggerSummary.
isValid()) {
126 edm::LogError(
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: TriggerSummary" 132 std::vector<float> ptMuon, etaMuon, phiMuon, ptElectron, etaElectron, phiElectron;
135 if (!(filterIndexEle >= triggerSummary->
sizeFilters())) {
137 for (
size_t j = 0; j < keys.size(); ++j) {
142 for (
unsigned int x = 0;
x < ptElectron.size();
x++) {
143 if (fabs(ptElectron[
x] - foundObject.
pt()) < 0.01 || fabs(etaElectron[
x] - foundObject.
eta()) < 0.001 ||
144 fabs(phiElectron[
x] - foundObject.
phi()) < 0.001)
152 ptElectron.push_back(foundObject.
pt());
153 etaElectron.push_back(foundObject.
eta());
154 phiElectron.push_back(foundObject.
phi());
160 for (
unsigned int x = 0;
x < ptMuon.size();
x++) {
161 if (fabs(ptMuon[
x] - foundObject.
pt()) < 0.01)
169 ptMuon.push_back(foundObject.
pt());
170 etaMuon.push_back(foundObject.
eta());
171 phiMuon.push_back(foundObject.
phi());
177 if (!ptMuon.empty() && !ptElectron.empty()) {
189 bool hasFired =
false;
190 bool hasFiredAuxiliaryForMuEleLeg =
false;
191 bool hasFiredAuxiliaryForHadronicLeg =
false;
193 unsigned int numTriggers = trigNames.
size();
194 for (
unsigned int hltIndex = 0; hltIndex < numTriggers; ++hltIndex) {
196 hltresults->
accept(hltIndex))
199 hltresults->
wasrun(hltIndex) && hltresults->
accept(hltIndex))
200 hasFiredAuxiliaryForMuEleLeg =
true;
202 hltresults->
wasrun(hltIndex) && hltresults->
accept(hltIndex))
203 hasFiredAuxiliaryForHadronicLeg =
true;
206 if (hasFiredAuxiliaryForMuEleLeg || hasFiredAuxiliaryForHadronicLeg) {
208 int indexOfMatchedMuEle[2] = {-1};
209 int matchedCounter = 0;
210 int offlineCounter = 0;
211 for (reco::MuonCollection::const_iterator
muon = MuonCollection->begin();
212 (
muon != MuonCollection->end() && matchedCounter < 1);
214 for (
size_t off_i = 0; off_i < ptMuon.size(); ++off_i) {
215 if (
sqrt((
muon->phi() - phiMuon[off_i]) * (
muon->phi() - phiMuon[off_i]) +
216 (
muon->eta() - etaMuon[off_i]) * (
muon->eta() - etaMuon[off_i])) < 0.5) {
217 indexOfMatchedMuEle[matchedCounter] = offlineCounter;
225 for (reco::GsfElectronCollection::const_iterator
electron = ElectronCollection->begin();
226 (
electron != ElectronCollection->end() && matchedCounter < 2);
228 for (
size_t off_i = 0; off_i < ptElectron.size(); ++off_i) {
230 (
electron->eta() - etaElectron[off_i]) * (
electron->eta() - etaElectron[off_i])) < 0.5) {
231 indexOfMatchedMuEle[matchedCounter] = offlineCounter;
241 for (reco::PFJetCollection::const_iterator i_pfjet = pfJetCollection->begin(); i_pfjet != pfJetCollection->end();
247 pfHT += i_pfjet->pt();
249 for (reco::CaloJetCollection::const_iterator i_calojet = caloJetCollection->begin();
250 i_calojet != caloJetCollection->end();
256 caloHT += i_calojet->pt();
259 if (hasFiredAuxiliaryForMuEleLeg && !MuonCollection->empty() && !ElectronCollection->empty()) {
260 if (hasFired && indexOfMatchedMuEle[1] >= 0 && indexOfMatchedMuEle[0] >= 0) {
268 if (hasFiredAuxiliaryForHadronicLeg) {
MonitorElement * h_EleTurnOn_den
bool wasrun() const
Was at least one path run?
edm::EDGetTokenT< reco::MuonCollection > theMuonCollection_
MonitorElement * h_triggerElePt
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > PtEtaPhiMLorentzVectorD
Lorentz vector with cartesian internal representation.
trigger::size_type sizeFilters() const
std::string triggerPathAuxiliaryForHadronic_
MonitorElement * h_triggerMuEta
MonitorElement * h_triggerMuEleMass
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
Strings::size_type size() const
edm::InputTag triggerFilter_
edm::EDGetTokenT< reco::GsfElectronCollection > theElectronCollection_
MonitorElement * h_pfHTTurnOn_num
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
std::vector< Muon > MuonCollection
collection of Muon objects
edm::EDGetTokenT< reco::PFJetCollection > thePfJetCollection_
MonitorElement * h_MuTurnOn_num
MonitorElement * h_triggerMuPt
Single trigger physics object (e.g., an isolated muon)
const TriggerObjectCollection & getObjects() const
std::string triggerPathAuxiliaryForMuEle_
MonitorElement * h_triggerElePhi
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollection_
std::vector< Electron > ElectronCollection
collectin of Electron objects
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
MonitorElement * h_pfHTTurnOn_den
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
std::vector< size_type > Keys
MonitorElement * h_MuTurnOn_den
MonitorElement * h_triggerEleEta
MonitorElement * h_EleTurnOn_num
MonitorElement * h_triggerMuPhi