48 produces< reco::IsolatedPixelTrackCandidateCollection >();
56 std::cout <<
"==============Inside IsolatedEcalPixelTrackCandidateProducer" << std::endl;
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]->etaPhiEcal()) etaPhi = isoPixTrackRefs[
p]->EtaPhiEcal();
87 double etaAbs =
std::abs(etaPhi.first);
90 std::cout <<
"Track: eta/phi " << etaPhi.first <<
"/" << etaPhi.second <<
" pt:" << isoPixTrackRefs[
p]->track()->pt() <<
" cone " << coneSize_ << std::endl;
91 std::cout <<
"rechit size EB/EE : " << ecalEB->size() <<
"/" << ecalEE->size() <<
" coneSize_: " << coneSize_ << std::endl;
99 inEnergy += (eItr->energy());
101 if (eItr->energy() >
hitEthr_) outEnergy += (eItr->energy());
103 std::cout <<
"Rechit Close to the track has energy " << eItr->energy()
104 <<
" eta/phi: " << pos.
eta() <<
"/" << pos.
phi() <<
" deltaR: " << R << std::endl;
115 inEnergy += (eItr->energy());
117 if (eItr->energy() >
hitEthr_) outEnergy += (eItr->energy());
119 std::cout <<
"Rechit Close to the track has energy " << eItr->energy()
120 <<
" eta/phi: " << pos.
eta() <<
"/" << pos.
phi() <<
" deltaR: " << R << std::endl;
126 std::cout <<
"nhitIn:" << nhitIn <<
" inEnergy:" << inEnergy <<
" nhitOut:" << nhitOut <<
" outEnergy:" << outEnergy << std::endl;
133 iptcCollection->push_back(newca);
136 std::cout <<
"ncand:" << nCand <<
" outcollction size:" << iptcCollection->size() << std::endl;
138 std::auto_ptr<reco::IsolatedPixelTrackCandidateCollection> outCollection(iptcCollection);
139 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)
void SetEnergyOut(double a)
void SetEnergyIn(double a)
~IsolatedEcalPixelTrackCandidateProducer()
edm::EDGetTokenT< EcalRecHitCollection > tok_eb
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
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_trigcand
edm::EDGetTokenT< EcalRecHitCollection > tok_ee