54 produces< reco::IsolatedPixelTrackCandidateCollection >();
103 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1tauobjref;
104 std::vector< edm::Ref<l1extra::L1JetParticleCollection> > l1jetobjref;
109 double ptTriggered=-10;
110 double etaTriggered=-100;
111 double phiTriggered=-100;
115 for (
unsigned int p=0;
p<l1tauobjref.size();
p++)
117 if (l1tauobjref[
p]->pt()>ptTriggered)
119 ptTriggered=l1tauobjref[
p]->pt();
120 phiTriggered=l1tauobjref[
p]->phi();
121 etaTriggered=l1tauobjref[
p]->eta();
124 for (
unsigned int p=0;
p<l1jetobjref.size();
p++)
126 if (l1jetobjref[
p]->pt()>ptTriggered)
128 ptTriggered=l1jetobjref[
p]->pt();
129 phiTriggered=l1jetobjref[
p]->phi();
130 etaTriggered=l1jetobjref[
p]->eta();
138 for (l1extra::L1JetParticleCollection::const_iterator tit=l1Taus->begin(); tit!=l1Taus->end(); tit++)
140 double dphi=fabs(tit->phi()-phiTriggered);
141 if (dphi>3.1415926535) dphi=2*3.1415926535-dphi;
142 double Rseed=
sqrt(
pow(etaTriggered-tit->eta(),2)+dphi*dphi);
143 if (Rseed<1.2)
continue;
153 double phihit = pos.
phi();
154 double etahit = pos.
eta();
155 phiD=fabs(phihit-tit->phi());
156 if (phiD>3.1415926535) phiD=2*3.1415926535-phiD;
157 R=
sqrt(
pow(etahit-tit->eta(),2)+phiD*phiD);
170 OutEnergy+=eItr->energy();
174 InEnergy+=eItr->energy();
183 double phihit = pos.
phi();
184 double etahit = pos.
eta();
185 phiD=fabs(phihit-tit->phi());
186 if (phiD>3.1415926535) phiD=2*3.1415926535-phiD;
187 R=
sqrt(
pow(etahit-tit->eta(),2)+phiD*phiD);
198 OutEnergy+=eItr->energy();
202 InEnergy+=eItr->energy();
208 iptcCollection->push_back(newca);
217 std::auto_ptr<reco::IsolatedPixelTrackCandidateCollection> pOut(iptcCollection);
~EcalIsolatedParticleCandidateProducer()
T getParameter(std::string const &) const
virtual void produce(edm::Event &, const edm::EventSetup &)
edm::InputTag EErecHitCollectionLabel_
EcalIsolatedParticleCandidateProducer(const edm::ParameterSet &)
Geom::Phi< T > phi() const
std::vector< EcalRecHit >::const_iterator const_iterator
edm::InputTag l1tausource_
edm::InputTag EBrecHitCollectionLabel_
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
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag hltGTseedlabel_
Power< A, B >::type pow(const A &a, const B &b)