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 40 of file PFPhotonIsolationCalculator.h.

Member Enumeration Documentation

Enumerator
kElectron 
kPhoton 

Definition at line 66 of file PFPhotonIsolationCalculator.h.

66  {
67  kElectron = -1, // MVA for non-triggering electrons
68  kPhoton = 1 // MVA for triggering electrons
69  };

Constructor & Destructor Documentation

PFPhotonIsolationCalculator::PFPhotonIsolationCalculator ( )

Definition at line 76 of file PFPhotonIsolationCalculator.cc.

76  {
77  // Constructor.
78 }
PFPhotonIsolationCalculator::~PFPhotonIsolationCalculator ( )

Definition at line 83 of file PFPhotonIsolationCalculator.cc.

84 {
85 
86 }

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 89 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.

94  {
95 
96  reco::VertexRef vtx(vertices, 0);
97  this->fGetIsolation(&*aPho, pfCandidateHandle, vtx, vertices);
98  phoisol03.chargedHadronIso = this->getIsolationCharged() ;
99  phoisol03.neutralHadronIso = this->getIsolationNeutral();
100  phoisol03.photonIso = this->getIsolationPhoton();
101 
102 
103 
104  }
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 685 of file PFPhotonIsolationCalculator.cc.

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

Referenced by getIsolationInRingsChargedAll(), and isChargedParticleVetoed().

685  {
686 
687  //code copied from Florian's PFNoPU class (corrected removing the double loop....)
688 
689  auto const & track = pfcand.trackRef();
690 
691  size_t iVertex = 0;
692  unsigned int index=0;
693  unsigned int nFoundVertex = 0;
694 
695  float bestweight=0;
696 
697  const reco::VertexCollection& vertices = *(verticesColl.product());
698 
699  for( auto const & vtx : vertices) {
700  float w = vtx.trackWeight(track); // 0 if does not belong here
701  //select the vertex for which the track has the highest weight
702  if (w > bestweight){ // should we break here?
703  bestweight=w;
704  iVertex=index;
705  nFoundVertex++;
706  }
707  ++index;
708  }
709 
710 
711 
712  if (nFoundVertex>0){
713  if (nFoundVertex!=1)
714  edm::LogWarning("TrackOnTwoVertex")<<"a track is shared by at least two verteces. Used to be an assert";
715  return reco::VertexRef( verticesColl, iVertex);
716  }
717  // no vertex found with this track.
718 
719  // optional: as a secondary solution, associate the closest vertex in z
720  if ( bCheckClosestZVertex_ ) {
721 
722  double dzmin = 10000.;
723  double ztrack = pfcand.vertex().z();
724  bool foundVertex = false;
725  index = 0;
726  for( reco::VertexCollection::const_iterator iv=vertices.begin(); iv!=vertices.end(); ++iv, ++index) {
727 
728  double dz = std::fabs(ztrack - iv->z());
729  if(dz<dzmin) {
730  dzmin = dz;
731  iVertex = index;
732  foundVertex = true;
733  }
734  }
735 
736  if( foundVertex )
737  return reco::VertexRef( verticesColl, iVertex);
738 
739  }
740 
741  return reco::VertexRef( );
742 }
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:442
const Point & vertex() const override
vertex position (overwritten by PF...)
Definition: PFCandidate.cc:656
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 139 of file PFPhotonIsolationCalculator.cc.

References fGetIsolationInRings(), fIsolation_, and fIsolationInRings_.

Referenced by calculate(), and getIsolationInRingsChargedAll().

139  {
140 
141  fGetIsolationInRings( photon, pfCandidateHandle, vtx, vertices);
143  return fIsolation_;
144 }
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 149 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().

