29 using namespace l1extra;
34 theL1MinPt(iConfig.getParameter<double>(
"L1MinPt")),
35 theL1MaxEta(iConfig.getParameter<double>(
"L1MaxEta")),
36 theL1MinQuality(iConfig.getParameter<unsigned int>(
"L1MinQuality"))
40 produces<L1MuonParticleCollection>();
51 desc.
add<
double>(
"L1MinPt",-1.);
52 desc.
add<
double>(
"L1MaxEta",5.0);
53 desc.
add<
unsigned int>(
"L1MinQuality",0);
54 descriptions.
add(
"hltL1MuonSelector",desc);
66 LogTrace(metname) <<
"Number of muons " << muColl->size() << endl;
68 L1MuonParticleCollection::const_iterator it;
71 for(it = muColl->begin(); it != muColl->end(); ++it,++l1ParticleIndex) {
75 bool valid_charge =
false;;
77 if ( muonCand.
empty() ) {
78 LogWarning(metname) <<
"HLTL1MuonSelector: WARNING, no L1MuGMTCand! " << endl;
79 LogWarning(metname) <<
"HLTL1MuonSelector: this should make sense only within MC tests" << endl;
89 float pt = (*it).pt();
90 float eta = (*it).eta();
92 float phi = (*it).phi();
93 int charge = (*it).charge();
95 if (!valid_charge) charge = 0;
96 bool barrel = !(*it).isForward();
100 LogTrace(metname) <<
"L1 Muon Found";
101 LogTrace(metname) <<
"Pt = " << pt <<
" GeV/c";
103 LogTrace(metname) <<
"theta = " << theta <<
" rad";
104 LogTrace(metname) <<
"phi = " << phi <<
" rad";
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const std::string metname
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > muCollToken_
Geom::Theta< T > theta() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const unsigned theL1MinQuality
bool empty() const
is it an empty muon candidate?
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool charge_valid() const
is the charge valid ?
virtual void produce(edm::Event &, const edm::EventSetup &)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
HLTL1MuonSelector(const edm::ParameterSet &)
Constructor.
unsigned int quality() const
get quality
~HLTL1MuonSelector()
Destructor.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
boost::remove_cv< typename boost::remove_reference< argument_type >::type >::type key_type