CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes | Private Attributes
MuonVPlusJetsIDSelectionFunctor Class Reference

#include <MuonVPlusJetsIDSelectionFunctor.h>

Inheritance diagram for MuonVPlusJetsIDSelectionFunctor:
Selector< pat::Muon >

Public Types

enum  Version_t {
  SUMMER08, FIRSTDATA, SPRING10, FALL10,
  N_VERSIONS, KITQCD
}
 
- Public Types inherited from Selector< pat::Muon >
typedef std::binary_function< pat::Muon, pat::strbitset, bool > base_type
 
typedef std::pair< index_type, size_t > cut_flow_item
 
typedef std::vector< cut_flow_itemcut_flow_map
 
typedef pat::Muon data_type
 
typedef std::map< index_type, double > double_map
 
typedef pat::strbitset::index_type index_type
 
typedef std::map< index_type, int > int_map
 

Public Member Functions

bool fall10Cuts (const pat::Muon &muon, edm::EventBase const &event, pat::strbitset &ret)
 
bool firstDataCuts (const pat::Muon &muon, pat::strbitset &ret)
 
void initialize (Version_t version, double chi2=10.0, double d0=999.0, double ed0=999.0, double sd0=3.0, int nhits=11, int nValidMuonHits=0, double ecalveto=4.0, double hcalveto=6.0, double reliso=0.05, double maxLepZ=1.0, int minPixelHits=1, int minNMatches=1)
 
bool kitQCDCuts (const pat::Muon &muon, edm::EventBase const &event, pat::strbitset &ret)
 
 MuonVPlusJetsIDSelectionFunctor ()
 
 MuonVPlusJetsIDSelectionFunctor (edm::ParameterSet const &parameters, edm::ConsumesCollector &iC)
 
 MuonVPlusJetsIDSelectionFunctor (edm::ParameterSet const &parameters)
 
 MuonVPlusJetsIDSelectionFunctor (Version_t version, double chi2=10.0, double d0=0.2, double ed0=999.0, double sd0=999.0, int nhits=11, int nValidMuonHits=0, double ecalveto=4.0, double hcalveto=6.0, double reliso=0.05, double maxLepZ=1.0, int minPixelHits=1, int minNMatches=1)
 
bool operator() (const pat::Muon &muon, edm::EventBase const &event, pat::strbitset &ret)
 
bool operator() (const pat::Muon &muon, pat::strbitset &ret)
 
bool spring10Cuts (const pat::Muon &muon, edm::EventBase const &event, pat::strbitset &ret)
 
bool summer08Cuts (const pat::Muon &muon, pat::strbitset &ret)
 
- Public Member Functions inherited from Selector< pat::Muon >
void clear (std::string const &s)
 Turn off a given selection cut. More...
 
void clear (index_type const &i)
 
bool considerCut (std::string const &s) const
 consider the cut at index "s" More...
 
bool considerCut (index_type const &i) const
 
int cut (index_type const &i, int val) const
 Access the int cut values at index "s". More...
 
double cut (index_type const &i, double val) const
 Access the double cut values at index "s". More...
 
int cut (std::string s, int val) const
 Access the int cut values at index "s". More...
 
double cut (std::string s, double val) const
 Access the double cut values at index "s". More...
 
pat::strbitset getBitTemplate () const
 Get an empty bitset with the proper names. More...
 
double getPasses (std::string const &s) const
 Return the number of passing cases. More...
 
double getPasses (index_type const &i) const
 
bool ignoreCut (std::string const &s) const
 ignore the cut at index "s" More...
 
bool ignoreCut (index_type const &i) const
 
virtual bool operator() (pat::Muon const &t, pat::strbitset &ret)=0
 This provides the interface for base classes to select objects. More...
 
virtual bool operator() (pat::Muon const &t)
 This provides an alternative signature without the second ret. More...
 
virtual bool operator() (pat::Muon const &t, edm::EventBase const &e, pat::strbitset &ret)
 This provides an alternative signature that includes extra information. More...
 
virtual bool operator() (pat::Muon const &t, edm::EventBase const &e)
 This provides an alternative signature that includes extra information. More...
 
bool operator[] (std::string const &s) const
 
bool operator[] (index_type const &i) const
 
void passCut (pat::strbitset &ret, std::string const &s)
 Passing cuts. More...
 
void passCut (pat::strbitset &ret, index_type const &i)
 
void print (std::ostream &out) const
 Print the cut flow. More...
 
void printActiveCuts (std::ostream &out) const
 Print the cuts being considered. More...
 
virtual void push_back (std::string const &s)
 This is the registration of an individual cut string. More...
 
virtual void push_back (std::string const &s, int cut)
 This is the registration of an individual cut string, with an int cut value. More...
 
virtual void push_back (std::string const &s, double cut)
 This is the registration of an individual cut string, with a double cut value. More...
 
 Selector ()
 Constructor clears the bits. More...
 
void set (std::string const &s, bool val=true)
 Set a given selection cut, on or off. More...
 
void set (index_type const &i, bool val=true)
 
void set (std::string const &s, int cut, bool val=true)
 Set a given selection cut, on or off, and reset int cut value. More...
 
void set (index_type const &i, int cut, bool val=true)
 
void set (std::string const &s, double cut, bool val=true)
 Set a given selection cut, on or off, and reset int cut value. More...
 
void set (index_type const &i, double cut, bool val=true)
 
void setIgnored (pat::strbitset &ret)
 set ignored bits More...
 
void setIgnoredCuts (std::vector< std::string > const &bitsToIgnore)
 set the bits to ignore from a vector More...
 
virtual ~Selector ()
 

Public Attributes

bool verbose_
 

Private Attributes

edm::InputTag beamLineSrc_
 
edm::EDGetTokenT< reco::BeamSpotbeamLineSrcToken_
 
index_type indexChi2_
 
index_type indexD0_
 
index_type indexECalVeto_
 
index_type indexED0_
 
index_type indexHCalVeto_
 
index_type indexLepZ_
 
index_type indexNHits_
 
index_type indexNValMuHits_
 
index_type indexPixHits_
 
index_type indexRelIso_
 
index_type indexSD0_
 
index_type indexStations_
 
edm::InputTag pvSrc_
 
edm::EDGetTokenT< std::vector< reco::Vertex > > pvSrcToken_
 
bool recalcDBFromBSp_
 
Version_t version_
 

Additional Inherited Members

- Protected Attributes inherited from Selector< pat::Muon >
pat::strbitset bits_
 the bitset indexed by strings More...
 
cut_flow_map cutFlow_
 map of cut flows in "human" order More...
 
double_map doubleCuts_
 the double-value cut map More...
 
