99 TKIsolationPtcut_ = iConfig.
getParameter<
double>(
"TkIsolationPtCut");
100 IsolationConeDR_ = iConfig.
getParameter<
double>(
"IsolationConeDR");
106 trackAssociator_.useDefaultPropagator();
109 produces<ValueMap<HSCPIsolation> >();
121 iEvent.getByToken(TKToken_, TKHandle);
123 edm::LogError(
"ProduceIsolationMap") <<
"TK Tracks collection not found";
133 iEvent.getByToken(inputCollectionToken_, tkTracks);
134 std::vector<HSCPIsolation> IsolationInfoColl(tkTracks->size());
137 for (TrackCollection::const_iterator itTrack = tkTracks->begin(); itTrack != tkTracks->end(); ++itTrack, TkIndex++) {
141 if (!
info.ecalRecHits.empty()) {
144 if (!
info.hcalRecHits.empty()) {
152 double CountHighPt = 0;
153 for (TrackCollection::const_iterator itTrack2 = TKHandle->begin(); itTrack2 != TKHandle->end(); ++itTrack2) {
154 if (fabs(itTrack->pt() - itTrack2->pt()) < 0.1 && fabs(itTrack->eta() - itTrack2->eta()) < 0.05)
156 float dR =
deltaR(itTrack->momentum(), itTrack2->momentum());
157 if (
dR > IsolationConeDR_)
159 SumPt += itTrack2->pt();
161 if (itTrack2->pt() < TKIsolationPtcut_)
165 IsolationInfoColl[TkIndex].Set_TK_CountHighPt(CountHighPt);
166 IsolationInfoColl[TkIndex].Set_TK_Count(Count);
167 IsolationInfoColl[TkIndex].Set_TK_SumEt(SumPt);
170 filler.insert(tkTracks, IsolationInfoColl.begin(), IsolationInfoColl.end());