CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes

reco::Photon Class Reference

#include <Photon.h>

Inheritance diagram for reco::Photon:
reco::RecoCandidate reco::LeafCandidate reco::Candidate pat::PATObject< reco::Photon > pat::Photon

List of all members.

Classes

struct  FiducialFlags
struct  IsolationVariables
struct  MIPVariables
struct  PflowIsolationVariables
struct  ShowerShape

Public Types

enum  ConversionProvenance { egamma = 0, pflow = 1, both = 2 }

Public Member Functions

math::XYZPointF caloPosition () const
 position in ECAL: this is th SC position if r9<0.93. If r8>0.93 is position of seed BasicCluster taking shower depth for unconverted photon
float chargedHadronIso () const
 Particle Flow Isolation variables.
virtual Photonclone () const
 returns a clone of the candidate
reco::ConversionRefVector conversions () const
 vector of references to Conversion's
reco::ConversionRefVector conversionsOneLeg () const
 vector of references to one leg Conversion's
int conversionTrackProvenance (const edm::RefToBase< reco::Track > &convTrack) const
float e1x5 () const
 Shower shape variables.
float e2x5 () const
float e3x3 () const
float e5x5 () const
float ecalRecHitSumEtConeDR03 () const
 Isolation variables in cone dR=0.3.
float ecalRecHitSumEtConeDR04 () const
reco::ElectronSeedRefVector electronPixelSeeds () const
 reference to electron Pixel seed
float hadronicDepth1OverEm () const
 the hadronic release in depth1 over electromagnetic fraction
float hadronicDepth2OverEm () const
 the hadronic release in depth2 over electromagnetic fraction
float hadronicOverEm () const
 the total hadronic over electromagnetic fraction
bool hasConversionTracks () const
 Bool flagging photons with a vector of refereces to conversions with size >0.
bool hasPixelSeed () const
 Bool flagging photons having a non-zero size vector of Ref to electornPixel seeds.
float hcalDepth1TowerSumEtConeDR03 () const
 Hcal-Depth1 isolation sum.
float hcalDepth1TowerSumEtConeDR04 () const
 Hcal-Depth1 isolation sum.
float hcalDepth2TowerSumEtConeDR03 () const
 Hcal-Depth2 isolation sum.
float hcalDepth2TowerSumEtConeDR04 () const
 Hcal-Depth2 isolation sum.
float hcalTowerSumEtConeDR03 () const
 Hcal isolation sum.
float hcalTowerSumEtConeDR04 () const
 Hcal isolation sum.
bool isEB () const
bool isEBEEGap () const
 true if photon is in boundary between EB and EE
bool isEBEtaGap () const
bool isEBGap () const
 true if photon is in EB, and inside the boundaries in super crystals/modules
bool isEBPhiGap () const
bool isEE () const
bool isEEDeeGap () const
bool isEEGap () const
 true if photon is in EE, and inside the boundaries in supercrystal/D
bool isEERingGap () const
bool isPFlowPhoton () const
 Retrieve photonCore attributes.
bool isPhoton () const
 Implement Candidate method for particle species.
bool isStandardPhoton () const
float maxEnergyXtal () const
float mipChi2 () const
 MIP variables.
float mipIntercept () const
bool mipIsHalo () const
int mipNhitCone () const
float mipSlope () const
float mipTotEnergy () const
float neutralHadronIso () const
int nTrkHollowConeDR03 () const
int nTrkHollowConeDR04 () const
int nTrkSolidConeDR03 () const
int nTrkSolidConeDR04 () const
reco::SuperClusterRef pfSuperCluster () const
 Ref to PFlow SuperCluster.
 Photon (const LorentzVector &p4, Point caloPos, const PhotonCoreRef &core, const Point &vtx=Point(0, 0, 0))
 constructor from values
 Photon (const Photon &)
 copy constructor
 Photon ()
 default constructor
reco::PhotonCoreRef photonCore () const
 returns a reference to the core photon object
float photonIso () const
float r1x5 () const
float r2x5 () const
float r9 () const
void setFiducialVolumeFlags (const FiducialFlags &a)
 set flags for photons in the ECAL fiducial volume
void setIsolationVariables (const IsolationVariables &isolInDr04, const IsolationVariables &isolInDr03)
 set relevant isolation variables
void setMIPVariables (const MIPVariables &mipVar)
 set mip Variables
