CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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_item
cut_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)
 
 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)
 This provides an alternative signature that includes extra information. More...
 
bool operator() (const pat::Muon &muon, pat::strbitset &ret)
 This provides the interface for base classes to select objects. More...
 
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::Muonconst &t)
 This provides an alternative signature without the second ret. More...
 
virtual bool operator() (pat::Muonconst &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_
 
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_
 
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 13 of file MuonVPlusJetsIDSelectionFunctor.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

MuonVPlusJetsIDSelectionFunctor::MuonVPlusJetsIDSelectionFunctor ( )
inline

Definition at line 21 of file MuonVPlusJetsIDSelectionFunctor.h.

21 {}
MuonVPlusJetsIDSelectionFunctor::MuonVPlusJetsIDSelectionFunctor ( edm::ParameterSet const &  parameters)
inline

Definition at line 23 of file MuonVPlusJetsIDSelectionFunctor.h.

References beamLineSrc_, gather_cfg::cout, edm::hlt::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, verbose_, and BeamSplash_cfg::version.

23  {
24 
25  verbose_ = false;
26 
27  std::string versionStr = parameters.getParameter<std::string>("version");
28 
30 
31  if ( versionStr == "SUMMER08" ) {
32  version = SUMMER08;
33  }
34  else if ( versionStr == "FIRSTDATA" ) {
35  version = FIRSTDATA;
36  }
37  else if ( versionStr == "SPRING10" ) {
38  version = SPRING10;
39  }
40  else if ( versionStr == "FALL10" ) {
41  version = FALL10;
42  if (verbose_) std::cout << "\nMUON SELECTION - you are using FALL10 Selection" << std::endl;
43  }
44  else if (versionStr == "KITQCD") {
45  version = KITQCD;
46  if (verbose_) std::cout << "\nMUON SELECTION - you are using KITQCD Selection" << std::endl;
47  }
48  else {
49  throw cms::Exception("InvalidInput") << "Expect version to be one of SUMMER08, FIRSTDATA, SPRING10, FALL10" << std::endl;
50  }
51 
52  initialize( version,
53  parameters.getParameter<double>("Chi2"),
54  parameters.getParameter<double>("D0") ,
55  parameters.getParameter<double>("ED0") ,
56  parameters.getParameter<double>("SD0") ,
57  parameters.getParameter<int> ("NHits") ,
58  parameters.getParameter<int> ("NValMuHits"),
59  parameters.getParameter<double>("ECalVeto") ,
60  parameters.getParameter<double>("HCalVeto") ,
61  parameters.getParameter<double>("RelIso"),
62  parameters.getParameter<double>("LepZ"),
63  parameters.getParameter<int>("nPixelHits"),
64  parameters.getParameter<int>("nMatchedStations")
65  );
66  if ( parameters.exists("cutsToIgnore") )
67  setIgnoredCuts( parameters.getParameter<std::vector<std::string> >("cutsToIgnore") );
68 
70 
71  recalcDBFromBSp_ = parameters.getParameter<bool>("RecalcFromBeamSpot");
72  beamLineSrc_ = parameters.getParameter<edm::InputTag>("beamLineSrc");
73  pvSrc_ = parameters.getParameter<edm::InputTag>("pvSrc");
74  }
dictionary parameters
Definition: Parameters.py:2
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
tuple cout
Definition: gather_cfg.py:121
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 77 of file MuonVPlusJetsIDSelectionFunctor.h.

References Selector< pat::Muon >::getBitTemplate(), initialize(), and Selector< pat::Muon >::retInternal_.

90  : recalcDBFromBSp_(false) {
91  initialize( version, chi2, d0, ed0, sd0, nhits, nValidMuonHits, ecalveto, hcalveto, reliso,
92  maxLepZ, minPixelHits, minNMatches );
93 
95  }
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 366 of file MuonVPlusJetsIDSelectionFunctor.h.

References beamLineSrc_, SiPixelRawToDigiRegional_cfi::beamSpot, reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthY(), Selector< pat::Muon >::cut(), pat::Muon::dB(), pat::Muon::ecalIso(), pat::Muon::edB(), reco::MuonIsolation::emVetoEt, edm::hlt::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(), pat::Muon::normChi2(), reco::Muon::numberOfMatches(), pat::Muon::numberOfValidHits(), Selector< pat::Muon >::passCut(), RecoTauCleanerPlugins::pt, reco::LeafCandidate::pt(), pvSrc_, recalcDBFromBSp_, run_regression::ret, 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()().

367  {
368 
369  ret.set(false);
370 
371  double norm_chi2 = muon.normChi2();
372  double corr_d0 = muon.dB();
373  double corr_ed0 = muon.edB();
374  double corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
375 
376  // Get the PV for the muon z requirement
378  event.getByLabel( pvSrc_, pvtxHandle_ );
379 
380  double zvtx = -999;
381  if ( pvtxHandle_->size() > 0 ) {
382  zvtx = pvtxHandle_->at(0).z();
383  } else {
384  throw cms::Exception("InvalidInput") << " There needs to be at least one primary vertex in the event." << std::endl;
385  }
386 
387  //If required, recalculate the impact parameter using the beam spot
388  if (recalcDBFromBSp_) {
389 
390  //Get the beam spot
391  reco::TrackBase::Point beamPoint(0,0,0);
393  edm::Handle<reco::BeamSpot> beamSpotHandle;
394  event.getByLabel(beamLineSrc_, beamSpotHandle);
395 
396  if( beamSpotHandle.isValid() ){
397  beamSpot = *beamSpotHandle;
398  } else{
399  edm::LogError("DataNotAvailable")
400  << "No beam spot available from EventSetup, not adding high level selection \n";
401  }
402  beamPoint = reco::TrackBase::Point ( beamSpot.x0(), beamSpot.y0(), beamSpot.z0() );
403 
404  //Use the beamspot to correct the impact parameter and uncertainty
406  if ( innerTrack.isNonnull() && innerTrack.isAvailable() ) {
407  corr_d0 = -1.0 * innerTrack->dxy( beamPoint );
408  corr_ed0 = sqrt( innerTrack->d0Error() * innerTrack->d0Error()
409  + 0.5* beamSpot.BeamWidthX()*beamSpot.BeamWidthX()
410  + 0.5* beamSpot.BeamWidthY()*beamSpot.BeamWidthY() );
411  corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
412 
413  } else {
414  corr_d0 = 999.;
415  corr_ed0 = 999.;
416  }
417  }
418 
419  int nhits = static_cast<int>( muon.numberOfValidHits() );
420  int nValidMuonHits = static_cast<int> (muon.globalTrack()->hitPattern().numberOfValidMuonHits());
421 
422  double ecalVeto = muon.isolationR03().emVetoEt;
423  double hcalVeto = muon.isolationR03().hadVetoEt;
424 
425  double hcalIso = muon.hcalIso();
426  double ecalIso = muon.ecalIso();
427  double trkIso = muon.trackIso();
428  double pt = muon.pt() ;
429 
430  double relIso = (ecalIso + hcalIso + trkIso) / pt;
431 
432 
433  double z_mu = muon.vertex().z();
434 
435  int nPixelHits = muon.innerTrack()->hitPattern().pixelLayersWithMeasurement();
436 
437  int nMatchedStations = muon.numberOfMatches();
438 
439  if ( norm_chi2 < cut(indexChi2_, double()) || ignoreCut(indexChi2_) ) passCut(ret, indexChi2_ );
440  if ( fabs(corr_d0) < cut(indexD0_, double()) || ignoreCut(indexD0_) ) passCut(ret, indexD0_ );
441  if ( fabs(corr_ed0)< cut(indexED0_, double()) || ignoreCut(indexED0_) ) passCut(ret, indexED0_ );
442  if ( fabs(corr_sd0)< cut(indexSD0_, double()) || ignoreCut(indexSD0_) ) passCut(ret, indexSD0_ );
443  if ( nhits >= cut(indexNHits_, int() ) || ignoreCut(indexNHits_) ) passCut(ret, indexNHits_ );
444  if ( nValidMuonHits> cut(indexNValMuHits_,int()) || ignoreCut(indexNValMuHits_)) passCut(ret, indexNValMuHits_ );
445  if ( hcalVeto < cut(indexHCalVeto_,double())|| ignoreCut(indexHCalVeto_)) passCut(ret, indexHCalVeto_);
446  if ( ecalVeto < cut(indexECalVeto_,double())|| ignoreCut(indexECalVeto_)) passCut(ret, indexECalVeto_);
447  if ( relIso < cut(indexRelIso_, double()) || ignoreCut(indexRelIso_) ) passCut(ret, indexRelIso_ );
448  if ( fabs(z_mu-zvtx)< cut(indexLepZ_, double()) || ignoreCut(indexLepZ_) ) passCut(ret, indexLepZ_ );
449  if ( nPixelHits > cut(indexPixHits_,int()) || ignoreCut(indexPixHits_)) passCut(ret, indexPixHits_);
450  if ( nMatchedStations> cut(indexStations_,int()) || ignoreCut(indexStations_)) passCut(ret, indexStations_);
451 
452  setIgnored(ret);
453 
454  return (bool)ret;
455  }
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
Definition: Muon.cc:317
double z0() const
z coordinate
Definition: BeamSpot.h:68
float ecalIso() const
Definition: Muon.h:160
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
Definition: Muon.cc:330
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
void setIgnored(pat::strbitset &ret)
set ignored bits
Definition: Selector.h:224
float trackIso() const
Definition: Muon.h:156
float hcalIso() const
Definition: Muon.h:164
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
Definition: Selector.h:176
T sqrt(T t)
Definition: SSEVec.h:48
bool ignoreCut(std::string const &s) const
ignore the cut at index &quot;s&quot;
Definition: Selector.h:159
double BeamWidthX() const
beam width X
Definition: BeamSpot.h:86
math::XYZPoint Point
point in the space
Definition: TrackBase.h:74
bool isValid() const
Definition: HandleBase.h:76
double dB(IpType type=None) const
Definition: Muon.cc:343
reco::TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon) ...
Definition: Muon.h:80
int numberOfMatches(ArbitrationType type=SegmentAndTrackArbitration) const
get number of chambers with matched segments
Definition: Muon.cc:60
float emVetoEt
ecal sum-et in the veto region in r-phi
Definition: MuonIsolation.h:14
double edB(IpType type=None) const
Definition: Muon.cc:368
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
virtual float pt() const GCC11_FINAL
transverse momentum
const MuonIsolation & isolationR03() const
Definition: Muon.h:158
int cut(index_type const &i, int val) const
Access the int cut values at index &quot;s&quot;.
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 256 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(), pat::Muon::normChi2(), pat::Muon::numberOfValidHits(), Selector< pat::Muon >::passCut(), RecoTauCleanerPlugins::pt, reco::LeafCandidate::pt(), run_regression::ret, pat::strbitset::set(), Selector< pat::Muon >::setIgnored(), and pat::Muon::trackIso().

