71 edm::LogInfo(
"SUSY_HLT_DoubleEle_Hadronic") <<
"SUSY_HLT_DoubleEle_Hadronic::analyze" << std::endl;
78 if (!pfJetCollection.
isValid()) {
79 edm::LogError(
"SUSY_HLT_DoubleEle_Hadronic") <<
"invalid collection: PFJets" 85 if (!caloJetCollection.
isValid()) {
86 edm::LogError(
"SUSY_HLT_DoubleEle_Hadronic") <<
"invalid collection: CaloJets" 96 if (!ElectronCollection.
isValid()) {
97 edm::LogError(
"SUSY_HLT_DoubleEle_Hadronic") <<
"invalid collection: Electrons " 108 edm::LogError(
"SUSY_HLT_DoubleEle_Hadronic") <<
"invalid collection: TriggerResults" 114 if (!triggerSummary.
isValid()) {
115 edm::LogError(
"SUSY_HLT_DoubleEle_Hadronic") <<
"invalid collection: TriggerSummary" 121 std::vector<float> ptElectron, etaElectron, phiElectron;
124 if (!(filterIndex >= triggerSummary->
sizeFilters())) {
126 for (
size_t j = 0; j < keys.size(); ++j) {
128 if (fabs(foundObject.
id()) == 11) {
131 for (
unsigned int x = 0;
x < ptElectron.size();
x++) {
132 if (fabs(ptElectron[
x] - foundObject.
pt()) < 0.01 || fabs(etaElectron[
x] - foundObject.
eta()) < 0.001 ||
133 fabs(phiElectron[
x] - foundObject.
phi()) < 0.001)
141 ptElectron.push_back(foundObject.
pt());
142 etaElectron.push_back(foundObject.
eta());
143 phiElectron.push_back(foundObject.
phi());
147 if (ptElectron.size() >= 2) {
161 bool hasFired =
false;
162 bool hasFiredAuxiliaryForElectronLeg =
false;
163 bool hasFiredAuxiliaryForHadronicLeg =
false;
165 unsigned int numTriggers = trigNames.
size();
166 for (
unsigned int hltIndex = 0; hltIndex < numTriggers; ++hltIndex) {
168 hltresults->
accept(hltIndex))
171 hltresults->
wasrun(hltIndex) && hltresults->
accept(hltIndex))
172 hasFiredAuxiliaryForElectronLeg =
true;
174 hltresults->
wasrun(hltIndex) && hltresults->
accept(hltIndex))
175 hasFiredAuxiliaryForHadronicLeg =
true;
178 if (hasFiredAuxiliaryForElectronLeg || hasFiredAuxiliaryForHadronicLeg) {
180 int indexOfMatchedElectron[2] = {-1};
181 int matchedCounter = 0;
182 int offlineCounter = 0;
183 for (reco::GsfElectronCollection::const_iterator
Electron = ElectronCollection->begin();
184 (
Electron != ElectronCollection->end() && matchedCounter < 2);
186 for (
size_t off_i = 0; off_i < ptElectron.size(); ++off_i) {
188 (
Electron->eta() - etaElectron[off_i]) * (
Electron->eta() - etaElectron[off_i])) < 0.5) {
189 indexOfMatchedElectron[matchedCounter] = offlineCounter;
199 for (reco::PFJetCollection::const_iterator i_pfjet = pfJetCollection->begin(); i_pfjet != pfJetCollection->end();
205 pfHT += i_pfjet->pt();
207 for (reco::CaloJetCollection::const_iterator i_calojet = caloJetCollection->begin();
208 i_calojet != caloJetCollection->end();
214 caloHT += i_calojet->pt();
217 if (hasFiredAuxiliaryForElectronLeg && ElectronCollection->size() > 1) {
218 if (hasFired && indexOfMatchedElectron[1] >= 0) {
223 if (hasFiredAuxiliaryForHadronicLeg) {
MonitorElement * h_EleTurnOn_den
edm::EDGetTokenT< reco::PFJetCollection > thePfJetCollection_
bool wasrun() const
Was at least one path run?
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > PtEtaPhiMLorentzVectorD
Lorentz vector with cartesian internal representation.
MonitorElement * h_pfHTTurnOn_den
trigger::size_type sizeFilters() const
edm::EDGetTokenT< reco::GsfElectronCollection > theElectronCollection_
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
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
MonitorElement * h_triggerDoubleEleMass
Strings::size_type size() const
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
MonitorElement * h_EleTurnOn_num
edm::InputTag triggerFilter_
Single trigger physics object (e.g., an isolated muon)
const TriggerObjectCollection & getObjects() const
std::string triggerPathAuxiliaryForHadronic_
std::vector< Electron > ElectronCollection
collectin of Electron objects
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollection_
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_triggerElePhi
std::string triggerPathAuxiliaryForElectron_
MonitorElement * h_triggerElePt
MonitorElement * h_triggerEleEta
MonitorElement * h_pfHTTurnOn_num