void setPflowIsolationVariables (const PflowIsolationVariables &pfisol)
 set isolation variables calculated with Pflow
void setShowerShapeVariables (const ShowerShape &a)
void setVertex (const Point &vertex)
 set primary event vertex used to define photon direction
float sigmaEtaEta () const
float sigmaIetaIeta () const
reco::SuperClusterRef superCluster () const
 Ref to SuperCluster.
float trkSumPtHollowConeDR03 () const
float trkSumPtHollowConeDR04 () const
float trkSumPtSolidConeDR03 () const
float trkSumPtSolidConeDR04 () const
virtual ~Photon ()
 destructor

Private Member Functions

virtual bool overlap (const Candidate &) const
 check overlap with another candidate

Private Attributes

math::XYZPointF caloPosition_
 position of seed BasicCluster for shower depth of unconverted photon
FiducialFlags fiducialFlagBlock_
IsolationVariables isolationR03_
IsolationVariables isolationR04_
MIPVariables mipVariableBlock_
PflowIsolationVariables pfIsolation_
reco::PhotonCoreRef photonCore_
 reference to the PhotonCore
bool pixelSeed_
ShowerShape showerShapeBlock_

Detailed Description

Author:
N. Marinelli Univ. of Notre Dame Photon object built out of PhotonCore stores isolation, shower shape and additional info needed for identification
Version:
Id:
Photon.h,v 1.42 2011/07/22 14:37:26 nancy Exp

Definition at line 24 of file Photon.h.


Member Enumeration Documentation

Enumerator:
egamma 
pflow 
both 

Definition at line 64 of file Photon.h.

                              {egamma=0, 
                               pflow=1, 
                               both=2};

Constructor & Destructor Documentation

reco::Photon::Photon ( ) [inline]

default constructor

Reimplemented in pat::Photon.

Definition at line 33 of file Photon.h.

References pixelSeed_.

Referenced by clone().

: RecoCandidate() { pixelSeed_=false; }
Photon::Photon ( const Photon rhs)
Photon::Photon ( const LorentzVector p4,
Point  caloPos,
const PhotonCoreRef core,
const Point vtx = Point( 0, 0, 0 ) 
)

constructor from values

Definition at line 7 of file Photon.cc.

                                   :
    RecoCandidate( 0, p4, vtx, 22 ),
    caloPosition_( caloPos ),
    photonCore_(core),
    pixelSeed_(false)
 {}
Photon::~Photon ( ) [virtual]

destructor

Reimplemented in pat::Photon.

Definition at line 34 of file Photon.cc.

{ }

Member Function Documentation

math::XYZPointF reco::Photon::caloPosition ( ) const [inline]

position in ECAL: this is th SC position if r9<0.93. If r8>0.93 is position of seed BasicCluster taking shower depth for unconverted photon

Definition at line 80 of file Photon.h.

References caloPosition_.

Referenced by FWPhotonDetailView::addSceneInfo(), FWPhotonDetailView::build(), and setVertex().

{return caloPosition_;}
float reco::Photon::chargedHadronIso ( ) const [inline]

Particle Flow Isolation variables.

Definition at line 327 of file Photon.h.

References reco::Photon::PflowIsolationVariables::chargedHadronIso, and pfIsolation_.

Photon * Photon::clone ( void  ) const [virtual]

returns a clone of the candidate

Reimplemented from reco::RecoCandidate.

Reimplemented in pat::Photon.

Definition at line 36 of file Photon.cc.

References Photon().

                             {
  return new Photon( * this );
}
reco::ConversionRefVector reco::Photon::conversions ( ) const [inline]

vector of references to Conversion's

Definition at line 63 of file Photon.h.

References photonCore().

Referenced by PhotonValidator::analyze(), and hasConversionTracks().

{return this->photonCore()->conversions() ;}  
reco::ConversionRefVector reco::Photon::conversionsOneLeg ( ) const [inline]

vector of references to one leg Conversion's

Definition at line 69 of file Photon.h.

References photonCore().

Referenced by hasConversionTracks().

{return this->photonCore()->conversionsOneLeg() ;} 
int Photon::conversionTrackProvenance ( const edm::RefToBase< reco::Track > &  convTrack) const

Definition at line 62 of file Photon.cc.

