46 : coneRadius_ ( iConfig.getParameter<double>(
"radius" ) )
47 , threshold_ ( iConfig.getParameter<double>(
"SumPtFraction" ) )
48 , v_recoTrackToken_( consumes< std::vector<
reco::Track> >( iConfig.getParameter<edm::
InputTag>(
"src" ) ) )
50 produces<std::vector<reco::Track> >();
64 std::auto_ptr<std::vector<reco::Track> >
IsoTracks(
new std::vector<reco::Track >);
69 if( dirtyTracks->size() == 0 )
71 iEvent.
put(IsoTracks);
75 std::vector<reco::Track>::const_iterator dirtyTrackIt ;
76 std::vector<reco::Track>::const_iterator dirtyTrackIt2 ;
79 double sumPtInCone = 0 ;
81 for ( dirtyTrackIt = dirtyTracks->begin(); dirtyTrackIt != dirtyTracks->end(); ++dirtyTrackIt ) {
82 for ( dirtyTrackIt2 = dirtyTracks->begin(); dirtyTrackIt2 != dirtyTracks->end(); ++dirtyTrackIt2 ) {
83 if ( dirtyTrackIt == dirtyTrackIt2) continue ;
85 dirtyTrackIt ->
phi() ,
86 dirtyTrackIt2 ->
eta() ,
88 sumPtInCone = sumPtInCone + dirtyTrackIt2 ->
pt() ;
91 if ( sumPtInCone <=
threshold_*(dirtyTrackIt->pt()) ){
92 IsoTracks -> push_back( *dirtyTrackIt ) ;
95 iEvent.
put(IsoTracks);
bool getByToken(EDGetToken token, Handle< PROD > &result) const
IsoTracks(const edm::ParameterSet &iConfig)
#define DEFINE_FWK_MODULE(type)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
edm::EDGetTokenT< std::vector< reco::Track > > v_recoTrackToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
double deltaR(double eta1, double eta2, double phi1, double phi2)
return(e1-e2)*(e1-e2)+dp *dp