int_map intCuts_
 the int-value cut map More...
 
pat::strbitset retInternal_
 internal ret if users don't care about return bits More...
 

Detailed Description

Definition at line 17 of file MuonVPlusJetsIDSelectionFunctor.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

MuonVPlusJetsIDSelectionFunctor::MuonVPlusJetsIDSelectionFunctor ( )
inline

Definition at line 25 of file MuonVPlusJetsIDSelectionFunctor.h.

25 {}
MuonVPlusJetsIDSelectionFunctor::MuonVPlusJetsIDSelectionFunctor ( edm::ParameterSet const &  parameters,
edm::ConsumesCollector iC 
)
inline
MuonVPlusJetsIDSelectionFunctor::MuonVPlusJetsIDSelectionFunctor ( edm::ParameterSet const &  parameters)
inline

Definition at line 36 of file MuonVPlusJetsIDSelectionFunctor.h.

References gather_cfg::cout, Exception, edm::ParameterSet::exists(), FALL10, FIRSTDATA, Selector< pat::Muon >::getBitTemplate(), edm::ParameterSet::getParameter(), initialize(), KITQCD, N_VERSIONS, pvSrc_, recalcDBFromBSp_, Selector< pat::Muon >::retInternal_, Selector< pat::Muon >::setIgnoredCuts(), SPRING10, AlCaHLTBitMon_QueryRunRegistry::string, SUMMER08, and jetIDSelector_cfi::version.

36  {
37 
38  verbose_ = false;
39 
40  std::string versionStr = parameters.getParameter<std::string>("version");
41 
43 
44  if ( versionStr == "SUMMER08" ) {
45  version = SUMMER08;
46  }
47  else if ( versionStr == "FIRSTDATA" ) {
48  version = FIRSTDATA;
49  }
50  else if ( versionStr == "SPRING10" ) {
51  version = SPRING10;
52  }
53  else if ( versionStr == "FALL10" ) {
54  version = FALL10;
55  if (verbose_) std::cout << "\nMUON SELECTION - you are using FALL10 Selection" << std::endl;
56  }
57  else if (versionStr == "KITQCD") {
58  version = KITQCD;
59  if (verbose_) std::cout << "\nMUON SELECTION - you are using KITQCD Selection" << std::endl;
60  }
61  else {
62  throw cms::Exception("InvalidInput") << "Expect version to be one of SUMMER08, FIRSTDATA, SPRING10, FALL10" << std::endl;
63  }
64 
65  initialize( version,
66  parameters.getParameter<double>("Chi2"),
67  parameters.getParameter<double>("D0") ,
68  parameters.getParameter<double>("ED0") ,
69  parameters.getParameter<double>("SD0") ,
70  parameters.getParameter<int> ("NHits") ,
71  parameters.getParameter<int> ("NValMuHits"),
72  parameters.getParameter<double>("ECalVeto") ,
73  parameters.getParameter<double>("HCalVeto") ,
74  parameters.getParameter<double>("RelIso"),
75  parameters.getParameter<double>("LepZ"),
76  parameters.getParameter<int>("nPixelHits"),
77  parameters.getParameter<int>("nMatchedStations")
78  );
79  if ( parameters.exists("cutsToIgnore") )
80  setIgnoredCuts( parameters.getParameter<std::vector<std::string> >("cutsToIgnore") );
81 
83 
84  recalcDBFromBSp_ = parameters.getParameter<bool>("RecalcFromBeamSpot");
85  pvSrc_ = parameters.getParameter<edm::InputTag>("pvSrc");
86  }
void initialize(Version_t version, double chi2=10.0, double d0=999.0, double ed0=999.0, double sd0=3.0, int nhits=11, int nValidMuonHits=0, double ecalveto=4.0, double hcalveto=6.0, double reliso=0.05, double maxLepZ=1.0, int minPixelHits=1, int minNMatches=1)
pat::strbitset retInternal_
internal ret if users don&#39;t care about return bits
Definition: Selector.h:287
pat::strbitset getBitTemplate() const
Get an empty bitset with the proper names.
Definition: Selector.h:212
void setIgnoredCuts(std::vector< std::string > const &bitsToIgnore)
set the bits to ignore from a vector
Definition: Selector.h:167
MuonVPlusJetsIDSelectionFunctor::MuonVPlusJetsIDSelectionFunctor ( Version_t  version,
double  chi2 = 10.0,
double  d0 = 0.2,
double  ed0 = 999.0,
double  sd0 = 999.0,
int  nhits = 11,
int  nValidMuonHits = 0,
double  ecalveto = 4.0,
double  hcalveto = 6.0,
double  reliso = 0.05,
double  maxLepZ = 1.0,
int  minPixelHits = 1,
int  minNMatches = 1 
)
inline

Definition at line 89 of file MuonVPlusJetsIDSelectionFunctor.h.

References HiEvtPlane_cfi::chi2, allConversions_cfi::d0, Selector< pat::Muon >::getBitTemplate(), initialize(), lostTracks_cfi::minPixelHits, nhits, and Selector< pat::Muon >::retInternal_.

102  : recalcDBFromBSp_(false) {
103  initialize( version, chi2, d0, ed0, sd0, nhits, nValidMuonHits, ecalveto, hcalveto, reliso,
104  maxLepZ, minPixelHits, minNMatches );
105 
107  }
void initialize(Version_t version, double chi2=10.0, double d0=999.0, double ed0=999.0, double sd0=3.0, int nhits=11, int nValidMuonHits=0, double ecalveto=4.0, double hcalveto=6.0, double reliso=0.05, double maxLepZ=1.0, int minPixelHits=1, int minNMatches=1)
pat::strbitset retInternal_
internal ret if users don&#39;t care about return bits
Definition: Selector.h:287
pat::strbitset getBitTemplate() const
Get an empty bitset with the proper names.
Definition: Selector.h:212

Member Function Documentation

bool MuonVPlusJetsIDSelectionFunctor::fall10Cuts ( const pat::Muon muon,
edm::EventBase const &  event,
pat::strbitset ret 
)
inline

Definition at line 378 of file MuonVPlusJetsIDSelectionFunctor.h.

