74 edm::LogInfo(
"SUSY_HLT_MuEle_Hadronic") <<
"SUSY_HLT_MuEle_Hadronic::analyze" << std::endl;
81 if ( !pfJetCollection.
isValid() ){
82 edm::LogError (
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: PFJets" <<
"\n";
87 if ( !caloJetCollection.
isValid() ){
88 edm::LogError (
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: CaloJets" <<
"\n";
97 if ( !MuonCollection.
isValid() ){
98 edm::LogError (
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: Muons " <<
"\n";
107 if ( !ElectronCollection.
isValid() ){
108 edm::LogError (
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: Electrons " <<
"\n";
118 edm::LogError (
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: TriggerResults" <<
"\n";
123 if(!triggerSummary.
isValid()) {
124 edm::LogError (
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: TriggerSummary" <<
"\n";
130 std::vector<float> ptMuon, etaMuon, phiMuon, ptElectron, etaElectron, phiElectron;
133 if( !(filterIndexEle >= triggerSummary->
sizeFilters()) ){
135 for(
size_t j = 0; j < keys.size(); ++j ){
140 for(
unsigned int x=0;
x<ptElectron.size();
x++){
141 if(fabs(ptElectron[
x] - foundObject.
pt()) < 0.01 || fabs(etaElectron[
x] - foundObject.
eta()) < 0.001 || fabs(phiElectron[
x] - foundObject.
phi()) < 0.001)
149 ptElectron.push_back(foundObject.
pt());
150 etaElectron.push_back(foundObject.
eta());
151 phiElectron.push_back(foundObject.
phi());
157 for(
unsigned int x=0;
x<ptMuon.size();
x++){
158 if(fabs(ptMuon[
x] - foundObject.
pt()) < 0.01)
166 ptMuon.push_back(foundObject.
pt());
167 etaMuon.push_back(foundObject.
eta());
168 phiMuon.push_back(foundObject.
phi());
176 if (!ptMuon.empty() && !ptElectron.empty()) {
188 bool hasFired =
false;
189 bool hasFiredAuxiliaryForMuEleLeg =
false;
190 bool hasFiredAuxiliaryForHadronicLeg =
false;
192 unsigned int numTriggers = trigNames.
size();
193 for(
unsigned int hltIndex=0; hltIndex<numTriggers; ++hltIndex ){
201 if(hasFiredAuxiliaryForMuEleLeg || hasFiredAuxiliaryForHadronicLeg) {
204 int indexOfMatchedMuEle[2] = {-1};
205 int matchedCounter = 0;
206 int offlineCounter = 0;
207 for(reco::MuonCollection::const_iterator
muon = MuonCollection->begin(); (
muon != MuonCollection->end() && matchedCounter < 1) ; ++
muon) {
208 for(
size_t off_i = 0; off_i < ptMuon.size(); ++off_i) {
209 if(
sqrt((
muon->phi()-phiMuon[off_i])*(
muon->phi()-phiMuon[off_i]) + (
muon->eta()-etaMuon[off_i])*(
muon->eta()-etaMuon[off_i])) < 0.5) {
210 indexOfMatchedMuEle[matchedCounter] = offlineCounter;
218 for(reco::GsfElectronCollection::const_iterator
electron = ElectronCollection->begin(); (
electron != ElectronCollection->end() && matchedCounter < 2) ; ++
electron) {
219 for(
size_t off_i = 0; off_i < ptElectron.size(); ++off_i) {
221 indexOfMatchedMuEle[matchedCounter] = offlineCounter;
231 for (reco::PFJetCollection::const_iterator i_pfjet = pfJetCollection->begin(); i_pfjet != pfJetCollection->end(); ++i_pfjet){
233 if (fabs(i_pfjet->eta()) >
etaThrJet_)
continue;
234 pfHT += i_pfjet->pt();
236 for (reco::CaloJetCollection::const_iterator i_calojet = caloJetCollection->begin(); i_calojet != caloJetCollection->end(); ++i_calojet){
237 if (i_calojet->pt() <
ptThrJet_)
continue;
238 if (fabs(i_calojet->eta()) >
etaThrJet_)
continue;
239 caloHT += i_calojet->pt();
242 if(hasFiredAuxiliaryForMuEleLeg && !MuonCollection->empty() && !ElectronCollection->empty()) {
243 if(hasFired && indexOfMatchedMuEle[1] >= 0 && indexOfMatchedMuEle[0] >= 0) {
251 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
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
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