Referenced by operator()().

257  {
258 
259  ret.set(false);
260 
261  double norm_chi2 = muon.normChi2();
262  double corr_d0 = muon.dB();
263  double corr_ed0 = muon.edB();
264  double corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
265  int nhits = static_cast<int>( muon.numberOfValidHits() );
266 
267  double ecalVeto = muon.isolationR03().emVetoEt;
268  double hcalVeto = muon.isolationR03().hadVetoEt;
269 
270  double hcalIso = muon.hcalIso();
271  double ecalIso = muon.ecalIso();
272  double trkIso = muon.trackIso();
273  double pt = muon.pt() ;
274 
275  double relIso = (ecalIso + hcalIso + trkIso) / pt;
276 
277  if ( norm_chi2 < cut(indexChi2_, double()) || ignoreCut(indexChi2_) ) passCut(ret, indexChi2_ );
278  if ( fabs(corr_d0) < cut(indexD0_, double()) || ignoreCut(indexD0_) ) passCut(ret, indexD0_ );
279  if ( fabs(corr_ed0)< cut(indexED0_, double()) || ignoreCut(indexED0_) ) passCut(ret, indexED0_ );
280  if ( fabs(corr_sd0)< cut(indexSD0_, double()) || ignoreCut(indexSD0_) ) passCut(ret, indexSD0_ );
281  if ( nhits >= cut(indexNHits_, int() ) || ignoreCut(indexNHits_) ) passCut(ret, indexNHits_ );
282  if ( hcalVeto < cut(indexHCalVeto_,double())|| ignoreCut(indexHCalVeto_)) passCut(ret, indexHCalVeto_);
283  if ( ecalVeto < cut(indexECalVeto_,double())|| ignoreCut(indexECalVeto_)) passCut(ret, indexECalVeto_);
284  if ( relIso < cut(indexRelIso_, double()) || ignoreCut(indexRelIso_) ) passCut(ret, indexRelIso_ );
285 
286  setIgnored(ret);
287 
288  return (bool)ret;
289  }
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
Definition: Muon.cc:317
float ecalIso() const
Definition: Muon.h:160
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
Definition: Muon.cc:330
float hadVetoEt
hcal sum-et in the veto region in r-phi
Definition: MuonIsolation.h:15
void setIgnored(pat::strbitset &ret)
set ignored bits
Definition: Selector.h:224
float trackIso() const
Definition: Muon.h:156
float hcalIso() const
Definition: Muon.h:164
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 &quot;s&quot;
Definition: Selector.h:159
double dB(IpType type=None) const
Definition: Muon.cc:343
float emVetoEt
ecal sum-et in the veto region in r-phi
Definition: MuonIsolation.h:14
double edB(IpType type=None) const
Definition: Muon.cc:368
strbitset & set(bool val=true)
set method of all bits
Definition: strbitset.h:144
virtual float pt() const GCC11_FINAL
transverse momentum
const MuonIsolation & isolationR03() const
Definition: Muon.h:158
int cut(index_type const &i, int val) const
Access the int cut values at index &quot;s&quot;.
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 100 of file MuonVPlusJetsIDSelectionFunctor.h.