149  {
150 
151 
152  int isoBin;
153 
154  for(isoBin =0;isoBin<iNumberOfRings_;isoBin++){
155  fIsolationInRings_[isoBin]=0.;
156  fIsolationInRingsPhoton_[isoBin]=0.;
157  fIsolationInRingsNeutral_[isoBin]=0.;
158  fIsolationInRingsCharged_[isoBin]=0.;
159  fIsolationInRingsChargedAll_[isoBin]=0.;
160  }
161 
162  iMissHits_ = 0;
163 
164  refSC = photon->superCluster();
165  pivotInBarrel = std::fabs((refSC->position().eta()))<1.479;
166 
167  for(unsigned iPF=0; iPF< pfCandidateHandle->size(); iPF++) {
168 
169  reco::PFCandidateRef pfParticle(reco::PFCandidateRef(pfCandidateHandle, iPF));
170 
171  if (pfParticle->superClusterRef().isNonnull() &&
172  photon->superCluster().isNonnull() &&
173  pfParticle->superClusterRef() == photon->superCluster())
174  continue;
175 
176 
177 
178  if(pfParticle->pdgId()==22){
179  // Set the vertex of reco::Photon to the first PV
180  math::XYZVector direction = math::XYZVector(photon->superCluster()->x() - pfParticle->vx(),
181  photon->superCluster()->y() - pfParticle->vy(),
182  photon->superCluster()->z() - pfParticle->vz());
183 
184  fEta_ = direction.Eta();
185  fPhi_ = direction.Phi();
186  fVx_ = pfParticle->vx();
187  fVy_ = pfParticle->vy();
188  fVz_ = pfParticle->vz();
189 
190  float fDeltaR =isPhotonParticleVetoed(pfParticle);
191  if( fDeltaR >=0.){
192  isoBin = (int)(fDeltaR/fRingSize_);
193  fIsolationInRingsPhoton_[isoBin] = fIsolationInRingsPhoton_[isoBin] + pfParticle->pt();
194  }
195 
196  }else if(std::abs(pfParticle->pdgId())==130){
197  // Set the vertex of reco::Photon to the first PV
198  math::XYZVector direction = math::XYZVector(photon->superCluster()->x() - pfParticle->vx(),
199  photon->superCluster()->y() - pfParticle->vy(),
200  photon->superCluster()->z() - pfParticle->vz());
201 
202  fEta_ = direction.Eta();
203  fPhi_ = direction.Phi();
204  fVx_ = pfParticle->vx();
205  fVy_ = pfParticle->vy();
206  fVz_ = pfParticle->vz();
207  float fDeltaR = isNeutralParticleVetoed( pfParticle);
208  if( fDeltaR>=0.){
209  isoBin = (int)(fDeltaR/fRingSize_);
210  fIsolationInRingsNeutral_[isoBin] = fIsolationInRingsNeutral_[isoBin] + pfParticle->pt();
211  }
212 
213  //}else if(abs(pfParticle.pdgId()) == 11 ||abs(pfParticle.pdgId()) == 13 || abs(pfParticle.pdgId()) == 211){
214  }else if(std::abs(pfParticle->pdgId()) == 211){
215  // Set the vertex of reco::Photon to the first PV
216  math::XYZVector direction = math::XYZVector(photon->superCluster()->x() - (*vtx).x(),
217  photon->superCluster()->y() - (*vtx).y(),
218  photon->superCluster()->z() - (*vtx).z());
219 
220  fEta_ = direction.Eta();
221  fPhi_ = direction.Phi();
222  fVx_ = (*vtx).x();
223  fVy_ = (*vtx).y();
224  fVz_ = (*vtx).z();
225  float fDeltaR = isChargedParticleVetoed( pfParticle, vtx, vertices);
226  if( fDeltaR >=0.){
227  isoBin = (int)(fDeltaR/fRingSize_);
228  fIsolationInRingsCharged_[isoBin] = fIsolationInRingsCharged_[isoBin] + pfParticle->pt();
229  }
230 
231  }
232  }
233 
234 
235  for(int isoBin =0;isoBin<iNumberOfRings_;isoBin++){
237  }
238 
239  return fIsolationInRings_;
240 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
float isNeutralParticleVetoed(const reco::PFCandidate *pfIsoCand)
std::vector< float > fIsolationInRingsCharged_
reco::SuperClusterRef superCluster() const override
Ref to SuperCluster.
std::vector< float > fIsolationInRingsChargedAll_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
std::vector< float > fIsolationInRingsNeutral_
float isPhotonParticleVetoed(const reco::PFCandidateRef pfIsoCand)
float isChargedParticleVetoed(const reco::PFCandidate *pfIsoCand, edm::Handle< reco::VertexCollection > vertices)
float PFPhotonIsolationCalculator::getIsolationCharged ( )
inlineprivate
float PFPhotonIsolationCalculator::getIsolationChargedAll ( )
inlineprivate
std::vector<float > PFPhotonIsolationCalculator::getIsolationInRingsCharged ( )
inlineprivate

Definition at line 82 of file PFPhotonIsolationCalculator.h.

References fIsolationInRingsCharged_.

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

Definition at line 81 of file PFPhotonIsolationCalculator.h.

References fIsolationInRingsNeutral_.

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

Definition at line 80 of file PFPhotonIsolationCalculator.h.

References fIsolationInRingsPhoton_.

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

Definition at line 110 of file PFPhotonIsolationCalculator.cc.

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

Referenced by setup().

110  {
111 
112  fIsolationInRings_.clear();
113  for(int isoBin =0;isoBin<iNumberOfRings;isoBin++){
114  float fTemp = 0.0;
115  fIsolationInRings_.push_back(fTemp);
116 
117  float fTempPhoton = 0.0;
118  fIsolationInRingsPhoton_.push_back(fTempPhoton);
119 
120  float fTempNeutral = 0.0;
121  fIsolationInRingsNeutral_.push_back(fTempNeutral);
122 
123  float fTempCharged = 0.0;
124  fIsolationInRingsCharged_.push_back(fTempCharged);
125 
126  float fTempChargedAll = 0.0;
127  fIsolationInRingsChargedAll_.push_back(fTempChargedAll);
128 
129  }
130 
131  fConeSize_ = fRingSize * (float)iNumberOfRings;
132 
133 }
std::vector< float > fIsolationInRingsCharged_
std::vector< float > fIsolationInRingsChargedAll_
std::vector< float > fIsolationInRingsNeutral_
float PFPhotonIsolationCalculator::isChargedParticleVetoed ( const reco::PFCandidate pfIsoCand,
edm::Handle< reco::VertexCollection vertices 
)
private

Definition at line 467 of file PFPhotonIsolationCalculator.cc.

Referenced by fGetIsolationInRings(), and getIsolationInRingsChargedAll().

467  {
468  //need code to handle special conditions
469 
470  return -999;
471 }
float PFPhotonIsolationCalculator::isChargedParticleVetoed ( const reco::PFCandidate pfIsoCand,
reco::VertexRef  vtx,
edm::Handle< reco::VertexCollection vertices 
)
private

Definition at line 474 of file PFPhotonIsolationCalculator.cc.

References funct::abs(), bApplyDzDxyVeto_, bApplyPFPUVeto_, bApplyVeto_, bDeltaRVetoBarrel_, bDeltaRVetoEndcap_, bRectangleVetoBarrel_, bRectangleVetoEndcap_, chargedHadronVertex(), hiPixelPairStep_cff::deltaPhi, 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.

474  {
475 
476  reco::VertexRef vtx = chargedHadronVertex(vertices, *pfIsoCand );
477  if(vtx.isNull())
478  return -999.;
479 
480 // float fVtxMainX = (*vtxMain).x();
481 // float fVtxMainY = (*vtxMain).y();
482  float fVtxMainZ = (*vtxMain).z();
483 
484  if(bApplyPFPUVeto_) {
485  if(vtx != vtxMain)
486  return -999.;
487  }
488 
489 
490  if(bApplyDzDxyVeto_) {
491  if(iParticleType_==kPhoton){
492 
493  float dz = std::fabs( pfIsoCand->trackRef()->dz( (*vtxMain).position() ) );
494  if (dz > 0.2)
495  return -999.;
496 
497  double dxy = pfIsoCand->trackRef()->dxy( (*vtxMain).position() );
498  if (std::fabs(dxy) > 0.1)
499  return -999.;
500 
501  /*
502 float dz = fabs(vtx->z() - fVtxMainZ);
503 if (dz > 1.)
504  return -999.;
505 double dxy = ( -(vtx->x() - fVtxMainX)*pfIsoCand->py() + (vtx->y() - fVtxMainY)*pfIsoCand->px()) / pfIsoCand->pt();
506 if(fabs(dxy) > 0.2)
507  return -999.;
508 */
509  }else{
510 
511 
512  float dz = std::fabs(vtx->z() - fVtxMainZ);
513  if (dz > 1.)
514  return -999.;
515 
516  double dxy = ( -(vtx->x() - fVx_)*pfIsoCand->py() + (vtx->y() - fVy_)*pfIsoCand->px()) / pfIsoCand->pt();
517  if(std::fabs(dxy) > 0.1)
518  return -999.;
519  }
520  }
521 
522  float fDeltaR = deltaR(pfIsoCand->eta(),pfIsoCand->phi(),fEta_,fPhi_);
523 
524  if(fDeltaR > fConeSize_)
525  return -999.;
526 
527  float fDeltaPhi = deltaPhi(fPhi_,pfIsoCand->phi());
528  float fDeltaEta = fEta_-pfIsoCand->eta();
529 
530 
531 // std::abscout << " charged hadron: DR " << fDeltaR
532 // << " pt " << pfIsoCand->pt() << " eta,phi " << pfIsoCand->eta() << ", " << pfIsoCand->phi()
533 // << " fVtxMainZ " << (*vtxMain).z() << " cand z " << vtx->z() << std::endl;
534 
535 
536  if(!bApplyVeto_)
537  return fDeltaR;
538 
539  //NOTE: get the direction for the EB/EE transition region from the deposit just to be in synch with the isoDep
540  // this will be changed in the future
541  if(pivotInBarrel){
543  return fDeltaR;
544  }
545 
546  if(bDeltaRVetoBarrel_){
547  if(fDeltaR < fDeltaRVetoBarrelCharged_)
548  return -999.;
549  }
552  return -999.;
553  }
554  }
555 
556  }else{
558  return fDeltaR;
559  }
560  if(bDeltaRVetoEndcap_){
561  if(fDeltaR < fDeltaRVetoEndcapCharged_)
562  return -999.;
563  }
566  return -999.;
567  }
568  }
569  }
570 
571 
572 
573 
574  return fDeltaR;
575 }
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:442
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:248
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
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 579 of file PFPhotonIsolationCalculator.cc.