References beamLineSrc_, ecalDrivenElectronSeedsParameters_cff::beamSpot, reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthY(), Selector< pat::Muon >::cut(), pat::Muon::dB(), pat::Muon::ecalIso(), pat::Muon::edB(), reco::MuonIsolation::emVetoEt, Exception, pat::Muon::globalTrack(), reco::MuonIsolation::hadVetoEt, pat::Muon::hcalIso(), Selector< pat::Muon >::ignoreCut(), indexChi2_, indexD0_, indexECalVeto_, indexED0_, indexHCalVeto_, indexLepZ_, indexNHits_, indexNValMuHits_, indexPixHits_, indexRelIso_, indexSD0_, indexStations_, susybsm::HSCParticleType::innerTrack, pat::Muon::innerTrack(), reco::Muon::isolationR03(), edm::HandleBase::isValid(), nhits, pat::Muon::normChi2(), reco::Muon::numberOfMatches(), pat::Muon::numberOfValidHits(), Selector< pat::Muon >::passCut(), EnergyCorrector::pt, reco::LeafCandidate::pt(), pvSrc_, recalcDBFromBSp_, objects.autophobj::relIso, pat::strbitset::set(), Selector< pat::Muon >::setIgnored(), mathSSE::sqrt(), pat::Muon::trackIso(), reco::LeafCandidate::vertex(), reco::BeamSpot::x0(), reco::BeamSpot::y0(), and reco::BeamSpot::z0().

Referenced by operator()().

379  {
380 
381  ret.set(false);
382 
383  double norm_chi2 = muon.normChi2();
384  double corr_d0 = muon.dB();
385  double corr_ed0 = muon.edB();
386  double corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
387 
388  // Get the PV for the muon z requirement
390  event.getByLabel( pvSrc_, pvtxHandle_ );
391 
392  double zvtx = -999;
393  if ( pvtxHandle_->size() > 0 ) {
394  zvtx = pvtxHandle_->at(0).z();
395  } else {
396  throw cms::Exception("InvalidInput") << " There needs to be at least one primary vertex in the event." << std::endl;
397  }
398 
399  //If required, recalculate the impact parameter using the beam spot
400  if (recalcDBFromBSp_) {
401 
402  //Get the beam spot
403  reco::TrackBase::Point beamPoint(0,0,0);
405  edm::Handle<reco::BeamSpot> beamSpotHandle;
406  event.getByLabel(beamLineSrc_, beamSpotHandle);
407 
408  if( beamSpotHandle.isValid() ){
409  beamSpot = *beamSpotHandle;
410  } else{
411  edm::LogError("DataNotAvailable")
412  << "No beam spot available from EventSetup, not adding high level selection \n";
413  }
414  beamPoint = reco::TrackBase::Point ( beamSpot.x0(), beamSpot.y0(), beamSpot.z0() );
415 
416  //Use the beamspot to correct the impact parameter and uncertainty
418  if ( innerTrack.isNonnull() && innerTrack.isAvailable() ) {
419  corr_d0 = -1.0 * innerTrack->dxy( beamPoint );
420  corr_ed0 = sqrt( innerTrack->d0Error() * innerTrack->d0Error()
421  + 0.5* beamSpot.BeamWidthX()*beamSpot.BeamWidthX()
422  + 0.5* beamSpot.BeamWidthY()*beamSpot.BeamWidthY() );
423  corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
424 
425  } else {
426  corr_d0 = 999.;
427  corr_ed0 = 999.;
428  }
429  }
430 
431  int nhits = static_cast<int>( muon.numberOfValidHits() );
432  int nValidMuonHits = static_cast<int> (muon.globalTrack()->hitPattern().numberOfValidMuonHits());
433 
434  double ecalVeto = muon.isolationR03().emVetoEt;
435  double hcalVeto = muon.isolationR03().hadVetoEt;
436 
437  double hcalIso = muon.hcalIso();
438  double ecalIso = muon.ecalIso();
439  double trkIso = muon.trackIso();
440  double pt = muon.pt() ;
441 
442  double relIso = (ecalIso + hcalIso + trkIso) / pt;
443 
444 
445  double z_mu = muon.vertex().z();
446 
447  int nPixelHits = muon.innerTrack()->hitPattern().pixelLayersWithMeasurement();
448 
449  int nMatchedStations = muon.numberOfMatches();
450 
451  if ( norm_chi2 < cut(indexChi2_, double()) || ignoreCut(indexChi2_) ) passCut(ret, indexChi2_ );
452  if ( fabs(corr_d0) < cut(indexD0_, double()) || ignoreCut(indexD0_) ) passCut(ret, indexD0_ );
453  if ( fabs(corr_ed0)< cut(indexED0_, double()) || ignoreCut(indexED0_) ) passCut(ret, indexED0_ );
454  if ( fabs(corr_sd0)< cut(indexSD0_, double()) || ignoreCut(indexSD0_) ) passCut(ret, indexSD0_ );
455  if ( nhits >= cut(indexNHits_, int() ) || ignoreCut(indexNHits_) ) passCut(ret, indexNHits_ );
456  if ( nValidMuonHits> cut(indexNValMuHits_,int()) || ignoreCut(indexNValMuHits_)) passCut(ret, indexNValMuHits_ );
457  if ( hcalVeto < cut(indexHCalVeto_,double())|| ignoreCut(indexHCalVeto_)) passCut(ret, indexHCalVeto_);
458  if ( ecalVeto < cut(indexECalVeto_,double())|| ignoreCut(indexECalVeto_)) passCut(ret, indexECalVeto_);
459  if ( relIso < cut(indexRelIso_, double()) || ignoreCut(indexRelIso_) ) passCut(ret, indexRelIso_ );
460  if ( fabs(z_mu-zvtx)< cut(indexLepZ_, double()) || ignoreCut(indexLepZ_) ) passCut(ret, indexLepZ_ );
461  if ( nPixelHits > cut(indexPixHits_,int()) || ignoreCut(indexPixHits_)) passCut(ret, indexPixHits_);
462  if ( nMatchedStations> cut(indexStations_,int()) || ignoreCut(indexStations_)) passCut(ret, indexStations_);
463 
464  setIgnored(ret);
465 
466  return (bool)ret;
467  }
virtual double pt() const final
transverse momentum
double z0() const
z coordinate
Definition: BeamSpot.h:68
float ecalIso() const
Definition: Muon.h:174
reco::TrackRef innerTrack() const
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
Definition: Muon.h:72
virtual const Point & vertex() const
vertex position (overwritten by PF...)
float hadVetoEt
hcal sum-et in the veto region in r-phi
Definition: MuonIsolation.h:15
double dB(IPTYPE type) const
void setIgnored(pat::strbitset &ret)
set ignored bits
Definition: Selector.h:224
float trackIso() const
Definition: Muon.h:170
float hcalIso() const
Definition: Muon.h:178
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
Definition: Selector.h:176
T sqrt(T t)
Definition: SSEVec.h:18
bool ignoreCut(std::string const &s) const
ignore the cut at index "s"
Definition: Selector.h:159
double BeamWidthX() const
beam width X
Definition: BeamSpot.h:86
math::XYZPoint Point
point in the space
Definition: TrackBase.h:83
bool isValid() const
Definition: HandleBase.h:74
double edB(IPTYPE type) const
reco::TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon) ...
Definition: Muon.h:80
float emVetoEt
ecal sum-et in the veto region in r-phi
Definition: MuonIsolation.h:14
strbitset & set(bool val=true)
set method of all bits
Definition: strbitset.h:144
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:88
int numberOfMatches(ArbitrationType type=SegmentAndTrackArbitration) const
get number of chambers with matched segments
double y0() const
y coordinate
Definition: BeamSpot.h:66
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
const MuonIsolation & isolationR03() const
Definition: Muon.h:162
int cut(index_type const &i, int val) const
Access the int cut values at index "s".
Definition: Selector.h:194
double x0() const
x coordinate
Definition: BeamSpot.h:64
bool MuonVPlusJetsIDSelectionFunctor::firstDataCuts ( const pat::Muon muon,
pat::strbitset ret 
)
inline

