77 tok_trigcand(consumes<
trigger::TriggerFilterObjectWithRefs>(conf.getParameter<
edm::
InputTag>(
"filterLabel"))),
79 coneSizeEta0_(conf.getParameter<double>(
"EcalConeSizeEta0")),
80 coneSizeEta1_(conf.getParameter<double>(
"EcalConeSizeEta1")),
81 hitCountEthrEB_(conf.getParameter<double>(
"EBHitCountEnergyThreshold")),
82 hitEthrEB_(conf.getParameter<double>(
"EBHitEnergyThreshold")),
83 fachitCountEE_(conf.getParameter<double>(
"EEFacHitCountEnergyThreshold")),
84 hitEthrEE0_(conf.getParameter<double>(
"EEHitEnergyThreshold0")),
85 hitEthrEE1_(conf.getParameter<double>(
"EEHitEnergyThreshold1")),
86 hitEthrEE2_(conf.getParameter<double>(
"EEHitEnergyThreshold2")),
87 hitEthrEE3_(conf.getParameter<double>(
"EEHitEnergyThreshold3")) {
89 produces<reco::IsolatedPixelTrackCandidateCollection>();
99 desc.add<
double>(
"EBHitEnergyThreshold", 0.10);
100 desc.add<
double>(
"EBHitCountEnergyThreshold", 0.5);
101 desc.add<
double>(
"EEHitEnergyThreshold0", -41.0664);
102 desc.add<
double>(
"EEHitEnergyThreshold1", 68.7950);
103 desc.add<
double>(
"EEHitEnergyThreshold2", -38.1483);
104 desc.add<
double>(
"EEHitEnergyThreshold3", 7.04303);
105 desc.add<
double>(
"EEFacHitCountEnergyThreshold", 10.0);
106 desc.add<
double>(
"EcalConeSizeEta0", 0.09);
107 desc.add<
double>(
"EcalConeSizeEta1", 0.14);
108 descriptions.
add(
"isolEcalPixelTrackProd",
desc);
116 edm::LogVerbatim(
"HcalIsoTrack") <<
"==============Inside IsolatedEcalPixelTrackCandidateProducer";
128 std::vector<edm::Ref<reco::IsolatedPixelTrackCandidateCollection> > isoPixTrackRefs;
130 int nCand = isoPixTrackRefs.size();
132 auto iptcCollection = std::make_unique<reco::IsolatedPixelTrackCandidateCollection>();
139 for (
int p = 0;
p < nCand;
p++) {
140 int nhitIn(0), nhitOut(0);
141 double inEnergy(0), outEnergy(0);
142 std::pair<double, double> etaPhi(isoPixTrackRefs[
p]->
track()->
eta(), isoPixTrackRefs[
p]->
track()->
phi());
143 if (isoPixTrackRefs[
p]->etaPhiEcalValid())
144 etaPhi = isoPixTrackRefs[
p]->etaPhiEcal();
145 double etaAbs =
std::abs(etaPhi.first);
148 edm::LogVerbatim(
"HcalIsoTrack") <<
"Track: eta/phi " << etaPhi.first <<
"/" << etaPhi.second
149 <<
" pt:" << isoPixTrackRefs[
p]->track()->pt() <<
" cone " << coneSize_ <<
"\n" 150 <<
"rechit size EB/EE : " << ecalEB->
size() <<
"/" << ecalEE->
size()
151 <<
" coneSize_: " << coneSize_;
155 for (
auto eItr : *(ecalEB.
product())) {
160 inEnergy += (eItr.energy());
165 outEnergy += (eItr.energy());
169 edm::LogVerbatim(
"HcalIsoTrack") <<
"EBRechit close to the track has E " << eItr.energy()
170 <<
" eta/phi: " <<
pos.eta() <<
"/" <<
pos.phi() <<
" deltaR: " <<
R;
177 for (
auto eItr : *(ecalEE.
product())) {
186 inEnergy += (eItr.energy());
190 if (eItr.energy() > hitEthr) {
191 outEnergy += (eItr.energy());
195 edm::LogVerbatim(
"HcalIsoTrack") <<
"EERechit close to the track has E " << eItr.energy()
196 <<
" eta/phi: " <<
pos.eta() <<
"/" <<
pos.phi() <<
" deltaR: " <<
R;
202 edm::LogVerbatim(
"HcalIsoTrack") <<
"nhitIn:" << nhitIn <<
" inEnergy:" << inEnergy <<
" nhitOut:" << nhitOut
203 <<
" outEnergy:" << outEnergy;
210 iptcCollection->push_back(newca);
213 edm::LogVerbatim(
"HcalIsoTrack") <<
"ncand:" << nCand <<
" outcollction size:" << iptcCollection->size();
Log< level::Info, true > LogVerbatim
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
const double fachitCountEE_
T const * product() const
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
const double hitCountEthrEB_
const edm::EDGetTokenT< EcalRecHitCollection > tok_eb
const double coneSizeEta1_
const edm::EDGetTokenT< EcalRecHitCollection > tok_ee
void setEnergyOut(double a)
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Abs< T >::type abs(const T &t)
#define DEFINE_FWK_MODULE(type)
bool getData(T &iHolder) const
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_trigcand
IsolatedEcalPixelTrackCandidateProducer(const edm::ParameterSet &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
~IsolatedEcalPixelTrackCandidateProducer() override
void setEnergyIn(double a)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const double coneSizeEta0_