References funct::abs(), bApplyDzDxyVeto_, bApplyPFPUVeto_, bApplyVeto_, bDeltaRVetoBarrel_, bDeltaRVetoEndcap_, bRectangleVetoBarrel_, bRectangleVetoEndcap_, chargedHadronVertex(), hiPixelPairStep_cff::deltaPhi, 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.

579  {
580 
581  reco::VertexRef vtx = chargedHadronVertex(vertices, *pfIsoCand );
582  if(vtx.isNull())
583  return -999.;
584 
585 // float fVtxMainX = (*vtxMain).x();
586 // float fVtxMainY = (*vtxMain).y();
587  float fVtxMainZ = (*vtxMain).z();
588 
589  if(bApplyPFPUVeto_) {
590  if(vtx != vtxMain)
591  return -999.;
592  }
593 
594 
595  if(bApplyDzDxyVeto_) {
596  if(iParticleType_==kPhoton){
597 
598  float dz = std::fabs( pfIsoCand->trackRef()->dz( (*vtxMain).position() ) );
599  if (dz > 0.2)
600  return -999.;
601 
602  double dxy = pfIsoCand->trackRef()->dxy( (*vtxMain).position() );
603  if (std::fabs(dxy) > 0.1)
604  return -999.;
605 
606  /*
607 float dz = fabs(vtx->z() - fVtxMainZ);
608 if (dz > 1.)
609  return -999.;
610 double dxy = ( -(vtx->x() - fVtxMainX)*pfIsoCand->py() + (vtx->y() - fVtxMainY)*pfIsoCand->px()) / pfIsoCand->pt();
611 if(fabs(dxy) > 0.2)
612  return -999.;
613 */
614  }else{
615 
616 
617  float dz = std::fabs(vtx->z() - fVtxMainZ);
618  if (dz > 1.)
619  return -999.;
620 
621  double dxy = ( -(vtx->x() - fVx_)*pfIsoCand->py() + (vtx->y() - fVy_)*pfIsoCand->px()) / pfIsoCand->pt();
622  if(std::fabs(dxy) > 0.1)
623  return -999.;
624  }
625  }
626 
627  float fDeltaR = deltaR(pfIsoCand->eta(),pfIsoCand->phi(),fEta_,fPhi_);
628 
629  if(fDeltaR > fConeSize_)
630  return -999.;
631 
632  float fDeltaPhi = deltaPhi(fPhi_,pfIsoCand->phi());
633  float fDeltaEta = fEta_-pfIsoCand->eta();
634 
635 
636 // std::cout << " charged hadron: DR " << fDeltaR
637 // << " pt " << pfIsoCand->pt() << " eta,phi " << pfIsoCand->eta() << ", " << pfIsoCand->phi()
638 // << " fVtxMainZ " << (*vtxMain).z() << " cand z " << vtx->z() << std::endl;
639 
640 
641  if(!bApplyVeto_)
642  return fDeltaR;
643 
644  //NOTE: get the direction for the EB/EE transition region from the deposit just to be in synch with the isoDep
645  // this will be changed in the future
646  if(pivotInBarrel){
648  return fDeltaR;
649  }
650 
651  if(bDeltaRVetoBarrel_){
652  if(fDeltaR < fDeltaRVetoBarrelCharged_)
653  return -999.;
654  }
657  return -999.;
658  }
659  }
660 
661  }else{
663  return fDeltaR;
664  }
665  if(bDeltaRVetoEndcap_){
666  if(fDeltaR < fDeltaRVetoEndcapCharged_)
667  return -999.;
668  }
671  return -999.;
672  }
673  }
674  }
675 
676 
677 
678 
679  return fDeltaR;
680 }
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:248
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
float PFPhotonIsolationCalculator::isNeutralParticleVetoed ( const reco::PFCandidate pfIsoCand)
private