References Selector< pat::Muon >::bits_, FALL10, FIRSTDATA, indexChi2_, indexD0_, indexECalVeto_, indexED0_, indexHCalVeto_, indexLepZ_, indexNHits_, indexNValMuHits_, indexPixHits_, indexRelIso_, indexSD0_, indexStations_, Selector< pat::Muon >::push_back(), Selector< pat::Muon >::set(), SPRING10, SUMMER08, BeamSplash_cfg::version, and version_.

Referenced by MuonVPlusJetsIDSelectionFunctor().

113  {
114  version_ = version;
115 
116  push_back("Chi2", chi2 );
117  push_back("D0", d0 );
118  push_back("ED0", ed0 );
119  push_back("SD0", sd0 );
120  push_back("NHits", nhits );
121  push_back("NValMuHits", nValidMuonHits );
122  push_back("ECalVeto", ecalveto);
123  push_back("HCalVeto", hcalveto);
124  push_back("RelIso", reliso );
125  push_back("LepZ", maxLepZ);
126  push_back("nPixelHits",minPixelHits);
127  push_back("nMatchedStations", minNMatches);
128 
129  set("Chi2");
130  set("D0");
131  set("ED0");
132  set("SD0");
133  set("NHits");
134  set("NValMuHits");
135  set("ECalVeto");
136  set("HCalVeto");
137  set("RelIso");
138  set("LepZ");
139  set("nPixelHits");
140  set("nMatchedStations");
141 
142  indexChi2_ = index_type(&bits_, "Chi2" );
143  indexD0_ = index_type(&bits_, "D0" );
144  indexED0_ = index_type(&bits_, "ED0" );
145  indexSD0_ = index_type(&bits_, "SD0" );
146  indexNHits_ = index_type(&bits_, "NHits" );
147  indexNValMuHits_ = index_type(&bits_, "NValMuHits" );
148  indexECalVeto_ = index_type(&bits_, "ECalVeto" );
149  indexHCalVeto_ = index_type(&bits_, "HCalVeto" );
150  indexRelIso_ = index_type(&bits_, "RelIso" );
151  indexLepZ_ = index_type( &bits_, "LepZ");
152  indexPixHits_ = index_type( &bits_, "nPixelHits");
153  indexStations_ = index_type( &bits_, "nMatchedStations");
154 
155  if ( version == FALL10) {
156  set("ED0", false );
157  set("SD0", false);
158  set("ECalVeto",false);
159  set("HCalVeto",false);
160  } else if ( version == SPRING10) {
161  set("ED0", false );
162  set("SD0", false);
163  set("ECalVeto",false);
164  set("HCalVeto",false);
165  set("LepZ", false);
166  set("nPixelHits", false);
167  set("nMatchedStations", false);
168  } else if ( version_ == FIRSTDATA ) {
169  set("D0", false );
170  set("ED0", false );
171  set("NValMuHits",false);
172  set("LepZ", false);
173  set("nPixelHits", false);
174  set("nMatchedStations", false);
175  } else if (version == SUMMER08 ) {
176  set("SD0", false);
177  set("NValMuHits",false);
178  set("LepZ", false);
179  set("nPixelHits", false);
180  set("nMatchedStations", false);
181 
182  }
183 
184  }
void set(std::string const &s, bool val=true)
Set a given selection cut, on or off.
Definition: Selector.h:105
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 462 of file MuonVPlusJetsIDSelectionFunctor.h.

