47 : coneRadius_ ( iConfig.getParameter<double>(
"radius" ) )
48 , threshold_ ( iConfig.getParameter<double>(
"SumPtFraction" ) )
49 , v_recoTrackToken_( consumes< std::vector<
reco::Track> >( iConfig.getParameter<edm::InputTag>(
"src" ) ) )
51 produces<std::vector<reco::Track> >();
65 std::auto_ptr<std::vector<reco::Track> >
IsoTracks(
new std::vector<reco::Track >);
70 if( dirtyTracks->size() == 0 )
72 iEvent.
put(IsoTracks);
76 std::vector<reco::Track>::const_iterator dirtyTrackIt ;
77 std::vector<reco::Track>::const_iterator dirtyTrackIt2 ;
80 double sumPtInCone = 0 ;
82 for ( dirtyTrackIt = dirtyTracks->begin(); dirtyTrackIt != dirtyTracks->end(); ++dirtyTrackIt ) {
83 for ( dirtyTrackIt2 = dirtyTracks->begin(); dirtyTrackIt2 != dirtyTracks->end(); ++dirtyTrackIt2 ) {
84 if ( dirtyTrackIt == dirtyTrackIt2) continue ;
86 dirtyTrackIt ->
phi() ,
87 dirtyTrackIt2 ->
eta() ,
89 sumPtInCone = sumPtInCone + dirtyTrackIt2 ->
pt() ;
92 if ( sumPtInCone <=
threshold_*(dirtyTrackIt->pt()) ){
93 IsoTracks -> push_back( *dirtyTrackIt ) ;
96 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