Definition at line 365 of file PFPhotonIsolationCalculator.cc.

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

Referenced by fGetIsolationInRings(), and getIsolationInRingsChargedAll().

365  {
366 
367  float fDeltaR = deltaR(fEta_,fPhi_,pfIsoCand->eta(),pfIsoCand->phi());
368 
369  if(fDeltaR > fConeSize_)
370  return -999;
371 
372  float fDeltaPhi = deltaPhi(fPhi_,pfIsoCand->phi());
373  float fDeltaEta = fEta_-pfIsoCand->eta();
374 
375  if(!bApplyVeto_)
376  return fDeltaR;
377 
378  //NOTE: get the direction for the EB/EE transition region from the deposit just to be in synch with the isoDep
379  // this will be changed in the future
380  if(pivotInBarrel){
382  return fDeltaR;
383  }
384 
385  if(bDeltaRVetoBarrel_ ){
386  if(fDeltaR < fDeltaRVetoBarrelNeutrals_)
387  return -999.;
388  }
391  return -999.;
392  }
393  }
394 
395  }else{
397  return fDeltaR;
398  }
399  if(bDeltaRVetoEndcap_){
400  if(fDeltaR < fDeltaRVetoEndcapNeutrals_)
401  return -999.;
402  }
405  return -999.;
406  }
407  }
408  }
409 
410  return fDeltaR;
411 }
double eta() const final
momentum pseudorapidity
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
double phi() const final
momentum azimuthal angle
float PFPhotonIsolationCalculator::isNeutralParticleVetoed ( const reco::PFCandidateRef  pfIsoCand)
private

