51 produces< reco::IsolatedPixelTrackCandidateCollection >();
100 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1tauobjref;
101 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1jetobjref;
106 double ptTriggered=-10;
107 double etaTriggered=-100;
108 double phiTriggered=-100;
112 for (
unsigned int p=0;
p<l1tauobjref.size();
p++)
114 if (l1tauobjref[
p]->
pt()>ptTriggered)
116 ptTriggered=l1tauobjref[
p]->pt();
117 phiTriggered=l1tauobjref[
p]->phi();
118 etaTriggered=l1tauobjref[
p]->eta();
121 for (
unsigned int p=0;
p<l1jetobjref.size();
p++)
123 if (l1jetobjref[
p]->
pt()>ptTriggered)
125 ptTriggered=l1jetobjref[
p]->pt();
126 phiTriggered=l1jetobjref[
p]->phi();
127 etaTriggered=l1jetobjref[
p]->eta();
135 for (l1extra::L1JetParticleCollection::const_iterator tit=l1Taus->begin(); tit!=l1Taus->end(); tit++)
137 double dphi=fabs(tit->phi()-phiTriggered);
138 if (dphi>3.1415926535) dphi=2*3.1415926535-dphi;
139 double Rseed=
sqrt(
pow(etaTriggered-tit->eta(),2)+dphi*dphi);
140 if (Rseed<1.2)
continue;
150 double phihit = pos.
phi();
151 double etahit = pos.
eta();
152 phiD=fabs(phihit-tit->phi());
153 if (phiD>3.1415926535) phiD=2*3.1415926535-phiD;
154 R=
sqrt(
pow(etahit-tit->eta(),2)+phiD*phiD);
167 OutEnergy+=eItr->energy();
171 InEnergy+=eItr->energy();
180 double phihit = pos.
phi();
181 double etahit = pos.
eta();
182 phiD=fabs(phihit-tit->phi());
183 if (phiD>3.1415926535) phiD=2*3.1415926535-phiD;
184 R=
sqrt(
pow(etahit-tit->eta(),2)+phiD*phiD);
195 OutEnergy+=eItr->energy();
199 InEnergy+=eItr->energy();
205 iptcCollection->push_back(newca);
214 std::auto_ptr<reco::IsolatedPixelTrackCandidateCollection> pOut(iptcCollection);
~EcalIsolatedParticleCandidateProducer()
T getParameter(std::string const &) const
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
virtual void produce(edm::Event &, const edm::EventSetup &)
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_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
std::vector< IsolatedPixelTrackCandidate > IsolatedPixelTrackCandidateCollection
collectin of IsolatedPixelTrackCandidate objects
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_hlt_
Power< A, B >::type pow(const A &a, const B &b)