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, 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)
 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_
 
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 16 of file MuonVPlusJetsIDSelectionFunctor.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

MuonVPlusJetsIDSelectionFunctor::MuonVPlusJetsIDSelectionFunctor ( )
inline

Definition at line 24 of file MuonVPlusJetsIDSelectionFunctor.h.

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

Definition at line 27 of file MuonVPlusJetsIDSelectionFunctor.h.

References beamLineSrc_, beamLineSrcToken_, edm::ConsumesCollector::consumes(), pvSrc_, and pvSrcToken_.

27  :
29  {
31  pvSrcToken_ = iC.consumes<std::vector<reco::Vertex> >(pvSrc_);
32  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
dictionary parameters
Definition: Parameters.py:2
edm::EDGetTokenT< std::vector< reco::Vertex > > pvSrcToken_
edm::EDGetTokenT< reco::BeamSpot > beamLineSrcToken_
MuonVPlusJetsIDSelectionFunctor::MuonVPlusJetsIDSelectionFunctor ( edm::ParameterSet const &  parameters)
inline

Definition at line 35 of file MuonVPlusJetsIDSelectionFunctor.h.

References 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.

35  {
36 
37  verbose_ = false;
38 
39  std::string versionStr = parameters.getParameter<std::string>("version");
40 
42 
43  if ( versionStr == "SUMMER08" ) {
44  version = SUMMER08;
45  }
46  else if ( versionStr == "FIRSTDATA" ) {
47  version = FIRSTDATA;
48  }
49  else if ( versionStr == "SPRING10" ) {
50  version = SPRING10;
51  }
52  else if ( versionStr == "FALL10" ) {
53  version = FALL10;
54  if (verbose_) std::cout << "\nMUON SELECTION - you are using FALL10 Selection" << std::endl;
55  }
56  else if (versionStr == "KITQCD") {
57  version = KITQCD;
58  if (verbose_) std::cout << "\nMUON SELECTION - you are using KITQCD Selection" << std::endl;
59  }
60  else {
61  throw cms::Exception("InvalidInput") << "Expect version to be one of SUMMER08, FIRSTDATA, SPRING10, FALL10" << std::endl;
62  }
63 
64  initialize( version,
65  parameters.getParameter<double>("Chi2"),
66  parameters.getParameter<double>("D0") ,
67  parameters.getParameter<double>("ED0") ,
68  parameters.getParameter<double>("SD0") ,
69  parameters.getParameter<int> ("NHits") ,
70  parameters.getParameter<int> ("NValMuHits"),
71  parameters.getParameter<double>("ECalVeto") ,
72  parameters.getParameter<double>("HCalVeto") ,
73  parameters.getParameter<double>("RelIso"),
74  parameters.getParameter<double>("LepZ"),
75  parameters.getParameter<int>("nPixelHits"),
76  parameters.getParameter<int>("nMatchedStations")
77  );
78  if ( parameters.exists("cutsToIgnore") )
79  setIgnoredCuts( parameters.getParameter<std::vector<std::string> >("cutsToIgnore") );
80 
82 
83  recalcDBFromBSp_ = parameters.getParameter<bool>("RecalcFromBeamSpot");
84  pvSrc_ = parameters.getParameter<edm::InputTag>("pvSrc");
85  }
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 88 of file MuonVPlusJetsIDSelectionFunctor.h.

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

101  : recalcDBFromBSp_(false) {
102  initialize( version, chi2, d0, ed0, sd0, nhits, nValidMuonHits, ecalveto, hcalveto, reliso,
103  maxLepZ, minPixelHits, minNMatches );
104 
106  }
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 377 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()().

378  {
379 
380  ret.set(false);
381 
382  double norm_chi2 = muon.normChi2();
383  double corr_d0 = muon.dB();
384  double corr_ed0 = muon.edB();
385  double corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
386 
387  // Get the PV for the muon z requirement
389  event.getByLabel( pvSrc_, pvtxHandle_ );
390 
391  double zvtx = -999;
392  if ( pvtxHandle_->size() > 0 ) {
393  zvtx = pvtxHandle_->at(0).z();
394  } else {
395  throw cms::Exception("InvalidInput") << " There needs to be at least one primary vertex in the event." << std::endl;
396  }
397 
398  //If required, recalculate the impact parameter using the beam spot
399  if (recalcDBFromBSp_) {
400 
401  //Get the beam spot
402  reco::TrackBase::Point beamPoint(0,0,0);
404  edm::Handle<reco::BeamSpot> beamSpotHandle;
405  event.getByLabel(beamLineSrc_, beamSpotHandle);
406 
407  if( beamSpotHandle.isValid() ){
408  beamSpot = *beamSpotHandle;
409  } else{
410  edm::LogError("DataNotAvailable")
411  << "No beam spot available from EventSetup, not adding high level selection \n";
412  }
413  beamPoint = reco::TrackBase::Point ( beamSpot.x0(), beamSpot.y0(), beamSpot.z0() );
414 
415  //Use the beamspot to correct the impact parameter and uncertainty
417  if ( innerTrack.isNonnull() && innerTrack.isAvailable() ) {
418  corr_d0 = -1.0 * innerTrack->dxy( beamPoint );
419  corr_ed0 = sqrt( innerTrack->d0Error() * innerTrack->d0Error()
420  + 0.5* beamSpot.BeamWidthX()*beamSpot.BeamWidthX()
421  + 0.5* beamSpot.BeamWidthY()*beamSpot.BeamWidthY() );
422  corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
423 
424  } else {
425  corr_d0 = 999.;
426  corr_ed0 = 999.;
427  }
428  }
429 
430  int nhits = static_cast<int>( muon.numberOfValidHits() );
431  int nValidMuonHits = static_cast<int> (muon.globalTrack()->hitPattern().numberOfValidMuonHits());
432 
433  double ecalVeto = muon.isolationR03().emVetoEt;
434  double hcalVeto = muon.isolationR03().hadVetoEt;
435 
436  double hcalIso = muon.hcalIso();
437  double ecalIso = muon.ecalIso();
438  double trkIso = muon.trackIso();
439  double pt = muon.pt() ;
440 
441  double relIso = (ecalIso + hcalIso + trkIso) / pt;
442 
443 
444  double z_mu = muon.vertex().z();
445 
446  int nPixelHits = muon.innerTrack()->hitPattern().pixelLayersWithMeasurement();
447 
448  int nMatchedStations = muon.numberOfMatches();
449 
450  if ( norm_chi2 < cut(indexChi2_, double()) || ignoreCut(indexChi2_) ) passCut(ret, indexChi2_ );
451  if ( fabs(corr_d0) < cut(indexD0_, double()) || ignoreCut(indexD0_) ) passCut(ret, indexD0_ );
452  if ( fabs(corr_ed0)< cut(indexED0_, double()) || ignoreCut(indexED0_) ) passCut(ret, indexED0_ );
453  if ( fabs(corr_sd0)< cut(indexSD0_, double()) || ignoreCut(indexSD0_) ) passCut(ret, indexSD0_ );
454  if ( nhits >= cut(indexNHits_, int() ) || ignoreCut(indexNHits_) ) passCut(ret, indexNHits_ );
455  if ( nValidMuonHits> cut(indexNValMuHits_,int()) || ignoreCut(indexNValMuHits_)) passCut(ret, indexNValMuHits_ );
456  if ( hcalVeto < cut(indexHCalVeto_,double())|| ignoreCut(indexHCalVeto_)) passCut(ret, indexHCalVeto_);
457  if ( ecalVeto < cut(indexECalVeto_,double())|| ignoreCut(indexECalVeto_)) passCut(ret, indexECalVeto_);
458  if ( relIso < cut(indexRelIso_, double()) || ignoreCut(indexRelIso_) ) passCut(ret, indexRelIso_ );
459  if ( fabs(z_mu-zvtx)< cut(indexLepZ_, double()) || ignoreCut(indexLepZ_) ) passCut(ret, indexLepZ_ );
460  if ( nPixelHits > cut(indexPixHits_,int()) || ignoreCut(indexPixHits_)) passCut(ret, indexPixHits_);
461  if ( nMatchedStations> cut(indexStations_,int()) || ignoreCut(indexStations_)) passCut(ret, indexStations_);
462 
463  setIgnored(ret);
464 
465  return (bool)ret;
466  }
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
Definition: Muon.cc:384
double z0() const
z coordinate
Definition: BeamSpot.h:68
float ecalIso() const
Definition: Muon.h:174
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
Definition: Muon.cc:397
reco::TrackRef innerTrack() const
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
Definition: Muon.h:73
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: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: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:82
bool isValid() const
Definition: HandleBase.h:76
double dB(IpType type=None) const
Definition: Muon.cc:410
reco::TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon) ...
Definition: Muon.h:81
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:435
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 267 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()().

