110 for (reco::VertexCollection::const_iterator inV = inVertices.begin();
111 inV != inVertices.end(); ++inV) {
115 && inV->position().Rho() <= 2.0
116 && fabs(inV->z()) <= 24.0
128 rho = (*hRhoKt6PFJets);
164 std::vector<double> energyValues;
165 std::vector<double> energyErrorValues;
170 for(
unsigned iele=0; iele <
nElectrons_ ; ++iele) {
174 std::cout <<
"***********************************************************************\n";
175 std::cout <<
"Run Lumi Event: " <<
event.id().run() <<
" " <<
event.luminosityBlock() <<
" " <<
event.id().event() <<
"\n";
176 std::cout <<
"Pat Electron : " << ele->
pt() <<
" " << ele->
eta() <<
" " << ele->
phi() <<
"\n";
184 recHits = pEBRecHits.
product();
186 recHits = pEERecHits.
product();
188 recHits = (*patCollectionH)[iele].recHits();
199 Double_t FinalMomentum = 0;
200 Double_t FinalMomentumError = 0;
201 Double_t RegressionMomentum = 0;
202 Double_t RegressionMomentumError = 0;
282 energyValues.push_back(RegressionMomentum);
283 energyErrorValues.push_back(RegressionMomentumError);
428 energyValues.push_back(RegressionMomentum);
429 energyErrorValues.push_back(RegressionMomentumError);
518 FinalMomentum = RegressionMomentum;
519 FinalMomentumError = RegressionMomentumError;
522 ( oldMomentum.x()*FinalMomentum/oldMomentum.t(),
523 oldMomentum.y()*FinalMomentum/oldMomentum.t(),
524 oldMomentum.z()*FinalMomentum/oldMomentum.t(),
530 energyValues.push_back(RegressionMomentum);
531 energyErrorValues.push_back(RegressionMomentumError);
539 if (myPatElectron)
delete myPatElectron;
540 if (mySCHelper)
delete mySCHelper;
552 energyFiller.insert( gsfCollectionH, energyValues.begin(), energyValues.end() );
553 energyErrorFiller.insert( gsfCollectionH, energyErrorValues.begin(), energyErrorValues.end() );
555 energyFiller.insert( patCollectionH, energyValues.begin(), energyValues.end() );
556 energyErrorFiller.insert( patCollectionH, energyErrorValues.begin(), energyErrorValues.end() );
560 energyErrorFiller.fill();
virtual double pt() const final
transverse momentum
void correctEcalEnergy(float newEnergy, float newEnergyError)
float trackMomentumError() const
float eESClusters() const
const LorentzVector & p4(P4Kind kind) const
float eSuperClusterOverP() const
std::string nameEnergyReg_
virtual double eta() const final
momentum pseudorapidity
float esClusterEnergy(unsigned i) const
float sigmaIetaIeta() const
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_
virtual double phi() const final
momentum azimuthal angle
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
virtual int charge() const final
electric charge
float esClusterEta(unsigned i) const
float subClusterEnergy(unsigned i) const
std::vector< Electron > ElectronCollection
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)
float preshowerEnergyOverRaw() const
virtual double p() const final
magnitude of momentum vector
float preshowerEnergy() const
float hadronicOverEm() const
float subClusterEmax(unsigned i) const
ElectronEnergyRegressionEvaluate * regressionEvaluator_
float esClusterPhi(unsigned i) const
float subClusterPhi(unsigned i) const
T const * product() 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.
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