39 tok_trigcand(consumes<
trigger::TriggerFilterObjectWithRefs>(conf.getParameter<
edm::
InputTag>(
"filterLabel"))),
41 coneSizeEta0_(conf.getParameter<double>(
"EcalConeSizeEta0")),
42 coneSizeEta1_(conf.getParameter<double>(
"EcalConeSizeEta1")),
43 hitCountEthrEB_(conf.getParameter<double>(
"EBHitCountEnergyThreshold")),
44 hitEthrEB_(conf.getParameter<double>(
"EBHitEnergyThreshold")),
45 fachitCountEE_(conf.getParameter<double>(
"EEFacHitCountEnergyThreshold")),
46 hitEthrEE0_(conf.getParameter<double>(
"EEHitEnergyThreshold0")),
47 hitEthrEE1_(conf.getParameter<double>(
"EEHitEnergyThreshold1")),
48 hitEthrEE2_(conf.getParameter<double>(
"EEHitEnergyThreshold2")),
49 hitEthrEE3_(conf.getParameter<double>(
"EEHitEnergyThreshold3")) {
51 produces<reco::IsolatedPixelTrackCandidateCollection>();
61 desc.add<
double>(
"EBHitEnergyThreshold", 0.10);
62 desc.add<
double>(
"EBHitCountEnergyThreshold", 0.5);
63 desc.add<
double>(
"EEHitEnergyThreshold0", -41.0664);
64 desc.add<
double>(
"EEHitEnergyThreshold1", 68.7950);
65 desc.add<
double>(
"EEHitEnergyThreshold2", -38.1483);
66 desc.add<
double>(
"EEHitEnergyThreshold3", 7.04303);
67 desc.add<
double>(
"EEFacHitCountEnergyThreshold", 10.0);
68 desc.add<
double>(
"EcalConeSizeEta0", 0.09);
69 desc.add<
double>(
"EcalConeSizeEta1", 0.14);
70 descriptions.
add(
"isolEcalPixelTrackProd",
desc);
78 edm::LogVerbatim(
"HcalIsoTrack") <<
"==============Inside IsolatedEcalPixelTrackCandidateProducer";
94 std::vector<edm::Ref<reco::IsolatedPixelTrackCandidateCollection> > isoPixTrackRefs;
96 int nCand = isoPixTrackRefs.size();
98 auto iptcCollection = std::make_unique<reco::IsolatedPixelTrackCandidateCollection>();
105 for (
int p = 0;
p < nCand;
p++) {
106 int nhitIn(0), nhitOut(0);
107 double inEnergy(0), outEnergy(0);
108 std::pair<double, double> etaPhi(isoPixTrackRefs[
p]->
track()->
eta(), isoPixTrackRefs[
p]->
track()->
phi());
109 if (isoPixTrackRefs[
p]->etaPhiEcalValid())
110 etaPhi = isoPixTrackRefs[
p]->etaPhiEcal();
111 double etaAbs =
std::abs(etaPhi.first);
114 edm::LogVerbatim(
"HcalIsoTrack") <<
"Track: eta/phi " << etaPhi.first <<
"/" << etaPhi.second
115 <<
" pt:" << isoPixTrackRefs[
p]->track()->pt() <<
" cone " << coneSize_ <<
"\n"
116 <<
"rechit size EB/EE : " << ecalEB->
size() <<
"/" << ecalEE->
size()
117 <<
" coneSize_: " << coneSize_;
121 for (
auto eItr : *(ecalEB.
product())) {
126 inEnergy += (eItr.energy());
131 outEnergy += (eItr.energy());
135 edm::LogVerbatim(
"HcalIsoTrack") <<
"EBRechit close to the track has E " << eItr.energy()
136 <<
" eta/phi: " <<
pos.eta() <<
"/" <<
pos.phi() <<
" deltaR: " <<
R;
143 for (
auto eItr : *(ecalEE.
product())) {
152 inEnergy += (eItr.energy());
156 if (eItr.energy() > hitEthr) {
157 outEnergy += (eItr.energy());
161 edm::LogVerbatim(
"HcalIsoTrack") <<
"EERechit close to the track has E " << eItr.energy()
162 <<
" eta/phi: " <<
pos.eta() <<
"/" <<
pos.phi() <<
" deltaR: " <<
R;
168 edm::LogVerbatim(
"HcalIsoTrack") <<
"nhitIn:" << nhitIn <<
" inEnergy:" << inEnergy <<
" nhitOut:" << nhitOut
169 <<
" outEnergy:" << outEnergy;
176 iptcCollection->push_back(newca);
179 edm::LogVerbatim(
"HcalIsoTrack") <<
"ncand:" << nCand <<
" outcollction size:" << iptcCollection->size();