Definition at line 268 of file MuonVPlusJetsIDSelectionFunctor.h.

References Selector< pat::Muon >::cut(), pat::Muon::dB(), pat::Muon::ecalIso(), pat::Muon::edB(), reco::MuonIsolation::emVetoEt, reco::MuonIsolation::hadVetoEt, pat::Muon::hcalIso(), Selector< pat::Muon >::ignoreCut(), indexChi2_, indexD0_, indexECalVeto_, indexED0_, indexHCalVeto_, indexNHits_, indexRelIso_, indexSD0_, reco::Muon::isolationR03(), nhits, pat::Muon::normChi2(), pat::Muon::numberOfValidHits(), Selector< pat::Muon >::passCut(), EnergyCorrector::pt, reco::LeafCandidate::pt(), objects.autophobj::relIso, pat::strbitset::set(), Selector< pat::Muon >::setIgnored(), and pat::Muon::trackIso().

Referenced by operator()().

269  {
270 
271  ret.set(false);
272 
273  double norm_chi2 = muon.normChi2();
274  double corr_d0 = muon.dB();
275  double corr_ed0 = muon.edB();
276  double corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
277  int nhits = static_cast<int>( muon.numberOfValidHits() );
278 
279  double ecalVeto = muon.isolationR03().emVetoEt;
280  double hcalVeto = muon.isolationR03().hadVetoEt;
281 
282  double hcalIso = muon.hcalIso();
283  double ecalIso = muon.ecalIso();
284  double trkIso = muon.trackIso();
285  double pt = muon.pt() ;
286 
287  double relIso = (ecalIso + hcalIso + trkIso) / pt;
288 
289  if ( norm_chi2 < cut(indexChi2_, double()) || ignoreCut(indexChi2_) ) passCut(ret, indexChi2_ );
290  if ( fabs(corr_d0) < cut(indexD0_, double()) || ignoreCut(indexD0_) ) passCut(ret, indexD0_ );
291  if ( fabs(corr_ed0)< cut(indexED0_, double()) || ignoreCut(indexED0_) ) passCut(ret, indexED0_ );
292  if ( fabs(corr_sd0)< cut(indexSD0_, double()) || ignoreCut(indexSD0_) ) passCut(ret, indexSD0_ );
293  if ( nhits >= cut(indexNHits_, int() ) || ignoreCut(indexNHits_) ) passCut(ret, indexNHits_ );
294  if ( hcalVeto < cut(indexHCalVeto_,double())|| ignoreCut(indexHCalVeto_)) passCut(ret, indexHCalVeto_);
295  if ( ecalVeto < cut(indexECalVeto_,double())|| ignoreCut(indexECalVeto_)) passCut(ret, indexECalVeto_);
296  if ( relIso < cut(indexRelIso_, double()) || ignoreCut(indexRelIso_) ) passCut(ret, indexRelIso_ );
297 
298  setIgnored(ret);
299 
300  return (bool)ret;
301  }
virtual double pt() const final
transverse momentum
float ecalIso() const
Definition: Muon.h:174
float hadVetoEt
hcal sum-et in the veto region in r-phi
Definition: MuonIsolation.h:15
double dB(IPTYPE type) const
void setIgnored(pat::strbitset &ret)
set ignored bits
Definition: Selector.h:224
float trackIso() const
Definition: Muon.h:170
float hcalIso() const
Definition: Muon.h:178
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
Definition: Selector.h:176
bool ignoreCut(std::string const &s) const
ignore the cut at index "s"
Definition: Selector.h:159
double edB(IPTYPE type) const
float emVetoEt
ecal sum-et in the veto region in r-phi
Definition: MuonIsolation.h:14
strbitset & set(bool val=true)
set method of all bits
Definition: strbitset.h:144
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
const MuonIsolation & isolationR03() const
Definition: Muon.h:162
int cut(index_type const &i, int val) const
Access the int cut values at index "s".
Definition: Selector.h:194
void MuonVPlusJetsIDSelectionFunctor::initialize ( Version_t  version,
double  chi2 = 10.0,
double  d0 = 999.0,
double  ed0 = 999.0,
double  sd0 = 3.0,
int  nhits = 11,
int  nValidMuonHits = 0,
double  ecalveto = 4.0,
double  hcalveto = 6.0,
double  reliso = 0.05,
double  maxLepZ = 1.0,
int  minPixelHits = 1,
int  minNMatches = 1 
)
inline

Definition at line 112 of file MuonVPlusJetsIDSelectionFunctor.h.

References Selector< pat::Muon >::bits_, HiEvtPlane_cfi::chi2, allConversions_cfi::d0, FALL10, funct::false, FIRSTDATA, indexChi2_, indexD0_, indexECalVeto_, indexED0_, indexHCalVeto_, indexLepZ_, indexNHits_, indexNValMuHits_, indexPixHits_, indexRelIso_, indexSD0_, indexStations_, lostTracks_cfi::minPixelHits, nhits, Selector< pat::Muon >::push_back(), SPRING10, SUMMER08, jetIDSelector_cfi::version, and version_.

Referenced by MuonVPlusJetsIDSelectionFunctor().

