161 float fTempPhoton = 0.0;
164 float fTempNeutral = 0.0;
167 float fTempCharged = 0.0;
170 float fTempChargedAll = 0.0;
206 fPt = pfCandidate->
pt();
207 fVx = pfCandidate->
vx();
208 fVy = pfCandidate->
vy();
209 fVz = pfCandidate->
vz();
213 for (
unsigned iPF = 0; iPF < pfParticlesColl->size(); iPF++) {
216 if (&pfParticle == (pfCandidate))
219 if (pfParticle.
pdgId() == 22) {
279 for (
unsigned iPF = 0; iPF < pfParticlesColl->size(); iPF++) {
286 if (pfParticle.
pdgId() == 22) {
289 photon->superCluster()->y() - pfParticle.
vy(),
290 photon->superCluster()->z() - pfParticle.
vz());
292 fEta = direction.Eta();
293 fPhi = direction.Phi();
294 fVx = pfParticle.
vx();
295 fVy = pfParticle.
vy();
296 fVz = pfParticle.
vz();
306 photon->superCluster()->y() - pfParticle.
vy(),
307 photon->superCluster()->z() - pfParticle.
vz());
309 fEta = direction.Eta();
310 fPhi = direction.Phi();
311 fVx = pfParticle.
vx();
312 fVy = pfParticle.
vy();
313 fVz = pfParticle.
vz();
324 photon->superCluster()->y() - (*vtx).y(),
325 photon->superCluster()->z() - (*vtx).z());
327 fEta = direction.Eta();
328 fPhi = direction.Phi();
388 for (
unsigned iPF = 0; iPF < pfParticlesColl->size(); iPF++) {
391 if (pfParticle.
pdgId() == 22) {
547 float fVtxMainZ = (*vtxMain).z();
560 double dxy = pfIsoCand->
trackRef()->dxy((*vtxMain).position());
580 double dxy = (-(
vtx->x() -
fVx) * pfIsoCand->
py() + (
vtx->y() -
fVy) * pfIsoCand->
px()) / pfIsoCand->
pt();
647 unsigned nFoundVertex = 0;
649 float bestweight = 0;
662 if (baseRef == trackBaseRef) {
663 float w =
vtx.trackWeight(baseRef);
665 if (
w > bestweight) {
674 if (nFoundVertex > 0) {
675 if (nFoundVertex != 1)
676 edm::LogWarning(
"TrackOnTwoVertex") <<
"a track is shared by at least two verteces. Used to be an assert";
683 double dzmin = 10000.;
684 double ztrack =
pfcand.vertex().z();
685 bool foundVertex =
false;
707 for (reco::PFCandidateCollection::const_iterator iPF = Candidates->begin(); iPF != Candidates->end(); iPF++) {
710 if ((((pfParticle.
pdgId() == 22) || TMath::Abs(pfParticle.
pdgId()) == 11))) {
746 for (reco::PFCandidateCollection::const_iterator iPF = Candidates->begin(); iPF != Candidates->end(); iPF++) {
749 if ((((pfParticle.
pdgId() == 22) || TMath::Abs(pfParticle.
pdgId()) == 11))) {
760 for (reco::PFCandidateCollection::const_iterator iPF = Candidates->begin(); iPF != Candidates->end(); iPF++) {
762 if ((((pfParticle.
pdgId() == 22) || TMath::Abs(pfParticle.
pdgId()) == 11))) {
763 if (pfParticle.
pt() >
fPt) {
767 fPt = pfParticle.
pt();
void setRectangleVetoEndcap(Bool_t bValue=kTRUE)
void setDeltaRVetoBarrel(Bool_t bValue=kTRUE)
float fRectangleDeltaPhiVetoEndcapNeutrals
std::vector< float > fIsolationInRings
std::vector< float > fIsolationInRingsChargedAll
void setNumberOfCrystalEndcapPhotons(float fValue=-1)
void setDeltaRVetoEndcap(Bool_t bValue=kTRUE)
double pt() const final
transverse momentum
float fDeltaRVetoEndcapPhotons
float mva_nothing_gamma() const
mva for gamma detection
void setRectangleDeltaPhiVetoBarrelPhotons(float fValue=-1.0)
void setApplyMissHitPhVeto(Bool_t bValue=kFALSE)
float fRectangleDeltaPhiVetoBarrelNeutrals
float fRectangleDeltaEtaVetoEndcapCharged
std::vector< float > fGetIsolationInRings(const reco::PFCandidate *pfCandidate, const reco::PFCandidateCollection *pfParticlesColl, reco::VertexRef vtx, edm::Handle< reco::VertexCollection > vertices)
float fDeltaRVetoBarrelPhotons
float isChargedParticleVetoed(const reco::PFCandidate *pfIsoCand, edm::Handle< reco::VertexCollection > vertices)
void setApplyDzDxyVeto(Bool_t bValue=kTRUE)
reco::VertexRef chargedHadronVertex(edm::Handle< reco::VertexCollection > verticies, const reco::PFCandidate &pfcand)
float fRectangleDeltaEtaVetoEndcapPhotons
T const * product() const
double vy() const override
y coordinate of vertex position
float fRectangleDeltaEtaVetoBarrelCharged
float fRectangleDeltaPhiVetoBarrelCharged
void setNumbersOfRings(int iValue=1)
void setDeltaRVetoBarrelNeutrals(float fValue=-1.0)
void setDeltaRVetoEndcapNeutrals(float fValue=-1.0)
bool isNonnull() const
Checks for non-null.
const math::XYZPointF & positionAtECALEntrance() const
std::vector< Vertex > VertexCollection
collection of Vertex objects
float fDeltaRVetoEndcapNeutrals
void setDeltaRVetoBarrelCharged(float fValue=-1.0)
float isPhotonParticleVetoed(const reco::PFCandidate *pfIsoCand)
void initialize(Bool_t bApplyVeto, int iParticleType)
void setDeltaRVetoEndcapPhotons(float fValue=-1.0)
void setApplyPFPUVeto(Bool_t bValue=kFALSE)
void setRectangleVetoBarrel(Bool_t bValue=kTRUE)
void setRectangleDeltaEtaVetoBarrelNeutrals(float fValue=-1.0)
edm::Ref< SuperClusterCollection > SuperClusterRef
reference to an object in a collection of SuperCluster objects
float fRectangleDeltaPhiVetoEndcapCharged
float fRectangleDeltaEtaVetoBarrelNeutrals
int pdgId() const final
PDG identifier.
float fDeltaRVetoBarrelNeutrals
double px() const final
x coordinate of momentum vector
void setUseCrystalSize(Bool_t bValue=kFALSE)
void setParticleType(int iValue)
std::vector< float > fIsolationInRingsPhoton
float fDeltaRVetoEndcapCharged
void setRectangleDeltaPhiVetoBarrelCharged(float fValue=-1.0)
int matchPFObject(const reco::Photon *photon, const reco::PFCandidateCollection *pfParticlesColl)
Abs< T >::type abs(const T &t)
void setRectangleDeltaPhiVetoEndcapNeutrals(float fValue=-1.0)
void setRectangleDeltaPhiVetoBarrelNeutrals(float fValue=-1.0)
float fRectangleDeltaPhiVetoBarrelPhotons
void setRectangleDeltaEtaVetoBarrelCharged(float fValue=-1.0)
std::vector< float > fIsolationInRingsCharged
float isNeutralParticleVetoed(const reco::PFCandidate *pfIsoCand)
void initializeRings(int iNumberOfRings, float fRingSize)
double py() const final
y coordinate of momentum vector
void setDeltaRVetoBarrelPhotons(float fValue=-1.0)
edm::Ref< VertexCollection > VertexRef
persistent reference to a Vertex
reco::SuperClusterRef refSC
void initializeElectronIsolation(Bool_t bApplyVeto)
void setRectangleDeltaPhiVetoEndcapCharged(float fValue=-1.0)
Bool_t checkClosestZVertex
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
void setRectangleDeltaEtaVetoEndcapCharged(float fValue=-1.0)
void setRectangleDeltaEtaVetoEndcapPhotons(float fValue=-1.0)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
void setDeltaRVetoEndcapCharged(float fValue=-1.0)
void setApplyVeto(Bool_t bValue=kTRUE)
void initializeElectronIsolationInRings(Bool_t bApplyVeto, int iNumberOfRings, float fRingSize)
void setRingSize(float fValue=0.4)
Particle reconstructed by the particle flow algorithm.
Bool_t bApplyMissHitPhVeto
float fRectangleDeltaEtaVetoEndcapNeutrals
void initializePhotonIsolation(Bool_t bApplyVeto)
void setRectangleDeltaPhiVetoEndcapPhotons(float fValue=-1.0)
float fGetIsolation(const reco::PFCandidate *pfCandidate, const reco::PFCandidateCollection *pfParticlesColl, reco::VertexRef vtx, edm::Handle< reco::VertexCollection > vertices)
reco::TrackRef trackRef() const
std::vector< float > fIsolationInRingsNeutral
void setRectangleDeltaEtaVetoBarrelPhotons(float fValue=-1.0)
double vz() const override
z coordinate of vertex position
Log< level::Warning, false > LogWarning
float fRectangleDeltaEtaVetoBarrelPhotons
void setRectangleDeltaEtaVetoEndcapNeutrals(float fValue=-1.0)
void setConeSize(float fValue=0.4)
double phi() const final
momentum azimuthal angle
float fDeltaRVetoBarrelCharged
double vx() const override
x coordinate of vertex position
Bool_t bRectangleVetoEndcap
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
reco::SuperClusterRef superClusterRef() const
return a reference to the corresponding SuperCluster if any
Bool_t bRectangleVetoBarrel
float fRectangleDeltaPhiVetoEndcapPhotons
void initializePhotonIsolationInRings(Bool_t bApplyVeto, int iNumberOfRings, float fRingSize)
float fNumberOfCrystalEndcapPhotons
double eta() const final
momentum pseudorapidity