40 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::LogInfo(
"HcalIsoTrack") <<
"==============Inside IsolatedEcalPixelTrackCandidateProducer";
96 std::vector<edm::Ref<reco::IsolatedPixelTrackCandidateCollection> > isoPixTrackRefs;
98 int nCand = isoPixTrackRefs.size();
100 auto iptcCollection = std::make_unique<reco::IsolatedPixelTrackCandidateCollection>();
107 for (
int p = 0;
p < nCand;
p++) {
108 int nhitIn(0), nhitOut(0);
109 double inEnergy(0), outEnergy(0);
110 std::pair<double, double> etaPhi(isoPixTrackRefs[
p]->
track()->
eta(), isoPixTrackRefs[
p]->
track()->
phi());
111 if (isoPixTrackRefs[
p]->etaPhiEcalValid())
112 etaPhi = isoPixTrackRefs[
p]->etaPhiEcal();
113 double etaAbs =
std::abs(etaPhi.first);
116 edm::LogInfo(
"HcalIsoTrack") <<
"Track: eta/phi " << etaPhi.first <<
"/" << etaPhi.second
117 <<
" pt:" << isoPixTrackRefs[
p]->track()->pt() <<
" cone " << coneSize_ <<
"\n" 118 <<
"rechit size EB/EE : " << ecalEB->
size() <<
"/" << ecalEE->
size()
119 <<
" coneSize_: " << coneSize_;
123 for (
auto eItr : *(ecalEB.
product())) {
128 inEnergy += (eItr.energy());
133 outEnergy += (eItr.energy());
137 edm::LogInfo(
"HcalIsoTrack") <<
"EBRechit close to the track has E " << eItr.energy()
138 <<
" eta/phi: " << pos.
eta() <<
"/" << pos.
phi() <<
" deltaR: " <<
R;
145 for (
auto eItr : *(ecalEE.
product())) {
154 inEnergy += (eItr.energy());
158 if (eItr.energy() > hitEthr) {
159 outEnergy += (eItr.energy());
163 edm::LogInfo(
"HcalIsoTrack") <<
"EERechit close to the track has E " << eItr.energy()
164 <<
" eta/phi: " << pos.
eta() <<
"/" << pos.
phi() <<
" deltaR: " <<
R;
170 edm::LogInfo(
"HcalIsoTrack") <<
"nhitIn:" << nhitIn <<
" inEnergy:" << inEnergy <<
" nhitOut:" << nhitOut
171 <<
" outEnergy:" << outEnergy;
178 iptcCollection->push_back(newca);
181 edm::LogInfo(
"HcalIsoTrack") <<
"ncand:" << nCand <<
" outcollction size:" << iptcCollection->size();
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const double fachitCountEE_
Geom::Phi< T > phi() const
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.
Abs< T >::type abs(const T &t)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_trigcand
IsolatedEcalPixelTrackCandidateProducer(const edm::ParameterSet &)
T const * product() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
~IsolatedEcalPixelTrackCandidateProducer() override
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
void setEnergyIn(double a)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const double coneSizeEta0_
T const * product() const