77 : InConeSize_(conf.getParameter<double>(
"EcalInnerConeSize")),
78 OutConeSize_(conf.getParameter<double>(
"EcalOuterConeSize")),
79 hitCountEthr_(conf.getParameter<double>(
"ECHitCountEnergyThreshold")),
80 hitEthr_(conf.getParameter<double>(
"ECHitEnergyThreshold")),
82 tok_hlt_(consumes<
trigger::TriggerFilterObjectWithRefs>(conf.getParameter<
edm::
InputTag>(
"L1GTSeedLabel"))),
87 produces<reco::IsolatedPixelTrackCandidateCollection>();
125 std::vector<edm::Ref<l1t::TauBxCollection> > l1tauobjref;
126 std::vector<edm::Ref<l1t::JetBxCollection> > l1jetobjref;
131 double ptTriggered = -10;
132 double etaTriggered = -100;
133 double phiTriggered = -100;
138 for (
unsigned int p = 0;
p < l1tauobjref.size();
p++) {
139 if (l1tauobjref[
p]->
pt() > ptTriggered) {
140 ptTriggered = l1tauobjref[
p]->pt();
141 phiTriggered = l1tauobjref[
p]->phi();
142 etaTriggered = l1tauobjref[
p]->eta();
145 for (
unsigned int p = 0;
p < l1jetobjref.size();
p++) {
146 if (l1jetobjref[
p]->
pt() > ptTriggered) {
147 ptTriggered = l1jetobjref[
p]->pt();
148 phiTriggered = l1jetobjref[
p]->phi();
149 etaTriggered = l1jetobjref[
p]->eta();
153 auto iptcCollection = std::make_unique<reco::IsolatedPixelTrackCandidateCollection>();
158 for (l1extra::L1JetParticleCollection::const_iterator tit = l1Taus->begin(); tit != l1Taus->end(); tit++) {
159 double dphi = fabs(tit->phi() - phiTriggered);
161 dphi = 2 *
M_PI - dphi;
162 double Rseed =
sqrt(
pow(etaTriggered - tit->eta(), 2) + dphi * dphi);
167 double OutEnergy = 0;
175 double phihit =
pos.phi();
176 double etahit =
pos.eta();
177 phiD = fabs(phihit - tit->phi());
179 phiD = 2 *
M_PI - phiD;
180 R =
sqrt(
pow(etahit - tit->eta(), 2) + phiD * phiD);
190 OutEnergy += eItr->energy();
193 InEnergy += eItr->energy();
200 double phihit =
pos.phi();
201 double etahit =
pos.eta();
202 phiD = fabs(phihit - tit->phi());
204 phiD = 2 *
M_PI - phiD;
205 R =
sqrt(
pow(etahit - tit->eta(), 2) + phiD * phiD);
213 OutEnergy += eItr->energy();
216 InEnergy += eItr->energy();
224 iptcCollection->push_back(newca);
238 desc.add<
double>(
"ECHitEnergyThreshold", 0.05);
243 desc.add<
double>(
"ECHitCountEnergyThreshold", 0.5);
244 desc.add<
double>(
"EcalInnerConeSize", 0.3);
245 desc.add<
double>(
"EcalOuterConeSize", 0.7);
246 descriptions.
add(
"ecalIsolPartProd",
desc);
Log< level::Info, true > LogVerbatim
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
EcalIsolatedParticleCandidateProducer(const edm::ParameterSet &)
const edm::EDGetTokenT< l1extra::L1JetParticleCollection > tok_l1tau_
std::vector< EcalRecHit >::const_iterator const_iterator
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
const edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
~EcalIsolatedParticleCandidateProducer() override
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
const edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
#define DEFINE_FWK_MODULE(type)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const_iterator begin() const
const double hitCountEthr_
const_iterator end() const
const double OutConeSize_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_hlt_