CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

DTCalibMuonSelection Class Reference

#include <DTCalibMuonSelection.h>

Inheritance diagram for DTCalibMuonSelection:
edm::EDFilter edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 DTCalibMuonSelection (const edm::ParameterSet &)
 ~DTCalibMuonSelection ()

Private Member Functions

virtual void beginJob ()
virtual void endJob ()
virtual bool filter (edm::Event &, const edm::EventSetup &)

Private Attributes

double etaMax
double etaMin
edm::InputTag muonList
double ptMin

Detailed Description

Definition at line 15 of file DTCalibMuonSelection.h.


Constructor & Destructor Documentation

DTCalibMuonSelection::DTCalibMuonSelection ( const edm::ParameterSet iConfig) [explicit]

Definition at line 22 of file DTCalibMuonSelection.cc.

References jptDQMConfig_cff::etaMax, jptDQMConfig_cff::etaMin, edm::ParameterSet::getParameter(), and PtMinSelector_cfg::ptMin.

{
  muonList = iConfig.getParameter<edm::InputTag>("src");
  etaMin = iConfig.getParameter<double>("etaMin");
  etaMax = iConfig.getParameter<double>("etaMax");
  ptMin = iConfig.getParameter<double>("ptMin");
}
DTCalibMuonSelection::~DTCalibMuonSelection ( )

Definition at line 31 of file DTCalibMuonSelection.cc.

{ }

Member Function Documentation

void DTCalibMuonSelection::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDFilter.

Definition at line 66 of file DTCalibMuonSelection.cc.

                                     {
}
void DTCalibMuonSelection::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDFilter.

Definition at line 72 of file DTCalibMuonSelection.cc.

                                   {
}
bool DTCalibMuonSelection::filter ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDFilter.

Definition at line 34 of file DTCalibMuonSelection.cc.

References jptDQMConfig_cff::etaMax, jptDQMConfig_cff::etaMin, edm::Event::getByLabel(), PtMinSelector_cfg::ptMin, and query::result.

{
  bool result = false;

  //Retrieve the muons list
  Handle<MuonCollection> MuHandle;
  iEvent.getByLabel(muonList,MuHandle);

  for (MuonCollection::const_iterator nmuon = MuHandle->begin(); nmuon != MuHandle->end(); ++nmuon) {

    double ptMuon(0.);
    double etaMuon(-999.);

    if(nmuon->isGlobalMuon()){
      ptMuon = nmuon->globalTrack()->pt();
      etaMuon = nmuon->globalTrack()->eta();
    }
    else continue;

    if(ptMuon > ptMin &&etaMuon > etaMin && etaMuon < etaMax){
      result = true;
      break;
    }

  }

  return result;
}

Member Data Documentation

double DTCalibMuonSelection::etaMax [private]

Definition at line 32 of file DTCalibMuonSelection.h.

double DTCalibMuonSelection::etaMin [private]

Definition at line 31 of file DTCalibMuonSelection.h.

Definition at line 29 of file DTCalibMuonSelection.h.

double DTCalibMuonSelection::ptMin [private]

Definition at line 33 of file DTCalibMuonSelection.h.