131 if(!TKHandle.
isValid() ){
edm::LogError(
"ProduceIsolationMap") <<
"TK Tracks collection not found";
return; }
140 std::vector<HSCPIsolation> IsolationInfoColl(tkTracks->size());
143 for(TrackCollection::const_iterator itTrack = tkTracks->begin(); itTrack != tkTracks->end(); ++itTrack, TkIndex++) {
154 double CountHighPt = 0;
155 for(TrackCollection::const_iterator itTrack2 = TKHandle->begin(); itTrack2 != TKHandle->end(); ++itTrack2){
156 if(fabs(itTrack->pt()-itTrack2->pt())<0.1 && fabs(itTrack->eta()-itTrack2->eta())<0.05)
continue;
157 float dR =
deltaR(itTrack->momentum(), itTrack2->momentum());
159 SumPt+= itTrack2->pt();
164 IsolationInfoColl[TkIndex].Set_TK_CountHighPt(CountHighPt);
165 IsolationInfoColl[TkIndex].Set_TK_Count (Count);
166 IsolationInfoColl[TkIndex].Set_TK_SumEt (SumPt);
169 filler.insert(tkTracks, IsolationInfoColl.begin(), IsolationInfoColl.end());
double coneEnergy(double dR, EnergyType)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< const EcalRecHit * > ecalRecHits
hits in the cone
std::vector< Track > TrackCollection
collection of Tracks
edm::EDGetTokenT< reco::TrackCollection > inputCollectionToken_
edm::EDGetTokenT< reco::TrackCollection > TKToken_
TrackDetectorAssociator trackAssociator_
TrackAssociatorParameters parameters_
std::vector< const HBHERecHit * > hcalRecHits
double deltaR(double eta1, double eta2, double phi1, double phi2)
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)