93 edm::LogInfo(
"SUSY_HLT_VBF_Mu") <<
"SUSY_HLT_VBF_Mu::analyze" << std::endl;
101 if ( !pfJetCollection.
isValid() ){
102 edm::LogError (
"SUSY_HLT_VBF_Mu") <<
"invalid collection: PFJets" <<
"\n";
108 if ( !caloJetCollection.
isValid() ){
109 edm::LogError (
"SUSY_HLT_VBF_Mu") <<
"invalid collection: CaloJets" <<
"\n";
118 if ( !MuonCollection.
isValid() ){
119 edm::LogError (
"SUSY_HLT_VBF_Mu") <<
"invalid collection: Muons " <<
"\n";
130 if ( !caloMETCollection.
isValid() ){
131 edm::LogError (
"SUSY_HLT_VBF_Mu") <<
"invalid collection: CaloMET" <<
"\n";
138 if ( !pfMETCollection.
isValid() ){
139 edm::LogError (
"SUSY_HLT_VBF_Mu") <<
"invalid collection: PFMET" <<
"\n";
150 edm::LogError (
"SUSY_HLT_VBF_Mu") <<
"invalid collection: TriggerResults" <<
"\n";
155 if(!triggerSummary.
isValid()) {
156 edm::LogError (
"SUSY_HLT_VBF_Mu") <<
"invalid collection: TriggerSummary" <<
"\n";
164 std::vector<float> ptMuon, etaMuon, phiMuon;
167 if( !(filterIndexMu >= triggerSummary->
sizeFilters()) ){
169 for(
size_t j = 0; j < keys.size(); ++j ){
171 if(fabs(foundObject.
id()) == 13){
174 for(
unsigned int x=0;
x<ptMuon.size();
x++){
175 if(fabs(ptMuon[
x] - foundObject.
pt()) < 0.01)
183 ptMuon.push_back(foundObject.
pt());
184 etaMuon.push_back(foundObject.
eta());
185 phiMuon.push_back(foundObject.
phi());
198 if( !(filterIndexMet >= triggerSummary->
sizeFilters()) ){
200 for(
size_t j = 0; j < keys.size(); ++j ){
209 std::vector<float> ptJet, etaJet, phiJet;
210 if( !(dijetFilterIndex >= triggerSummary->
sizeFilters()) ){
212 const size_t nK(KEYS.size());
215 for (
size_t i=0;
i < nK ;
i++ ) {
220 for (
size_t j=
i; j < nK; j++) {
224 double tmpdeta = fabs( TO1.eta() - TO2.eta() );
225 double tmpopposite = TO1.eta() * TO2.eta() ;
227 TLorentzVector j1 ( TO1.px(), TO1.py(), TO1.pz(), TO1.energy());
228 TLorentzVector j2 ( TO2.px(), TO2.py(), TO2.pz(), TO2.energy());
229 double tmpmass = ( j1 + j2 ).M();
230 if(
dijet < tmpmass ) {
244 if( filterIndexCaloMET < triggerSummary->sizeFilters() ) {
247 float met_h = triggerObjects[ keys[0] ].pt();
256 if( filterIndexHt < triggerSummary->sizeFilters() ) {
258 if( !keys.empty() ) {
259 float ht = triggerObjects[ keys[0] ].pt();
266 bool hasFired =
false;
269 unsigned int numTriggers = trigNames.
size();
271 for(
unsigned int hltIndex=0; hltIndex<numTriggers; ++hltIndex ){
279 int indexOfMatchedMuon = -1;
280 int offlineCounter = 0;
281 for(reco::MuonCollection::const_iterator
muon = MuonCollection->begin();
muon != MuonCollection->end() ; ++
muon) {
282 for(
size_t off_i = 0; off_i < ptMuon.size(); ++off_i) {
284 indexOfMatchedMuon = offlineCounter;
295 for (reco::PFJetCollection::const_iterator i_pfjet = pfJetCollection->begin(); i_pfjet != pfJetCollection->end(); ++i_pfjet){
297 if (fabs(i_pfjet->eta()) >
etaThrJet_)
continue;
298 pfHT += i_pfjet->pt();
305 size_t jetCol = pfJetCollection->size();
307 for (
size_t i=0;
i < jetCol ;
i++ ) {
311 for (
size_t j=
i; j <jetCol ; j++) {
317 double tmpdetaOff = fabs( pfJetCollection->at(
i).eta() - pfJetCollection->at(j).eta() );
318 double tmpoppositeOff = pfJetCollection->at(
i).eta() * pfJetCollection->at(j).eta() ;
320 TLorentzVector j1Off ( pfJetCollection->at(
i).px(), pfJetCollection->at(
i).py(), pfJetCollection->at(
i).pz(), pfJetCollection->at(
i).energy());
321 TLorentzVector j2Off ( pfJetCollection->at(j).px(), pfJetCollection->at(j).py(), pfJetCollection->at(j).pz(), pfJetCollection->at(j).energy());
322 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
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