Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:01:09

0001 /* \class PtMaxTrackCountFilter
0002  *
0003  * Filters events if at least N tracks below
0004  * a pt cut are present.
0005  *
0006  * \author: Marco Musich
0007  *
0008  */
0009 #include "FWCore/Framework/interface/MakerMacros.h"
0010 #include "DataFormats/TrackReco/interface/Track.h"
0011 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0012 #include "CommonTools/UtilAlgos/interface/ObjectCountFilter.h"
0013 #include "CommonTools/UtilAlgos/interface/PtMaxSelector.h"
0014 
0015 typedef ObjectCountFilter<reco::TrackCollection, PtMaxSelector>::type PtMaxTrackCountFilter;
0016 
0017 template <>
0018 void PtMaxTrackCountFilter::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0019   edm::ParameterSetDescription desc;
0020   desc.add<edm::InputTag>("src", edm::InputTag("tracks"));
0021   desc.add<unsigned int>("minNumber", 1);
0022   desc.add<double>("ptMax", 999.);
0023   desc.add<std::string>("cut", "");
0024   descriptions.add("ptMaxTrackCountFilter", desc);
0025 }
0026 
0027 DEFINE_FWK_MODULE(PtMaxTrackCountFilter);