164 ElectronCollection::const_iterator
electron ;
165 ElectronCollection::iterator ele ;
170 ele!=oldElectrons->end();
189 int run =
event.run();
191 float r9 = ele->r9();
192 double correctedEcalEnergy = ele->correctedEcalEnergy();
193 double correctedEcalEnergyError = ele->correctedEcalEnergyError();
195 double trackMomentumError = ele->trackMomentumError();
196 double combinedMomentum = ele->p();
197 double combinedMomentumError = ele->p4Error(ele->candidateP4Kind());
201 if( !ele->ecalDrivenSeed() )
203 double error = 999. ;
204 double momentum = (combinedMomentum<15. ? 15. : combinedMomentum);
207 float parEB[3] = { 5.24e-02, 2.01e-01, 1.00e-02} ;
208 error = momentum *
sqrt(
pow(parEB[0]/
sqrt(momentum),2) +
pow(parEB[1]/momentum,2) +
pow(parEB[2],2) );
210 else if ( ele->isEE() )
212 float parEE[3] = { 1.46e-01, 9.21e-01, 1.94e-03} ;
213 error = momentum *
sqrt(
pow(parEE[0]/
sqrt(momentum),2) +
pow(parEE[1]/momentum,2) +
pow(parEE[2],2) );
215 combinedMomentumError =
error;
230 correctedEcalEnergyError,
233 ele->ecalRegressionEnergy(),
234 ele->ecalRegressionError(),
236 combinedMomentumError,
237 ele->superCluster()->eta(),
241 ele->trackerDrivenSeed()
256 std::cout <<
"[CalibratedPATElectronProducer] "
257 <<
"You choose not to combine." << std::endl;
263 std::cout <<
"[CalibratedPATElectronProducer] "
264 <<
"You choose corrected regression energy for standard combination" << std::endl;
272 std::cout <<
"[CalibratedPATElectronProducer] "
273 <<
"You choose uncorrected regression energy for standard combination" << std::endl;
281 std::cout <<
"[CalibratedPATElectronProducer] "
282 <<
"You choose regression combination." << std::endl;
289 <<
"Unknown combination Type !!!" ;
295 ( oldMomentum.x()*mySimpleElectron.getCombinedMomentum()/oldMomentum.t(),
296 oldMomentum.y()*mySimpleElectron.getCombinedMomentum()/oldMomentum.t(),
297 oldMomentum.z()*mySimpleElectron.getCombinedMomentum()/oldMomentum.t(),
298 mySimpleElectron.getCombinedMomentum() ) ;
303 mySimpleElectron.getTrackerMomentumError(),
304 mySimpleElectron.getCombinedMomentumError()
309 std::cout <<
"[CalibratedPATElectronProducer] Combined momentum after saving "
310 << ele->p4().t() << std::endl;
318 std::cout <<
"[CalibratedPATElectronProducer] "
319 <<
"You choose not to correct. Uncorrected Regression Energy is taken." << std::endl;
edm::EDGetTokenT< edm::View< reco::Candidate > > inputPatElectronsToken
void calibrate(SimpleElectron &electron, edm::StreamID const &)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
std::vector< Electron > ElectronCollection
collectin of Electron objects
void correctLinearity(SimpleElectron &electron)
EpCombinationTool * myEpCombinationTool
ElectronEPcombinator * myCombinator
void setCombinationMode(int mode)
Analysis-level electron class.
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
virtual const_iterator begin() const =0
first daughter const_iterator
StreamID streamID() const
void combine(SimpleElectron &electron)
ElectronEnergyCalibrator * theEnCorrector
Power< A, B >::type pow(const A &a, const B &b)