Definition at line 415 of file PFPhotonIsolationCalculator.cc.

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

415  {
416 
417  float fDeltaR = deltaR(fEta_,fPhi_,pfIsoCand->eta(),pfIsoCand->phi());
418 
419  if(fDeltaR > fConeSize_)
420  return -999;
421 
422  float fDeltaPhi = deltaPhi(fPhi_,pfIsoCand->phi());
423  float fDeltaEta = fEta_-pfIsoCand->eta();
424 
425  if(!bApplyVeto_)
426  return fDeltaR;
427 
428  //NOTE: get the direction for the EB/EE transition region from the deposit just to be in synch with the isoDep
429  // this will be changed in the future
430  if(pivotInBarrel){
432  return fDeltaR;
433  }
434 
435  if(bDeltaRVetoBarrel_){
436  if(fDeltaR < fDeltaRVetoBarrelNeutrals_)
437  return -999.;
438  }
441  return -999.;
442  }
443  }
444 
445  }else{
447  return fDeltaR;
448  }
449  if(bDeltaRVetoEndcap_ ){
450  if(fDeltaR < fDeltaRVetoEndcapNeutrals_ )
451  return -999.;
452  }
455  return -999.;
456  }
457  }
458  }
459 
460  return fDeltaR;
461 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
float PFPhotonIsolationCalculator::isPhotonParticleVetoed ( const reco::PFCandidateRef  pfIsoCand)
private

Definition at line 306 of file PFPhotonIsolationCalculator.cc.

References funct::abs(), bApplyMissHitPhVeto_, bApplyVeto_, bDeltaRVetoBarrel_, bDeltaRVetoEndcap_, bRectangleVetoBarrel_, bRectangleVetoEndcap_, bUseCrystalSize_, hiPixelPairStep_cff::deltaPhi, 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().

