83 edm::LogInfo(
"SUSY_HLT_VBF_Mu") <<
"SUSY_HLT_VBF_Mu::analyze" << std::endl;
91 if (!pfJetCollection.
isValid()) {
92 edm::LogError(
"SUSY_HLT_VBF_Mu") <<
"invalid collection: PFJets" 99 if (!caloJetCollection.
isValid()) {
100 edm::LogError(
"SUSY_HLT_VBF_Mu") <<
"invalid collection: CaloJets" 110 if (!MuonCollection.
isValid()) {
111 edm::LogError(
"SUSY_HLT_VBF_Mu") <<
"invalid collection: Muons " 122 if (!caloMETCollection.
isValid()) {
123 edm::LogError(
"SUSY_HLT_VBF_Mu") <<
"invalid collection: CaloMET" 130 if (!pfMETCollection.
isValid()) {
131 edm::LogError(
"SUSY_HLT_VBF_Mu") <<
"invalid collection: PFMET" 143 edm::LogError(
"SUSY_HLT_VBF_Mu") <<
"invalid collection: TriggerResults" 149 if (!triggerSummary.
isValid()) {
150 edm::LogError(
"SUSY_HLT_VBF_Mu") <<
"invalid collection: TriggerSummary" 157 std::vector<float> ptMuon, etaMuon, phiMuon;
160 if (!(filterIndexMu >= triggerSummary->
sizeFilters())) {
162 for (
size_t j = 0; j < keys.size(); ++j) {
164 if (fabs(foundObject.
id()) == 13) {
167 for (
unsigned int x = 0;
x < ptMuon.size();
x++) {
168 if (fabs(ptMuon[
x] - foundObject.
pt()) < 0.01)
176 ptMuon.push_back(foundObject.
pt());
177 etaMuon.push_back(foundObject.
eta());
178 phiMuon.push_back(foundObject.
phi());
189 if (!(filterIndexMet >= triggerSummary->
sizeFilters())) {
191 for (
size_t j = 0; j < keys.size(); ++j) {
200 std::vector<float> ptJet, etaJet, phiJet;
201 if (!(dijetFilterIndex >= triggerSummary->
sizeFilters())) {
203 const size_t nK(KEYS.size());
206 for (
size_t i = 0;
i < nK;
i++) {
210 for (
size_t j =
i; j < nK; j++) {
214 double tmpdeta = fabs(TO1.eta() - TO2.eta());
215 double tmpopposite = TO1.eta() * TO2.eta();
217 TLorentzVector j1(TO1.px(), TO1.py(), TO1.pz(), TO1.energy());
218 TLorentzVector j2(TO2.px(), TO2.py(), TO2.pz(), TO2.energy());
219 double tmpmass = (j1 + j2).M();
220 if (
dijet < tmpmass) {
233 if (filterIndexCaloMET < triggerSummary->sizeFilters()) {
236 float met_h = triggerObjects[keys[0]].pt();
242 if (filterIndexHt < triggerSummary->sizeFilters()) {
245 float ht = triggerObjects[keys[0]].pt();
250 bool hasFired =
false;
253 unsigned int numTriggers = trigNames.
size();
255 for (
unsigned int hltIndex = 0; hltIndex < numTriggers; ++hltIndex) {
257 hltresults->
accept(hltIndex))
262 int indexOfMatchedMuon = -1;
263 int offlineCounter = 0;
264 for (reco::MuonCollection::const_iterator
muon = MuonCollection->begin();
muon != MuonCollection->end(); ++
muon) {
265 for (
size_t off_i = 0; off_i < ptMuon.size(); ++off_i) {
267 indexOfMatchedMuon = offlineCounter;
276 for (reco::PFJetCollection::const_iterator i_pfjet = pfJetCollection->begin(); i_pfjet != pfJetCollection->end();
282 pfHT += i_pfjet->pt();
289 size_t jetCol = pfJetCollection->size();
291 for (
size_t i = 0;
i < jetCol;
i++) {
293 for (
size_t j =
i; j < jetCol; j++) {
296 double tmpdetaOff = fabs(pfJetCollection->at(
i).eta() - pfJetCollection->at(j).eta());
297 double tmpoppositeOff = pfJetCollection->at(
i).eta() * pfJetCollection->at(j).eta();
299 TLorentzVector j1Off(pfJetCollection->at(
i).px(),
300 pfJetCollection->at(
i).py(),
301 pfJetCollection->at(
i).pz(),
302 pfJetCollection->at(
i).energy());
303 TLorentzVector j2Off(pfJetCollection->at(j).px(),
304 pfJetCollection->at(j).py(),
305 pfJetCollection->at(j).pz(),
306 pfJetCollection->at(j).energy());
307 double tmpmassOff = (j1Off + j2Off).M();
331 if (indexOfMatchedMuon > -1 && (MuonCollection->at(indexOfMatchedMuon).pt() >
muonOnlinethreshold) &&
341 if (indexOfMatchedMuon > -1 && (MuonCollection->at(indexOfMatchedMuon).pt() >
muonOnlinethreshold) &&
MonitorElement * h_triggerMuPhi
bool wasrun() const
Was at least one path run?
edm::EDGetTokenT< reco::CaloMETCollection > theCaloMETCollection_
MonitorElement * h_num_met
trigger::size_type sizeFilters() const
MonitorElement * h_den_muonpt
MonitorElement * h_triggerCaloMet
edm::InputTag triggerMetFilter_
bool accept() const
Has at least one path accepted the event?
const Keys & filterKeys(trigger::size_type index) const
edm::EDGetTokenT< reco::MuonCollection > theMuonCollection_
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
double mjjOnlinethreshold
double muonOnlinethreshold
Strings::size_type size() const
MonitorElement * h_num_muoneta
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
edm::EDGetTokenT< reco::PFJetCollection > thePfJetCollection_
std::vector< Muon > MuonCollection
collection of Muon objects
Single trigger physics object (e.g., an isolated muon)
MonitorElement * h_num_mjj
edm::InputTag triggerDiJetFilter_
const TriggerObjectCollection & getObjects() const
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
MonitorElement * h_DiJetMass
MonitorElement * h_den_met
edm::InputTag triggerHTFilter_
edm::InputTag triggerMuFilter_
MonitorElement * h_triggerMuPt
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
MonitorElement * h_den_mjj
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
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollection_
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
MonitorElement * h_num_muonpt
MonitorElement * h_num_ht
double pfmetOnlinethreshold
MonitorElement * h_triggerMetPhi
MonitorElement * h_triggerMuEta
MonitorElement * h_den_ht
MonitorElement * h_triggerMet
edm::InputTag triggerCaloMETFilter_
MonitorElement * h_den_muoneta