98 edm::LogInfo(
"SUSY_HLT_VBF_Mu") <<
"SUSY_HLT_VBF_Mu::analyze" << std::endl;
106 if ( !pfJetCollection.
isValid() ){
107 edm::LogError (
"SUSY_HLT_VBF_Mu") <<
"invalid collection: PFJets" <<
"\n";
113 if ( !caloJetCollection.
isValid() ){
114 edm::LogError (
"SUSY_HLT_VBF_Mu") <<
"invalid collection: CaloJets" <<
"\n";
123 if ( !MuonCollection.
isValid() ){
124 edm::LogError (
"SUSY_HLT_VBF_Mu") <<
"invalid collection: Muons " <<
"\n";
135 if ( !caloMETCollection.
isValid() ){
136 edm::LogError (
"SUSY_HLT_VBF_Mu") <<
"invalid collection: CaloMET" <<
"\n";
143 if ( !pfMETCollection.
isValid() ){
144 edm::LogError (
"SUSY_HLT_VBF_Mu") <<
"invalid collection: PFMET" <<
"\n";
155 edm::LogError (
"SUSY_HLT_VBF_Mu") <<
"invalid collection: TriggerResults" <<
"\n";
160 if(!triggerSummary.
isValid()) {
161 edm::LogError (
"SUSY_HLT_VBF_Mu") <<
"invalid collection: TriggerSummary" <<
"\n";
169 std::vector<float> ptMuon, etaMuon, phiMuon;
172 if( !(filterIndexMu >= triggerSummary->
sizeFilters()) ){
174 for(
size_t j = 0; j < keys.size(); ++j ){
176 if(fabs(foundObject.
id()) == 13){
179 for(
unsigned int x=0;
x<ptMuon.size();
x++){
180 if(fabs(ptMuon[
x] - foundObject.
pt()) < 0.01)
188 ptMuon.push_back(foundObject.
pt());
189 etaMuon.push_back(foundObject.
eta());
190 phiMuon.push_back(foundObject.
phi());
203 if( !(filterIndexMet >= triggerSummary->
sizeFilters()) ){
205 for(
size_t j = 0; j < keys.size(); ++j ){
214 std::vector<float> ptJet, etaJet, phiJet;
215 if( !(dijetFilterIndex >= triggerSummary->
sizeFilters()) ){
217 const size_t nK(KEYS.size());
220 for (
size_t i=0;
i < nK ;
i++ ) {
225 for (
size_t j=
i; j < nK; j++) {
229 double tmpdeta = fabs( TO1.eta() - TO2.eta() );
230 double tmpopposite = TO1.eta() * TO2.eta() ;
232 TLorentzVector j1 ( TO1.px(), TO1.py(), TO1.pz(), TO1.energy());
233 TLorentzVector j2 ( TO2.px(), TO2.py(), TO2.pz(), TO2.energy());
234 double tmpmass = ( j1 + j2 ).M();
235 if(
dijet < tmpmass ) {
249 if( filterIndexCaloMET < triggerSummary->sizeFilters() ) {
252 float met_h = triggerObjects[ keys[0] ].pt();
261 if( filterIndexHt < triggerSummary->sizeFilters() ) {
263 if( !keys.empty() ) {
264 float ht = triggerObjects[ keys[0] ].pt();
271 bool hasFired =
false;
274 unsigned int numTriggers = trigNames.
size();
276 for(
unsigned int hltIndex=0; hltIndex<numTriggers; ++hltIndex ){
284 int indexOfMatchedMuon = -1;
285 int offlineCounter = 0;
286 for(reco::MuonCollection::const_iterator
muon = MuonCollection->begin();
muon != MuonCollection->end() ; ++
muon) {
287 for(
size_t off_i = 0; off_i < ptMuon.size(); ++off_i) {
289 indexOfMatchedMuon = offlineCounter;
300 for (reco::PFJetCollection::const_iterator i_pfjet = pfJetCollection->begin(); i_pfjet != pfJetCollection->end(); ++i_pfjet){
302 if (fabs(i_pfjet->eta()) >
etaThrJet_)
continue;
303 pfHT += i_pfjet->pt();
310 size_t jetCol = pfJetCollection->size();
312 for (
size_t i=0;
i < jetCol ;
i++ ) {
316 for (
size_t j=
i; j <jetCol ; j++) {
322 double tmpdetaOff = fabs( pfJetCollection->at(
i).eta() - pfJetCollection->at(j).eta() );
323 double tmpoppositeOff = pfJetCollection->at(
i).eta() * pfJetCollection->at(j).eta() ;
325 TLorentzVector j1Off ( pfJetCollection->at(
i).px(), pfJetCollection->at(
i).py(), pfJetCollection->at(
i).pz(), pfJetCollection->at(
i).energy());
326 TLorentzVector j2Off ( pfJetCollection->at(j).px(), pfJetCollection->at(j).py(), pfJetCollection->at(j).pz(), pfJetCollection->at(j).energy());
327 double tmpmassOff = ( j1Off + j2Off ).M();
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
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
MonitorElement * h_den_met
edm::InputTag triggerHTFilter_
edm::InputTag triggerMuFilter_
MonitorElement * h_triggerMuPt
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