CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
PFPhotonIsolationCalculator Class Reference

#include <PFPhotonIsolationCalculator.h>

Public Member Functions

void calculate (const reco::Photon *, const edm::Handle< reco::PFCandidateCollection > pfCandidateHandle, edm::Handle< reco::VertexCollection > &vertices, const edm::Event &e, const edm::EventSetup &es, reco::Photon::PflowIsolationVariables &phoisol03)
 
 PFPhotonIsolationCalculator ()
 
void setup (const edm::ParameterSet &conf)
 
 ~PFPhotonIsolationCalculator ()
 

Private Types

enum  VetoType { kElectron = -1, kPhoton = 1 }
 

Private Member Functions

reco::VertexRef chargedHadronVertex (edm::Handle< reco::VertexCollection > verticies, const reco::PFCandidate &pfcand)
 
float fGetIsolation (const reco::Photon *photon, const edm::Handle< reco::PFCandidateCollection > pfCandidateHandle, reco::VertexRef vtx, edm::Handle< reco::VertexCollection > vertices)
 
std::vector< float > fGetIsolationInRings (const reco::Photon *photon, edm::Handle< reco::PFCandidateCollection > pfCandidateHandle, reco::VertexRef vtx, edm::Handle< reco::VertexCollection > vertices)
 
float getIsolationCharged ()
 
float getIsolationChargedAll ()
 
std::vector< float > getIsolationInRingsCharged ()
 
std::vector< float > getIsolationInRingsChargedAll ()
 
std::vector< float > getIsolationInRingsNeutral ()
 
std::vector< float > getIsolationInRingsPhoton ()
 
float getIsolationNeutral ()
 
float getIsolationPhoton ()
 
void initializeRings (int iNumberOfRings, float fRingSize)
 
float isChargedParticleVetoed (const reco::PFCandidate *pfIsoCand, edm::Handle< reco::VertexCollection > vertices)
 
float isChargedParticleVetoed (const reco::PFCandidate *pfIsoCand, reco::VertexRef vtx, edm::Handle< reco::VertexCollection > vertices)
 
float isChargedParticleVetoed (const reco::PFCandidateRef pfIsoCand, reco::VertexRef vtx, edm::Handle< reco::VertexCollection > vertices)
 
float isNeutralParticleVetoed (const reco::PFCandidate *pfIsoCand)
 
float isNeutralParticleVetoed (const reco::PFCandidateRef pfIsoCand)
 
float isPhotonParticleVetoed (const reco::PFCandidateRef pfIsoCand)
 
float isPhotonParticleVetoed (const reco::PFCandidate *pfIsoCand)
 
int matchPFObject (const reco::Photon *photon, const reco::PFCandidateCollection *pfParticlesColl)
 
int matchPFObject (const reco::GsfElectron *photon, const reco::PFCandidateCollection *pfParticlesColl)
 

Private Attributes

Bool_t bApplyDzDxyVeto_
 
Bool_t bApplyMissHitPhVeto_
 
Bool_t bApplyPFPUVeto_
 
Bool_t bApplyVeto_
 
Bool_t bCheckClosestZVertex_
 
Bool_t bDeltaRVetoBarrel_
 
Bool_t bDeltaRVetoEndcap_
 
Bool_t bRectangleVetoBarrel_
 
Bool_t bRectangleVetoEndcap_
 
Bool_t bUseCrystalSize_
 
float fConeSize_
 
float fDeltaRVetoBarrelCharged_
 
float fDeltaRVetoBarrelNeutrals_
 
float fDeltaRVetoBarrelPhotons_
 
float fDeltaRVetoEndcapCharged_
 
float fDeltaRVetoEndcapNeutrals_
 
float fDeltaRVetoEndcapPhotons_
 
float fEta_
 
float fEtaSC_
 
Bool_t fisInitialized_
 
float fIsolation_
 
float fIsolationCharged_
 
float fIsolationChargedAll_
 
std::vector< float > fIsolationInRings_
 
std::vector< float > fIsolationInRingsCharged_
 
std::vector< float > fIsolationInRingsChargedAll_
 
std::vector< float > fIsolationInRingsNeutral_
 
std::vector< float > fIsolationInRingsPhoton_
 
float fIsolationNeutral_
 
float fIsolationPhoton_
 
float fNumberOfCrystalEndcapPhotons_
 
float fPhi_
 
float fPhiSC_
 
float fPt_
 
float fRectangleDeltaEtaVetoBarrelCharged_
 
float fRectangleDeltaEtaVetoBarrelNeutrals_
 
float fRectangleDeltaEtaVetoBarrelPhotons_
 
float fRectangleDeltaEtaVetoEndcapCharged_
 
float fRectangleDeltaEtaVetoEndcapNeutrals_
 
float fRectangleDeltaEtaVetoEndcapPhotons_
 
float fRectangleDeltaPhiVetoBarrelCharged_
 
float fRectangleDeltaPhiVetoBarrelNeutrals_
 
float fRectangleDeltaPhiVetoBarrelPhotons_
 
float fRectangleDeltaPhiVetoEndcapCharged_
 
float fRectangleDeltaPhiVetoEndcapNeutrals_
 
float fRectangleDeltaPhiVetoEndcapPhotons_
 
float fRingSize_
 
float fVx_
 
float fVy_
 
float fVz_
 
int iMissHits_
 
int iNumberOfRings_
 
int iParticleType_
 
bool pivotInBarrel
 
reco::SuperClusterRef refSC
 

Detailed Description

Definition at line 35 of file PFPhotonIsolationCalculator.h.

Member Enumeration Documentation

Enumerator
kElectron 
kPhoton 

Definition at line 51 of file PFPhotonIsolationCalculator.h.

51  {
52  kElectron = -1, // MVA for non-triggering electrons
53  kPhoton = 1 // MVA for triggering electrons
54  };

Constructor & Destructor Documentation

PFPhotonIsolationCalculator::PFPhotonIsolationCalculator ( )

Definition at line 62 of file PFPhotonIsolationCalculator.cc.

62  {
63  // Constructor.
64 }
PFPhotonIsolationCalculator::~PFPhotonIsolationCalculator ( )

Definition at line 67 of file PFPhotonIsolationCalculator.cc.

67 {}

Member Function Documentation

void PFPhotonIsolationCalculator::calculate ( const reco::Photon aPho,
const edm::Handle< reco::PFCandidateCollection pfCandidateHandle,
edm::Handle< reco::VertexCollection > &  vertices,
const edm::Event e,
const edm::EventSetup es,
reco::Photon::PflowIsolationVariables phoisol03 
)

Definition at line 69 of file PFPhotonIsolationCalculator.cc.

References reco::Photon::PflowIsolationVariables::chargedHadronIso, fGetIsolation(), getIsolationCharged(), getIsolationNeutral(), getIsolationPhoton(), reco::Photon::PflowIsolationVariables::neutralHadronIso, reco::Photon::PflowIsolationVariables::photonIso, and badGlobalMuonTaggersAOD_cff::vtx.

