166 ElectronCollection::const_iterator
electron ;
167 ElectronCollection::iterator ele ;
172 ele!=oldElectrons->end();
191 int run =
event.run();
193 float r9 = ele->r9();
194 double correctedEcalEnergy = ele->correctedEcalEnergy();
195 double correctedEcalEnergyError = ele->correctedEcalEnergyError();
197 double trackMomentumError = ele->trackMomentumError();
198 double combinedMomentum = ele->p();
199 double combinedMomentumError = ele->p4Error(ele->candidateP4Kind());
203 if( !ele->ecalDrivenSeed() )
205 double error = 999. ;
206 double momentum = (combinedMomentum<15. ? 15. : combinedMomentum);
209 float parEB[3] = { 5.24e-02, 2.01e-01, 1.00e-02} ;
210 error = momentum *
sqrt(
pow(parEB[0]/
sqrt(momentum),2) +
pow(parEB[1]/momentum,2) +
pow(parEB[2],2) );
212 else if ( ele->isEE() )
214 float parEE[3] = { 1.46e-01, 9.21e-01, 1.94e-03} ;
215 error = momentum *
sqrt(
pow(parEE[0]/
sqrt(momentum),2) +
pow(parEE[1]/momentum,2) +
pow(parEE[2],2) );
217 combinedMomentumError =
error;
232 correctedEcalEnergyError,
235 ele->ecalRegressionEnergy(),
236 ele->ecalRegressionError(),
238 combinedMomentumError,
239 ele->superCluster()->eta(),
243 ele->trackerDrivenSeed()
258 std::cout <<
"[CalibratedPATElectronProducer] "
259 <<
"You choose not to combine." << std::endl;
265 std::cout <<
"[CalibratedPATElectronProducer] "
266 <<
"You choose corrected regression energy for standard combination" << std::endl;
274 std::cout <<
"[CalibratedPATElectronProducer] "
275 <<
"You choose uncorrected regression energy for standard combination" << std::endl;
283 std::cout <<
"[CalibratedPATElectronProducer] "
284 <<
"You choose regression combination." << std::endl;
291 <<
"Unknown combination Type !!!" ;
297 ( oldMomentum.x()*mySimpleElectron.getCombinedMomentum()/oldMomentum.t(),
298 oldMomentum.y()*mySimpleElectron.getCombinedMomentum()/oldMomentum.t(),
299 oldMomentum.z()*mySimpleElectron.getCombinedMomentum()/oldMomentum.t(),
300 mySimpleElectron.getCombinedMomentum() ) ;
305 mySimpleElectron.getTrackerMomentumError(),
306 mySimpleElectron.getCombinedMomentumError()
311 std::cout <<
"[CalibratedPATElectronProducer] Combined momentum after saving "
312 << ele->p4().t() << std::endl;
320 std::cout <<
"[CalibratedPATElectronProducer] "
321 <<
"You choose not to correct. Uncorrected Regression Energy is taken." << std::endl;
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
void calibrate(SimpleElectron &electron)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
edm::InputTag inputPatElectrons
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)
virtual const_iterator begin() const =0
first daughter const_iterator
void combine(SimpleElectron &electron)
ElectronEnergyCalibrator * theEnCorrector
Power< A, B >::type pow(const A &a, const B &b)