References both, egamma, pflow, photonCore(), and edm::RefVector< C, T, F >::size().

                                                                                   {

  const reco::ConversionRefVector & conv2leg = this->photonCore()->conversions();
  const reco::ConversionRefVector & conv1leg = this->photonCore()->conversionsOneLeg();

  int origin = -1;
  bool isEg=false, isPf=false;

  for (unsigned iConv=0; iConv<conv2leg.size(); iConv++){
    std::vector<edm::RefToBase<reco::Track> > convtracks = conv2leg[iConv]->tracks();
    for (unsigned itk=0; itk<convtracks.size(); itk++){
      if (convTrack==convtracks[itk]) isEg=true;
    }
  }

  for (unsigned iConv=0; iConv<conv1leg.size(); iConv++){
    std::vector<edm::RefToBase<reco::Track> > convtracks = conv1leg[iConv]->tracks();
    for (unsigned itk=0; itk<convtracks.size(); itk++){
      if (convTrack==convtracks[itk]) isPf=true;
    }
  }

  if (isEg) origin=egamma;
  if (isPf) origin=pflow;
  if (isEg && isPf) origin=both;

  return origin;
}
float reco::Photon::e1x5 ( ) const [inline]

Shower shape variables.

Definition at line 170 of file Photon.h.

References reco::Photon::ShowerShape::e1x5, and showerShapeBlock_.

Referenced by egHLT::OffHelper::fillClusShapeData().

float reco::Photon::e2x5 ( ) const [inline]

Definition at line 171 of file Photon.h.

References reco::Photon::ShowerShape::e2x5, and showerShapeBlock_.

Referenced by egHLT::OffHelper::fillClusShapeData().

float reco::Photon::e3x3 ( ) const [inline]

Definition at line 172 of file Photon.h.

References reco::Photon::ShowerShape::e3x3, and showerShapeBlock_.

float reco::Photon::e5x5 ( ) const [inline]

Definition at line 173 of file Photon.h.

References reco::Photon::ShowerShape::e5x5, and showerShapeBlock_.

Referenced by egHLT::OffHelper::fillClusShapeData().

float reco::Photon::ecalRecHitSumEtConeDR03 ( ) const [inline]

Isolation variables in cone dR=0.3.

Definition at line 308 of file Photon.h.

References reco::Photon::IsolationVariables::ecalRecHitSumEt, and isolationR03_.

Referenced by egHLT::OffHelper::fillIsolData(), and PhotonSelectorAlgo::passPhotonSelection().

float reco::Photon::ecalRecHitSumEtConeDR04 ( ) const [inline]
reco::ElectronSeedRefVector reco::Photon::electronPixelSeeds ( ) const [inline]

reference to electron Pixel seed

Definition at line 73 of file Photon.h.

References photonCore().

Referenced by hasPixelSeed().

{return this->photonCore()->electronPixelSeeds();}
float reco::Photon::hadronicDepth1OverEm ( ) const [inline]

the hadronic release in depth1 over electromagnetic fraction

Definition at line 165 of file Photon.h.

References reco::Photon::ShowerShape::hcalDepth1OverEcal, and showerShapeBlock_.

float reco::Photon::hadronicDepth2OverEm ( ) const [inline]

the hadronic release in depth2 over electromagnetic fraction

Definition at line 167 of file Photon.h.

References reco::Photon::ShowerShape::hcalDepth2OverEcal, and showerShapeBlock_.

float reco::Photon::hadronicOverEm ( ) const [inline]
bool reco::Photon::hasConversionTracks ( ) const [inline]

Bool flagging photons with a vector of refereces to conversions with size >0.

Definition at line 71 of file Photon.h.

References conversions(), conversionsOneLeg(), photonCore(), and reco::Candidate::size.

Referenced by SimplePi0DiscAnalyzer::analyze().

{ if (this->photonCore()->conversions().size() > 0 || this->photonCore()->conversionsOneLeg().size() > 0)  return true; else return false;}
bool reco::Photon::hasPixelSeed ( ) const [inline]

Bool flagging photons having a non-zero size vector of Ref to electornPixel seeds.

Definition at line 75 of file Photon.h.

References electronPixelSeeds(), photonCore(), and reco::Candidate::size.

{ if ((this->photonCore()->electronPixelSeeds()).size() > 0 ) return true; else return false; }
float reco::Photon::hcalDepth1TowerSumEtConeDR03 ( ) const [inline]

Hcal-Depth1 isolation sum.

Definition at line 312 of file Photon.h.

References reco::Photon::IsolationVariables::hcalDepth1TowerSumEt, and isolationR03_.

