132 std::vector <reco::TrackRef> fTracks;
133 fTracks.reserve (tracks_h->size());
134 for (
unsigned i = 0;
i < tracks_h->size(); ++
i) {
149 for (
unsigned i = 0;
i < jets_h->size(); ++
i) {
157 double factorZSP = 1.;
167 double scaleJPT = 1.;
179 scaleJPT =
mJPTalgo->
correction ( corrected, *oldjet, iEvent, iSetup, pions, muons, elecs, ok );
181 corrected.
py()*scaleJPT,
182 corrected.
pz()*scaleJPT,
183 corrected.
energy()*scaleJPT );
185 scaleJPT =
mJPTalgo->
correction( corrected, *oldjet, iEvent, iSetup, p4, pions, muons, elecs, ok );
222 double deEta2Tr = 0.;
223 double dePhi2Tr = 0.;
227 double denominator_tracks = 0.;
231 double deR =
deltaR((*it)->eta(), (*it)->phi(), p4.eta(), p4.phi());
232 double deEta = (*it)->eta() - p4.eta();
233 double dePhi =
deltaPhi((*it)->phi(), p4.phi());
234 if((**it).ptError()/(**it).pt() < 0.1) {
235 deR2Tr = deR2Tr + deR*deR*(*it)->pt();
236 deEta2Tr = deEta2Tr + deEta*deEta*(*it)->pt();
237 dePhi2Tr = dePhi2Tr + dePhi*dePhi*(*it)->pt();
238 denominator_tracks = denominator_tracks + (*it)->pt();
239 Zch = Zch + (*it)->pt();
241 Pout2 = Pout2 + (**it).p()*(**it).p() - (Zch*p4.P())*(Zch*p4.P());
246 double deR =
deltaR((*it)->eta(), (*it)->phi(), p4.eta(), p4.phi());
247 double deEta = (*it)->eta() - p4.eta();
248 double dePhi =
deltaPhi((*it)->phi(), p4.phi());
249 if((**it).ptError()/(**it).pt() < 0.1) {
250 deR2Tr = deR2Tr + deR*deR*(*it)->pt();
251 deEta2Tr = deEta2Tr + deEta*deEta*(*it)->pt();
252 dePhi2Tr = dePhi2Tr + dePhi*dePhi*(*it)->pt();
253 denominator_tracks = denominator_tracks + (*it)->pt();
254 Zch = Zch + (*it)->pt();
256 Pout2 = Pout2 + (**it).p()*(**it).p() - (Zch*p4.P())*(Zch*p4.P());
261 double deR =
deltaR((*it)->eta(), (*it)->phi(), p4.eta(), p4.phi());
262 double deEta = (*it)->eta() - p4.eta();
263 double dePhi =
deltaPhi((*it)->phi(), p4.phi());
264 if((**it).ptError()/(**it).pt() < 0.1) {
265 deR2Tr = deR2Tr + deR*deR*(*it)->pt();
266 deEta2Tr = deEta2Tr + deEta*deEta*(*it)->pt();
267 dePhi2Tr = dePhi2Tr + dePhi*dePhi*(*it)->pt();
268 denominator_tracks = denominator_tracks + (*it)->pt();
269 Zch = Zch + (*it)->pt();
271 Pout2 = Pout2 + (**it).p()*(**it).p() - (Zch*p4.P())*(Zch*p4.P());
276 Zch = Zch + (*it)->pt();
279 Zch = Zch + (*it)->pt();
282 Zch = Zch + (*it)->pt();
290 Pout =
sqrt(fabs(Pout2))/ntracks;
294 if (denominator_tracks!=0){
295 deR2Tr = deR2Tr/denominator_tracks;
296 deEta2Tr= deEta2Tr/denominator_tracks;
297 dePhi2Tr= dePhi2Tr/denominator_tracks;
303 specific.
Pout = Pout;
313 if ( pvCollection.
isValid() && pvCollection->size()>0 ) vertex_=pvCollection->begin()->position();
320 tmpColl.push_back(fJet);
331 std::map<reco::JPTJetCollection::iterator, double> AreaNonJet;
333 for(reco::JPTJetCollection::iterator ij1=tmpColl.begin(); ij1!=tmpColl.end(); ij1++)
336 for(reco::JPTJetCollection::iterator ij2=tmpColl.begin(); ij2!=tmpColl.end(); ij2++)
338 if(ij2 == ij1)
continue;
339 if(fabs((*ij1).eta() - (*ij2).eta()) > 0.5 )
continue;
356 for(reco::JPTJetCollection::iterator ij=tmpColl.begin(); ij!=tmpColl.end(); ij++)
363 double ja = (AreaNonJet.find(ij))->
second;
369 (*ij).scaleEnergy (factorPU);
374 pOut->push_back(*ij);
reco::TrackRefVector muonsInVertexOutCalo
float mSumEnergyOfChargedWithoutEff
Jets made from CaloTowers.
reco::TrackRefVector muonsInVertexInCalo
reco::TrackRefVector calculateBGtracksJet(reco::JPTJetCollection &, std::vector< reco::TrackRef > &, edm::Handle< std::vector< reco::TrackExtrapolation > > &, reco::TrackRefVector &)
ZSPJPTJetCorrector * mZSPalgo
std::vector< JPTJet > JPTJetCollection
collection of CaloJet objects
float mChargedHadronEnergy
float mSumPtOfChargedWithEff
reco::TrackRefVector inVertexInCalo_
reco::TrackRefVector muonsOutVertexInCalo
virtual void scaleEnergy(double fScale)
scale energy of the jet
reco::TrackRefVector inVertexOutOfCalo_
virtual double correction(const reco::Jet &, const edm::Event &, const edm::EventSetup &) const
apply correction using Event information
double getResponseOfChargedWithoutEff()
float mResponseOfChargedWithEff
reco::TrackRefVector elecsOutVertexInCalo
reco::TrackRefVector pionsInVertexOutCalo
const_iterator end() const
Termination of iteration.
const_iterator begin() const
Initialize an iterator over the RefVector.
U second(std::pair< T, U > const &p)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
virtual double energy() const
energy
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Jets made from CaloJets corrected for ZSP and tracks.
JetPlusTrackCorrector * mJPTalgo
double getResponseOfChargedWithEff()
Get responses/sumPT/SumEnergy with and without Efficiency correction.
reco::TrackRefVector pionsOutVertexInCalo
float mSumEnergyOfChargedWithEff
math::XYZPoint Point
point in the space
reco::TrackRefVector outOfVertexInCalo_
reco::TrackRefVector elecsInVertexInCalo
double correction(const reco::Jet &, const reco::Jet &, const edm::Event &, const edm::EventSetup &, P4 &, jpt::MatchedTracks &pions, jpt::MatchedTracks &muons, jpt::MatchedTracks &elecs, bool &validMatches) const
Vectorial correction method (corrected 4-momentum passed by reference)
edm::InputTag mExtrapolations
double correctAA(const reco::Jet &, const reco::TrackRefVector &, double &, const reco::TrackRefVector &, const reco::TrackRefVector &, double, const reco::TrackRefVector &) const
For AA - correct in tracker.
double getSumPtWithoutEff()
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::RefToBase< reco::Jet > theCaloJetRef
double deltaR(double eta1, double eta2, double phi1, double phi2)
float mResponseOfChargedWithoutEff
reco::TrackRefVector pionsInVertexInCalo
virtual double px() const
x coordinate of momentum vector
float mSumPtOfChargedWithoutEff
reco::TrackRefVector elecsInVertexOutCalo
virtual double pz() const
z coordinate of momentum vector
Particles matched to tracks that are in/in, in/out, out/in at Vertex and CaloFace.
double getSumEnergyWithoutEff()
virtual double py() const
y coordinate of momentum vector
double getSumEnergyWithEff()
math::XYZPoint Point
point in the space
virtual Constituents getJetConstituents() const
list of constituents