75  {
76  reco::VertexRef vtx(vertices, 0);
77  this->fGetIsolation(&*aPho, pfCandidateHandle, vtx, vertices);
78  phoisol03.chargedHadronIso = this->getIsolationCharged();
79  phoisol03.neutralHadronIso = this->getIsolationNeutral();
80  phoisol03.photonIso = this->getIsolationPhoton();
81 }
float fGetIsolation(const reco::Photon *photon, const edm::Handle< reco::PFCandidateCollection > pfCandidateHandle, reco::VertexRef vtx, edm::Handle< reco::VertexCollection > vertices)
reco::VertexRef PFPhotonIsolationCalculator::chargedHadronVertex ( edm::Handle< reco::VertexCollection verticies,
const reco::PFCandidate pfcand 
)
private

Definition at line 630 of file PFPhotonIsolationCalculator.cc.

References bCheckClosestZVertex_, PVValHelper::dz, edm::Handle< T >::product(), HLT_2018_cff::track, reco::PFCandidate::trackRef(), reco::PFCandidate::vertex(), pwdgSkimBPark_cfi::vertices, badGlobalMuonTaggersAOD_cff::vtx, and w.

Referenced by getIsolationInRingsChargedAll(), and isChargedParticleVetoed().

631  {
632  //code copied from Florian's PFNoPU class (corrected removing the double loop....)
633 
634  auto const& track = pfcand.trackRef();
635 
636  size_t iVertex = 0;
637  unsigned int index = 0;
638  unsigned int nFoundVertex = 0;
639 
640  float bestweight = 0;
641 
642  const reco::VertexCollection& vertices = *(verticesColl.product());
643 
644  for (auto const& vtx : vertices) {
645  float w = vtx.trackWeight(track); // 0 if does not belong here
646  //select the vertex for which the track has the highest weight
647  if (w > bestweight) { // should we break here?
648  bestweight = w;
649  iVertex = index;
650  nFoundVertex++;
651  }
652  ++index;
653  }
654 
655  if (nFoundVertex > 0) {
656  if (nFoundVertex != 1)
657  edm::LogWarning("TrackOnTwoVertex") << "a track is shared by at least two verteces. Used to be an assert";
658  return reco::VertexRef(verticesColl, iVertex);
659  }
660  // no vertex found with this track.
661 
662  // optional: as a secondary solution, associate the closest vertex in z
663  if (bCheckClosestZVertex_) {
664  double dzmin = 10000.;
665  double ztrack = pfcand.vertex().z();
666  bool foundVertex = false;
667  index = 0;
668  for (reco::VertexCollection::const_iterator iv = vertices.begin(); iv != vertices.end(); ++iv, ++index) {
669  double dz = std::fabs(ztrack - iv->z());
670  if (dz < dzmin) {
671  dzmin = dz;
672  iVertex = index;
673  foundVertex = true;
674  }
675  }
676 
677  if (foundVertex)
678  return reco::VertexRef(verticesColl, iVertex);
679  }
680 
681  return reco::VertexRef();
682 }
const double w
Definition: UKUtility.cc:23
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:408
const Point & vertex() const override
vertex position (overwritten by PF...)
Definition: PFCandidate.cc:602
edm::Ref< VertexCollection > VertexRef
persistent reference to a Vertex
Definition: VertexFwd.h:13
float PFPhotonIsolationCalculator::fGetIsolation ( const reco::Photon photon,
const edm::Handle< reco::PFCandidateCollection pfCandidateHandle,
reco::VertexRef  vtx,
edm::Handle< reco::VertexCollection vertices 
)
private

Definition at line 107 of file PFPhotonIsolationCalculator.cc.

References fGetIsolationInRings(), fIsolation_, and fIsolationInRings_.

Referenced by calculate(), and getIsolationInRingsChargedAll().

110  {
111  fGetIsolationInRings(photon, pfCandidateHandle, vtx, vertices);
113  return fIsolation_;
114 }
std::vector< float > fGetIsolationInRings(const reco::Photon *photon, edm::Handle< reco::PFCandidateCollection > pfCandidateHandle, reco::VertexRef vtx, edm::Handle< reco::VertexCollection > vertices)
std::vector< float > PFPhotonIsolationCalculator::fGetIsolationInRings ( const reco::Photon photon,
edm::Handle< reco::PFCandidateCollection pfCandidateHandle,
reco::VertexRef  vtx,
edm::Handle< reco::VertexCollection vertices 
)
private

Definition at line 117 of file PFPhotonIsolationCalculator.cc.

References funct::abs(), fEta_, fIsolationInRings_, fIsolationInRingsCharged_, fIsolationInRingsChargedAll_, fIsolationInRingsNeutral_, fIsolationInRingsPhoton_, fPhi_, fRingSize_, fVx_, fVy_, fVz_, iMissHits_, createfilelist::int, iNumberOfRings_, isChargedParticleVetoed(), isNeutralParticleVetoed(), edm::Ref< C, T, F >::isNonnull(), isPhotonParticleVetoed(), pivotInBarrel, refSC, and reco::Photon::superCluster().

Referenced by fGetIsolation(), and getIsolationInRingsChargedAll().

