49 produces< reco::IsolatedPixelTrackCandidateCollection >();
95 std::vector< edm::Ref<l1t::TauBxCollection> > l1tauobjref;
96 std::vector< edm::Ref<l1t::JetBxCollection> > l1jetobjref;
101 double ptTriggered=-10;
102 double etaTriggered=-100;
103 double phiTriggered=-100;
107 for (
unsigned int p=0;
p<l1tauobjref.size();
p++) {
108 if (l1tauobjref[
p]->
pt()>ptTriggered) {
109 ptTriggered=l1tauobjref[
p]->pt();
110 phiTriggered=l1tauobjref[
p]->phi();
111 etaTriggered=l1tauobjref[
p]->eta();
114 for (
unsigned int p=0;
p<l1jetobjref.size();
p++) {
115 if (l1jetobjref[
p]->
pt()>ptTriggered) {
116 ptTriggered=l1jetobjref[
p]->pt();
117 phiTriggered=l1jetobjref[
p]->phi();
118 etaTriggered=l1jetobjref[
p]->eta();
122 auto iptcCollection = std::make_unique<reco::IsolatedPixelTrackCandidateCollection>();
126 for (l1extra::L1JetParticleCollection::const_iterator tit=l1Taus->begin(); tit!=l1Taus->end(); tit++) {
127 double dphi=fabs(tit->phi()-phiTriggered);
129 double Rseed=
sqrt(
pow(etaTriggered-tit->eta(),2)+dphi*dphi);
130 if (Rseed<1.2)
continue;
139 double phihit = pos.
phi();
140 double etahit = pos.
eta();
141 phiD=fabs(phihit-tit->phi());
143 R=
sqrt(
pow(etahit-tit->eta(),2)+phiD*phiD);
153 OutEnergy+=eItr->energy();
155 if (R<InConeSize_&&eItr->energy()>
hitEthr_) {
156 InEnergy+=eItr->energy();
164 double phihit = pos.
phi();
165 double etahit = pos.
eta();
166 phiD=fabs(phihit-tit->phi());
168 R=
sqrt(
pow(etahit-tit->eta(),2)+phiD*phiD);
176 OutEnergy+=eItr->energy();
178 if (R<InConeSize_&&eItr->energy()>
hitEthr_) {
179 InEnergy+=eItr->energy();
185 iptcCollection->push_back(newca);
T getParameter(std::string const &) const
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
bool getByToken(EDGetToken token, Handle< PROD > &result) const
EcalIsolatedParticleCandidateProducer(const edm::ParameterSet &)
Geom::Phi< T > phi() const
std::vector< EcalRecHit >::const_iterator const_iterator
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_l1tau_
~EcalIsolatedParticleCandidateProducer() override
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
const_iterator end() const
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_hlt_
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
T const * product() const
Power< A, B >::type pow(const A &a, const B &b)
const_iterator begin() const