11 caloPosition_( caloPos ),
19 caloPosition_(rhs.caloPosition_),
20 photonCore_ ( rhs.photonCore_),
21 pixelSeed_ ( rhs.pixelSeed_ ),
22 fiducialFlagBlock_ ( rhs.fiducialFlagBlock_ ),
23 isolationR04_ ( rhs.isolationR04_),
24 isolationR03_ ( rhs.isolationR03_),
25 showerShapeBlock_ ( rhs.showerShapeBlock_),
26 full5x5_showerShapeBlock_ ( rhs.full5x5_showerShapeBlock_),
27 saturationInfo_ ( rhs.saturationInfo_ ),
28 eCorrections_(rhs.eCorrections_),
29 mipVariableBlock_ (rhs.mipVariableBlock_),
30 pfIsolation_ ( rhs.pfIsolation_ )
39 return new Photon( *
this );
45 return ( o !=
nullptr &&
53 double energy = this->energy();
70 bool isEg=
false, isPf=
false;
72 for (
unsigned iConv=0; iConv<conv2leg.
size(); iConv++){
73 std::vector<edm::RefToBase<reco::Track> > convtracks = conv2leg[iConv]->tracks();
74 for (
unsigned itk=0; itk<convtracks.size(); itk++){
75 if (convTrack==convtracks[itk]) isEg=
true;
79 for (
unsigned iConv=0; iConv<conv1leg.
size(); iConv++){
80 std::vector<edm::RefToBase<reco::Track> > convtracks = conv1leg[iConv]->tracks();
81 for (
unsigned itk=0; itk<convtracks.size(); itk++){
82 if (convTrack==convtracks[itk]) isPf=
true;
87 if (isPf) origin=
pflow;
88 if (isEg && isPf) origin=
both;
97 newP4 *= newEnergy/newP4.e() ;
101 eCorrections_.scEcalEnergy = newEnergy;
102 eCorrections_.scEcalEnergyError = delta_e;
105 eCorrections_.phoEcalEnergy = newEnergy;
106 eCorrections_.phoEcalEnergyError = delta_e;
109 eCorrections_.regression1Energy = newEnergy ;
110 eCorrections_.regression1EnergyError = delta_e;
112 eCorrections_.regression2Energy = newEnergy ;
113 eCorrections_.regression2EnergyError = delta_e;
118 setP4(type, newP4, delta_e, setToRecoCandidate);
129 return eCorrections_.scEcalEnergy;
132 return eCorrections_.phoEcalEnergy;
135 return eCorrections_.regression1Energy;
137 return eCorrections_.regression2Energy;
140 throw cms::Exception(
"reco::Photon")<<
"unexpected p4 type " << type <<
" cannot return the energy value: " ;
149 return eCorrections_.scEcalEnergyError;
152 return eCorrections_.phoEcalEnergyError;
155 return eCorrections_.regression1EnergyError;
157 return eCorrections_.regression2EnergyError;
160 throw cms::Exception(
"reco::Photon")<<
"unexpected p4 type " << type <<
" cannot return the uncertainty on the energy: " ;
172 eCorrections_.scEcalP4 =
p4 ;
173 eCorrections_.scEcalEnergyError =
error ;
176 eCorrections_.phoEcalP4 =
p4 ;
177 eCorrections_.phoEcalEnergyError =
error ;
180 eCorrections_.regression1P4 =
p4 ;
181 eCorrections_.regression1EnergyError =
error ;
183 eCorrections_.regression2P4 =
p4 ;
184 eCorrections_.regression2EnergyError =
error ;
189 if (setToRecoCandidate)
192 eCorrections_.candidateP4type =
type ;
202 case ecal_standard:
return eCorrections_.scEcalP4 ;
203 case ecal_photons:
return eCorrections_.phoEcalP4 ;
204 case regression1:
return eCorrections_.regression1P4 ;
205 case regression2:
return eCorrections_.regression2P4 ;
206 default:
throw cms::Exception(
"reco::Photon")<<
"unexpected p4 type: "<< type <<
" cannot return p4 ";
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
void setCorrectedEnergy(P4type type, float E, float dE, bool toCand=true)
bool overlap(const Candidate &) const override
check overlap with another candidate
Photon * clone() const override
returns a clone of the candidate
reco::SuperClusterRef superCluster() const override
Ref to SuperCluster.
int conversionTrackProvenance(const edm::RefToBase< reco::Track > &convTrack) const
Photon()
default constructor
void setVertex(const Point &vertex) override
set vertex
void setVertex(const Point &vertex) override
set primary event vertex used to define photon direction
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
math::XYZTLorentzVector LorentzVector
const LorentzVector & p4() const final
four-momentum Lorentz vector
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float > > XYZVectorF
spatial vector with cartesian internal representation
~Photon() override
destructor
float getCorrectedEnergyError(P4type type) const
const SuperClusterRef & superCluster() const
math::XYZTLorentzVector LorentzVector
Lorentz vector.
float getCorrectedEnergy(P4type type) const
def checkOverlap(process)
size_type size() const
Size of the RefVector.
void setP4(P4type type, const LorentzVector &p4, float p4Error, bool setToRecoCandidate)
virtual reco::SuperClusterRef superCluster() const
reference to a SuperCluster