121  {
122  int isoBin;
123 
124  for (isoBin = 0; isoBin < iNumberOfRings_; isoBin++) {
125  fIsolationInRings_[isoBin] = 0.;
126  fIsolationInRingsPhoton_[isoBin] = 0.;
127  fIsolationInRingsNeutral_[isoBin] = 0.;
128  fIsolationInRingsCharged_[isoBin] = 0.;
129  fIsolationInRingsChargedAll_[isoBin] = 0.;
130  }
131 
132  iMissHits_ = 0;
133 
134  refSC = photon->superCluster();
135  pivotInBarrel = std::fabs((refSC->position().eta())) < 1.479;
136 
137  for (unsigned iPF = 0; iPF < pfCandidateHandle->size(); iPF++) {
138  reco::PFCandidateRef pfParticle(reco::PFCandidateRef(pfCandidateHandle, iPF));
139 
140  if (pfParticle->superClusterRef().isNonnull() && photon->superCluster().isNonnull() &&
141  pfParticle->superClusterRef() == photon->superCluster())
142  continue;
143 
144  if (pfParticle->pdgId() == 22) {
145  // Set the vertex of reco::Photon to the first PV
146  math::XYZVector direction = math::XYZVector(photon->superCluster()->x() - pfParticle->vx(),
147  photon->superCluster()->y() - pfParticle->vy(),
148  photon->superCluster()->z() - pfParticle->vz());
149 
150  fEta_ = direction.Eta();
151  fPhi_ = direction.Phi();
152  fVx_ = pfParticle->vx();
153  fVy_ = pfParticle->vy();
154  fVz_ = pfParticle->vz();
155 
156  float fDeltaR = isPhotonParticleVetoed(pfParticle);
157  if (fDeltaR >= 0.) {
158  isoBin = (int)(fDeltaR / fRingSize_);
159  fIsolationInRingsPhoton_[isoBin] = fIsolationInRingsPhoton_[isoBin] + pfParticle->pt();
160  }
161 
162  } else if (std::abs(pfParticle->pdgId()) == 130) {
163  // Set the vertex of reco::Photon to the first PV
164  math::XYZVector direction = math::XYZVector(photon->superCluster()->x() - pfParticle->vx(),
165  photon->superCluster()->y() - pfParticle->vy(),
166  photon->superCluster()->z() - pfParticle->vz());
167 
168  fEta_ = direction.Eta();
169  fPhi_ = direction.Phi();
170  fVx_ = pfParticle->vx();
171  fVy_ = pfParticle->vy();
172  fVz_ = pfParticle->vz();
173  float fDeltaR = isNeutralParticleVetoed(pfParticle);
174  if (fDeltaR >= 0.) {
175  isoBin = (int)(fDeltaR / fRingSize_);
176  fIsolationInRingsNeutral_[isoBin] = fIsolationInRingsNeutral_[isoBin] + pfParticle->pt();
177  }
178 
179  //}else if(abs(pfParticle.pdgId()) == 11 ||abs(pfParticle.pdgId()) == 13 || abs(pfParticle.pdgId()) == 211){
180  } else if (std::abs(pfParticle->pdgId()) == 211) {
181  // Set the vertex of reco::Photon to the first PV
182  math::XYZVector direction = math::XYZVector(photon->superCluster()->x() - (*vtx).x(),
183  photon->superCluster()->y() - (*vtx).y(),
184  photon->superCluster()->z() - (*vtx).z());
185 
186  fEta_ = direction.Eta();
187  fPhi_ = direction.Phi();
188  fVx_ = (*vtx).x();
189  fVy_ = (*vtx).y();
190  fVz_ = (*vtx).z();
191  float fDeltaR = isChargedParticleVetoed(pfParticle, vtx, vertices);
192  if (fDeltaR >= 0.) {
193  isoBin = (int)(fDeltaR / fRingSize_);
194  fIsolationInRingsCharged_[isoBin] = fIsolationInRingsCharged_[isoBin] + pfParticle->pt();
195  }
196  }
197  }
198 
199  for (int isoBin = 0; isoBin < iNumberOfRings_; isoBin++) {
200  fIsolationInRings_[isoBin] =
202  }
203 
204  return fIsolationInRings_;
205 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
float isNeutralParticleVetoed(const reco::PFCandidate *pfIsoCand)
reco::SuperClusterRef superCluster() const override
Ref to SuperCluster.
std::vector< float > fIsolationInRingsChargedAll_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< float > fIsolationInRingsNeutral_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
float isPhotonParticleVetoed(const reco::PFCandidateRef pfIsoCand)
float isChargedParticleVetoed(const reco::PFCandidate *pfIsoCand, edm::Handle< reco::VertexCollection > vertices)
std::vector< float > fIsolationInRingsCharged_
float PFPhotonIsolationCalculator::getIsolationCharged ( )
inlineprivate
float PFPhotonIsolationCalculator::getIsolationChargedAll ( )
inlineprivate
std::vector<float> PFPhotonIsolationCalculator::getIsolationInRingsCharged ( )
inlineprivate

Definition at line 74 of file PFPhotonIsolationCalculator.h.

References fIsolationInRingsCharged_.

74 { return fIsolationInRingsCharged_; };
std::vector< float > fIsolationInRingsCharged_
std::vector<float> PFPhotonIsolationCalculator::getIsolationInRingsChargedAll ( )
inlineprivate
std::vector<float> PFPhotonIsolationCalculator::getIsolationInRingsNeutral ( )
inlineprivate

Definition at line 73 of file PFPhotonIsolationCalculator.h.

References fIsolationInRingsNeutral_.

73 { return fIsolationInRingsNeutral_; };
std::vector< float > fIsolationInRingsNeutral_
std::vector<float> PFPhotonIsolationCalculator::getIsolationInRingsPhoton ( )
inlineprivate

Definition at line 72 of file PFPhotonIsolationCalculator.h.

References fIsolationInRingsPhoton_.

72 { return fIsolationInRingsPhoton_; };
float PFPhotonIsolationCalculator::getIsolationNeutral ( )
inlineprivate
float PFPhotonIsolationCalculator::getIsolationPhoton ( )
inlineprivate
void PFPhotonIsolationCalculator::initializeRings ( int  iNumberOfRings,
float  fRingSize 
)
private

Definition at line 84 of file PFPhotonIsolationCalculator.cc.

References fConeSize_, fIsolationInRings_, fIsolationInRingsCharged_, fIsolationInRingsChargedAll_, fIsolationInRingsNeutral_, fIsolationInRingsPhoton_, and dqmMemoryStats::float.

Referenced by setup().

84  {
85  fIsolationInRings_.clear();
86  for (int isoBin = 0; isoBin < iNumberOfRings; isoBin++) {
87  float fTemp = 0.0;
88  fIsolationInRings_.push_back(fTemp);
89 
90  float fTempPhoton = 0.0;
91  fIsolationInRingsPhoton_.push_back(fTempPhoton);
92 
93  float fTempNeutral = 0.0;
94  fIsolationInRingsNeutral_.push_back(fTempNeutral);
95 
96  float fTempCharged = 0.0;
97  fIsolationInRingsCharged_.push_back(fTempCharged);
98 
99  float fTempChargedAll = 0.0;
100  fIsolationInRingsChargedAll_.push_back(fTempChargedAll);
101  }
102 
103  fConeSize_ = fRingSize * (float)iNumberOfRings;
104 }
std::vector< float > fIsolationInRingsChargedAll_
std::vector< float > fIsolationInRingsNeutral_
std::vector< float > fIsolationInRingsCharged_
float PFPhotonIsolationCalculator::isChargedParticleVetoed ( const reco::PFCandidate pfIsoCand,
edm::Handle< reco::VertexCollection vertices 
)
private

Definition at line 426 of file PFPhotonIsolationCalculator.cc.

Referenced by fGetIsolationInRings(), and getIsolationInRingsChargedAll().

427  {
428  //need code to handle special conditions
429 
430  return -999;
431 }
float PFPhotonIsolationCalculator::isChargedParticleVetoed ( const reco::PFCandidate pfIsoCand,
reco::VertexRef  vtx,
edm::Handle< reco::VertexCollection vertices 
)
private

Definition at line 434 of file PFPhotonIsolationCalculator.cc.

References funct::abs(), bApplyDzDxyVeto_, bApplyPFPUVeto_, bApplyVeto_, bDeltaRVetoBarrel_, bDeltaRVetoEndcap_, bRectangleVetoBarrel_, bRectangleVetoEndcap_, chargedHadronVertex(), SiPixelRawToDigiRegional_cfi::deltaPhi, PbPb_ZMuSkimMuonDPG_cff::deltaR, PVValHelper::dxy, PVValHelper::dz, reco::LeafCandidate::eta(), fConeSize_, fDeltaRVetoBarrelCharged_, fDeltaRVetoEndcapCharged_, fEta_, fPhi_, fRectangleDeltaEtaVetoBarrelCharged_, fRectangleDeltaEtaVetoEndcapCharged_, fRectangleDeltaPhiVetoBarrelCharged_, fRectangleDeltaPhiVetoEndcapCharged_, fVx_, fVy_, iParticleType_, edm::Ref< C, T, F >::isNull(), kPhoton, reco::LeafCandidate::phi(), pivotInBarrel, reco::LeafCandidate::pt(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), reco::PFCandidate::trackRef(), and badGlobalMuonTaggersAOD_cff::vtx.

436  {
437  reco::VertexRef vtx = chargedHadronVertex(vertices, *pfIsoCand);
438  if (vtx.isNull())
439  return -999.;
440 
441  // float fVtxMainX = (*vtxMain).x();
442  // float fVtxMainY = (*vtxMain).y();
443  float fVtxMainZ = (*vtxMain).z();
444 
445  if (bApplyPFPUVeto_) {
446  if (vtx != vtxMain)
447  return -999.;
448  }
449 
450  if (bApplyDzDxyVeto_) {
451  if (iParticleType_ == kPhoton) {
452  float dz = std::fabs(pfIsoCand->trackRef()->dz((*vtxMain).position()));
453  if (dz > 0.2)
454  return -999.;
455 
456  double dxy = pfIsoCand->trackRef()->dxy((*vtxMain).position());
457  if (std::fabs(dxy) > 0.1)
458  return -999.;
459 
460  /*
461 float dz = fabs(vtx->z() - fVtxMainZ);
462 if (dz > 1.)
463  return -999.;
464 double dxy = ( -(vtx->x() - fVtxMainX)*pfIsoCand->py() + (vtx->y() - fVtxMainY)*pfIsoCand->px()) / pfIsoCand->pt();
465 if(fabs(dxy) > 0.2)
466  return -999.;
467 */
468  } else {
469  float dz = std::fabs(vtx->z() - fVtxMainZ);
470  if (dz > 1.)
471  return -999.;
472 
473  double dxy = (-(vtx->x() - fVx_) * pfIsoCand->py() + (vtx->y() - fVy_) * pfIsoCand->px()) / pfIsoCand->pt();
474  if (std::fabs(dxy) > 0.1)
475  return -999.;
476  }
477  }
478 
479  float fDeltaR = deltaR(pfIsoCand->eta(), pfIsoCand->phi(), fEta_, fPhi_);
480 
481  if (fDeltaR > fConeSize_)
482  return -999.;
483 
484  float fDeltaPhi = deltaPhi(fPhi_, pfIsoCand->phi());
485  float fDeltaEta = fEta_ - pfIsoCand->eta();
486 
487  // std::abscout << " charged hadron: DR " << fDeltaR
488  // << " pt " << pfIsoCand->pt() << " eta,phi " << pfIsoCand->eta() << ", " << pfIsoCand->phi()
489  // << " fVtxMainZ " << (*vtxMain).z() << " cand z " << vtx->z() << std::endl;
490 
491  if (!bApplyVeto_)
492  return fDeltaR;
493 
494  //NOTE: get the direction for the EB/EE transition region from the deposit just to be in synch with the isoDep
495  // this will be changed in the future
496  if (pivotInBarrel) {
498  return fDeltaR;
499  }
500 
501  if (bDeltaRVetoBarrel_) {
502  if (fDeltaR < fDeltaRVetoBarrelCharged_)
503  return -999.;
504  }
505  if (bRectangleVetoBarrel_) {
508  return -999.;
509  }
510  }
511 
512  } else {
514  return fDeltaR;
515  }
516  if (bDeltaRVetoEndcap_) {
517  if (fDeltaR < fDeltaRVetoEndcapCharged_)
518  return -999.;
519  }
520  if (bRectangleVetoEndcap_) {
523  return -999.;
524  }
525  }
526  }
527 
528  return fDeltaR;
529 }
double eta() const final
momentum pseudorapidity
double px() const final
x coordinate of momentum vector
double pt() const final
transverse momentum
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:408
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
reco::VertexRef chargedHadronVertex(edm::Handle< reco::VertexCollection > verticies, const reco::PFCandidate &pfcand)
bool isNull() const
Checks for null.
Definition: Ref.h:235
double py() const final
y coordinate of momentum vector
double phi() const final
momentum azimuthal angle
float PFPhotonIsolationCalculator::isChargedParticleVetoed ( const reco::PFCandidateRef  pfIsoCand,
reco::VertexRef  vtx,
edm::Handle< reco::VertexCollection vertices 
)
private