References beamLineSrc_, SiPixelRawToDigiRegional_cfi::beamSpot, reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthY(), Selector< pat::Muon >::cut(), pat::Muon::dB(), pat::Muon::ecalIso(), pat::Muon::edB(), reco::MuonIsolation::emVetoEt, edm::hlt::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(), pat::Muon::normChi2(), reco::Muon::numberOfMatches(), pat::Muon::numberOfValidHits(), Selector< pat::Muon >::passCut(), RecoTauCleanerPlugins::pt, reco::LeafCandidate::pt(), pvSrc_, recalcDBFromBSp_, run_regression::ret, 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()().

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

This provides an alternative signature that includes extra information.

Reimplemented from Selector< pat::Muon >.

Definition at line 187 of file MuonVPlusJetsIDSelectionFunctor.h.

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

188  {
189 
190  if (version_ == FALL10 ) return fall10Cuts(muon, event, ret);
191  else if (version_ == SPRING10 ) return spring10Cuts(muon, event, ret);
192  else if ( version_ == SUMMER08 ) return summer08Cuts( muon, ret );
193  else if ( version_ == FIRSTDATA ) return firstDataCuts( muon, ret );
194  else if ( version_ == KITQCD ) {
195  if (verbose_) std::cout << "Calling KIT selection method" << std::endl;
196  return kitQCDCuts (muon, event, ret);
197  }
198  else {
199  return false;
200  }
201  }
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)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
bool spring10Cuts(const pat::Muon &muon, edm::EventBase const &event, pat::strbitset &ret)
tuple cout
Definition: gather_cfg.py:121
bool kitQCDCuts(const pat::Muon &muon, edm::EventBase const &event, pat::strbitset &ret)
bool MuonVPlusJetsIDSelectionFunctor::operator() ( const pat::Muon t,
pat::strbitset ret 
)
inlinevirtual