306  {
307 
308 
309  float fDeltaR = deltaR(fEta_,fPhi_,pfIsoCand->eta(),pfIsoCand->phi());
310 
311  if(fDeltaR > fConeSize_)
312  return -999.;
313 
314  float fDeltaPhi = deltaPhi(fPhi_,pfIsoCand->phi());
315  float fDeltaEta = fEta_-pfIsoCand->eta();
316 
317  if(!bApplyVeto_)
318  return fDeltaR;
319 
320  //NOTE: get the direction for the EB/EE transition region from the deposit just to be in synch with the isoDep
321  // this will be changed in the future
322 
324  if(iMissHits_ > 0)
325  if(pfIsoCand->mva_nothing_gamma() > 0.99) {
326  if(pfIsoCand->superClusterRef().isNonnull() && refSC.isNonnull()) {
327  if(pfIsoCand->superClusterRef() == refSC)
328  return -999.;
329  }
330  }
331  }
332 
333  if(pivotInBarrel){
334  if(bDeltaRVetoBarrel_){
335  if(fDeltaR < fDeltaRVetoBarrelPhotons_)
336  return -999.;
337  }
338 
341  return -999.;
342  }
343  }
344  }else{
345  if (bUseCrystalSize_ == true) {
346  fDeltaRVetoEndcapPhotons_ = 0.00864*std::fabs(refSC->position().z()/sqrt(refSC->position().perp2()))*fNumberOfCrystalEndcapPhotons_;
347  }
348 
349  if(bDeltaRVetoEndcap_){
350  if(fDeltaR < fDeltaRVetoEndcapPhotons_)
351  return -999.;
352  }
355  return -999.;
356  }
357  }
358  }
359 
360  return fDeltaR;
361 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
T sqrt(T t)
Definition: SSEVec.h:18
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
float PFPhotonIsolationCalculator::isPhotonParticleVetoed ( const reco::PFCandidate pfIsoCand)
private

Definition at line 246 of file PFPhotonIsolationCalculator.cc.

References funct::abs(), bApplyMissHitPhVeto_, bApplyVeto_, bDeltaRVetoBarrel_, bDeltaRVetoEndcap_, bRectangleVetoBarrel_, bRectangleVetoEndcap_, bUseCrystalSize_, hiPixelPairStep_cff::deltaPhi, 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().

246  {
247 
248 
249  float fDeltaR = deltaR(fEta_,fPhi_,pfIsoCand->eta(),pfIsoCand->phi());
250 
251  if(fDeltaR > fConeSize_)
252  return -999.;
253 
254  float fDeltaPhi = deltaPhi(fPhi_,pfIsoCand->phi());
255  float fDeltaEta = fEta_-pfIsoCand->eta();
256 
257  if(!bApplyVeto_)
258  return fDeltaR;
259 
260  //NOTE: get the direction for the EB/EE transition region from the deposit just to be in synch with the isoDep
261  // this will be changed in the future
262 
264  if(iMissHits_ > 0)
265  if(pfIsoCand->mva_nothing_gamma() > 0.99) {
266  if(pfIsoCand->superClusterRef().isNonnull() && refSC.isNonnull()) {
267  if(pfIsoCand->superClusterRef() == refSC)
268  return -999.;
269  }
270  }
271  }
272 
273  if(pivotInBarrel){
274  if(bDeltaRVetoBarrel_){
275  if(fDeltaR < fDeltaRVetoBarrelPhotons_)
276  return -999.;
277  }
278 
281  return -999.;
282  }
283  }
284  }else{
285  if (bUseCrystalSize_ == true) {
286  fDeltaRVetoEndcapPhotons_ = 0.00864*std::fabs(refSC->position().z()/sqrt(refSC->position().perp2()))*fNumberOfCrystalEndcapPhotons_;
287  }
288 
289  if(bDeltaRVetoEndcap_){
290  if(fDeltaR < fDeltaRVetoEndcapPhotons_)
291  return -999.;
292  }
295  return -999.;
296  }
297  }
298  }
299 
300  return fDeltaR;
301 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
double eta() const final
momentum pseudorapidity
float mva_nothing_gamma() const
mva for gamma detection
Definition: PFCandidate.h:333
T sqrt(T t)
Definition: SSEVec.h:18
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
double phi() const final
momentum azimuthal angle
reco::SuperClusterRef superClusterRef() const
return a reference to the corresponding SuperCluster if any
Definition: PFCandidate.cc:609
int PFPhotonIsolationCalculator::matchPFObject ( const reco::Photon photon,
const reco::PFCandidateCollection pfParticlesColl 
)
private