Definition at line 532 of file PFPhotonIsolationCalculator.cc.

References funct::abs(), bApplyDzDxyVeto_, bApplyPFPUVeto_, bApplyVeto_, bDeltaRVetoBarrel_, bDeltaRVetoEndcap_, bRectangleVetoBarrel_, bRectangleVetoEndcap_, chargedHadronVertex(), SiPixelRawToDigiRegional_cfi::deltaPhi, PbPb_ZMuSkimMuonDPG_cff::deltaR, PVValHelper::dxy, PVValHelper::dz, fConeSize_, fDeltaRVetoBarrelCharged_, fDeltaRVetoEndcapCharged_, fEta_, fPhi_, fRectangleDeltaEtaVetoBarrelCharged_, fRectangleDeltaEtaVetoEndcapCharged_, fRectangleDeltaPhiVetoBarrelCharged_, fRectangleDeltaPhiVetoEndcapCharged_, fVx_, fVy_, iParticleType_, edm::Ref< C, T, F >::isNull(), kPhoton, pivotInBarrel, and badGlobalMuonTaggersAOD_cff::vtx.

534  {
535  reco::VertexRef vtx = chargedHadronVertex(vertices, *pfIsoCand);
536  if (vtx.isNull())
537  return -999.;
538 
539  // float fVtxMainX = (*vtxMain).x();
540  // float fVtxMainY = (*vtxMain).y();
541  float fVtxMainZ = (*vtxMain).z();
542 
543  if (bApplyPFPUVeto_) {
544  if (vtx != vtxMain)
545  return -999.;
546  }
547 
548  if (bApplyDzDxyVeto_) {
549  if (iParticleType_ == kPhoton) {
550  float dz = std::fabs(pfIsoCand->trackRef()->dz((*vtxMain).position()));
551  if (dz > 0.2)
552  return -999.;
553 
554  double dxy = pfIsoCand->trackRef()->dxy((*vtxMain).position());
555  if (std::fabs(dxy) > 0.1)
556  return -999.;
557 
558  /*
559 float dz = fabs(vtx->z() - fVtxMainZ);
560 if (dz > 1.)
561  return -999.;
562 double dxy = ( -(vtx->x() - fVtxMainX)*pfIsoCand->py() + (vtx->y() - fVtxMainY)*pfIsoCand->px()) / pfIsoCand->pt();
563 if(fabs(dxy) > 0.2)
564  return -999.;
565 */
566  } else {
567  float dz = std::fabs(vtx->z() - fVtxMainZ);
568  if (dz > 1.)
569  return -999.;
570 
571  double dxy = (-(vtx->x() - fVx_) * pfIsoCand->py() + (vtx->y() - fVy_) * pfIsoCand->px()) / pfIsoCand->pt();
572  if (std::fabs(dxy) > 0.1)
573  return -999.;
574  }
575  }
576 
577  float fDeltaR = deltaR(pfIsoCand->eta(), pfIsoCand->phi(), fEta_, fPhi_);
578 
579  if (fDeltaR > fConeSize_)
580  return -999.;
581 
582  float fDeltaPhi = deltaPhi(fPhi_, pfIsoCand->phi());
583  float fDeltaEta = fEta_ - pfIsoCand->eta();
584 
585  // std::cout << " charged hadron: DR " << fDeltaR
586  // << " pt " << pfIsoCand->pt() << " eta,phi " << pfIsoCand->eta() << ", " << pfIsoCand->phi()
587  // << " fVtxMainZ " << (*vtxMain).z() << " cand z " << vtx->z() << std::endl;
588 
589  if (!bApplyVeto_)
590  return fDeltaR;
591 
592  //NOTE: get the direction for the EB/EE transition region from the deposit just to be in synch with the isoDep
593  // this will be changed in the future
594  if (pivotInBarrel) {
596  return fDeltaR;
597  }
598 
599  if (bDeltaRVetoBarrel_) {
600  if (fDeltaR < fDeltaRVetoBarrelCharged_)
601  return -999.;
602  }
603  if (bRectangleVetoBarrel_) {
606  return -999.;
607  }
608  }
609 
610  } else {
612  return fDeltaR;
613  }
614  if (bDeltaRVetoEndcap_) {
615  if (fDeltaR < fDeltaRVetoEndcapCharged_)
616  return -999.;
617  }
618  if (bRectangleVetoEndcap_) {
621  return -999.;
622  }
623  }
624  }
625 
626  return fDeltaR;
627 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
reco::VertexRef chargedHadronVertex(edm::Handle< reco::VertexCollection > verticies, const reco::PFCandidate &pfcand)
bool isNull() const
Checks for null.
Definition: Ref.h:235
float PFPhotonIsolationCalculator::isNeutralParticleVetoed ( const reco::PFCandidate pfIsoCand)
private

