109 for (
unsigned i = 0;
i < jets_h->size(); ++
i) {
117 double factorZSP = 1.;
124 double scaleJPT = 1.;
135 scaleJPT =
mJPTalgo->
correction ( corrected, *oldjet, iEvent, iSetup, pions, muons, elecs,ok );
137 corrected.
py()*scaleJPT,
138 corrected.
pz()*scaleJPT,
139 corrected.
energy()*scaleJPT );
141 scaleJPT =
mJPTalgo->
correction( corrected, *oldjet, iEvent, iSetup, p4, pions, muons, elecs,ok );
173 double deEta2Tr = 0.;
174 double dePhi2Tr = 0.;
178 double denominator_tracks = 0.;
182 double deR =
deltaR((*it)->eta(), (*it)->phi(), p4.eta(), p4.phi());
183 double deEta = (*it)->eta() - p4.eta();
184 double dePhi =
deltaPhi((*it)->phi(), p4.phi());
185 if((**it).ptError()/(**it).pt() < 0.1) {
186 deR2Tr = deR2Tr + deR*deR*(*it)->pt();
187 deEta2Tr = deEta2Tr + deEta*deEta*(*it)->pt();
188 dePhi2Tr = dePhi2Tr + dePhi*dePhi*(*it)->pt();
189 denominator_tracks = denominator_tracks + (*it)->pt();
190 Zch = Zch + (*it)->pt();
192 Pout2 = Pout2 + (**it).p()*(**it).p() - (Zch*p4.P())*(Zch*p4.P());
200 double deR =
deltaR((*it)->eta(), (*it)->phi(), p4.eta(), p4.phi());
201 double deEta = (*it)->eta() - p4.eta();
202 double dePhi =
deltaPhi((*it)->phi(), p4.phi());
203 if((**it).ptError()/(**it).pt() < 0.1) {
204 deR2Tr = deR2Tr + deR*deR*(*it)->pt();
205 deEta2Tr = deEta2Tr + deEta*deEta*(*it)->pt();
206 dePhi2Tr = dePhi2Tr + dePhi*dePhi*(*it)->pt();
207 denominator_tracks = denominator_tracks + (*it)->pt();
208 Zch = Zch + (*it)->pt();
210 Pout2 = Pout2 + (**it).p()*(**it).p() - (Zch*p4.P())*(Zch*p4.P());
215 double deR =
deltaR((*it)->eta(), (*it)->phi(), p4.eta(), p4.phi());
216 double deEta = (*it)->eta() - p4.eta();
217 double dePhi =
deltaPhi((*it)->phi(), p4.phi());
218 if((**it).ptError()/(**it).pt() < 0.1) {
219 deR2Tr = deR2Tr + deR*deR*(*it)->pt();
220 deEta2Tr = deEta2Tr + deEta*deEta*(*it)->pt();
221 dePhi2Tr = dePhi2Tr + dePhi*dePhi*(*it)->pt();
222 denominator_tracks = denominator_tracks + (*it)->pt();
223 Zch = Zch + (*it)->pt();
225 Pout2 = Pout2 + (**it).p()*(**it).p() - (Zch*p4.P())*(Zch*p4.P());
230 Zch = Zch + (*it)->pt();
233 Zch = Zch + (*it)->pt();
236 Zch = Zch + (*it)->pt();
244 Pout =
sqrt(fabs(Pout2))/ntracks;
246 if (denominator_tracks!=0){
247 deR2Tr = deR2Tr/denominator_tracks;
248 deEta2Tr= deEta2Tr/denominator_tracks;
249 dePhi2Tr= dePhi2Tr/denominator_tracks;
255 specific.
Pout = Pout;
269 if ( pvCollection.
isValid() && pvCollection->size()>0 ) vertex_=pvCollection->begin()->position();
276 pOut->push_back(fJet);
reco::TrackRefVector muonsInVertexOutCalo
float mSumEnergyOfChargedWithoutEff
Jets made from CaloTowers.
reco::TrackRefVector muonsInVertexInCalo
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.
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
virtual double energy() const
energy
ZSPJPTJetCorrector * mZSPalgo
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Jets made from CaloJets corrected for ZSP and tracks.
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)
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.
JetPlusTrackCorrector * mJPTalgo
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