268  {
269 
270  ret.set(false);
271 
272  double norm_chi2 = muon.normChi2();
273  double corr_d0 = muon.dB();
274  double corr_ed0 = muon.edB();
275  double corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
276  int nhits = static_cast<int>( muon.numberOfValidHits() );
277 
278  double ecalVeto = muon.isolationR03().emVetoEt;
279  double hcalVeto = muon.isolationR03().hadVetoEt;
280 
281  double hcalIso = muon.hcalIso();
282  double ecalIso = muon.ecalIso();
283  double trkIso = muon.trackIso();
284  double pt = muon.pt() ;
285 
286  double relIso = (ecalIso + hcalIso + trkIso) / pt;
287 
288  if ( norm_chi2 < cut(indexChi2_, double()) || ignoreCut(indexChi2_) ) passCut(ret, indexChi2_ );
289  if ( fabs(corr_d0) < cut(indexD0_, double()) || ignoreCut(indexD0_) ) passCut(ret, indexD0_ );
290  if ( fabs(corr_ed0)< cut(indexED0_, double()) || ignoreCut(indexED0_) ) passCut(ret, indexED0_ );
291  if ( fabs(corr_sd0)< cut(indexSD0_, double()) || ignoreCut(indexSD0_) ) passCut(ret, indexSD0_ );
292  if ( nhits >= cut(indexNHits_, int() ) || ignoreCut(indexNHits_) ) passCut(ret, indexNHits_ );
293  if ( hcalVeto < cut(indexHCalVeto_,double())|| ignoreCut(indexHCalVeto_)) passCut(ret, indexHCalVeto_);
294  if ( ecalVeto < cut(indexECalVeto_,double())|| ignoreCut(indexECalVeto_)) passCut(ret, indexECalVeto_);
295  if ( relIso < cut(indexRelIso_, double()) || ignoreCut(indexRelIso_) ) passCut(ret, indexRelIso_ );
296 
297  setIgnored(ret);
298 
299  return (bool)ret;
300  }
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
Definition: Muon.cc:384
float ecalIso() const
Definition: Muon.h:174
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
Definition: Muon.cc:397
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: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 &quot;s&quot;
Definition: Selector.h:159
double dB(IpType type=None) const
Definition: Muon.cc:410
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:435
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 111 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().