Definition at line 326 of file PFPhotonIsolationCalculator.cc.

References funct::abs(), bApplyVeto_, bDeltaRVetoBarrel_, bDeltaRVetoEndcap_, bRectangleVetoBarrel_, bRectangleVetoEndcap_, SiPixelRawToDigiRegional_cfi::deltaPhi, PbPb_ZMuSkimMuonDPG_cff::deltaR, reco::LeafCandidate::eta(), fConeSize_, fDeltaRVetoBarrelNeutrals_, fDeltaRVetoEndcapNeutrals_, fEta_, fPhi_, fRectangleDeltaEtaVetoBarrelNeutrals_, fRectangleDeltaEtaVetoEndcapNeutrals_, fRectangleDeltaPhiVetoBarrelNeutrals_, fRectangleDeltaPhiVetoEndcapNeutrals_, reco::LeafCandidate::phi(), and pivotInBarrel.

Referenced by fGetIsolationInRings(), and getIsolationInRingsChargedAll().

326  {
327  float fDeltaR = deltaR(fEta_, fPhi_, pfIsoCand->eta(), pfIsoCand->phi());
328 
329  if (fDeltaR > fConeSize_)
330  return -999;
331 
332  float fDeltaPhi = deltaPhi(fPhi_, pfIsoCand->phi());
333  float fDeltaEta = fEta_ - pfIsoCand->eta();
334 
335  if (!bApplyVeto_)
336  return fDeltaR;
337 
338  //NOTE: get the direction for the EB/EE transition region from the deposit just to be in synch with the isoDep
339  // this will be changed in the future
340  if (pivotInBarrel) {
342  return fDeltaR;
343  }
344 
345  if (bDeltaRVetoBarrel_) {
346  if (fDeltaR < fDeltaRVetoBarrelNeutrals_)
347  return -999.;
348  }
349  if (bRectangleVetoBarrel_) {
352  return -999.;
353  }
354  }
355 
356  } else {
358  return fDeltaR;
359  }
360  if (bDeltaRVetoEndcap_) {
361  if (fDeltaR < fDeltaRVetoEndcapNeutrals_)
362  return -999.;
363  }
364  if (bRectangleVetoEndcap_) {
367  return -999.;
368  }
369  }
370  }
371 
372  return fDeltaR;
373 }
double eta() const final
momentum pseudorapidity
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double phi() const final
momentum azimuthal angle
float PFPhotonIsolationCalculator::isNeutralParticleVetoed ( const reco::PFCandidateRef  pfIsoCand)
private

Definition at line 376 of file PFPhotonIsolationCalculator.cc.

References funct::abs(), bApplyVeto_, bDeltaRVetoBarrel_, bDeltaRVetoEndcap_, bRectangleVetoBarrel_, bRectangleVetoEndcap_, SiPixelRawToDigiRegional_cfi::deltaPhi, PbPb_ZMuSkimMuonDPG_cff::deltaR, fConeSize_, fDeltaRVetoBarrelNeutrals_, fDeltaRVetoEndcapNeutrals_, fEta_, fPhi_, fRectangleDeltaEtaVetoBarrelNeutrals_, fRectangleDeltaEtaVetoEndcapNeutrals_, fRectangleDeltaPhiVetoBarrelNeutrals_, fRectangleDeltaPhiVetoEndcapNeutrals_, and pivotInBarrel.

376  {
377  float fDeltaR = deltaR(fEta_, fPhi_, pfIsoCand->eta(), pfIsoCand->phi());
378 
379  if (fDeltaR > fConeSize_)
380  return -999;
381 
382  float fDeltaPhi = deltaPhi(fPhi_, pfIsoCand->phi());
383  float fDeltaEta = fEta_ - pfIsoCand->eta();
384 
385  if (!bApplyVeto_)
386  return fDeltaR;
387 
388  //NOTE: get the direction for the EB/EE transition region from the deposit just to be in synch with the isoDep
389  // this will be changed in the future
390  if (pivotInBarrel) {
392  return fDeltaR;
393  }
394 
395  if (bDeltaRVetoBarrel_) {
396  if (fDeltaR < fDeltaRVetoBarrelNeutrals_)
397  return -999.;
398  }
399  if (bRectangleVetoBarrel_) {
402  return -999.;
403  }
404  }
405 
406  } else {
408  return fDeltaR;
409  }
410  if (bDeltaRVetoEndcap_) {
411  if (fDeltaR < fDeltaRVetoEndcapNeutrals_)
412  return -999.;
413  }
414  if (bRectangleVetoEndcap_) {
417  return -999.;
418  }
419  }
420  }
421 
422  return fDeltaR;
423 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float PFPhotonIsolationCalculator::isPhotonParticleVetoed ( const reco::PFCandidateRef  pfIsoCand)
private

Definition at line 267 of file PFPhotonIsolationCalculator.cc.

References funct::abs(), bApplyMissHitPhVeto_, bApplyVeto_, bDeltaRVetoBarrel_, bDeltaRVetoEndcap_, bRectangleVetoBarrel_, bRectangleVetoEndcap_, bUseCrystalSize_, SiPixelRawToDigiRegional_cfi::deltaPhi, PbPb_ZMuSkimMuonDPG_cff::deltaR, fConeSize_, fDeltaRVetoBarrelPhotons_, fDeltaRVetoEndcapPhotons_, fEta_, fNumberOfCrystalEndcapPhotons_, fPhi_, fRectangleDeltaEtaVetoBarrelPhotons_, fRectangleDeltaEtaVetoEndcapPhotons_, fRectangleDeltaPhiVetoBarrelPhotons_, fRectangleDeltaPhiVetoEndcapPhotons_, iMissHits_, edm::Ref< C, T, F >::isNonnull(), pivotInBarrel, refSC, and mathSSE::sqrt().

Referenced by fGetIsolationInRings(), and getIsolationInRingsChargedAll().