float reco::Photon::hcalDepth1TowerSumEtConeDR04 ( ) const [inline]

Hcal-Depth1 isolation sum.

Definition at line 295 of file Photon.h.

References reco::Photon::IsolationVariables::hcalDepth1TowerSumEt, and isolationR04_.

float reco::Photon::hcalDepth2TowerSumEtConeDR03 ( ) const [inline]

Hcal-Depth2 isolation sum.

Definition at line 314 of file Photon.h.

References reco::Photon::IsolationVariables::hcalDepth2TowerSumEt, and isolationR03_.

float reco::Photon::hcalDepth2TowerSumEtConeDR04 ( ) const [inline]

Hcal-Depth2 isolation sum.

Definition at line 297 of file Photon.h.

References reco::Photon::IsolationVariables::hcalDepth2TowerSumEt, and isolationR04_.

float reco::Photon::hcalTowerSumEtConeDR03 ( ) const [inline]
float reco::Photon::hcalTowerSumEtConeDR04 ( ) const [inline]
bool reco::Photon::isEB ( ) const [inline]

Ritrievs fiducial flags true if photon is in ECAL barrel

Definition at line 119 of file Photon.h.

References fiducialFlagBlock_, and reco::Photon::FiducialFlags::isEB.

Referenced by PatPhotonSimpleAnalyzer::analyze().

bool reco::Photon::isEBEEGap ( ) const [inline]
bool reco::Photon::isEBEtaGap ( ) const [inline]
bool reco::Photon::isEBGap ( ) const [inline]

true if photon is in EB, and inside the boundaries in super crystals/modules

Definition at line 123 of file Photon.h.

References isEBEtaGap(), and isEBPhiGap().

Referenced by PatPhotonSimpleAnalyzer::analyze(), and egHLT::OffPho::isGap().

{ return (isEBEtaGap() || isEBPhiGap()); }
bool reco::Photon::isEBPhiGap ( ) const [inline]
bool reco::Photon::isEE ( ) const [inline]
bool reco::Photon::isEEDeeGap ( ) const [inline]
bool reco::Photon::isEEGap ( ) const [inline]

true if photon is in EE, and inside the boundaries in supercrystal/D

Definition at line 127 of file Photon.h.

References isEEDeeGap(), and isEERingGap().

Referenced by PatPhotonSimpleAnalyzer::analyze(), and egHLT::OffPho::isGap().

{ return (isEERingGap() || isEEDeeGap()); }
bool reco::Photon::isEERingGap ( ) const [inline]
bool reco::Photon::isPFlowPhoton ( ) const [inline]

Retrieve photonCore attributes.

Definition at line 56 of file Photon.h.

References photonCore().

{return this->photonCore()->isPFlowPhoton();}
bool reco::Photon::isPhoton ( ) const [inline, virtual]

Implement Candidate method for particle species.

Reimplemented from reco::LeafCandidate.

Definition at line 84 of file Photon.h.

References funct::true.

{ return true ; }
bool reco::Photon::isStandardPhoton ( ) const [inline]

Definition at line 57 of file Photon.h.

References photonCore().

{return this->photonCore()->isStandardPhoton();}
float reco::Photon::maxEnergyXtal ( ) const [inline]
float reco::Photon::mipChi2 ( ) const [inline]

MIP variables.

Definition at line 208 of file Photon.h.

References reco::Photon::MIPVariables::mipChi2, and mipVariableBlock_.

float reco::Photon::mipIntercept ( ) const [inline]
bool reco::Photon::mipIsHalo ( ) const [inline]

Definition at line 213 of file Photon.h.

References reco::Photon::MIPVariables::mipIsHalo, and mipVariableBlock_.

int reco::Photon::mipNhitCone ( ) const [inline]
float reco::Photon::mipSlope ( ) const [inline]

Definition at line 210 of file Photon.h.

References reco::Photon::MIPVariables::mipSlope, and mipVariableBlock_.

float reco::Photon::mipTotEnergy ( ) const [inline]
float reco::Photon::neutralHadronIso ( ) const [inline]
int reco::Photon::nTrkHollowConeDR03 ( ) const [inline]
int reco::Photon::nTrkHollowConeDR04 ( ) const [inline]
int reco::Photon::nTrkSolidConeDR03 ( ) const [inline]
int reco::Photon::nTrkSolidConeDR04 ( ) const [inline]
bool Photon::overlap ( const Candidate c) const [private, virtual]

check overlap with another candidate