124  {
125  version_ = version;
126 
127  push_back("Chi2", chi2 );
128  push_back("D0", d0 );
129  push_back("ED0", ed0 );
130  push_back("SD0", sd0 );
131  push_back("NHits", nhits );
132  push_back("NValMuHits", nValidMuonHits );
133  push_back("ECalVeto", ecalveto);
134  push_back("HCalVeto", hcalveto);
135  push_back("RelIso", reliso );
136  push_back("LepZ", maxLepZ);
137  push_back("nPixelHits",minPixelHits);
138  push_back("nMatchedStations", minNMatches);
139 
140  set("Chi2");
141  set("D0");
142  set("ED0");
143  set("SD0");
144  set("NHits");
145  set("NValMuHits");
146  set("ECalVeto");
147  set("HCalVeto");
148  set("RelIso");
149  set("LepZ");
150  set("nPixelHits");
151  set("nMatchedStations");
152 
153  indexChi2_ = index_type(&bits_, "Chi2" );
154  indexD0_ = index_type(&bits_, "D0" );
155  indexED0_ = index_type(&bits_, "ED0" );
156  indexSD0_ = index_type(&bits_, "SD0" );
157  indexNHits_ = index_type(&bits_, "NHits" );
158  indexNValMuHits_ = index_type(&bits_, "NValMuHits" );
159  indexECalVeto_ = index_type(&bits_, "ECalVeto" );
160  indexHCalVeto_ = index_type(&bits_, "HCalVeto" );
161  indexRelIso_ = index_type(&bits_, "RelIso" );
162  indexLepZ_ = index_type( &bits_, "LepZ");
163  indexPixHits_ = index_type( &bits_, "nPixelHits");
164  indexStations_ = index_type( &bits_, "nMatchedStations");
165 
166  if ( version == FALL10) {
167  set("ED0", false );
168  set("SD0", false);
169  set("ECalVeto",false);
170  set("HCalVeto",false);
171  } else if ( version == SPRING10) {
172  set("ED0", false );
173  set("SD0", false);
174  set("ECalVeto",false);
175  set("HCalVeto",false);
176  set("LepZ", false);
177  set("nPixelHits", false);
178  set("nMatchedStations", false);
179  } else if ( version_ == FIRSTDATA ) {
180  set("D0", false );
181  set("ED0", false );
182  set("NValMuHits",false);
183  set("LepZ", false);
184  set("nPixelHits", false);
185  set("nMatchedStations", false);
186  } else if (version == SUMMER08 ) {
187  set("SD0", false);
188  set("NValMuHits",false);
189  set("LepZ", false);
190  set("nPixelHits", false);
191  set("nMatchedStations", false);
192 
193  }
194 
195  }
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 473 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()().