Definition at line 746 of file PFPhotonIsolationCalculator.cc.

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

Referenced by getIsolationInRingsChargedAll().

746  {
747 
748  Int_t iMatch = -1;
749 
750  int i=0;
751  for(reco::PFCandidateCollection::const_iterator iPF=Candidates->begin();iPF !=Candidates->end();iPF++){
752  const reco::PFCandidate& pfParticle = (*iPF);
753  if((((pfParticle.pdgId()==22 ) || std::abs(pfParticle.pdgId())==11) )){
754 
755  if(pfParticle.superClusterRef()==photon->superCluster())
756  iMatch= i;
757 
758  }
759 
760  i++;
761  }
762 
763 /*
764 if(iMatch == -1){
765 i=0;
766 float fPt = -1;
767 for(reco::PFCandidateCollection::const_iterator iPF=Candidates->begin();iPF !=Candidates->end();iPF++){
768 const reco::PFCandidate& pfParticle = (*iPF);
769 if((((pfParticle.pdgId()==22 ) || TMath::Abs(pfParticle.pdgId())==11) )){
770  if(pfParticle.pt()>fPt){
771  fDeltaR = deltaR(pfParticle.eta(),pfParticle.phi(),photon->eta(),photon->phi());
772  if(fDeltaR<0.1){
773  iMatch = i;
774  fPt = pfParticle.pt();
775  }
776  }
777 }
778 i++;
779 }
780 }
781 */
782 
783  return iMatch;
784 
785 }
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:609
int PFPhotonIsolationCalculator::matchPFObject ( const reco::GsfElectron photon,
const reco::PFCandidateCollection pfParticlesColl 
)
private

Definition at line 791 of file PFPhotonIsolationCalculator.cc.

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

791  {
792 
793  Int_t iMatch = -1;
794 
795  int i=0;
796  for(reco::PFCandidateCollection::const_iterator iPF=Candidates->begin();iPF !=Candidates->end();iPF++){
797  const reco::PFCandidate& pfParticle = (*iPF);
798  if((((pfParticle.pdgId()==22 ) || std::abs(pfParticle.pdgId())==11) )){
799 
800  if(pfParticle.superClusterRef()==electron->superCluster())
801  iMatch= i;
802 
803  }
804 
805  i++;
806  }
807 
808  if(iMatch == -1){
809  i=0;
810  float fPt = -1;
811  for(reco::PFCandidateCollection::const_iterator iPF=Candidates->begin();iPF !=Candidates->end();iPF++){
812  const reco::PFCandidate& pfParticle = (*iPF);
813  if((((pfParticle.pdgId()==22 ) || std::abs(pfParticle.pdgId())==11) )){
814  if(pfParticle.pt()>fPt){
815  float fDeltaR = deltaR(pfParticle.eta(),pfParticle.phi(),electron->eta(),electron->phi());
816  if(fDeltaR<0.1){
817  iMatch = i;
818  fPt = pfParticle.pt();
819  }
820  }
821  }
822  i++;
823  }
824  }
825 
826  return iMatch;
827 
828 }
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
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
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:609
void PFPhotonIsolationCalculator::setup ( const edm::ParameterSet conf)

Definition at line 20 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_.

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

Member Data Documentation

Bool_t PFPhotonIsolationCalculator::bApplyDzDxyVeto_
private

Definition at line 126 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

Bool_t PFPhotonIsolationCalculator::bApplyMissHitPhVeto_
private

Definition at line 128 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

Bool_t PFPhotonIsolationCalculator::bApplyPFPUVeto_
private

Definition at line 127 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

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

Definition at line 123 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 129 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

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

Definition at line 139 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fDeltaRVetoBarrelNeutrals_
private

Definition at line 138 of file PFPhotonIsolationCalculator.h.

Referenced by isNeutralParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fDeltaRVetoBarrelPhotons_
private

Definition at line 137 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fDeltaRVetoEndcapCharged_
private

Definition at line 143 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fDeltaRVetoEndcapNeutrals_
private

