46 produces<reco::IsolatedPixelTrackCandidateCollection>();
86 std::vector<edm::Ref<l1t::TauBxCollection> > l1tauobjref;
87 std::vector<edm::Ref<l1t::JetBxCollection> > l1jetobjref;
92 double ptTriggered = -10;
93 double etaTriggered = -100;
94 double phiTriggered = -100;
98 for (
unsigned int p = 0;
p < l1tauobjref.size();
p++) {
99 if (l1tauobjref[
p]->
pt() > ptTriggered) {
100 ptTriggered = l1tauobjref[
p]->pt();
101 phiTriggered = l1tauobjref[
p]->phi();
102 etaTriggered = l1tauobjref[
p]->eta();
105 for (
unsigned int p = 0;
p < l1jetobjref.size();
p++) {
106 if (l1jetobjref[
p]->
pt() > ptTriggered) {
107 ptTriggered = l1jetobjref[
p]->pt();
108 phiTriggered = l1jetobjref[
p]->phi();
109 etaTriggered = l1jetobjref[
p]->eta();
113 auto iptcCollection = std::make_unique<reco::IsolatedPixelTrackCandidateCollection>();
117 for (l1extra::L1JetParticleCollection::const_iterator tit = l1Taus->begin(); tit != l1Taus->end(); tit++) {
118 double dphi = fabs(tit->phi() - phiTriggered);
120 dphi = 2 *
M_PI - dphi;
121 double Rseed =
sqrt(
pow(etaTriggered - tit->eta(), 2) + dphi * dphi);
126 double OutEnergy = 0;
132 double phihit = pos.
phi();
133 double etahit = pos.
eta();
134 phiD = fabs(phihit - tit->phi());
136 phiD = 2 *
M_PI - phiD;
137 R =
sqrt(
pow(etahit - tit->eta(), 2) + phiD * phiD);
147 OutEnergy += eItr->energy();
149 if (R < InConeSize_ && eItr->energy() >
hitEthr_) {
150 InEnergy += eItr->energy();
157 double phihit = pos.
phi();
158 double etahit = pos.
eta();
159 phiD = fabs(phihit - tit->phi());
161 phiD = 2 *
M_PI - phiD;
162 R =
sqrt(
pow(etahit - tit->eta(), 2) + phiD * phiD);
170 OutEnergy += eItr->energy();
172 if (R < InConeSize_ && eItr->energy() >
hitEthr_) {
173 InEnergy += eItr->energy();
179 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
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