CMS 3D CMS Logo

SimpleElectron.cc
Go to the documentation of this file.
1 #ifndef SimpleElectron_STANDALONE
4  run_(runNumber),
5  eClass_(int(in.classification())),
6  r9_(in.full5x5_r9()),
7  scEnergy_(in.superCluster()->rawEnergy() + (in.isEB() ? 0 : in.superCluster()->preshowerEnergy())),
8  scEnergyError_(-999.), // FIXME???
9  trackMomentum_(in.trackMomentumAtVtx().R()),
10  trackMomentumError_(in.trackMomentumError()),
11  regEnergy_(in.correctedEcalEnergy()),
12  regEnergyError_(in.correctedEcalEnergyError()),
13  eta_(in.superCluster()->eta()),
14  isEB_(in.isEB()),
15  isMC_(isMC),
16  isEcalDriven_(in.ecalDriven()),
17  isTrackerDriven_(in.trackerDrivenSeed()),
18  newEnergy_(regEnergy_),
19  newEnergyError_(regEnergyError_),
20  combinedMomentum_(in.p4(reco::GsfElectron::P4_COMBINATION).P()),
21  combinedMomentumError_(in.p4Error(reco::GsfElectron::P4_COMBINATION)),
22  scale_(1.0), smearing_(0.0)
23 {
24 }
25 
26 
28 {
29  math::XYZTLorentzVector oldMomentum = out.p4();
30  math::XYZTLorentzVector newMomentum = math::XYZTLorentzVector(oldMomentum.x()*getCombinedMomentum()/oldMomentum.t(),
31  oldMomentum.y()*getCombinedMomentum()/oldMomentum.t(),
32  oldMomentum.z()*getCombinedMomentum()/oldMomentum.t(),
37 }
38 #endif
const LorentzVector & p4(P4Kind kind) const
Definition: GsfElectron.cc:225
void correctMomentum(const LorentzVector &p4, float trackMomentumError, float p4Error)
Definition: GsfElectron.h:858
double getNewEnergy() const
double getCombinedMomentum() const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
void setCorrectedEcalEnergyError(float newEnergyError)
Definition: GsfElectron.cc:179
double getNewEnergyError() const
double p4[4]
Definition: TauolaWrapper.h:92
void writeTo(reco::GsfElectron &out) const
double getCombinedMomentumError() const
std::pair< OmniClusterRef, TrackingParticleRef > P
void setCorrectedEcalEnergy(float newEnergy)
Definition: GsfElectron.cc:182
fixed size matrix
double getTrackerMomentumError() const