Get the analysis.
183 if (!HLTresults.
isValid())
return;
185 unsigned int triggerIndex;
193 if (triggerIndex < HLTresults->
size()) passed_HLT = HLTresults->accept(triggerIndex);
200 if (triggerIndex < HLTresults->
size()) passed_HLT = HLTresults->accept(triggerIndex);
201 if (!passed_HLT)
return;
211 double vtx_ndof = -1.0;
213 bool vtx_isFake =
true;
214 if (vertexCollection.size()>0) {
215 vtx_ndof = vertexCollection.begin()->ndof();
216 vtx_z = vertexCollection.begin()->z();
219 if (vtx_isFake || fabs(vtx_z)>15 || vtx_ndof<4)
return;
234 if (!photonCollection.
isValid())
return;
238 iEvent.
getByLabel(
"reducedEcalRecHitsEB", EBReducedRecHits);
240 iEvent.
getByLabel(
"reducedEcalRecHitsEE", EEReducedRecHits);
245 float photon_et = -9.0;
246 float photon_eta = -9.0;
247 float photon_phi = -9.0;
248 bool photon_passPhotonID =
false;
249 bool found_lead_pho =
false;
250 int photon_count_bar = 0;
251 int photon_count_end = 0;
253 for (PhotonCollection::const_iterator recoPhoton = photonCollection->begin(); recoPhoton!=photonCollection->end(); recoPhoton++){
260 DetId id = lazyTool.getMaximum(*seed).first;
261 float time = -999., outOfTimeChi2 = -999., chi2 = -999.;
262 int flags=-1, severity = -1;
263 const EcalRecHitCollection & rechits = ( recoPhoton->isEB() ? *EBReducedRecHits : *EEReducedRecHits);
265 if( it != rechits.end() ) {
267 outOfTimeChi2 = it->outOfTimeChi2();
269 flags = it->recoFlag();
273 severity = sevlv->severityLevel(
id, rechits);
275 bool isNotSpike = ((recoPhoton->isEB() && (severity!=3 && severity!=4 ) && (
flags != 2) ) || recoPhoton->isEE());
276 if (!isNotSpike)
continue;
279 bool pho_current_passPhotonID =
false;
280 bool pho_current_isEB = recoPhoton->isEB();
281 bool pho_current_isEE = recoPhoton->isEE();
283 if ( pho_current_isEB && (recoPhoton->sigmaIetaIeta() < 0.01 || recoPhoton->hadronicOverEm() < 0.05) ) {
285 pho_current_passPhotonID =
true;
287 }
else if ( pho_current_isEE && (recoPhoton->hadronicOverEm() < 0.05) ) {
289 pho_current_passPhotonID =
true;
293 if (!found_lead_pho) {
294 found_lead_pho =
true;
295 photon_passPhotonID = pho_current_passPhotonID;
296 photon_et = recoPhoton->et();
297 photon_eta = recoPhoton->eta();
298 photon_phi = recoPhoton->phi();
312 if (!caloJetCollection.
isValid())
return;
315 float jet_eta = -8.0;
316 float jet_phi = -8.0;
318 float jet2_pt = -9.0;
319 float jet2_eta = -9.0;
320 float jet2_phi = -9.0;
322 for (CaloJetCollection::const_iterator i_calojet = caloJetCollection->begin(); i_calojet != caloJetCollection->end(); i_calojet++) {
324 float jet_current_pt = i_calojet->pt();
327 if (
deltaR(i_calojet->eta(), i_calojet->phi(), photon_eta, photon_phi) < 0.5 )
continue;
332 if (jet_current_pt > jet_pt) {
336 jet_pt = jet_current_pt;
337 jet_eta = i_calojet->eta();
338 jet_phi = i_calojet->phi();
339 }
else if (jet_current_pt > jet2_pt) {
340 jet2_pt = jet_current_pt;
341 jet2_eta = i_calojet->eta();
342 jet2_phi = i_calojet->phi();
352 if ( jet_pt > 0.0 ) {
361 if ( fabs(photon_eta)<1.45 && photon_passPhotonID ) {
362 if (fabs(jet_eta)<1.45){
363 if (photon_eta*jet_eta>0) {
368 }
else if (jet_eta>1.55 && jet_eta<2.5) {
369 if (photon_eta*jet_eta>0) {
385 if ( jet2_pt > 0.0 ) {
HLTConfigProvider hltConfigProvider_
MonitorElement * h_photon_et
MonitorElement * h_photon_eta
MonitorElement * h_photon_count_bar
MonitorElement * h_photon_et_jetco
double deltaPhi(float phi1, float phi2)
MonitorElement * h_deltaR_jet_jet2
std::string theTriggerPathToPass
std::vector< T >::const_iterator const_iterator
MonitorElement * h_deltaR_photon_jet2
MonitorElement * h_photon_et_jetfs
std::vector< Variable::Flags > flags
std::vector< Vertex > VertexCollection
collection of Vertex objects
MonitorElement * h_deltaEt_photon_jet
MonitorElement * h_jet_count
bool theRequirePhotonFound
MonitorElement * h_jet_eta
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
edm::InputTag thePhotonCollectionLabel
MonitorElement * h_photon_et_jetfo
MonitorElement * h_jet2_ptOverPhotonEt
MonitorElement * h_photon_et_jetcs
MonitorElement * h_jet2_pt
MonitorElement * h_jet_pt
std::vector< std::string > thePlotTheseTriggersToo
std::string theTriggerResultsCollection
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag theVertexCollectionLabel
double deltaR(double eta1, double eta2, double phi1, double phi2)
MonitorElement * h_photon_count_end
MonitorElement * h_jet2_eta
MonitorElement * h_deltaPhi_photon_jet2
T const * product() const
iterator find(key_type k)
edm::InputTag theCaloJetCollectionLabel
MonitorElement * h_triggers_passed
MonitorElement * h_deltaPhi_jet_jet2
MonitorElement * h_deltaPhi_photon_jet
tuple size
Write out results.