79 int firstBX = old_egammas->getFirstBX();
80 int lastBX = old_egammas->getLastBX();
82 new_egammas->setBXRange(firstBX, lastBX);
83 new_taus->setBXRange(firstBX, lastBX);
84 new_jets->setBXRange(firstBX, lastBX);
85 new_taus->setBXRange(firstBX, lastBX);
86 new_calospares->setBXRange(firstBX, lastBX);
88 for(
int bx = firstBX; bx <= lastBX; ++bx)
91 itEGamma != old_egammas->end(bx); ++itEGamma)
94 const double et = emScale->et( itEGamma->hwPt() );
100 itEGamma->hwEta(), itEGamma->hwPhi(),
101 itEGamma->hwQual(), itEGamma->hwIso());
102 new_egammas->push_back(bx, *&eg);
108 itTau != old_taus->end(bx); ++itTau)
118 const double et = jetScale->et( itTau->hwPt() );
125 itTau->hwEta(), itTau->hwPhi(),
126 itTau->hwQual(), itTau->hwIso());
127 new_taus->push_back(bx, *&
tau);
132 itJet != old_jets->end(bx); ++itJet)
142 const double et = jetScale->et( itJet->hwPt() );
144 const bool forward = ((itJet->hwQual() & 0x2) != 0);
150 itJet->hwEta(), itJet->hwPhi(),
152 new_jets->push_back(bx, *&
jet);
157 itEtSum != old_etsums->end(bx); ++itEtSum)
159 double et = itEtSum->hwPt() * emScale->linearLsb();
163 if(sumType == EtSum::EtSumType::kMissingHt)
164 et = htMissScale->et( itEtSum->hwPt() );
172 itEtSum->hwEta(), itEtSum->hwPhi(),
174 new_etsums->push_back(bx, *&eg);
180 itCaloSpare != old_calospares->end(bx); ++itCaloSpare)
184 new_calospares->push_back(bx, *itCaloSpare);
188 iEvent.
put(new_egammas);
189 iEvent.
put(new_taus);
190 iEvent.
put(new_jets);
191 iEvent.
put(new_etsums);
192 iEvent.
put(new_calospares);
edm::EDGetToken EtSumToken_
double getPhysicalEta(int etaIndex, bool forward=false)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetToken TauToken_
edm::EDGetToken CaloSpareToken_
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
double getPhysicalPhi(int phiIndex)
edm::EDGetToken EGammaToken_
edm::EDGetToken JetToken_
std::vector< EGamma >::const_iterator const_iterator