474  {
475 
476  ret.set(false);
477 
478  double norm_chi2 = muon.normChi2();
479  double corr_d0 = muon.dB();
480  double corr_ed0 = muon.edB();
481  double corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
482 
483  // Get the PV for the muon z requirement
485  event.getByLabel( pvSrc_, pvtxHandle_ );
486 
487  double zvtx = -999;
488  if ( pvtxHandle_->size() > 0 ) {
489  zvtx = pvtxHandle_->at(0).z();
490  } else {
491  throw cms::Exception("InvalidInput") << " There needs to be at least one primary vertex in the event." << std::endl;
492  }
493 
494  //If required, recalculate the impact parameter using the beam spot
495  if (recalcDBFromBSp_) {
496 
497  //Get the beam spot
498  reco::TrackBase::Point beamPoint(0,0,0);
500  edm::Handle<reco::BeamSpot> beamSpotHandle;
501  event.getByLabel(beamLineSrc_, beamSpotHandle);
502 
503  if( beamSpotHandle.isValid() ){
504  beamSpot = *beamSpotHandle;
505  } else{
506  edm::LogError("DataNotAvailable")
507  << "No beam spot available from EventSetup, not adding high level selection \n";
508  }
509  beamPoint = reco::TrackBase::Point ( beamSpot.x0(), beamSpot.y0(), beamSpot.z0() );
510 
511  //Use the beamspot to correct the impact parameter and uncertainty
513  if ( innerTrack.isNonnull() && innerTrack.isAvailable() ) {
514  corr_d0 = -1.0 * innerTrack->dxy( beamPoint );
515  corr_ed0 = sqrt( innerTrack->d0Error() * innerTrack->d0Error()
516  + 0.5* beamSpot.BeamWidthX()*beamSpot.BeamWidthX()
517  + 0.5* beamSpot.BeamWidthY()*beamSpot.BeamWidthY() );
518  corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
519 
520  } else {
521  corr_d0 = 999.;
522  corr_ed0 = 999.;
523  }
524  }
525 
526  int nhits = static_cast<int>( muon.numberOfValidHits() );
527  int nValidMuonHits = static_cast<int> (muon.globalTrack()->hitPattern().numberOfValidMuonHits());
528 
529  double ecalVeto = muon.isolationR03().emVetoEt;
530  double hcalVeto = muon.isolationR03().hadVetoEt;
531 
532  double hcalIso = muon.hcalIso();
533  double ecalIso = muon.ecalIso();
534  double trkIso = muon.trackIso();
535  double pt = muon.pt() ;
536 
537  double relIso = (ecalIso + hcalIso + trkIso) / pt;
538 
539 
540  double z_mu = muon.vertex().z();
541 
542  int nPixelHits = muon.innerTrack()->hitPattern().pixelLayersWithMeasurement();
543 
544  int nMatchedStations = muon.numberOfMatches();
545 
546  if ( norm_chi2 < cut(indexChi2_, double()) || ignoreCut(indexChi2_) ) passCut(ret, indexChi2_ );
547  if ( fabs(corr_d0) < cut(indexD0_, double()) || ignoreCut(indexD0_) ) passCut(ret, indexD0_ );
548  if ( fabs(corr_ed0)< cut(indexED0_, double()) || ignoreCut(indexED0_) ) passCut(ret, indexED0_ );
549  if ( fabs(corr_sd0)< cut(indexSD0_, double()) || ignoreCut(indexSD0_) ) passCut(ret, indexSD0_ );
550  if ( nhits >= cut(indexNHits_, int() ) || ignoreCut(indexNHits_) ) passCut(ret, indexNHits_ );
551  if ( nValidMuonHits> cut(indexNValMuHits_,int()) || ignoreCut(indexNValMuHits_)) passCut(ret, indexNValMuHits_ );
552  if ( hcalVeto < cut(indexHCalVeto_,double())|| ignoreCut(indexHCalVeto_)) passCut(ret, indexHCalVeto_);
553  if ( ecalVeto < cut(indexECalVeto_,double())|| ignoreCut(indexECalVeto_)) passCut(ret, indexECalVeto_);
554  if ( fabs(z_mu-zvtx)< cut(indexLepZ_, double()) || ignoreCut(indexLepZ_) ) passCut(ret, indexLepZ_ );
555  if ( nPixelHits > cut(indexPixHits_,int()) || ignoreCut(indexPixHits_)) passCut(ret, indexPixHits_);
556  if ( nMatchedStations> cut(indexStations_,int()) || ignoreCut(indexStations_)) passCut(ret, indexStations_);
557 
558 
560  //
561  // JMS Dec 13 2010
562  // HACK
563  // Need double-sided relIso cut to implement data-driven QCD
564  //
565  //
567  if ( ((relIso > 0.2) && (relIso < 0.75))
569 
570 
571 
572 
573  setIgnored(ret);
574 
575  return (bool)ret;
576  }
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
Definition: Muon.cc:384
double z0() const
z coordinate
Definition: BeamSpot.h:68
float ecalIso() const
Definition: Muon.h:174
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
Definition: Muon.cc:397
reco::TrackRef innerTrack() const
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
Definition: Muon.h:73
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: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: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:82
bool isValid() const
Definition: HandleBase.h:76
double dB(IpType type=None) const
Definition: Muon.cc:410
reco::TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon) ...
Definition: Muon.h:81
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:435
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 198 of file MuonVPlusJetsIDSelectionFunctor.h.

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

