Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-15 23:29:29

0001 /* \class PtMinTrackCountFilter
0002  *
0003  * Filters events if at least N tracks above 
0004  * a pt cut are present.
0005  *
0006  * \author: Antonio Vagnerini, DESY
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/PtMinSelector.h"
0014 
0015 typedef ObjectCountFilter<reco::TrackCollection, PtMinSelector>::type PtMinTrackCountFilter;
0016 
0017 template <>
0018 void PtMinTrackCountFilter::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>("ptMin", 0.);
0023   desc.add<std::string>("cut", "");
0024   descriptions.add("ptMinTrackCountFilter", desc);
0025 }
0026 
0027 DEFINE_FWK_MODULE(PtMinTrackCountFilter);