This provides the interface for base classes to select objects.

Implements Selector< pat::Muon >.

Definition at line 204 of file MuonVPlusJetsIDSelectionFunctor.h.

References edm::hlt::Exception, FALL10, FIRSTDATA, firstDataCuts(), SPRING10, SUMMER08, summer08Cuts(), and version_.

205  {
206 
207  if (version_ == SPRING10 || version_ == FALL10 ) throw cms::Exception("LogicError")
208  << "MuonVPlusJetsSelectionFunctor SPRING10 and FALL10 versions needs the event! Call operator()(muon,event,ret)"
209  <<std::endl;
210 
211  else if ( version_ == SUMMER08 ) return summer08Cuts( muon, ret );
212  else if ( version_ == FIRSTDATA ) return firstDataCuts( muon, ret );
213  else {
214  return false;
215  }
216  }
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 292 of file MuonVPlusJetsIDSelectionFunctor.h.

References beamLineSrc_, SiPixelRawToDigiRegional_cfi::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(), pat::Muon::normChi2(), pat::Muon::numberOfValidHits(), Selector< pat::Muon >::passCut(), RecoTauCleanerPlugins::pt, reco::LeafCandidate::pt(), recalcDBFromBSp_, run_regression::ret, 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()().

293  {
294 
295  ret.set(false);
296 
297  double norm_chi2 = muon.normChi2();
298  double corr_d0 = muon.dB();
299  double corr_ed0 = muon.edB();
300  double corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
301 
302  //If required, recalculate the impact parameter using the beam spot
303  if (recalcDBFromBSp_) {
304 
305  //Get the beam spot
306  reco::TrackBase::Point beamPoint(0,0,0);
308  edm::Handle<reco::BeamSpot> beamSpotHandle;
309  event.getByLabel(beamLineSrc_, beamSpotHandle);
310 
311  if( beamSpotHandle.isValid() ){
312  beamSpot = *beamSpotHandle;
313  } else{
314  edm::LogError("DataNotAvailable")
315  << "No beam spot available from EventSetup, not adding high level selection \n";
316  }
317  beamPoint = reco::TrackBase::Point ( beamSpot.x0(), beamSpot.y0(), beamSpot.z0() );
318 
319  //Use the beamspot to correct the impact parameter and uncertainty
321  if ( innerTrack.isNonnull() && innerTrack.isAvailable() ) {
322  corr_d0 = -1.0 * innerTrack->dxy( beamPoint );
323  corr_ed0 = sqrt( innerTrack->d0Error() * innerTrack->d0Error()
324  + 0.5* beamSpot.BeamWidthX()*beamSpot.BeamWidthX()
325  + 0.5* beamSpot.BeamWidthY()*beamSpot.BeamWidthY() );
326  corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
327 
328  } else {
329  corr_d0 = 999.;
330  corr_ed0 = 999.;
331  }
332  }
333 
334  int nhits = static_cast<int>( muon.numberOfValidHits() );
335  int nValidMuonHits = static_cast<int> (muon.globalTrack()->hitPattern().numberOfValidMuonHits());
336 
337  double ecalVeto = muon.isolationR03().emVetoEt;
338  double hcalVeto = muon.isolationR03().hadVetoEt;
339 
340  double hcalIso = muon.hcalIso();
341  double ecalIso = muon.ecalIso();
342  double trkIso = muon.trackIso();
343  double pt = muon.pt() ;
344 
345  double relIso = (ecalIso + hcalIso + trkIso) / pt;
346 
347  if ( norm_chi2 < cut(indexChi2_, double()) || ignoreCut(indexChi2_) ) passCut(ret, indexChi2_ );
348  if ( fabs(corr_d0) < cut(indexD0_, double()) || ignoreCut(indexD0_) ) passCut(ret, indexD0_ );
349  if ( fabs(corr_ed0)< cut(indexED0_, double()) || ignoreCut(indexED0_) ) passCut(ret, indexED0_ );
350  if ( fabs(corr_sd0)< cut(indexSD0_, double()) || ignoreCut(indexSD0_) ) passCut(ret, indexSD0_ );
351  if ( nhits >= cut(indexNHits_, int() ) || ignoreCut(indexNHits_) ) passCut(ret, indexNHits_ );
352  if ( nValidMuonHits> cut(indexNValMuHits_,int()) || ignoreCut(indexNValMuHits_)) passCut(ret, indexNValMuHits_ );
353  if ( hcalVeto < cut(indexHCalVeto_,double())|| ignoreCut(indexHCalVeto_)) passCut(ret, indexHCalVeto_);
354  if ( ecalVeto < cut(indexECalVeto_,double())|| ignoreCut(indexECalVeto_)) passCut(ret, indexECalVeto_);
355  if ( relIso < cut(indexRelIso_, double()) || ignoreCut(indexRelIso_) ) passCut(ret, indexRelIso_ );
356 
357  setIgnored(ret);
358 
359  return (bool)ret;
360  }
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
Definition: Muon.cc:317
double z0() const
z coordinate
Definition: BeamSpot.h:68
float ecalIso() const
Definition: Muon.h:160
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
Definition: Muon.cc:330
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
void setIgnored(pat::strbitset &ret)
set ignored bits
Definition: Selector.h:224
float trackIso() const
Definition: Muon.h:156
float hcalIso() const
Definition: Muon.h:164
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
Definition: Selector.h:176
T sqrt(T t)
Definition: SSEVec.h:48
bool ignoreCut(std::string const &s) const
ignore the cut at index &quot;s&quot;
Definition: Selector.h:159
double BeamWidthX() const
beam width X
Definition: BeamSpot.h:86
math::XYZPoint Point
point in the space
Definition: TrackBase.h:74
bool isValid() const
Definition: HandleBase.h:76
double dB(IpType type=None) const
Definition: Muon.cc:343
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
double edB(IpType type=None) const
Definition: Muon.cc:368
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
virtual float pt() const GCC11_FINAL
transverse momentum
const MuonIsolation & isolationR03() const
Definition: Muon.h:158
int cut(index_type const &i, int val) const
Access the int cut values at index &quot;s&quot;.
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 222 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(), pat::Muon::normChi2(), pat::Muon::numberOfValidHits(), Selector< pat::Muon >::passCut(), RecoTauCleanerPlugins::pt, reco::LeafCandidate::pt(), run_regression::ret, pat::strbitset::set(), Selector< pat::Muon >::setIgnored(), and pat::Muon::trackIso().