Definition at line 142 of file PFPhotonIsolationCalculator.h.

Referenced by isNeutralParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fDeltaRVetoEndcapPhotons_
private

Definition at line 141 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

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

Definition at line 173 of file PFPhotonIsolationCalculator.h.

Bool_t PFPhotonIsolationCalculator::fisInitialized_
private

Definition at line 110 of file PFPhotonIsolationCalculator.h.

float PFPhotonIsolationCalculator::fIsolation_
private

Definition at line 111 of file PFPhotonIsolationCalculator.h.

Referenced by fGetIsolation().

float PFPhotonIsolationCalculator::fIsolationCharged_
private

Definition at line 114 of file PFPhotonIsolationCalculator.h.

Referenced by getIsolationCharged().

float PFPhotonIsolationCalculator::fIsolationChargedAll_
private

Definition at line 115 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 113 of file PFPhotonIsolationCalculator.h.

Referenced by getIsolationNeutral().

float PFPhotonIsolationCalculator::fIsolationPhoton_
private

Definition at line 112 of file PFPhotonIsolationCalculator.h.

Referenced by getIsolationPhoton().

float PFPhotonIsolationCalculator::fNumberOfCrystalEndcapPhotons_
private

Definition at line 145 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

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

Definition at line 174 of file PFPhotonIsolationCalculator.h.

float PFPhotonIsolationCalculator::fPt_
private

Definition at line 176 of file PFPhotonIsolationCalculator.h.

float PFPhotonIsolationCalculator::fRectangleDeltaEtaVetoBarrelCharged_
private

Definition at line 157 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaEtaVetoBarrelNeutrals_
private

Definition at line 156 of file PFPhotonIsolationCalculator.h.

Referenced by isNeutralParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaEtaVetoBarrelPhotons_
private

Definition at line 155 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaEtaVetoEndcapCharged_
private

Definition at line 161 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaEtaVetoEndcapNeutrals_
private

Definition at line 160 of file PFPhotonIsolationCalculator.h.

Referenced by isNeutralParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaEtaVetoEndcapPhotons_
private

Definition at line 159 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaPhiVetoBarrelCharged_
private

Definition at line 149 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaPhiVetoBarrelNeutrals_
private

Definition at line 148 of file PFPhotonIsolationCalculator.h.

Referenced by isNeutralParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaPhiVetoBarrelPhotons_
private

Definition at line 147 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaPhiVetoEndcapCharged_
private

Definition at line 153 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaPhiVetoEndcapNeutrals_
private

Definition at line 152 of file PFPhotonIsolationCalculator.h.

Referenced by isNeutralParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRectangleDeltaPhiVetoEndcapPhotons_
private

Definition at line 151 of file PFPhotonIsolationCalculator.h.

Referenced by isPhotonParticleVetoed(), and setup().

float PFPhotonIsolationCalculator::fRingSize_
private

Definition at line 166 of file PFPhotonIsolationCalculator.h.

Referenced by fGetIsolationInRings(), and setup().

float PFPhotonIsolationCalculator::fVx_
private

Definition at line 177 of file PFPhotonIsolationCalculator.h.

Referenced by fGetIsolationInRings(), and isChargedParticleVetoed().

float PFPhotonIsolationCalculator::fVy_
private

Definition at line 178 of file PFPhotonIsolationCalculator.h.

Referenced by fGetIsolationInRings(), and isChargedParticleVetoed().

float PFPhotonIsolationCalculator::fVz_
private

Definition at line 179 of file PFPhotonIsolationCalculator.h.

Referenced by fGetIsolationInRings().

int PFPhotonIsolationCalculator::iMissHits_
private

Definition at line 164 of file PFPhotonIsolationCalculator.h.

Referenced by fGetIsolationInRings(), and isPhotonParticleVetoed().

int PFPhotonIsolationCalculator::iNumberOfRings_
private

Definition at line 163 of file PFPhotonIsolationCalculator.h.

Referenced by fGetIsolationInRings(), and setup().

int PFPhotonIsolationCalculator::iParticleType_
private

Definition at line 108 of file PFPhotonIsolationCalculator.h.

Referenced by isChargedParticleVetoed(), and setup().

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

Definition at line 181 of file PFPhotonIsolationCalculator.h.

Referenced by fGetIsolationInRings(), and isPhotonParticleVetoed().