116 for (reco::VertexCollection::const_iterator inV = inVertices.begin();
117 inV != inVertices.end(); ++inV) {
121 && inV->position().Rho() <= 2.0
122 && fabs(inV->z()) <= 24.0
134 rho = (*hRhoKt6PFJets);
170 std::vector<double> energyValues;
171 std::vector<double> energyErrorValues;
176 for(
unsigned iele=0; iele <
nElectrons_ ; ++iele) {
180 std::cout <<
"***********************************************************************\n";
181 std::cout <<
"Run Lumi Event: " <<
event.id().run() <<
" " <<
event.luminosityBlock() <<
" " <<
event.id().event() <<
"\n";
182 std::cout <<
"Pat Electron : " << ele->
pt() <<
" " << ele->
eta() <<
" " << ele->
phi() <<
"\n";
190 recHits = pEBRecHits.
product();
192 recHits = pEERecHits.
product();
194 recHits = (*patCollectionH)[iele].recHits();
205 Double_t FinalMomentum = 0;
206 Double_t FinalMomentumError = 0;
207 Double_t RegressionMomentum = 0;
208 Double_t RegressionMomentumError = 0;
288 energyValues.push_back(RegressionMomentum);
289 energyErrorValues.push_back(RegressionMomentumError);
434 energyValues.push_back(RegressionMomentum);
435 energyErrorValues.push_back(RegressionMomentumError);
524 FinalMomentum = RegressionMomentum;
525 FinalMomentumError = RegressionMomentumError;
528 ( oldMomentum.x()*FinalMomentum/oldMomentum.t(),
529 oldMomentum.y()*FinalMomentum/oldMomentum.t(),
530 oldMomentum.z()*FinalMomentum/oldMomentum.t(),
536 energyValues.push_back(RegressionMomentum);
537 energyErrorValues.push_back(RegressionMomentumError);
545 if (myPatElectron)
delete myPatElectron;
546 if (mySCHelper)
delete mySCHelper;
558 energyFiller.insert( gsfCollectionH, energyValues.begin(), energyValues.end() );
559 energyErrorFiller.insert( gsfCollectionH, energyErrorValues.begin(), energyErrorValues.end() );
561 energyFiller.insert( patCollectionH, energyValues.begin(), energyValues.end() );
562 energyErrorFiller.insert( patCollectionH, energyErrorValues.begin(), energyErrorValues.end() );
566 energyErrorFiller.fill();
void correctEcalEnergy(float newEnergy, float newEnergyError)
virtual double p() const
magnitude of momentum vector
float trackMomentumError() const
float eESClusters() const
virtual float pt() const
transverse momentum
const LorentzVector & p4(P4Kind kind) const
float eSuperClusterOverP() const
std::string nameEnergyReg_
float esClusterEnergy(unsigned i) const
float sigmaIetaIeta() const
virtual float phi() const
momentum azimuthal angle
float subClusterE3x3(unsigned i) const
void correctMomentum(const LorentzVector &p4, float trackMomentumError, float p4Error)
math::XYZVectorF trackMomentumAtVtx() const
uint32_t inputCollectionType_
std::vector< Vertex > VertexCollection
collection of Vertex objects
double regressionValueWithTrkVar(double electronP, double SCRawEnergy, double scEta, double scPhi, double R9, double etawidth, double phiwidth, double NClusters, double HoE, double rho, double vertices, double EtaSeed, double PhiSeed, double ESeed, double E3x3Seed, double E5x5Seed, double see, double spp, double sep, double EMaxSeed, double E2ndSeed, double ETopSeed, double EBottomSeed, double ELeftSeed, double ERightSeed, double E2x5MaxSeed, double E2x5TopSeed, double E2x5BottomSeed, double E2x5LeftSeed, double E2x5RightSeed, double pt, double GsfTrackPIn, double fbrem, double Charge, double EoP, double IEtaSeed, double IPhiSeed, double EtaCrySeed, double PhiCrySeed, double PreShowerOverRaw, bool printDebug=false)
float eSubClusters() const
double regressionUncertaintyNoTrkVar(double SCRawEnergy, double scEta, double scPhi, double R9, double etawidth, double phiwidth, double NClusters, double HoE, double rho, double vertices, double EtaSeed, double PhiSeed, double ESeed, double E3x3Seed, double E5x5Seed, double see, double spp, double sep, double EMaxSeed, double E2ndSeed, double ETopSeed, double EBottomSeed, double ELeftSeed, double ERightSeed, double E2x5MaxSeed, double E2x5TopSeed, double E2x5BottomSeed, double E2x5LeftSeed, double E2x5RightSeed, double IEtaSeed, double IPhiSeed, double EtaCrySeed, double PhiCrySeed, double PreShowerOverRaw, bool printDebug=false)
bool isInitialized() const
edm::EDGetTokenT< EcalRecHitCollection > recHitCollectionEBToken_
double regressionValueWithSubClusters(double SCRawEnergy, double scEta, double scPhi, double R9, double etawidth, double phiwidth, double NClusters, double HoE, double rho, double vertices, double EtaSeed, double PhiSeed, double ESeed, double E3x3Seed, double E5x5Seed, double see, double spp, double sep, double EMaxSeed, double E2ndSeed, double ETopSeed, double EBottomSeed, double ELeftSeed, double ERightSeed, double E2x5MaxSeed, double E2x5TopSeed, double E2x5BottomSeed, double E2x5LeftSeed, double E2x5RightSeed, double IEtaSeed, double IPhiSeed, double EtaCrySeed, double PhiCrySeed, double PreShowerOverRaw, double isEcalDriven, double isEtaGap, double isPhiGap, double isDeeGap, double ESubs, double ESub1, double EtaSub1, double PhiSub1, double EMaxSub1, double E3x3Sub1, double ESub2, double EtaSub2, double PhiSub2, double EMaxSub2, double E3x3Sub2, double ESub3, double EtaSub3, double PhiSub3, double EMaxSub3, double E3x3Sub3, double NPshwClusters, double EPshwSubs, double EPshwSub1, double EtaPshwSub1, double PhiPshwSub1, double EPshwSub2, double EtaPshwSub2, double PhiPshwSub2, double EPshwSub3, double EtaPshwSub3, double PhiPshwSub3, bool isEB, bool printDebug=false)
const CaloTopology * ecalTopology_
edm::EDGetTokenT< EcalRecHitCollection > recHitCollectionEEToken_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
float esClusterEta(unsigned i) const
float subClusterEnergy(unsigned i) const
edm::EDGetTokenT< reco::VertexCollection > verticesInputToken_
double regressionValueNoTrkVar(double SCRawEnergy, double scEta, double scPhi, double R9, double etawidth, double phiwidth, double NClusters, double HoE, double rho, double vertices, double EtaSeed, double PhiSeed, double ESeed, double E3x3Seed, double E5x5Seed, double see, double spp, double sep, double EMaxSeed, double E2ndSeed, double ETopSeed, double EBottomSeed, double ELeftSeed, double ERightSeed, double E2x5MaxSeed, double E2x5TopSeed, double E2x5BottomSeed, double E2x5LeftSeed, double E2x5RightSeed, double IEtaSeed, double IPhiSeed, double EtaCrySeed, double PhiCrySeed, double PreShowerOverRaw, bool printDebug=false)
virtual float eta() const
momentum pseudorapidity
float preshowerEnergyOverRaw() const
virtual int charge() const
electric charge
std::vector< Electron > ElectronCollection
collectin of Electron objects
float preshowerEnergy() const
float hadronicOverEm() const
float subClusterEmax(unsigned i) const
ElectronEnergyRegressionEvaluate * regressionEvaluator_
float esClusterPhi(unsigned i) const
float subClusterPhi(unsigned i) const
double regressionUncertaintyWithTrkVar(double electronP, double SCRawEnergy, double scEta, double scPhi, double R9, double etawidth, double phiwidth, double NClusters, double HoE, double rho, double vertices, double EtaSeed, double PhiSeed, double ESeed, double E3x3Seed, double E5x5Seed, double see, double spp, double sep, double EMaxSeed, double E2ndSeed, double ETopSeed, double EBottomSeed, double ELeftSeed, double ERightSeed, double E2x5MaxSeed, double E2x5TopSeed, double E2x5BottomSeed, double E2x5LeftSeed, double E2x5RightSeed, double pt, double GsfTrackPIn, double fbrem, double Charge, double EoP, double IEtaSeed, double IPhiSeed, double EtaCrySeed, double PhiCrySeed, double PreShowerOverRaw, bool printDebug=false)
const CaloGeometry * caloGeometry_
Analysis-level electron class.
T const * product() const
uint32_t energyRegressionType_
std::string nameEnergyErrorReg_
edm::EDGetTokenT< reco::GsfElectronCollection > inputGsfElectronsToken_
float nPreshowerClusters() const
edm::EDGetTokenT< double > rhoInputToken_
float clustersSize() const
float subClusterEta(unsigned i) const
double regressionUncertaintyWithSubClusters(double SCRawEnergy, double scEta, double scPhi, double R9, double etawidth, double phiwidth, double NClusters, double HoE, double rho, double vertices, double EtaSeed, double PhiSeed, double ESeed, double E3x3Seed, double E5x5Seed, double see, double spp, double sep, double EMaxSeed, double E2ndSeed, double ETopSeed, double EBottomSeed, double ELeftSeed, double ERightSeed, double E2x5MaxSeed, double E2x5TopSeed, double E2x5BottomSeed, double E2x5LeftSeed, double E2x5RightSeed, double IEtaSeed, double IPhiSeed, double EtaCrySeed, double PhiCrySeed, double PreShowerOverRaw, double isEcalDriven, double isEtaGap, double isPhiGap, double isDeeGap, double ESubs, double ESub1, double EtaSub1, double PhiSub1, double EMaxSub1, double E3x3Sub1, double ESub2, double EtaSub2, double PhiSub2, double EMaxSub2, double E3x3Sub2, double ESub3, double EtaSub3, double PhiSub3, double EMaxSub3, double E3x3Sub3, double NPshwClusters, double EPshwSubs, double EPshwSub1, double EtaPshwSub1, double PhiPshwSub1, double EPshwSub2, double EtaPshwSub2, double PhiPshwSub2, double EPshwSub3, double EtaPshwSub3, double PhiPshwSub3, bool isEB, bool printDebug=false)
void setEcalRegressionEnergy(double val, double err)
set regression1
edm::EDGetTokenT< pat::ElectronCollection > inputPatElectronsToken_
bool ecalDrivenSeed() const