Referenced by operator()().

223  {
224 
225  ret.set(false);
226 
227  double norm_chi2 = muon.normChi2();
228  double corr_d0 = muon.dB();
229  int nhits = static_cast<int>( muon.numberOfValidHits() );
230 
231  double ecalVeto = muon.isolationR03().emVetoEt;
232  double hcalVeto = muon.isolationR03().hadVetoEt;
233 
234  double hcalIso = muon.hcalIso();
235  double ecalIso = muon.ecalIso();
236  double trkIso = muon.trackIso();
237  double pt = muon.pt() ;
238 
239  double relIso = (ecalIso + hcalIso + trkIso) / pt;
240 
241  if ( norm_chi2 < cut(indexChi2_, double()) || ignoreCut(indexChi2_) ) passCut(ret, indexChi2_ );
242  if ( fabs(corr_d0) < cut(indexD0_, double()) || ignoreCut(indexD0_) ) passCut(ret, indexD0_ );
243  if ( nhits >= cut(indexNHits_, int() ) || ignoreCut(indexNHits_) ) passCut(ret, indexNHits_ );
244  if ( hcalVeto < cut(indexHCalVeto_,double())|| ignoreCut(indexHCalVeto_)) passCut(ret, indexHCalVeto_);
245  if ( ecalVeto < cut(indexECalVeto_,double())|| ignoreCut(indexECalVeto_)) passCut(ret, indexECalVeto_);
246  if ( relIso < cut(indexRelIso_, double()) || ignoreCut(indexRelIso_) ) passCut(ret, indexRelIso_ );
247 
248  setIgnored(ret);
249 
250  return (bool)ret;
251  }
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
Definition: Muon.cc:317
float ecalIso() const
Definition: Muon.h:160
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
Definition: Muon.cc:330
float hadVetoEt
hcal sum-et in the veto region in r-phi
Definition: MuonIsolation.h:15
void setIgnored(pat::strbitset &ret)
set ignored bits
Definition: Selector.h:224
float trackIso() const
Definition: Muon.h:156
float hcalIso() const
Definition: Muon.h:164
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 &quot;s&quot;
Definition: Selector.h:159
double dB(IpType type=None) const
Definition: Muon.cc:343
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
virtual float pt() const GCC11_FINAL
transverse momentum
const MuonIsolation & isolationR03() const
Definition: Muon.h:158
int cut(index_type const &i, int val) const
Access the int cut values at index &quot;s&quot;.
Definition: Selector.h:194

Member Data Documentation

edm::InputTag MuonVPlusJetsIDSelectionFunctor::beamLineSrc_
private
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 586 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 587 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 588 of file MuonVPlusJetsIDSelectionFunctor.h.

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

edm::InputTag MuonVPlusJetsIDSelectionFunctor::pvSrc_
private
bool MuonVPlusJetsIDSelectionFunctor::recalcDBFromBSp_
private
bool MuonVPlusJetsIDSelectionFunctor::verbose_
Version_t MuonVPlusJetsIDSelectionFunctor::version_
private

Definition at line 572 of file MuonVPlusJetsIDSelectionFunctor.h.

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