86 tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
89 produces<reco::IsolatedPixelTrackCandidateCollection>();
132 std::vector<edm::Ref<l1t::TauBxCollection> > l1tauobjref;
133 std::vector<edm::Ref<l1t::JetBxCollection> > l1jetobjref;
138 double ptTriggered = -10;
139 double etaTriggered = -100;
140 double phiTriggered = -100;
145 for (
unsigned int p = 0;
p < l1tauobjref.size();
p++) {
146 if (l1tauobjref[
p]->
pt() > ptTriggered) {
147 ptTriggered = l1tauobjref[
p]->pt();
148 phiTriggered = l1tauobjref[
p]->phi();
149 etaTriggered = l1tauobjref[
p]->eta();
152 for (
unsigned int p = 0;
p < l1jetobjref.size();
p++) {
153 if (l1jetobjref[
p]->
pt() > ptTriggered) {
154 ptTriggered = l1jetobjref[
p]->pt();
155 phiTriggered = l1jetobjref[
p]->phi();
156 etaTriggered = l1jetobjref[
p]->eta();
160 auto iptcCollection = std::make_unique<reco::IsolatedPixelTrackCandidateCollection>();
165 for (l1extra::L1JetParticleCollection::const_iterator tit = l1Taus->begin(); tit != l1Taus->end(); tit++) {
166 double dphi = fabs(tit->phi() - phiTriggered);
168 dphi = 2 *
M_PI - dphi;
169 double Rseed =
sqrt(
pow(etaTriggered - tit->eta(), 2) + dphi * dphi);
174 double OutEnergy = 0;
182 double phihit = pos.
phi();
183 double etahit = pos.
eta();
184 phiD = fabs(phihit - tit->phi());
186 phiD = 2 *
M_PI - phiD;
187 R =
sqrt(
pow(etahit - tit->eta(), 2) + phiD * phiD);
197 OutEnergy += eItr->energy();
200 InEnergy += eItr->energy();
207 double phihit = pos.
phi();
208 double etahit = pos.
eta();
209 phiD = fabs(phihit - tit->phi());
211 phiD = 2 *
M_PI - phiD;
212 R =
sqrt(
pow(etahit - tit->eta(), 2) + phiD * phiD);
220 OutEnergy += eItr->energy();
223 InEnergy += eItr->energy();
231 iptcCollection->push_back(newca);
245 desc.
add<
double>(
"ECHitEnergyThreshold", 0.05);
250 desc.
add<
double>(
"ECHitCountEnergyThreshold", 0.5);
251 desc.
add<
double>(
"EcalInnerConeSize", 0.3);
252 desc.
add<
double>(
"EcalOuterConeSize", 0.7);
253 descriptions.
add(
"ecalIsolPartProd", desc);
Log< level::Info, true > LogVerbatim
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
EcalIsolatedParticleCandidateProducer(const edm::ParameterSet &)
Geom::Phi< T > phi() const
std::vector< EcalRecHit >::const_iterator const_iterator
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_l1tau_
bool getData(T &iHolder) const
~EcalIsolatedParticleCandidateProducer() override
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_hlt_
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Power< A, B >::type pow(const A &a, const B &b)