267  {
268  float fDeltaR = deltaR(fEta_, fPhi_, pfIsoCand->eta(), pfIsoCand->phi());
269 
270  if (fDeltaR > fConeSize_)
271  return -999.;
272 
273  float fDeltaPhi = deltaPhi(fPhi_, pfIsoCand->phi());
274  float fDeltaEta = fEta_ - pfIsoCand->eta();
275 
276  if (!bApplyVeto_)
277  return fDeltaR;
278 
279  //NOTE: get the direction for the EB/EE transition region from the deposit just to be in synch with the isoDep
280  // this will be changed in the future
281 
282  if (bApplyMissHitPhVeto_) {
283  if (iMissHits_ > 0)
284  if (pfIsoCand->mva_nothing_gamma() > 0.99) {
285  if (pfIsoCand->superClusterRef().isNonnull() && refSC.isNonnull()) {
286  if (pfIsoCand->superClusterRef() == refSC)
287  return -999.;
288  }
289  }
290  }
291 
292  if (pivotInBarrel) {
293  if (bDeltaRVetoBarrel_) {
294  if (fDeltaR < fDeltaRVetoBarrelPhotons_)
295  return -999.;
296  }
297 
298  if (bRectangleVetoBarrel_) {
301  return -999.;
302  }
303  }
304  } else {
305  if (bUseCrystalSize_ == true) {
307  0.00864 * std::fabs(refSC->position().z() / sqrt(refSC->position().perp2())) * fNumberOfCrystalEndcapPhotons_;
308  }
309 
310  if (bDeltaRVetoEndcap_) {
311  if (fDeltaR < fDeltaRVetoEndcapPhotons_)
312  return -999.;
313  }
314  if (bRectangleVetoEndcap_) {
317  return -999.;
318  }
319  }
320  }
321 
322  return fDeltaR;
323 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
T sqrt(T t)
Definition: SSEVec.h:19
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float PFPhotonIsolationCalculator::isPhotonParticleVetoed ( const reco::PFCandidate pfIsoCand)
private

Definition at line 208 of file PFPhotonIsolationCalculator.cc.

References funct::abs(), bApplyMissHitPhVeto_, bApplyVeto_, bDeltaRVetoBarrel_, bDeltaRVetoEndcap_, bRectangleVetoBarrel_, bRectangleVetoEndcap_, bUseCrystalSize_, SiPixelRawToDigiRegional_cfi::deltaPhi, PbPb_ZMuSkimMuonDPG_cff::deltaR, reco::LeafCandidate::eta(), fConeSize_, fDeltaRVetoBarrelPhotons_, fDeltaRVetoEndcapPhotons_, fEta_, fNumberOfCrystalEndcapPhotons_, fPhi_, fRectangleDeltaEtaVetoBarrelPhotons_, fRectangleDeltaEtaVetoEndcapPhotons_, fRectangleDeltaPhiVetoBarrelPhotons_, fRectangleDeltaPhiVetoEndcapPhotons_, iMissHits_, edm::Ref< C, T, F >::isNonnull(), reco::PFCandidate::mva_nothing_gamma(), reco::LeafCandidate::phi(), pivotInBarrel, refSC, mathSSE::sqrt(), and reco::PFCandidate::superClusterRef().

208  {
209  float fDeltaR = deltaR(fEta_, fPhi_, pfIsoCand->eta(), pfIsoCand->phi());
210 
211  if (fDeltaR > fConeSize_)
212  return -999.;
213 
214  float fDeltaPhi = deltaPhi(fPhi_, pfIsoCand->phi());
215  float fDeltaEta = fEta_ - pfIsoCand->eta();
216 
217  if (!bApplyVeto_)
218  return fDeltaR;
219 
220  //NOTE: get the direction for the EB/EE transition region from the deposit just to be in synch with the isoDep
221  // this will be changed in the future
222 
223  if (bApplyMissHitPhVeto_) {
224  if (iMissHits_ > 0)
225  if (pfIsoCand->mva_nothing_gamma() > 0.99) {
226  if (pfIsoCand->superClusterRef().isNonnull() && refSC.isNonnull()) {
227  if (pfIsoCand->superClusterRef() == refSC)
228  return -999.;
229  }
230  }
231  }
232 
233  if (pivotInBarrel) {
234  if (bDeltaRVetoBarrel_) {
235  if (fDeltaR < fDeltaRVetoBarrelPhotons_)
236  return -999.;
237  }
238 
239  if (bRectangleVetoBarrel_) {
242  return -999.;
243  }
244  }
245  } else {
246  if (bUseCrystalSize_ == true) {
248  0.00864 * std::fabs(refSC->position().z() / sqrt(refSC->position().perp2())) * fNumberOfCrystalEndcapPhotons_;
249  }
250 
251  if (bDeltaRVetoEndcap_) {
252  if (fDeltaR < fDeltaRVetoEndcapPhotons_)
253  return -999.;
254  }
255  if (bRectangleVetoEndcap_) {
258  return -999.;
259  }
260  }
261  }
262 
263  return fDeltaR;
264 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
double eta() const final
momentum pseudorapidity
float mva_nothing_gamma() const
mva for gamma detection
Definition: PFCandidate.h:334
T sqrt(T t)
Definition: SSEVec.h:19
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double phi() const final
momentum azimuthal angle
reco::SuperClusterRef superClusterRef() const
return a reference to the corresponding SuperCluster if any
Definition: PFCandidate.cc:558
int PFPhotonIsolationCalculator::matchPFObject ( const reco::Photon photon,
const reco::PFCandidateCollection pfParticlesColl 
)
private

Definition at line 684 of file PFPhotonIsolationCalculator.cc.

References funct::abs(), mps_fire::i, reco::LeafCandidate::pdgId(), reco::Photon::superCluster(), and reco::PFCandidate::superClusterRef().

Referenced by getIsolationInRingsChargedAll().

685  {
686  Int_t iMatch = -1;
687 
688  int i = 0;
689  for (reco::PFCandidateCollection::const_iterator iPF = Candidates->begin(); iPF != Candidates->end(); iPF++) {
690  const reco::PFCandidate& pfParticle = (*iPF);
691  if ((((pfParticle.pdgId() == 22) || std::abs(pfParticle.pdgId()) == 11))) {
692  if (pfParticle.superClusterRef() == photon->superCluster())
693  iMatch = i;
694  }
695 
696  i++;
697  }
698 
699  /*
700 if(iMatch == -1){
701 i=0;
702 float fPt = -1;
703 for(reco::PFCandidateCollection::const_iterator iPF=Candidates->begin();iPF !=Candidates->end();iPF++){
704 const reco::PFCandidate& pfParticle = (*iPF);
705 if((((pfParticle.pdgId()==22 ) || TMath::Abs(pfParticle.pdgId())==11) )){
706  if(pfParticle.pt()>fPt){
707  fDeltaR = deltaR(pfParticle.eta(),pfParticle.phi(),photon->eta(),photon->phi());
708  if(fDeltaR<0.1){
709  iMatch = i;
710  fPt = pfParticle.pt();
711  }
712  }
713 }
714 i++;
715 }
716 }
717 */
718 
719  return iMatch;
720 }
int pdgId() const final
PDG identifier.
reco::SuperClusterRef superCluster() const override
Ref to SuperCluster.
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:40
reco::SuperClusterRef superClusterRef() const
return a reference to the corresponding SuperCluster if any
Definition: PFCandidate.cc:558
int PFPhotonIsolationCalculator::matchPFObject ( const reco::GsfElectron photon,
const reco::PFCandidateCollection pfParticlesColl 
)
private

