79 edm::LogInfo(
"SUSY_HLT_MuEle_Hadronic") <<
"SUSY_HLT_MuEle_Hadronic::analyze" << std::endl;
86 if ( !pfJetCollection.
isValid() ){
87 edm::LogError (
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: PFJets" <<
"\n";
92 if ( !caloJetCollection.
isValid() ){
93 edm::LogError (
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: CaloJets" <<
"\n";
102 if ( !MuonCollection.
isValid() ){
103 edm::LogError (
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: Muons " <<
"\n";
112 if ( !ElectronCollection.
isValid() ){
113 edm::LogError (
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: Electrons " <<
"\n";
123 edm::LogError (
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: TriggerResults" <<
"\n";
128 if(!triggerSummary.
isValid()) {
129 edm::LogError (
"SUSY_HLT_MuEle_Hadronic") <<
"invalid collection: TriggerSummary" <<
"\n";
135 std::vector<float> ptMuon, etaMuon, phiMuon, ptElectron, etaElectron, phiElectron;
138 if( !(filterIndexEle >= triggerSummary->
sizeFilters()) ){
140 for(
size_t j = 0; j < keys.size(); ++j ){
145 for(
unsigned int x=0;
x<ptElectron.size();
x++){
146 if(fabs(ptElectron[
x] - foundObject.
pt()) < 0.01 || fabs(etaElectron[
x] - foundObject.
eta()) < 0.001 || fabs(phiElectron[
x] - foundObject.
phi()) < 0.001)
154 ptElectron.push_back(foundObject.
pt());
155 etaElectron.push_back(foundObject.
eta());
156 phiElectron.push_back(foundObject.
phi());
162 for(
unsigned int x=0;
x<ptMuon.size();
x++){
163 if(fabs(ptMuon[
x] - foundObject.
pt()) < 0.01)
171 ptMuon.push_back(foundObject.
pt());
172 etaMuon.push_back(foundObject.
eta());
173 phiMuon.push_back(foundObject.
phi());
181 if (!ptMuon.empty() && !ptElectron.empty()) {
193 bool hasFired =
false;
194 bool hasFiredAuxiliaryForMuEleLeg =
false;
195 bool hasFiredAuxiliaryForHadronicLeg =
false;
197 unsigned int numTriggers = trigNames.
size();
198 for(
unsigned int hltIndex=0; hltIndex<numTriggers; ++hltIndex ){
206 if(hasFiredAuxiliaryForMuEleLeg || hasFiredAuxiliaryForHadronicLeg) {
209 int indexOfMatchedMuEle[2] = {-1};
210 int matchedCounter = 0;
211 int offlineCounter = 0;
212 for(reco::MuonCollection::const_iterator
muon = MuonCollection->begin(); (
muon != MuonCollection->end() && matchedCounter < 1) ; ++
muon) {
213 for(
size_t off_i = 0; off_i < ptMuon.size(); ++off_i) {
214 if(
sqrt((
muon->phi()-phiMuon[off_i])*(
muon->phi()-phiMuon[off_i]) + (
muon->eta()-etaMuon[off_i])*(
muon->eta()-etaMuon[off_i])) < 0.5) {
215 indexOfMatchedMuEle[matchedCounter] = offlineCounter;
223 for(reco::GsfElectronCollection::const_iterator
electron = ElectronCollection->begin(); (
electron != ElectronCollection->end() && matchedCounter < 2) ; ++
electron) {
224 for(
size_t off_i = 0; off_i < ptElectron.size(); ++off_i) {
226 indexOfMatchedMuEle[matchedCounter] = offlineCounter;
236 for (reco::PFJetCollection::const_iterator i_pfjet = pfJetCollection->begin(); i_pfjet != pfJetCollection->end(); ++i_pfjet){
238 if (fabs(i_pfjet->eta()) >
etaThrJet_)
continue;
239 pfHT += i_pfjet->pt();
241 for (reco::CaloJetCollection::const_iterator i_calojet = caloJetCollection->begin(); i_calojet != caloJetCollection->end(); ++i_calojet){
242 if (i_calojet->pt() <
ptThrJet_)
continue;
243 if (fabs(i_calojet->eta()) >
etaThrJet_)
continue;
244 caloHT += i_calojet->pt();
247 if(hasFiredAuxiliaryForMuEleLeg && !MuonCollection->empty() && !ElectronCollection->empty()) {
248 if(hasFired && indexOfMatchedMuEle[1] >= 0 && indexOfMatchedMuEle[0] >= 0) {
256 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