125  {
126  version_ = version;
127 
128  push_back("Chi2", chi2 );
129  push_back("D0", d0 );
130  push_back("ED0", ed0 );
131  push_back("SD0", sd0 );
132  push_back("NHits", nhits );
133  push_back("NValMuHits", nValidMuonHits );
134  push_back("ECalVeto", ecalveto);
135  push_back("HCalVeto", hcalveto);
136  push_back("RelIso", reliso );
137  push_back("LepZ", maxLepZ);
138  push_back("nPixelHits",minPixelHits);
139  push_back("nMatchedStations", minNMatches);
140 
141  set("Chi2");
142  set("D0");
143  set("ED0");
144  set("SD0");
145  set("NHits");
146  set("NValMuHits");
147  set("ECalVeto");
148  set("HCalVeto");
149  set("RelIso");
150  set("LepZ");
151  set("nPixelHits");
152  set("nMatchedStations");
153 
154  indexChi2_ = index_type(&bits_, "Chi2" );
155  indexD0_ = index_type(&bits_, "D0" );
156  indexED0_ = index_type(&bits_, "ED0" );
157  indexSD0_ = index_type(&bits_, "SD0" );
158  indexNHits_ = index_type(&bits_, "NHits" );
159  indexNValMuHits_ = index_type(&bits_, "NValMuHits" );
160  indexECalVeto_ = index_type(&bits_, "ECalVeto" );
161  indexHCalVeto_ = index_type(&bits_, "HCalVeto" );
162  indexRelIso_ = index_type(&bits_, "RelIso" );
163  indexLepZ_ = index_type( &bits_, "LepZ");
164  indexPixHits_ = index_type( &bits_, "nPixelHits");
165  indexStations_ = index_type( &bits_, "nMatchedStations");
166 
167  if ( version == FALL10) {
168  set("ED0", false );
169  set("SD0", false);
170  set("ECalVeto",false);
171  set("HCalVeto",false);
172  } else if ( version == SPRING10) {
173  set("ED0", false );
174  set("SD0", false);
175  set("ECalVeto",false);
176  set("HCalVeto",false);
177  set("LepZ", false);
178  set("nPixelHits", false);
179  set("nMatchedStations", false);
180  } else if ( version_ == FIRSTDATA ) {
181  set("D0", false );
182  set("ED0", false );
183  set("NValMuHits",false);
184  set("LepZ", false);
185  set("nPixelHits", false);
186  set("nMatchedStations", false);
187  } else if (version == SUMMER08 ) {
188  set("SD0", false);
189  set("NValMuHits",false);
190  set("LepZ", false);
191  set("nPixelHits", false);
192  set("nMatchedStations", false);
193 
194  }
195 
196  }
pat::strbitset::index_type index_type
Definition: Selector.h:29
pat::strbitset bits_
the bitset indexed by strings
Definition: Selector.h:286
virtual void push_back(std::string const &s)
This is the registration of an individual cut string.
Definition: Selector.h:46
bool MuonVPlusJetsIDSelectionFunctor::kitQCDCuts ( const pat::Muon muon,
edm::EventBase const &  event,
pat::strbitset ret 
)
inline

Definition at line 474 of file MuonVPlusJetsIDSelectionFunctor.h.

References beamLineSrc_, ecalDrivenElectronSeedsParameters_cff::beamSpot, reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthY(), Selector< pat::Muon >::cut(), pat::Muon::dB(), pat::Muon::ecalIso(), pat::Muon::edB(), reco::MuonIsolation::emVetoEt, Exception, pat::Muon::globalTrack(), reco::MuonIsolation::hadVetoEt, pat::Muon::hcalIso(), Selector< pat::Muon >::ignoreCut(), indexChi2_, indexD0_, indexECalVeto_, indexED0_, indexHCalVeto_, indexLepZ_, indexNHits_, indexNValMuHits_, indexPixHits_, indexRelIso_, indexSD0_, indexStations_, susybsm::HSCParticleType::innerTrack, pat::Muon::innerTrack(), reco::Muon::isolationR03(), edm::HandleBase::isValid(), nhits, pat::Muon::normChi2(), reco::Muon::numberOfMatches(), pat::Muon::numberOfValidHits(), Selector< pat::Muon >::passCut(), EnergyCorrector::pt, reco::LeafCandidate::pt(), pvSrc_, recalcDBFromBSp_, objects.autophobj::relIso, pat::strbitset::set(), Selector< pat::Muon >::setIgnored(), mathSSE::sqrt(), pat::Muon::trackIso(), reco::LeafCandidate::vertex(), reco::BeamSpot::x0(), reco::BeamSpot::y0(), and reco::BeamSpot::z0().

Referenced by operator()().