Definition at line 722 of file PFPhotonIsolationCalculator.cc.

References funct::abs(), PbPb_ZMuSkimMuonDPG_cff::deltaR, reco::LeafCandidate::eta(), mps_fire::i, reco::LeafCandidate::pdgId(), reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), reco::GsfElectron::superCluster(), and reco::PFCandidate::superClusterRef().

723  {
724  Int_t iMatch = -1;
725 
726  int i = 0;
727  for (reco::PFCandidateCollection::const_iterator iPF = Candidates->begin(); iPF != Candidates->end(); iPF++) {
728  const reco::PFCandidate& pfParticle = (*iPF);
729  if ((((pfParticle.pdgId() == 22) || std::abs(pfParticle.pdgId()) == 11))) {
730  if (pfParticle.superClusterRef() == electron->superCluster())
731  iMatch = i;
732  }
733 
734  i++;
735  }
736 
737  if (iMatch == -1) {
738  i = 0;
739  float fPt = -1;
740  for (reco::PFCandidateCollection::const_iterator iPF = Candidates->begin(); iPF != Candidates->end(); iPF++) {
741  const reco::PFCandidate& pfParticle = (*iPF);
742  if ((((pfParticle.pdgId() == 22) || std::abs(pfParticle.pdgId()) == 11))) {
743  if (pfParticle.pt() > fPt) {
744  float fDeltaR = deltaR(pfParticle.eta(), pfParticle.phi(), electron->eta(), electron->phi());
745  if (fDeltaR < 0.1) {
746  iMatch = i;
747  fPt = pfParticle.pt();
748  }
749  }
750  }
751  i++;
752  }
753  }
754 
755  return iMatch;
756 }
int pdgId() const final
PDG identifier.
double eta() const final
momentum pseudorapidity
double pt() const final
transverse momentum
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:40
double phi() const final
momentum azimuthal angle
reco::SuperClusterRef superClusterRef() const
return a reference to the corresponding SuperCluster if any
Definition: PFCandidate.cc:558
void PFPhotonIsolationCalculator::setup ( const edm::ParameterSet conf)

Definition at line 16 of file PFPhotonIsolationCalculator.cc.

References bApplyDzDxyVeto_, bApplyMissHitPhVeto_, bApplyPFPUVeto_, bApplyVeto_, bCheckClosestZVertex_, bDeltaRVetoBarrel_, bDeltaRVetoEndcap_, bRectangleVetoBarrel_, bRectangleVetoEndcap_, bUseCrystalSize_, fConeSize_, fDeltaRVetoBarrelCharged_, fDeltaRVetoBarrelNeutrals_, fDeltaRVetoBarrelPhotons_, fDeltaRVetoEndcapCharged_, fDeltaRVetoEndcapNeutrals_, fDeltaRVetoEndcapPhotons_, fNumberOfCrystalEndcapPhotons_, fRectangleDeltaEtaVetoBarrelCharged_, fRectangleDeltaEtaVetoBarrelNeutrals_, fRectangleDeltaEtaVetoBarrelPhotons_, fRectangleDeltaEtaVetoEndcapCharged_, fRectangleDeltaEtaVetoEndcapNeutrals_, fRectangleDeltaEtaVetoEndcapPhotons_, fRectangleDeltaPhiVetoBarrelCharged_, fRectangleDeltaPhiVetoBarrelNeutrals_, fRectangleDeltaPhiVetoBarrelPhotons_, fRectangleDeltaPhiVetoEndcapCharged_, fRectangleDeltaPhiVetoEndcapNeutrals_, fRectangleDeltaPhiVetoEndcapPhotons_, fRingSize_, edm::ParameterSet::getParameter(), initializeRings(), iNumberOfRings_, and iParticleType_.

16  {
17  iParticleType_ = conf.getParameter<int>("particleType");
18  if (iParticleType_ == 1) {
19  fConeSize_ = conf.getParameter<double>("coneDR");
20  iNumberOfRings_ = conf.getParameter<int>("numberOfRings");
21  fRingSize_ = conf.getParameter<double>("ringSize");
22  //
23  bApplyVeto_ = conf.getParameter<bool>("applyVeto");
24  bApplyPFPUVeto_ = conf.getParameter<bool>("applyPFPUVeto");
25  bApplyDzDxyVeto_ = conf.getParameter<bool>("applyDzDxyVeto");
26  bApplyMissHitPhVeto_ = conf.getParameter<bool>("applyMissHitPhVeto");
27  bDeltaRVetoBarrel_ = conf.getParameter<bool>("deltaRVetoBarrel");
28  bDeltaRVetoEndcap_ = conf.getParameter<bool>("deltaRVetoEndcap");
29  bRectangleVetoBarrel_ = conf.getParameter<bool>("rectangleVetoBarrel");
30  bRectangleVetoEndcap_ = conf.getParameter<bool>("rectangleVetoEndcap");
31  bUseCrystalSize_ = conf.getParameter<bool>("useCrystalSize");
32  //
33  fDeltaRVetoBarrelPhotons_ = conf.getParameter<double>("deltaRVetoBarrelPhotons");
34  fDeltaRVetoBarrelNeutrals_ = conf.getParameter<double>("deltaRVetoBarrelNeutrals");
35  fDeltaRVetoBarrelCharged_ = conf.getParameter<double>("deltaRVetoBarrelCharged");
36  fDeltaRVetoEndcapPhotons_ = conf.getParameter<double>("deltaRVetoEndcapPhotons");
37  fDeltaRVetoEndcapNeutrals_ = conf.getParameter<double>("deltaRVetoEndcapNeutrals");
38  fDeltaRVetoEndcapCharged_ = conf.getParameter<double>("deltaRVetoEndcapCharged");
39  fNumberOfCrystalEndcapPhotons_ = conf.getParameter<double>("numberOfCrystalEndcapPhotons");
40  //
41  fRectangleDeltaPhiVetoBarrelPhotons_ = conf.getParameter<double>("rectangleDeltaPhiVetoBarrelPhotons");
42  fRectangleDeltaPhiVetoBarrelNeutrals_ = conf.getParameter<double>("rectangleDeltaPhiVetoBarrelNeutrals");
43  fRectangleDeltaPhiVetoBarrelCharged_ = conf.getParameter<double>("rectangleDeltaPhiVetoBarrelCharged");
44  fRectangleDeltaPhiVetoEndcapPhotons_ = conf.getParameter<double>("rectangleDeltaPhiVetoEndcapPhotons");
45  fRectangleDeltaPhiVetoEndcapNeutrals_ = conf.getParameter<double>("rectangleDeltaPhiVetoEndcapNeutrals");
46  fRectangleDeltaPhiVetoEndcapCharged_ = conf.getParameter<double>("rectangleDeltaPhiVetoEndcapCharged");
47  //
48  fRectangleDeltaEtaVetoBarrelPhotons_ = conf.getParameter<double>("rectangleDeltaEtaVetoBarrelPhotons");
49  fRectangleDeltaEtaVetoBarrelNeutrals_ = conf.getParameter<double>("rectangleDeltaEtaVetoBarrelNeutrals");
50  fRectangleDeltaEtaVetoBarrelCharged_ = conf.getParameter<double>("rectangleDeltaEtaVetoBarrelCharged");
51  fRectangleDeltaEtaVetoEndcapPhotons_ = conf.getParameter<double>("rectangleDeltaEtaVetoEndcapPhotons");
52  fRectangleDeltaEtaVetoEndcapNeutrals_ = conf.getParameter<double>("rectangleDeltaEtaVetoEndcapNeutrals");
53  fRectangleDeltaEtaVetoEndcapCharged_ = conf.getParameter<double>("rectangleDeltaEtaVetoEndcapCharged");
54  //
55  bCheckClosestZVertex_ = conf.getParameter<bool>("checkClosestZVertex");
56  initializeRings(iNumberOfRings_, fConeSize_);
57  }
58 }
T getParameter(std::string const &) const
void initializeRings(int iNumberOfRings, float fRingSize)

