Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 /* \class MuonRefToBaseSelector
0002  *
0003  * Selects muon with a configurable string-based cut.
0004  * Saves references to the selected muons
0005  *
0006  * \author: Luca Lista, INFN
0007  *
0008  * usage:
0009  *
0010  * module bestMuons = MuonRefToBaseSelector {
0011  *   src = muons
0012  *   string cut = "pt > 20 & abs( eta ) < 2"
0013  * }
0014  *
0015  * for more details about the cut syntax, see the documentation
0016  * page below:
0017  *
0018  *   https://twiki.cern.ch/twiki/bin/view/CMS/SWGuidePhysicsCutParser
0019  *
0020  *
0021  */
0022 
0023 #include "FWCore/Framework/interface/MakerMacros.h"
0024 #include "CommonTools/UtilAlgos/interface/SingleObjectSelector.h"
0025 #include "CommonTools/UtilAlgos/interface/StringCutObjectSelector.h"
0026 #include "DataFormats/MuonReco/interface/Muon.h"
0027 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0028 #include "DataFormats/Common/interface/View.h"
0029 #include "DataFormats/Common/interface/RefToBaseVector.h"
0030 
0031 typedef SingleObjectSelector<edm::View<reco::Muon>, StringCutObjectSelector<reco::Muon>, edm::RefToBaseVector<reco::Muon> >
0032     MuonViewRefSelector;
0033 
0034 DEFINE_FWK_MODULE(MuonViewRefSelector);