30 fisInitialized(kFALSE)
78 if(bApplyVeto && iParticleType==
kElectron){
185 float fTempPhoton = 0.0;
188 float fTempNeutral = 0.0;
191 float fTempCharged = 0.0;
194 float fTempChargedAll = 0.0;
199 fConeSize = fRingSize * (float)iNumberOfRings;
233 fPt = pfCandidate->
pt();
234 fVx = pfCandidate->
vx();
235 fVy = pfCandidate->
vy();
236 fVz = pfCandidate->
vz();
240 for(
unsigned iPF=0; iPF<pfParticlesColl->size(); iPF++) {
244 if(&pfParticle==(pfCandidate))
247 if(pfParticle.
pdgId()==22){
254 }
else if(
abs(pfParticle.
pdgId())==130){
263 }
else if(
abs(pfParticle.
pdgId()) == 211){
309 for(
unsigned iPF=0; iPF<pfParticlesColl->size(); iPF++) {
318 if(pfParticle.
pdgId()==22){
325 fEta = direction.Eta();
326 fPhi = direction.Phi();
327 fVx = pfParticle.
vx();
328 fVy = pfParticle.
vy();
329 fVz = pfParticle.
vz();
336 }
else if(
abs(pfParticle.
pdgId())==130){
343 fEta = direction.Eta();
344 fPhi = direction.Phi();
345 fVx = pfParticle.
vx();
346 fVy = pfParticle.
vy();
347 fVz = pfParticle.
vz();
355 }
else if(
abs(pfParticle.
pdgId()) == 211){
362 fEta = direction.Eta();
363 fPhi = direction.Phi();
414 fPt = electron->
pt();
415 fVx = electron->
vx();
416 fVy = electron->
vy();
417 fVz = electron->
vz();
424 for(
unsigned iPF=0; iPF<pfParticlesColl->size(); iPF++) {
429 if(pfParticle.
pdgId()==22){
437 }
else if(
abs(pfParticle.
pdgId())==130){
445 }
else if(
abs(pfParticle.
pdgId()) == 211){
588 float fVtxMainZ = (*vtxMain).z();
599 float dz = fabs( pfIsoCand->
trackRef()->dz( (*vtxMain).position() ) );
603 double dxy = pfIsoCand->
trackRef()->dxy( (*vtxMain).position() );
621 float dz = fabs(vtx->z() - fVtxMainZ);
625 double dxy = ( -(vtx->x() -
fVx)*pfIsoCand->
py() + (vtx->y() -
fVy)*pfIsoCand->
px()) / pfIsoCand->
pt();
696 unsigned nFoundVertex = 0;
702 for( reco::VertexCollection::const_iterator iv=vertices.begin(); iv!=vertices.end(); ++iv, ++
index) {
713 if(baseRef == trackBaseRef ) {
730 edm::LogWarning(
"TrackOnTwoVertex")<<
"a track is shared by at least two verteces. Used to be an assert";
731 return VertexRef( verticesColl, iVertex);
738 double dzmin = 10000.;
739 double ztrack = pfcand.
vertex().z();
740 bool foundVertex =
false;
742 for( reco::VertexCollection::const_iterator iv=vertices.begin(); iv!=vertices.end(); ++iv, ++
index) {
744 double dz = fabs(ztrack - iv->z());
753 return VertexRef( verticesColl, iVertex);
767 for(reco::PFCandidateCollection::const_iterator iPF=Candidates->begin();iPF !=Candidates->end();iPF++){
770 if((((pfParticle.
pdgId()==22 ) || TMath::Abs(pfParticle.
pdgId())==11) )){
813 for(reco::PFCandidateCollection::const_iterator iPF=Candidates->begin();iPF !=Candidates->end();iPF++){
816 if((((pfParticle.
pdgId()==22 ) || TMath::Abs(pfParticle.
pdgId())==11) )){
829 for(reco::PFCandidateCollection::const_iterator iPF=Candidates->begin();iPF !=Candidates->end();iPF++){
831 if((((pfParticle.
pdgId()==22 ) || TMath::Abs(pfParticle.
pdgId())==11) )){
832 if(pfParticle.
pt()>
fPt){
836 fPt = pfParticle.
pt();
void setRectangleVetoEndcap(Bool_t bValue=kTRUE)
void setDeltaRVetoBarrel(Bool_t bValue=kTRUE)
float fRectangleDeltaPhiVetoEndcapNeutrals
virtual int pdgId() const
PDG identifier.
virtual double vz() const
z coordinate of vertex position
vector< float > fIsolationInRingsCharged
void setNumberOfCrystalEndcapPhotons(float fValue=-1)
void setDeltaRVetoEndcap(Bool_t bValue=kTRUE)
float fDeltaRVetoEndcapPhotons
void setRectangleDeltaPhiVetoBarrelPhotons(float fValue=-1.0)
trackRef_iterator tracks_end() const
last iterator over tracks
void setApplyMissHitPhVeto(Bool_t bValue=kFALSE)
float mva_nothing_gamma() const
mva for gamma detection
float fRectangleDeltaPhiVetoBarrelNeutrals
float fRectangleDeltaEtaVetoEndcapCharged
vector< float > fIsolationInRingsChargedAll
float fDeltaRVetoBarrelPhotons
float isChargedParticleVetoed(const reco::PFCandidate *pfIsoCand, edm::Handle< reco::VertexCollection > vertices)
void setApplyDzDxyVeto(Bool_t bValue=kTRUE)
float fRectangleDeltaEtaVetoEndcapPhotons
vector< float > fIsolationInRings
float fRectangleDeltaEtaVetoBarrelCharged
float fRectangleDeltaPhiVetoBarrelCharged
void setNumbersOfRings(int iValue=1)
void setDeltaRVetoBarrelNeutrals(float fValue=-1.0)
void setDeltaRVetoEndcapNeutrals(float fValue=-1.0)
reco::SuperClusterRef superCluster() const
Ref to SuperCluster.
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)
VertexRef chargedHadronVertex(edm::Handle< reco::VertexCollection > verticies, const reco::PFCandidate &pfcand)
void setDeltaRVetoEndcapPhotons(float fValue=-1.0)
void setApplyPFPUVeto(Bool_t bValue=kFALSE)
void setRectangleVetoBarrel(Bool_t bValue=kTRUE)
virtual double vy() const
y coordinate of vertex position
void setRectangleDeltaEtaVetoBarrelNeutrals(float fValue=-1.0)
edm::Ref< SuperClusterCollection > SuperClusterRef
reference to an object in a collection of SuperCluster objects
float fRectangleDeltaPhiVetoEndcapCharged
virtual double eta() const
momentum pseudorapidity
const math::XYZPointF & positionAtECALEntrance() const
virtual double vx() const
x coordinate of vertex position
float fRectangleDeltaEtaVetoBarrelNeutrals
reco::TrackRef trackRef() const
float fDeltaRVetoBarrelNeutrals
bool isNonnull() const
Checks for non-null.
bool isNull() const
Checks for null.
vector< float > fIsolationInRingsNeutral
void setUseCrystalSize(Bool_t bValue=kFALSE)
void setParticleType(int iValue)
float trackWeight(const TrackBaseRef &r) const
returns the weight with which a Track has contributed to the vertex-fit.
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
float fDeltaRVetoEndcapCharged
void setRectangleDeltaPhiVetoBarrelCharged(float fValue=-1.0)
int matchPFObject(const reco::Photon *photon, const reco::PFCandidateCollection *pfParticlesColl)
virtual const Point & vertex() const
vertex position
void setRectangleDeltaPhiVetoEndcapNeutrals(float fValue=-1.0)
void setRectangleDeltaPhiVetoBarrelNeutrals(float fValue=-1.0)
float fRectangleDeltaPhiVetoBarrelPhotons
void setRectangleDeltaEtaVetoBarrelCharged(float fValue=-1.0)
vector< float > fGetIsolationInRings(const reco::PFCandidate *pfCandidate, const reco::PFCandidateCollection *pfParticlesColl, reco::VertexRef vtx, edm::Handle< reco::VertexCollection > vertices)
float isNeutralParticleVetoed(const reco::PFCandidate *pfIsoCand)
void initializeRings(int iNumberOfRings, float fRingSize)
virtual double vz() const
z coordinate of vertex position
void setDeltaRVetoBarrelPhotons(float fValue=-1.0)
edm::Ref< VertexCollection > VertexRef
persistent reference to a Vertex
void initializeElectronIsolation(Bool_t bApplyVeto)
void setRectangleDeltaPhiVetoEndcapCharged(float fValue=-1.0)
double deltaR(double eta1, double eta2, double phi1, double phi2)
Bool_t checkClosestZVertex
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
void setRectangleDeltaEtaVetoEndcapCharged(float fValue=-1.0)
virtual double px() const
x coordinate of momentum vector
void setRectangleDeltaEtaVetoEndcapPhotons(float fValue=-1.0)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
virtual double pt() const
transverse momentum
void setDeltaRVetoEndcapCharged(float fValue=-1.0)
virtual double vy() const
y coordinate of vertex position
T const * product() const
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
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
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)
virtual double vx() const
x coordinate of vertex position
void setRectangleDeltaEtaVetoBarrelPhotons(float fValue=-1.0)
trackRef_iterator tracks_begin() const
first iterator over tracks
float fRectangleDeltaEtaVetoBarrelPhotons
void setRectangleDeltaEtaVetoEndcapNeutrals(float fValue=-1.0)
void setConeSize(float fValue=0.4)
float fDeltaRVetoBarrelCharged
Bool_t bRectangleVetoEndcap
virtual double phi() const
momentum azimuthal angle
virtual double py() const
y coordinate of momentum vector
vector< float > fIsolationInRingsPhoton
Bool_t bRectangleVetoBarrel
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
float fRectangleDeltaPhiVetoEndcapPhotons
reco::SuperClusterRef superClusterRef() const
return a reference to the corresponding SuperCluster if any
void initializePhotonIsolationInRings(Bool_t bApplyVeto, int iNumberOfRings, float fRingSize)
float fNumberOfCrystalEndcapPhotons