475  {
476 
477  ret.set(false);
478 
479  double norm_chi2 = muon.normChi2();
480  double corr_d0 = muon.dB();
481  double corr_ed0 = muon.edB();
482  double corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
483 
484  // Get the PV for the muon z requirement
486  event.getByLabel( pvSrc_, pvtxHandle_ );
487 
488  double zvtx = -999;
489  if ( pvtxHandle_->size() > 0 ) {
490  zvtx = pvtxHandle_->at(0).z();
491  } else {
492  throw cms::Exception("InvalidInput") << " There needs to be at least one primary vertex in the event." << std::endl;
493  }
494 
495  //If required, recalculate the impact parameter using the beam spot
496  if (recalcDBFromBSp_) {
497 
498  //Get the beam spot
499  reco::TrackBase::Point beamPoint(0,0,0);
501  edm::Handle<reco::BeamSpot> beamSpotHandle;
502  event.getByLabel(beamLineSrc_, beamSpotHandle);
503 
504  if( beamSpotHandle.isValid() ){
505  beamSpot = *beamSpotHandle;
506  } else{
507  edm::LogError("DataNotAvailable")
508  << "No beam spot available from EventSetup, not adding high level selection \n";
509  }
510  beamPoint = reco::TrackBase::Point ( beamSpot.x0(), beamSpot.y0(), beamSpot.z0() );
511 
512  //Use the beamspot to correct the impact parameter and uncertainty
514  if ( innerTrack.isNonnull() && innerTrack.isAvailable() ) {
515  corr_d0 = -1.0 * innerTrack->dxy( beamPoint );
516  corr_ed0 = sqrt( innerTrack->d0Error() * innerTrack->d0Error()
517  + 0.5* beamSpot.BeamWidthX()*beamSpot.BeamWidthX()
518  + 0.5* beamSpot.BeamWidthY()*beamSpot.BeamWidthY() );
519  corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
520 
521  } else {
522  corr_d0 = 999.;
523  corr_ed0 = 999.;
524  }
525  }
526 
527  int nhits = static_cast<int>( muon.numberOfValidHits() );
528  int nValidMuonHits = static_cast<int> (muon.globalTrack()->hitPattern().numberOfValidMuonHits());
529 
530  double ecalVeto = muon.isolationR03().emVetoEt;
531  double hcalVeto = muon.isolationR03().hadVetoEt;
532 
533  double hcalIso = muon.hcalIso();
534  double ecalIso = muon.ecalIso();
535  double trkIso = muon.trackIso();
536  double pt = muon.pt() ;
537 
538  double relIso = (ecalIso + hcalIso + trkIso) / pt;
539 
540 
541  double z_mu = muon.vertex().z();
542 
543  int nPixelHits = muon.innerTrack()->hitPattern().pixelLayersWithMeasurement();
544 
545  int nMatchedStations = muon.numberOfMatches();
546 
547  if ( norm_chi2 < cut(indexChi2_, double()) || ignoreCut(indexChi2_) ) passCut(ret, indexChi2_ );
548  if ( fabs(corr_d0) < cut(indexD0_, double()) || ignoreCut(indexD0_) ) passCut(ret, indexD0_ );
549  if ( fabs(corr_ed0)< cut(indexED0_, double()) || ignoreCut(indexED0_) ) passCut(ret, indexED0_ );
550  if ( fabs(corr_sd0)< cut(indexSD0_, double()) || ignoreCut(indexSD0_) ) passCut(ret, indexSD0_ );
551  if ( nhits >= cut(indexNHits_, int() ) || ignoreCut(indexNHits_) ) passCut(ret, indexNHits_ );
552  if ( nValidMuonHits> cut(indexNValMuHits_,int()) || ignoreCut(indexNValMuHits_)) passCut(ret, indexNValMuHits_ );
553  if ( hcalVeto < cut(indexHCalVeto_,double())|| ignoreCut(indexHCalVeto_)) passCut(ret, indexHCalVeto_);
554  if ( ecalVeto < cut(indexECalVeto_,double())|| ignoreCut(indexECalVeto_)) passCut(ret, indexECalVeto_);
555  if ( fabs(z_mu-zvtx)< cut(indexLepZ_, double()) || ignoreCut(indexLepZ_) ) passCut(ret, indexLepZ_ );
556  if ( nPixelHits > cut(indexPixHits_,int()) || ignoreCut(indexPixHits_)) passCut(ret, indexPixHits_);
557  if ( nMatchedStations> cut(indexStations_,int()) || ignoreCut(indexStations_)) passCut(ret, indexStations_);
558 
559 
561  //
562  // JMS Dec 13 2010
563  // HACK
564  // Need double-sided relIso cut to implement data-driven QCD
565  //
566  //
568  if ( ((relIso > 0.2) && (relIso < 0.75))
570 
571 
572 
573 
574  setIgnored(ret);
575 
576  return (bool)ret;
577  }
virtual double pt() const final
transverse momentum
double z0() const
z coordinate
Definition: BeamSpot.h:68
float ecalIso() const
Definition: Muon.h:174
reco::TrackRef innerTrack() const
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
Definition: Muon.h:72
virtual const Point & vertex() const
vertex position (overwritten by PF...)
float hadVetoEt
hcal sum-et in the veto region in r-phi
Definition: MuonIsolation.h:15
double dB(IPTYPE type) const
void setIgnored(pat::strbitset &ret)
set ignored bits
Definition: Selector.h:224
float trackIso() const
Definition: Muon.h:170
float hcalIso() const
Definition: Muon.h:178
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
Definition: Selector.h:176
T sqrt(T t)
Definition: SSEVec.h:18
bool ignoreCut(std::string const &s) const
ignore the cut at index "s"
Definition: Selector.h:159
double BeamWidthX() const
beam width X
Definition: BeamSpot.h:86
math::XYZPoint Point
point in the space
Definition: TrackBase.h:83
bool isValid() const
Definition: HandleBase.h:74
double edB(IPTYPE type) const
reco::TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon) ...
Definition: Muon.h:80
float emVetoEt
ecal sum-et in the veto region in r-phi
Definition: MuonIsolation.h:14
strbitset & set(bool val=true)
set method of all bits
Definition: strbitset.h:144
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:88
int numberOfMatches(ArbitrationType type=SegmentAndTrackArbitration) const
get number of chambers with matched segments
double y0() const
y coordinate
Definition: BeamSpot.h:66
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
const MuonIsolation & isolationR03() const
Definition: Muon.h:162
int cut(index_type const &i, int val) const
Access the int cut values at index "s".
Definition: Selector.h:194
double x0() const
x coordinate
Definition: BeamSpot.h:64
bool MuonVPlusJetsIDSelectionFunctor::operator() ( const pat::Muon muon,
edm::EventBase const &  event,
pat::strbitset ret 
)
inline

Definition at line 199 of file MuonVPlusJetsIDSelectionFunctor.h.

References gather_cfg::cout, FALL10, fall10Cuts(), FIRSTDATA, firstDataCuts(), kitQCDCuts(), SPRING10, spring10Cuts(), SUMMER08, summer08Cuts(), and version_.

200  {
201 
202  if (version_ == FALL10 ) return fall10Cuts(muon, event, ret);
203  else if (version_ == SPRING10 ) return spring10Cuts(muon, event, ret);
204  else if ( version_ == SUMMER08 ) return summer08Cuts( muon, ret );
205  else if ( version_ == FIRSTDATA ) return firstDataCuts( muon, ret );
206  else if ( version_ == KITQCD ) {
207  if (verbose_) std::cout << "Calling KIT selection method" << std::endl;
208  return kitQCDCuts (muon, event, ret);
209  }
210  else {
211  return false;
212  }
213  }
bool fall10Cuts(const pat::Muon &muon, edm::EventBase const &event, pat::strbitset &ret)
bool firstDataCuts(const pat::Muon &muon, pat::strbitset &ret)
bool summer08Cuts(const pat::Muon &muon, pat::strbitset &ret)
bool spring10Cuts(const pat::Muon &muon, edm::EventBase const &event, pat::strbitset &ret)
bool kitQCDCuts(const pat::Muon &muon, edm::EventBase const &event, pat::strbitset &ret)
Definition: event.py:1
bool MuonVPlusJetsIDSelectionFunctor::operator() ( const pat::Muon muon,
pat::strbitset ret 
)
inline

Definition at line 216 of file MuonVPlusJetsIDSelectionFunctor.h.

References Exception, FALL10, FIRSTDATA, firstDataCuts(), Utilities::operator, SPRING10, SUMMER08, summer08Cuts(), and version_.

217  {
218 
219  if (version_ == SPRING10 || version_ == FALL10 ) throw cms::Exception("LogicError")
220  << "MuonVPlusJetsSelectionFunctor SPRING10 and FALL10 versions needs the event! Call operator()(muon,event,ret)"
221  <<std::endl;
222 
223  else if ( version_ == SUMMER08 ) return summer08Cuts( muon, ret );
224  else if ( version_ == FIRSTDATA ) return firstDataCuts( muon, ret );
225  else {
226  return false;
227  }
228  }
bool firstDataCuts(const pat::Muon &muon, pat::strbitset &ret)
bool summer08Cuts(const pat::Muon &muon, pat::strbitset &ret)
bool MuonVPlusJetsIDSelectionFunctor::spring10Cuts ( const pat::Muon muon,
edm::EventBase const &  event,
pat::strbitset ret 
)
inline

