47 : src_ (iConfig.getParameter<edm::InputTag>(
"src"))
48 , coneRadius_(iConfig.getParameter<double>(
"radius"))
49 , threshold_ (iConfig.getParameter<double>(
"SumPtFraction"))
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);
IsoTracks(const edm::ParameterSet &iConfig)
#define DEFINE_FWK_MODULE(type)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double deltaR(double eta1, double eta2, double phi1, double phi2)