102 TKIsolationPtcut_ = iConfig.
getParameter<
double > (
"TkIsolationPtCut");
103 IsolationConeDR_ = iConfig.
getParameter<
double > (
"IsolationConeDR");
109 parameters_.loadParameters( parameters, iC );
110 trackAssociator_.useDefaultPropagator();
113 produces<ValueMap<HSCPIsolation> >();
131 if(!TKHandle.
isValid() ){
edm::LogError(
"ProduceIsolationMap") <<
"TK Tracks collection not found";
return; }
139 iEvent.
getByToken(inputCollectionToken_,tkTracks);
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());
158 if(dR>IsolationConeDR_)
continue;
159 SumPt+= itTrack2->pt();
161 if(itTrack2->pt()<TKIsolationPtcut_)
continue;
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());
T getParameter(std::string const &) const
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
#define DEFINE_FWK_MODULE(type)
std::vector< const EcalRecHit * > ecalRecHits
hits in the cone
void insert(const H &h, I begin, I end)
std::vector< Track > TrackCollection
collection of Tracks
edm::EDGetTokenT< reco::TrackCollection > inputCollectionToken_
ProduceIsolationMap(const edm::ParameterSet &)
edm::EDGetTokenT< reco::TrackCollection > TKToken_
TrackDetectorAssociator trackAssociator_
TrackAssociatorParameters parameters_
std::vector< const HBHERecHit * > hcalRecHits
double deltaR(double eta1, double eta2, double phi1, double phi2)
virtual void produce(edm::Event &, const edm::EventSetup &) override