Member Data Documentation

Bool_t PFPhotonIsolationCalculator::bApplyDzDxyVeto_
private

Definition at line 124 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

Bool_t PFPhotonIsolationCalculator::bApplyMissHitPhVeto_
private

Definition at line 126 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

Bool_t PFPhotonIsolationCalculator::bApplyPFPUVeto_
private

Definition at line 125 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

Bool_t PFPhotonIsolationCalculator::bApplyVeto_
private
Bool_t PFPhotonIsolationCalculator::bCheckClosestZVertex_
private

Definition at line 121 of file PFPhotonIsolationCalculator.h.

Referenced by chargedHadronVertex(), and setup().

Bool_t PFPhotonIsolationCalculator::bDeltaRVetoBarrel_
private
Bool_t PFPhotonIsolationCalculator::bDeltaRVetoEndcap_
private
Bool_t PFPhotonIsolationCalculator::bRectangleVetoBarrel_
private
Bool_t PFPhotonIsolationCalculator::bRectangleVetoEndcap_
private
Bool_t PFPhotonIsolationCalculator::bUseCrystalSize_
private

Definition at line 127 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fConeSize_
private
float PFPhotonIsolationCalculator::fDeltaRVetoBarrelCharged_
private

Definition at line 137 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fDeltaRVetoBarrelNeutrals_
private

Definition at line 136 of file PFPhotonIsolationCalculator.h.

Referenced by isNeutralParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fDeltaRVetoBarrelPhotons_
private

Definition at line 135 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fDeltaRVetoEndcapCharged_
private

Definition at line 141 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fDeltaRVetoEndcapNeutrals_
private

Definition at line 140 of file PFPhotonIsolationCalculator.h.

Referenced by isNeutralParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fDeltaRVetoEndcapPhotons_
private

Definition at line 139 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fEta_
private
float PFPhotonIsolationCalculator::fEtaSC_
private

Definition at line 171 of file PFPhotonIsolationCalculator.h.

Bool_t PFPhotonIsolationCalculator::fisInitialized_
private

Definition at line 108 of file PFPhotonIsolationCalculator.h.

float PFPhotonIsolationCalculator::fIsolation_
private

Definition at line 109 of file PFPhotonIsolationCalculator.h.

Referenced by fGetIsolation().

float PFPhotonIsolationCalculator::fIsolationCharged_
private

Definition at line 112 of file PFPhotonIsolationCalculator.h.

Referenced by getIsolationCharged().

float PFPhotonIsolationCalculator::fIsolationChargedAll_
private

Definition at line 113 of file PFPhotonIsolationCalculator.h.

Referenced by getIsolationChargedAll().

std::vector<float> PFPhotonIsolationCalculator::fIsolationInRings_
private
std::vector<float> PFPhotonIsolationCalculator::fIsolationInRingsCharged_
private
std::vector<float> PFPhotonIsolationCalculator::fIsolationInRingsChargedAll_
private
std::vector<float> PFPhotonIsolationCalculator::fIsolationInRingsNeutral_
private
std::vector<float> PFPhotonIsolationCalculator::fIsolationInRingsPhoton_
private
float PFPhotonIsolationCalculator::fIsolationNeutral_
private

Definition at line 111 of file PFPhotonIsolationCalculator.h.

Referenced by getIsolationNeutral().

float PFPhotonIsolationCalculator::fIsolationPhoton_
private

Definition at line 110 of file PFPhotonIsolationCalculator.h.

Referenced by getIsolationPhoton().

float PFPhotonIsolationCalculator::fNumberOfCrystalEndcapPhotons_
private

Definition at line 143 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fPhi_
private
float PFPhotonIsolationCalculator::fPhiSC_
private

Definition at line 172 of file PFPhotonIsolationCalculator.h.

float PFPhotonIsolationCalculator::fPt_
private

Definition at line 174 of file PFPhotonIsolationCalculator.h.

float PFPhotonIsolationCalculator::fRectangleDeltaEtaVetoBarrelCharged_
private

Definition at line 155 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaEtaVetoBarrelNeutrals_
private

Definition at line 154 of file PFPhotonIsolationCalculator.h.

Referenced by isNeutralParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaEtaVetoBarrelPhotons_
private

Definition at line 153 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaEtaVetoEndcapCharged_
private

Definition at line 159 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaEtaVetoEndcapNeutrals_
private

Definition at line 158 of file PFPhotonIsolationCalculator.h.

Referenced by isNeutralParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaEtaVetoEndcapPhotons_
private

Definition at line 157 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaPhiVetoBarrelCharged_
private

Definition at line 147 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaPhiVetoBarrelNeutrals_
private

Definition at line 146 of file PFPhotonIsolationCalculator.h.

Referenced by isNeutralParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaPhiVetoBarrelPhotons_
private

Definition at line 145 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaPhiVetoEndcapCharged_
private

Definition at line 151 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaPhiVetoEndcapNeutrals_
private

Definition at line 150 of file PFPhotonIsolationCalculator.h.

Referenced by isNeutralParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaPhiVetoEndcapPhotons_
private

Definition at line 149 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRingSize_
private

Definition at line 164 of file PFPhotonIsolationCalculator.h.

Referenced by fGetIsolationInRings(), and setup().

float PFPhotonIsolationCalculator::fVx_
private

Definition at line 175 of file PFPhotonIsolationCalculator.h.

Referenced by fGetIsolationInRings(), and isChargedParticleVetoed().

float PFPhotonIsolationCalculator::fVy_
private

Definition at line 176 of file PFPhotonIsolationCalculator.h.

Referenced by fGetIsolationInRings(), and isChargedParticleVetoed().

float PFPhotonIsolationCalculator::fVz_
private

Definition at line 177 of file PFPhotonIsolationCalculator.h.

Referenced by fGetIsolationInRings().

int PFPhotonIsolationCalculator::iMissHits_
private

Definition at line 162 of file PFPhotonIsolationCalculator.h.

Referenced by fGetIsolationInRings(), and isPhotonParticleVetoed().

int PFPhotonIsolationCalculator::iNumberOfRings_
private

Definition at line 161 of file PFPhotonIsolationCalculator.h.

Referenced by fGetIsolationInRings(), and setup().

int PFPhotonIsolationCalculator::iParticleType_
private

Definition at line 106 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

bool PFPhotonIsolationCalculator::pivotInBarrel
private
reco::SuperClusterRef PFPhotonIsolationCalculator::refSC
private

Definition at line 179 of file PFPhotonIsolationCalculator.h.

Referenced by fGetIsolationInRings(), and isPhotonParticleVetoed().