Definition at line 304 of file MuonVPlusJetsIDSelectionFunctor.h.

References beamLineSrc_, ecalDrivenElectronSeedsParameters_cff::beamSpot, reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthY(), Selector< pat::Muon >::cut(), pat::Muon::dB(), pat::Muon::ecalIso(), pat::Muon::edB(), reco::MuonIsolation::emVetoEt, pat::Muon::globalTrack(), reco::MuonIsolation::hadVetoEt, pat::Muon::hcalIso(), Selector< pat::Muon >::ignoreCut(), indexChi2_, indexD0_, indexECalVeto_, indexED0_, indexHCalVeto_, indexNHits_, indexNValMuHits_, indexRelIso_, indexSD0_, susybsm::HSCParticleType::innerTrack, pat::Muon::innerTrack(), reco::Muon::isolationR03(), edm::HandleBase::isValid(), nhits, pat::Muon::normChi2(), pat::Muon::numberOfValidHits(), Selector< pat::Muon >::passCut(), EnergyCorrector::pt, reco::LeafCandidate::pt(), recalcDBFromBSp_, objects.autophobj::relIso, pat::strbitset::set(), Selector< pat::Muon >::setIgnored(), mathSSE::sqrt(), pat::Muon::trackIso(), reco::BeamSpot::x0(), reco::BeamSpot::y0(), and reco::BeamSpot::z0().

Referenced by operator()().

305  {
306 
307  ret.set(false);
308 
309  double norm_chi2 = muon.normChi2();
310  double corr_d0 = muon.dB();
311  double corr_ed0 = muon.edB();
312  double corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
313 
314  //If required, recalculate the impact parameter using the beam spot
315  if (recalcDBFromBSp_) {
316 
317  //Get the beam spot
318  reco::TrackBase::Point beamPoint(0,0,0);
320  edm::Handle<reco::BeamSpot> beamSpotHandle;
321  event.getByLabel(beamLineSrc_, beamSpotHandle);
322 
323  if( beamSpotHandle.isValid() ){
324  beamSpot = *beamSpotHandle;
325  } else{
326  edm::LogError("DataNotAvailable")
327  << "No beam spot available from EventSetup, not adding high level selection \n";
328  }
329  beamPoint = reco::TrackBase::Point ( beamSpot.x0(), beamSpot.y0(), beamSpot.z0() );
330 
331  //Use the beamspot to correct the impact parameter and uncertainty
333  if ( innerTrack.isNonnull() && innerTrack.isAvailable() ) {
334  corr_d0 = -1.0 * innerTrack->dxy( beamPoint );
335  corr_ed0 = sqrt( innerTrack->d0Error() * innerTrack->d0Error()
336  + 0.5* beamSpot.BeamWidthX()*beamSpot.BeamWidthX()
337  + 0.5* beamSpot.BeamWidthY()*beamSpot.BeamWidthY() );
338  corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
339 
340  } else {
341  corr_d0 = 999.;
342  corr_ed0 = 999.;
343  }
344  }
345 
346  int nhits = static_cast<int>( muon.numberOfValidHits() );
347  int nValidMuonHits = static_cast<int> (muon.globalTrack()->hitPattern().numberOfValidMuonHits());
348 
349  double ecalVeto = muon.isolationR03().emVetoEt;
350  double hcalVeto = muon.isolationR03().hadVetoEt;
351 
352  double hcalIso = muon.hcalIso();
353  double ecalIso = muon.ecalIso();
354  double trkIso = muon.trackIso();
355  double pt = muon.pt() ;
356 
357  double relIso = (ecalIso + hcalIso + trkIso) / pt;
358 
359  if ( norm_chi2 < cut(indexChi2_, double()) || ignoreCut(indexChi2_) ) passCut(ret, indexChi2_ );
360  if ( fabs(corr_d0) < cut(indexD0_, double()) || ignoreCut(indexD0_) ) passCut(ret, indexD0_ );
361  if ( fabs(corr_ed0)< cut(indexED0_, double()) || ignoreCut(indexED0_) ) passCut(ret, indexED0_ );
362  if ( fabs(corr_sd0)< cut(indexSD0_, double()) || ignoreCut(indexSD0_) ) passCut(ret, indexSD0_ );
363  if ( nhits >= cut(indexNHits_, int() ) || ignoreCut(indexNHits_) ) passCut(ret, indexNHits_ );
364  if ( nValidMuonHits> cut(indexNValMuHits_,int()) || ignoreCut(indexNValMuHits_)) passCut(ret, indexNValMuHits_ );
365  if ( hcalVeto < cut(indexHCalVeto_,double())|| ignoreCut(indexHCalVeto_)) passCut(ret, indexHCalVeto_);
366  if ( ecalVeto < cut(indexECalVeto_,double())|| ignoreCut(indexECalVeto_)) passCut(ret, indexECalVeto_);
367  if ( relIso < cut(indexRelIso_, double()) || ignoreCut(indexRelIso_) ) passCut(ret, indexRelIso_ );
368 
369  setIgnored(ret);
370 
371  return (bool)ret;
372  }
virtual double pt() const final
transverse momentum
double z0() const
z coordinate
Definition: BeamSpot.h:68
float ecalIso() const
Definition: Muon.h:174
reco::TrackRef innerTrack() const
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
Definition: Muon.h:72
float hadVetoEt
hcal sum-et in the veto region in r-phi
Definition: MuonIsolation.h:15
double dB(IPTYPE type) const
void setIgnored(pat::strbitset &ret)
set ignored bits
Definition: Selector.h:224
float trackIso() const
Definition: Muon.h:170
float hcalIso() const
Definition: Muon.h:178
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
Definition: Selector.h:176
T sqrt(T t)
Definition: SSEVec.h:18
bool ignoreCut(std::string const &s) const
ignore the cut at index "s"
Definition: Selector.h:159
double BeamWidthX() const
beam width X
Definition: BeamSpot.h:86
math::XYZPoint Point
point in the space
Definition: TrackBase.h:83
bool isValid() const
Definition: HandleBase.h:74
double edB(IPTYPE type) const
reco::TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon) ...
Definition: Muon.h:80
float emVetoEt
ecal sum-et in the veto region in r-phi
Definition: MuonIsolation.h:14
strbitset & set(bool val=true)
set method of all bits
Definition: strbitset.h:144
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:88
double y0() const
y coordinate
Definition: BeamSpot.h:66
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
const MuonIsolation & isolationR03() const
Definition: Muon.h:162
int cut(index_type const &i, int val) const
Access the int cut values at index "s".
Definition: Selector.h:194
double x0() const
x coordinate
Definition: BeamSpot.h:64
bool MuonVPlusJetsIDSelectionFunctor::summer08Cuts ( const pat::Muon muon,
pat::strbitset ret 
)
inline