199  {
200 
201  if (version_ == FALL10 ) return fall10Cuts(muon, event, ret);
202  else if (version_ == SPRING10 ) return spring10Cuts(muon, event, ret);
203  else if ( version_ == SUMMER08 ) return summer08Cuts( muon, ret );
204  else if ( version_ == FIRSTDATA ) return firstDataCuts( muon, ret );
205  else if ( version_ == KITQCD ) {
206  if (verbose_) std::cout << "Calling KIT selection method" << std::endl;
207  return kitQCDCuts (muon, event, ret);
208  }
209  else {
210  return false;
211  }
212  }
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 215 of file MuonVPlusJetsIDSelectionFunctor.h.

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

216  {
217 
218  if (version_ == SPRING10 || version_ == FALL10 ) throw cms::Exception("LogicError")
219  << "MuonVPlusJetsSelectionFunctor SPRING10 and FALL10 versions needs the event! Call operator()(muon,event,ret)"
220  <<std::endl;
221 
222  else if ( version_ == SUMMER08 ) return summer08Cuts( muon, ret );
223  else if ( version_ == FIRSTDATA ) return firstDataCuts( muon, ret );
224  else {
225  return false;
226  }
227  }
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 303 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()().

304  {
305 
306  ret.set(false);
307 
308  double norm_chi2 = muon.normChi2();
309  double corr_d0 = muon.dB();
310  double corr_ed0 = muon.edB();
311  double corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
312 
313  //If required, recalculate the impact parameter using the beam spot
314  if (recalcDBFromBSp_) {
315 
316  //Get the beam spot
317  reco::TrackBase::Point beamPoint(0,0,0);
319  edm::Handle<reco::BeamSpot> beamSpotHandle;
320  event.getByLabel(beamLineSrc_, beamSpotHandle);
321 
322  if( beamSpotHandle.isValid() ){
323  beamSpot = *beamSpotHandle;
324  } else{
325  edm::LogError("DataNotAvailable")
326  << "No beam spot available from EventSetup, not adding high level selection \n";
327  }
328  beamPoint = reco::TrackBase::Point ( beamSpot.x0(), beamSpot.y0(), beamSpot.z0() );
329 
330  //Use the beamspot to correct the impact parameter and uncertainty
332  if ( innerTrack.isNonnull() && innerTrack.isAvailable() ) {
333  corr_d0 = -1.0 * innerTrack->dxy( beamPoint );
334  corr_ed0 = sqrt( innerTrack->d0Error() * innerTrack->d0Error()
335  + 0.5* beamSpot.BeamWidthX()*beamSpot.BeamWidthX()
336  + 0.5* beamSpot.BeamWidthY()*beamSpot.BeamWidthY() );
337  corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
338 
339  } else {
340  corr_d0 = 999.;
341  corr_ed0 = 999.;
342  }
343  }
344 
345  int nhits = static_cast<int>( muon.numberOfValidHits() );
346  int nValidMuonHits = static_cast<int> (muon.globalTrack()->hitPattern().numberOfValidMuonHits());
347 
348  double ecalVeto = muon.isolationR03().emVetoEt;
349  double hcalVeto = muon.isolationR03().hadVetoEt;
350 
351  double hcalIso = muon.hcalIso();
352  double ecalIso = muon.ecalIso();
353  double trkIso = muon.trackIso();
354  double pt = muon.pt() ;
355 
356  double relIso = (ecalIso + hcalIso + trkIso) / pt;
357 
358  if ( norm_chi2 < cut(indexChi2_, double()) || ignoreCut(indexChi2_) ) passCut(ret, indexChi2_ );
359  if ( fabs(corr_d0) < cut(indexD0_, double()) || ignoreCut(indexD0_) ) passCut(ret, indexD0_ );
360  if ( fabs(corr_ed0)< cut(indexED0_, double()) || ignoreCut(indexED0_) ) passCut(ret, indexED0_ );
361  if ( fabs(corr_sd0)< cut(indexSD0_, double()) || ignoreCut(indexSD0_) ) passCut(ret, indexSD0_ );
362  if ( nhits >= cut(indexNHits_, int() ) || ignoreCut(indexNHits_) ) passCut(ret, indexNHits_ );
363  if ( nValidMuonHits> cut(indexNValMuHits_,int()) || ignoreCut(indexNValMuHits_)) passCut(ret, indexNValMuHits_ );
364  if ( hcalVeto < cut(indexHCalVeto_,double())|| ignoreCut(indexHCalVeto_)) passCut(ret, indexHCalVeto_);
365  if ( ecalVeto < cut(indexECalVeto_,double())|| ignoreCut(indexECalVeto_)) passCut(ret, indexECalVeto_);
366  if ( relIso < cut(indexRelIso_, double()) || ignoreCut(indexRelIso_) ) passCut(ret, indexRelIso_ );
367 
368  setIgnored(ret);
369 
370  return (bool)ret;
371  }
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
Definition: Muon.cc:384
double z0() const
z coordinate
Definition: BeamSpot.h:68
float ecalIso() const
Definition: Muon.h:174
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
Definition: Muon.cc:397
reco::TrackRef innerTrack() const
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
Definition: Muon.h:73
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: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: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:82
bool isValid() const
Definition: HandleBase.h:76
double dB(IpType type=None) const
Definition: Muon.cc:410
reco::TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon) ...
Definition: Muon.h:81
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:435
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 233 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()().

