69 using namespace susybsm;
106 TKIsolationPtcut_ = iConfig.
getParameter<
double > (
"TkIsolationPtCut");
107 IsolationConeDR_ = iConfig.
getParameter<
double > (
"IsolationConeDR");
112 parameters_.loadParameters( parameters );
113 trackAssociator_.useDefaultPropagator();
116 produces<ValueMap<HSCPIsolation> >();
134 if(!TKHandle.isValid() ){
edm::LogError(
"ProduceIsolationMap") <<
"TK Tracks collection not found";
return; }
143 std::vector<HSCPIsolation> IsolationInfoColl(tkTracks->size());
146 for(TrackCollection::const_iterator itTrack = tkTracks->begin(); itTrack != tkTracks->end(); ++itTrack, TkIndex++) {
157 double CountHighPt = 0;
158 for(TrackCollection::const_iterator itTrack2 = TKHandle->begin(); itTrack2 != TKHandle->end(); ++itTrack2){
159 if(fabs(itTrack->pt()-itTrack2->pt())<0.1 && fabs(itTrack->eta()-itTrack2->eta())<0.05)
continue;
160 float dR =
deltaR(itTrack->momentum(), itTrack2->momentum());
161 if(dR>IsolationConeDR_)
continue;
162 SumPt+= itTrack2->pt();
164 if(itTrack2->pt()<TKIsolationPtcut_)
continue;
167 IsolationInfoColl[TkIndex].Set_TK_CountHighPt(CountHighPt);
168 IsolationInfoColl[TkIndex].Set_TK_Count (Count);
169 IsolationInfoColl[TkIndex].Set_TK_SumEt (SumPt);
172 filler.
insert(tkTracks, IsolationInfoColl.begin(), IsolationInfoColl.end());
174 iEvent.
put(trackHSCPIsolMap);
T getParameter(std::string const &) const
double coneEnergy(double dR, EnergyType)
edm::InputTag inputCollection_
#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::InputTag EErecHitsLabel_
ProduceIsolationMap(const edm::ParameterSet &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
TrackDetectorAssociator trackAssociator_
TrackAssociatorParameters parameters_
std::vector< const HBHERecHit * > hcalRecHits
edm::InputTag EBrecHitsLabel_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double deltaR(double eta1, double eta2, double phi1, double phi2)
virtual void produce(edm::Event &, const edm::EventSetup &) override
edm::InputTag HCALrecHitsLabel_