Definition at line 234 of file MuonVPlusJetsIDSelectionFunctor.h.

References Selector< pat::Muon >::cut(), pat::Muon::dB(), pat::Muon::ecalIso(), reco::MuonIsolation::emVetoEt, reco::MuonIsolation::hadVetoEt, pat::Muon::hcalIso(), Selector< pat::Muon >::ignoreCut(), indexChi2_, indexD0_, indexECalVeto_, indexHCalVeto_, indexNHits_, indexRelIso_, reco::Muon::isolationR03(), nhits, pat::Muon::normChi2(), pat::Muon::numberOfValidHits(), Selector< pat::Muon >::passCut(), EnergyCorrector::pt, reco::LeafCandidate::pt(), objects.autophobj::relIso, pat::strbitset::set(), Selector< pat::Muon >::setIgnored(), and pat::Muon::trackIso().

Referenced by operator()().

235  {
236 
237  ret.set(false);
238 
239  double norm_chi2 = muon.normChi2();
240  double corr_d0 = muon.dB();
241  int nhits = static_cast<int>( muon.numberOfValidHits() );
242 
243  double ecalVeto = muon.isolationR03().emVetoEt;
244  double hcalVeto = muon.isolationR03().hadVetoEt;
245 
246  double hcalIso = muon.hcalIso();
247  double ecalIso = muon.ecalIso();
248  double trkIso = muon.trackIso();
249  double pt = muon.pt() ;
250 
251  double relIso = (ecalIso + hcalIso + trkIso) / pt;
252 
253  if ( norm_chi2 < cut(indexChi2_, double()) || ignoreCut(indexChi2_) ) passCut(ret, indexChi2_ );
254  if ( fabs(corr_d0) < cut(indexD0_, double()) || ignoreCut(indexD0_) ) passCut(ret, indexD0_ );
255  if ( nhits >= cut(indexNHits_, int() ) || ignoreCut(indexNHits_) ) passCut(ret, indexNHits_ );
256  if ( hcalVeto < cut(indexHCalVeto_,double())|| ignoreCut(indexHCalVeto_)) passCut(ret, indexHCalVeto_);
257  if ( ecalVeto < cut(indexECalVeto_,double())|| ignoreCut(indexECalVeto_)) passCut(ret, indexECalVeto_);
258  if ( relIso < cut(indexRelIso_, double()) || ignoreCut(indexRelIso_) ) passCut(ret, indexRelIso_ );
259 
260  setIgnored(ret);
261 
262  return (bool)ret;
263  }
virtual double pt() const final
transverse momentum
float ecalIso() const
Definition: Muon.h:174
float hadVetoEt
hcal sum-et in the veto region in r-phi
Definition: MuonIsolation.h:15
double dB(IPTYPE type) const
void setIgnored(pat::strbitset &ret)
set ignored bits
Definition: Selector.h:224
float trackIso() const
Definition: Muon.h:170
float hcalIso() const
Definition: Muon.h:178
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
Definition: Selector.h:176
bool ignoreCut(std::string const &s) const
ignore the cut at index "s"
Definition: Selector.h:159
float emVetoEt
ecal sum-et in the veto region in r-phi
Definition: MuonIsolation.h:14
strbitset & set(bool val=true)
set method of all bits
Definition: strbitset.h:144
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
const MuonIsolation & isolationR03() const
Definition: Muon.h:162
int cut(index_type const &i, int val) const
Access the int cut values at index "s".
Definition: Selector.h:194

Member Data Documentation

edm::InputTag MuonVPlusJetsIDSelectionFunctor::beamLineSrc_
private
edm::EDGetTokenT<reco::BeamSpot> MuonVPlusJetsIDSelectionFunctor::beamLineSrcToken_
private

Definition at line 588 of file MuonVPlusJetsIDSelectionFunctor.h.

Referenced by MuonVPlusJetsIDSelectionFunctor().

index_type MuonVPlusJetsIDSelectionFunctor::indexChi2_
private
index_type MuonVPlusJetsIDSelectionFunctor::indexD0_
private
index_type MuonVPlusJetsIDSelectionFunctor::indexECalVeto_
private
index_type MuonVPlusJetsIDSelectionFunctor::indexED0_
private
index_type MuonVPlusJetsIDSelectionFunctor::indexHCalVeto_
private
index_type MuonVPlusJetsIDSelectionFunctor::indexLepZ_
private

Definition at line 604 of file MuonVPlusJetsIDSelectionFunctor.h.

Referenced by fall10Cuts(), initialize(), and kitQCDCuts().

index_type MuonVPlusJetsIDSelectionFunctor::indexNHits_
private
index_type MuonVPlusJetsIDSelectionFunctor::indexNValMuHits_
private
index_type MuonVPlusJetsIDSelectionFunctor::indexPixHits_
private

Definition at line 605 of file MuonVPlusJetsIDSelectionFunctor.h.

Referenced by fall10Cuts(), initialize(), and kitQCDCuts().

index_type MuonVPlusJetsIDSelectionFunctor::indexRelIso_
private
index_type MuonVPlusJetsIDSelectionFunctor::indexSD0_
private
index_type MuonVPlusJetsIDSelectionFunctor::indexStations_
private

Definition at line 606 of file MuonVPlusJetsIDSelectionFunctor.h.

Referenced by fall10Cuts(), initialize(), and kitQCDCuts().

edm::InputTag MuonVPlusJetsIDSelectionFunctor::pvSrc_
private
edm::EDGetTokenT<std::vector<reco::Vertex> > MuonVPlusJetsIDSelectionFunctor::pvSrcToken_
private

Definition at line 592 of file MuonVPlusJetsIDSelectionFunctor.h.

Referenced by MuonVPlusJetsIDSelectionFunctor().

bool MuonVPlusJetsIDSelectionFunctor::recalcDBFromBSp_
private
bool MuonVPlusJetsIDSelectionFunctor::verbose_

Definition at line 21 of file MuonVPlusJetsIDSelectionFunctor.h.

Version_t MuonVPlusJetsIDSelectionFunctor::version_
private

Definition at line 584 of file MuonVPlusJetsIDSelectionFunctor.h.

Referenced by initialize(), and operator()().