48 produces< reco::IsolatedPixelTrackCandidateCollection >();
56 edm::LogInfo(
"HcalIsoTrack") <<
"==============Inside IsolatedEcalPixelTrackCandidateProducer";
74 std::vector< edm::Ref<reco::IsolatedPixelTrackCandidateCollection> > isoPixTrackRefs;
76 int nCand=isoPixTrackRefs.size();
82 for (
int p=0;
p<nCand;
p++) {
83 int nhitIn(0), nhitOut(0);
84 double inEnergy(0), outEnergy(0);
85 std::pair<double,double> etaPhi(isoPixTrackRefs[
p]->track()->
eta(), isoPixTrackRefs[
p]->track()->
phi());
86 if (isoPixTrackRefs[
p]->etaPhiEcalValid()) etaPhi = isoPixTrackRefs[
p]->etaPhiEcal();
87 double etaAbs =
std::abs(etaPhi.first);
90 edm::LogInfo(
"HcalIsoTrack") <<
"Track: eta/phi " << etaPhi.first <<
"/" << etaPhi.second <<
" pt:" << isoPixTrackRefs[
p]->track()->pt() <<
" cone " << coneSize_ <<
"\n" <<
"rechit size EB/EE : " << ecalEB->size() <<
"/" << ecalEE->size() <<
" coneSize_: " << coneSize_;
98 inEnergy += (eItr->energy());
100 if (eItr->energy() >
hitEthr_) outEnergy += (eItr->energy());
102 edm::LogInfo(
"HcalIsoTrack") <<
"Rechit Close to the track has energy " << eItr->energy() <<
" eta/phi: " << pos.
eta() <<
"/" << pos.
phi() <<
" deltaR: " <<
R;
113 inEnergy += (eItr->energy());
115 if (eItr->energy() >
hitEthr_) outEnergy += (eItr->energy());
117 edm::LogInfo(
"HcalIsoTrack") <<
"Rechit Close to the track has energy " << eItr->energy() <<
" eta/phi: " << pos.
eta() <<
"/" << pos.
phi() <<
" deltaR: " <<
R;
123 edm::LogInfo(
"HcalIsoTrack") <<
"nhitIn:" << nhitIn <<
" inEnergy:" << inEnergy <<
" nhitOut:" << nhitOut <<
" outEnergy:" << outEnergy;
130 iptcCollection->push_back(newca);
133 edm::LogInfo(
"HcalIsoTrack") <<
"ncand:" << nCand <<
" outcollction size:" << iptcCollection->size();
135 std::auto_ptr<reco::IsolatedPixelTrackCandidateCollection> outCollection(iptcCollection);
136 iEvent.
put(outCollection);
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Geom::Phi< T > phi() const
std::vector< EcalRecHit >::const_iterator const_iterator
virtual void produce(edm::Event &, const edm::EventSetup &)
double deltaR(const T1 &t1, const T2 &t2)
~IsolatedEcalPixelTrackCandidateProducer()
edm::EDGetTokenT< EcalRecHitCollection > tok_eb
void setEnergyOut(double a)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Abs< T >::type abs(const T &t)
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
std::vector< IsolatedPixelTrackCandidate > IsolatedPixelTrackCandidateCollection
collectin of IsolatedPixelTrackCandidate objects
IsolatedEcalPixelTrackCandidateProducer(const edm::ParameterSet &)
T const * product() const
void setEnergyIn(double a)
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_trigcand
edm::EDGetTokenT< EcalRecHitCollection > tok_ee