Implements reco::RecoCandidate.

Definition at line 41 of file Photon.cc.

References trackerHits::c, reco::RecoCandidate::checkOverlap(), connectstrParser::o, reco::RecoCandidate::superCluster(), and superCluster().

                                                {
  const RecoCandidate * o = dynamic_cast<const RecoCandidate *>( & c );
  return ( o != 0 &&
           ( checkOverlap( superCluster(), o->superCluster() ) )
           );
  return false;
}
reco::SuperClusterRef reco::Photon::pfSuperCluster ( ) const [inline]

Ref to PFlow SuperCluster.

Definition at line 61 of file Photon.h.

References photonCore().

{return this->photonCore()->pfSuperCluster();}
reco::PhotonCoreRef reco::Photon::photonCore ( ) const [inline]

returns a reference to the core photon object

Definition at line 51 of file Photon.h.

References photonCore_.

Referenced by conversions(), conversionsOneLeg(), conversionTrackProvenance(), electronPixelSeeds(), hasConversionTracks(), hasPixelSeed(), isPFlowPhoton(), isStandardPhoton(), pfSuperCluster(), and superCluster().

{ return photonCore_;}
float reco::Photon::photonIso ( ) const [inline]

Definition at line 329 of file Photon.h.

References pfIsolation_, and reco::Photon::PflowIsolationVariables::photonIso.

float reco::Photon::r1x5 ( ) const [inline]
float reco::Photon::r2x5 ( ) const [inline]
float reco::Photon::r9 ( ) const [inline]
void reco::Photon::setFiducialVolumeFlags ( const FiducialFlags a) [inline]

set flags for photons in the ECAL fiducial volume

Definition at line 116 of file Photon.h.

References a, and fiducialFlagBlock_.

void reco::Photon::setIsolationVariables ( const IsolationVariables isolInDr04,
const IsolationVariables isolInDr03 
) [inline]

set relevant isolation variables

Definition at line 285 of file Photon.h.

References isolationR03_, and isolationR04_.

{  isolationR04_ = isolInDr04 ; isolationR03_ = isolInDr03 ;} 
void reco::Photon::setMIPVariables ( const MIPVariables mipVar) [inline]

set mip Variables

Definition at line 218 of file Photon.h.

References mipVariableBlock_.

{mipVariableBlock_= mipVar;} 
void reco::Photon::setPflowIsolationVariables ( const PflowIsolationVariables pfisol) [inline]

set isolation variables calculated with Pflow

Definition at line 287 of file Photon.h.

References pfIsolation_.

{  pfIsolation_ = pfisol;} 
void reco::Photon::setShowerShapeVariables ( const ShowerShape a) [inline]

Definition at line 161 of file Photon.h.

References a, and showerShapeBlock_.

void Photon::setVertex ( const Point vertex) [virtual]

set primary event vertex used to define photon direction

Reimplemented from reco::LeafCandidate.

Definition at line 49 of file Photon.cc.

References caloPosition(), reco::LeafCandidate::energy(), reco::LeafCandidate::momentum(), reco::LeafCandidate::setP4(), reco::LeafCandidate::vertex(), and reco::LeafCandidate::vertex_.

                                           {
  math::XYZVectorF direction = caloPosition() - vertex;
  double energy = this->energy();
  math::XYZVectorF momentum = direction.unit() * energy;
  math::XYZTLorentzVector lv(momentum.x(), momentum.y(), momentum.z(), energy );
  setP4(lv);
  vertex_ = vertex;
}
float reco::Photon::sigmaEtaEta ( ) const [inline]
float reco::Photon::sigmaIetaIeta ( ) const [inline]
reco::SuperClusterRef Photon::superCluster ( ) const [virtual]
float reco::Photon::trkSumPtHollowConeDR03 ( ) const [inline]
float reco::Photon::trkSumPtHollowConeDR04 ( ) const [inline]
float reco::Photon::trkSumPtSolidConeDR03 ( ) const [inline]
float reco::Photon::trkSumPtSolidConeDR04 ( ) const [inline]

Member Data Documentation

position of seed BasicCluster for shower depth of unconverted photon

Definition at line 336 of file Photon.h.

Referenced by caloPosition().

reference to the PhotonCore

Definition at line 338 of file Photon.h.

Referenced by photonCore().

bool reco::Photon::pixelSeed_ [private]

Definition at line 340 of file Photon.h.

Referenced by Photon().