234  {
235 
236  ret.set(false);
237 
238  double norm_chi2 = muon.normChi2();
239  double corr_d0 = muon.dB();
240  int nhits = static_cast<int>( muon.numberOfValidHits() );
241 
242  double ecalVeto = muon.isolationR03().emVetoEt;
243  double hcalVeto = muon.isolationR03().hadVetoEt;
244 
245  double hcalIso = muon.hcalIso();
246  double ecalIso = muon.ecalIso();
247  double trkIso = muon.trackIso();
248  double pt = muon.pt() ;
249 
250  double relIso = (ecalIso + hcalIso + trkIso) / pt;
251 
252  if ( norm_chi2 < cut(indexChi2_, double()) || ignoreCut(indexChi2_) ) passCut(ret, indexChi2_ );
253  if ( fabs(corr_d0) < cut(indexD0_, double()) || ignoreCut(indexD0_) ) passCut(ret, indexD0_ );
254  if ( nhits >= cut(indexNHits_, int() ) || ignoreCut(indexNHits_) ) passCut(ret, indexNHits_ );
255  if ( hcalVeto < cut(indexHCalVeto_,double())|| ignoreCut(indexHCalVeto_)) passCut(ret, indexHCalVeto_);
256  if ( ecalVeto < cut(indexECalVeto_,double())|| ignoreCut(indexECalVeto_)) passCut(ret, indexECalVeto_);
257  if ( relIso < cut(indexRelIso_, double()) || ignoreCut(indexRelIso_) ) passCut(ret, indexRelIso_ );
258 
259  setIgnored(ret);
260 
261  return (bool)ret;
262  }
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
Definition: Muon.cc:384
float ecalIso() const
Definition: Muon.h:174
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
Definition: Muon.cc:397
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: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 &quot;s&quot;
Definition: Selector.h:159
double dB(IpType type=None) const
Definition: Muon.cc:410
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
edm::EDGetTokenT<reco::BeamSpot> MuonVPlusJetsIDSelectionFunctor::beamLineSrcToken_
private

Definition at line 587 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 603 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 604 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 605 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 591 of file MuonVPlusJetsIDSelectionFunctor.h.

Referenced by MuonVPlusJetsIDSelectionFunctor().

bool MuonVPlusJetsIDSelectionFunctor::recalcDBFromBSp_
private
bool MuonVPlusJetsIDSelectionFunctor::verbose_
Version_t MuonVPlusJetsIDSelectionFunctor::version_
private

Definition at line 583 of file MuonVPlusJetsIDSelectionFunctor.h.

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