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 | Private Attributes
MuonVPlusJetsIDSelectionFunctor Class Reference

#include <MuonVPlusJetsIDSelectionFunctor.h>

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

Public Types

enum  Version_t { SUMMER08, FIRSTDATA, SPRING10, N_VERSIONS }
 
- 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 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)
 
 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)
 
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 ()
 

Private Attributes

edm::InputTag beamLineSrc_
 
index_type indexChi2_
 
index_type indexD0_
 
index_type indexECalVeto_
 
index_type indexED0_
 
index_type indexHCalVeto_
 
index_type indexNHits_
 
index_type indexNValMuHits_
 
index_type indexRelIso_
 
index_type indexSD0_
 
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 19 of file MuonVPlusJetsIDSelectionFunctor.h.

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

Definition at line 21 of file MuonVPlusJetsIDSelectionFunctor.h.

References beamLineSrc_, edm::hlt::Exception, edm::ParameterSet::exists(), FIRSTDATA, Selector< pat::Muon >::getBitTemplate(), edm::ParameterSet::getParameter(), initialize(), N_VERSIONS, recalcDBFromBSp_, Selector< pat::Muon >::retInternal_, Selector< pat::Muon >::setIgnoredCuts(), SPRING10, SUMMER08, and AlCaRecoCosmics_cfg::version.

21  {
22 
23  std::string versionStr = parameters.getParameter<std::string>("version");
24 
26 
27  if ( versionStr == "SUMMER08" ) {
28  version = SUMMER08;
29  }
30  else if ( versionStr == "FIRSTDATA" ) {
31  version = FIRSTDATA;
32  }
33  else if ( versionStr == "SPRING10" ) {
34  version = SPRING10;
35  }
36  else {
37  throw cms::Exception("InvalidInput") << "Expect version to be one of SUMMER08, FIRSTDATA, SPRING10," << std::endl;
38  }
39 
40  initialize( version,
41  parameters.getParameter<double>("Chi2"),
42  parameters.getParameter<double>("D0") ,
43  parameters.getParameter<double>("ED0") ,
44  parameters.getParameter<double>("SD0") ,
45  parameters.getParameter<int> ("NHits") ,
46  parameters.getParameter<int> ("NValMuHits"),
47  parameters.getParameter<double>("ECalVeto") ,
48  parameters.getParameter<double>("HCalVeto") ,
49  parameters.getParameter<double>("RelIso") );
50  if ( parameters.exists("cutsToIgnore") )
51  setIgnoredCuts( parameters.getParameter<std::vector<std::string> >("cutsToIgnore") );
52 
54 
55  recalcDBFromBSp_ = parameters.getParameter<bool>("RecalcFromBeamSpot");
56  beamLineSrc_ = parameters.getParameter<edm::InputTag>("beamLineSrc");
57  }
pat::strbitset retInternal_
internal ret if users don&#39;t care about return bits
Definition: Selector.h:288
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)
pat::strbitset getBitTemplate() const
Get an empty bitset with the proper names.
Definition: Selector.h:213
void setIgnoredCuts(std::vector< std::string > const &bitsToIgnore)
set the bits to ignore from a vector
Definition: Selector.h:168
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 
)
inline

Definition at line 60 of file MuonVPlusJetsIDSelectionFunctor.h.

References ExpressReco_HICollisions_FallBack::chi2, debug_cff::d0, and initialize().

70  : recalcDBFromBSp_(false) {
71  initialize( version, chi2, d0, ed0, sd0, nhits, nValidMuonHits, ecalveto, hcalveto, reliso );
72  }
tuple d0
Definition: debug_cff.py:3
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)

Member Function Documentation

bool MuonVPlusJetsIDSelectionFunctor::firstDataCuts ( const pat::Muon muon,
pat::strbitset ret 
)
inline

Definition at line 201 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(), reco::LeafCandidate::pt(), ExpressReco_HICollisions_FallBack::pt, runTheMatrix::ret, pat::strbitset::set(), Selector< pat::Muon >::setIgnored(), and pat::Muon::trackIso().

Referenced by operator()().

202  {
203 
204  ret.set(false);
205 
206  double norm_chi2 = muon.normChi2();
207  double corr_d0 = muon.dB();
208  double corr_ed0 = muon.edB();
209  double corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
210  int nhits = static_cast<int>( muon.numberOfValidHits() );
211 
212  double ecalVeto = muon.isolationR03().emVetoEt;
213  double hcalVeto = muon.isolationR03().hadVetoEt;
214 
215  double hcalIso = muon.hcalIso();
216  double ecalIso = muon.ecalIso();
217  double trkIso = muon.trackIso();
218  double pt = muon.pt() ;
219 
220  double relIso = (ecalIso + hcalIso + trkIso) / pt;
221 
222  if ( norm_chi2 < cut(indexChi2_, double()) || ignoreCut(indexChi2_) ) passCut(ret, indexChi2_ );
223  if ( fabs(corr_d0) < cut(indexD0_, double()) || ignoreCut(indexD0_) ) passCut(ret, indexD0_ );
224  if ( fabs(corr_ed0)< cut(indexED0_, double()) || ignoreCut(indexED0_) ) passCut(ret, indexED0_ );
225  if ( fabs(corr_sd0)< cut(indexSD0_, double()) || ignoreCut(indexSD0_) ) passCut(ret, indexSD0_ );
226  if ( nhits >= cut(indexNHits_, int() ) || ignoreCut(indexNHits_) ) passCut(ret, indexNHits_ );
227  if ( hcalVeto < cut(indexHCalVeto_,double())|| ignoreCut(indexHCalVeto_)) passCut(ret, indexHCalVeto_);
228  if ( ecalVeto < cut(indexECalVeto_,double())|| ignoreCut(indexECalVeto_)) passCut(ret, indexECalVeto_);
229  if ( relIso < cut(indexRelIso_, double()) || ignoreCut(indexRelIso_) ) passCut(ret, indexRelIso_ );
230 
231  setIgnored(ret);
232 
233  return (bool)ret;
234  }
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
Definition: Muon.cc:278
float ecalIso() const
Definition: Muon.h:142
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
Definition: Muon.cc:291
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:225
float trackIso() const
Definition: Muon.h:138
float hcalIso() const
Definition: Muon.h:146
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
Definition: Selector.h:177
bool ignoreCut(std::string const &s) const
ignore the cut at index &quot;s&quot;
Definition: Selector.h:160
double dB(IpType type=None) const
Definition: Muon.cc:304
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:329
virtual double pt() const
transverse momentum
strbitset & set(bool val=true)
set method of all bits
Definition: strbitset.h:144
const MuonIsolation & isolationR03() const
Definition: Muon.h:109
int cut(index_type const &i, int val) const
Access the int cut values at index &quot;s&quot;.
Definition: Selector.h:195
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 
)
inline

Definition at line 77 of file MuonVPlusJetsIDSelectionFunctor.h.

References Selector< pat::Muon >::bits_, ExpressReco_HICollisions_FallBack::chi2, debug_cff::d0, FIRSTDATA, indexChi2_, indexD0_, indexECalVeto_, indexED0_, indexHCalVeto_, indexNHits_, indexNValMuHits_, indexRelIso_, indexSD0_, Selector< pat::Muon >::push_back(), Selector< pat::Muon >::set(), SPRING10, SUMMER08, AlCaRecoCosmics_cfg::version, and version_.

Referenced by MuonVPlusJetsIDSelectionFunctor().

87  {
88  version_ = version;
89 
90  push_back("Chi2", chi2 );
91  push_back("D0", d0 );
92  push_back("ED0", ed0 );
93  push_back("SD0", sd0 );
94  push_back("NHits", nhits );
95  push_back("NValMuHits", nValidMuonHits );
96  push_back("ECalVeto", ecalveto);
97  push_back("HCalVeto", hcalveto);
98  push_back("RelIso", reliso );
99 
100  set("Chi2");
101  set("D0");
102  set("ED0");
103  set("SD0");
104  set("NHits");
105  set("NValMuHits");
106  set("ECalVeto");
107  set("HCalVeto");
108  set("RelIso");
109 
110  indexChi2_ = index_type(&bits_, "Chi2" );
111  indexD0_ = index_type(&bits_, "D0" );
112  indexED0_ = index_type(&bits_, "ED0" );
113  indexSD0_ = index_type(&bits_, "SD0" );
114  indexNHits_ = index_type(&bits_, "NHits" );
115  indexNValMuHits_ = index_type(&bits_, "NValMuHits" );
116  indexECalVeto_ = index_type(&bits_, "ECalVeto" );
117  indexHCalVeto_ = index_type(&bits_, "HCalVeto" );
118  indexRelIso_ = index_type(&bits_, "RelIso" );
119 
120  if ( version == SPRING10) {
121  set("ED0", false );
122  set("SD0", false);
123  set("ECalVeto",false);
124  set("HCalVeto",false);
125  } else if ( version_ == FIRSTDATA ) {
126  set("D0", false );
127  set("ED0", false );
128  set("NValMuHits",false);
129  } else if (version == SUMMER08 ) {
130  set("SD0", false);
131  set("NValMuHits",false);
132  }
133 
134  }
void set(std::string const &s, bool val=true)
Set a given selection cut, on or off.
Definition: Selector.h:106
tuple d0
Definition: debug_cff.py:3
pat::strbitset::index_type index_type
Definition: Selector.h:30
pat::strbitset bits_
the bitset indexed by strings
Definition: Selector.h:287
virtual void push_back(std::string const &s)
This is the registration of an individual cut string.
Definition: Selector.h:47
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 137 of file MuonVPlusJetsIDSelectionFunctor.h.

References FIRSTDATA, firstDataCuts(), SPRING10, spring10Cuts(), SUMMER08, summer08Cuts(), and version_.

138  {
139 
140  if (version_ == SPRING10 ) return spring10Cuts(muon, event, ret);
141  else if ( version_ == SUMMER08 ) return summer08Cuts( muon, ret );
142  else if ( version_ == FIRSTDATA ) return firstDataCuts( muon, ret );
143  else {
144  return false;
145  }
146  }
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)
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 149 of file MuonVPlusJetsIDSelectionFunctor.h.

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

150  {
151 
152  if (version_ == SPRING10 ) throw cms::Exception("LogicError")
153  << "MuonVPlusJetsSelectionFunctor SPRING10 version needs the event! Call operator()(muon,event,ret)"
154  <<std::endl;
155 
156  else if ( version_ == SUMMER08 ) return summer08Cuts( muon, ret );
157  else if ( version_ == FIRSTDATA ) return firstDataCuts( muon, ret );
158  else {
159  return false;
160  }
161  }
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 237 of file MuonVPlusJetsIDSelectionFunctor.h.

References beamLineSrc_, ExpressReco_HICollisions_FallBack::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(), reco::LeafCandidate::pt(), ExpressReco_HICollisions_FallBack::pt, recalcDBFromBSp_, runTheMatrix::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()().

238  {
239 
240  ret.set(false);
241 
242  double norm_chi2 = muon.normChi2();
243  double corr_d0 = muon.dB();
244  double corr_ed0 = muon.edB();
245  double corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
246 
247  //If required, recalculate the impact parameter using the beam spot
248  if (recalcDBFromBSp_) {
249 
250  //Get the beam spot
251  reco::TrackBase::Point beamPoint(0,0,0);
253  edm::Handle<reco::BeamSpot> beamSpotHandle;
254  event.getByLabel(beamLineSrc_, beamSpotHandle);
255 
256  if( beamSpotHandle.isValid() ){
257  beamSpot = *beamSpotHandle;
258  } else{
259  edm::LogError("DataNotAvailable")
260  << "No beam spot available from EventSetup, not adding high level selection \n";
261  }
262  beamPoint = reco::TrackBase::Point ( beamSpot.x0(), beamSpot.y0(), beamSpot.z0() );
263 
264  //Use the beamspot to correct the impact parameter and uncertainty
266  if ( innerTrack.isNonnull() && innerTrack.isAvailable() ) {
267  corr_d0 = -1.0 * innerTrack->dxy( beamPoint );
268  corr_ed0 = sqrt( innerTrack->d0Error() * innerTrack->d0Error()
269  + 0.5* beamSpot.BeamWidthX()*beamSpot.BeamWidthX()
270  + 0.5* beamSpot.BeamWidthY()*beamSpot.BeamWidthY() );
271  corr_sd0 = ( corr_ed0 > 0.000000001 ) ? corr_d0 / corr_ed0 : 999.0;
272 
273  } else {
274  corr_d0 = 999.;
275  corr_ed0 = 999.;
276  }
277  }
278 
279  int nhits = static_cast<int>( muon.numberOfValidHits() );
280  int nValidMuonHits = static_cast<int> (muon.globalTrack()->hitPattern().numberOfValidMuonHits());
281 
282  double ecalVeto = muon.isolationR03().emVetoEt;
283  double hcalVeto = muon.isolationR03().hadVetoEt;
284 
285  double hcalIso = muon.hcalIso();
286  double ecalIso = muon.ecalIso();
287  double trkIso = muon.trackIso();
288  double pt = muon.pt() ;
289 
290  double relIso = (ecalIso + hcalIso + trkIso) / pt;
291 
292  if ( norm_chi2 < cut(indexChi2_, double()) || ignoreCut(indexChi2_) ) passCut(ret, indexChi2_ );
293  if ( fabs(corr_d0) < cut(indexD0_, double()) || ignoreCut(indexD0_) ) passCut(ret, indexD0_ );
294  if ( fabs(corr_ed0)< cut(indexED0_, double()) || ignoreCut(indexED0_) ) passCut(ret, indexED0_ );
295  if ( fabs(corr_sd0)< cut(indexSD0_, double()) || ignoreCut(indexSD0_) ) passCut(ret, indexSD0_ );
296  if ( nhits >= cut(indexNHits_, int() ) || ignoreCut(indexNHits_) ) passCut(ret, indexNHits_ );
297  if ( nValidMuonHits> cut(indexNValMuHits_,int()) || ignoreCut(indexNValMuHits_)) passCut(ret, indexNValMuHits_ );
298  if ( hcalVeto < cut(indexHCalVeto_,double())|| ignoreCut(indexHCalVeto_)) passCut(ret, indexHCalVeto_);
299  if ( ecalVeto < cut(indexECalVeto_,double())|| ignoreCut(indexECalVeto_)) passCut(ret, indexECalVeto_);
300  if ( relIso < cut(indexRelIso_, double()) || ignoreCut(indexRelIso_) ) passCut(ret, indexRelIso_ );
301 
302  setIgnored(ret);
303 
304  return (bool)ret;
305  }
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
Definition: Muon.cc:278
double z0() const
z coordinate
Definition: BeamSpot.h:69
float ecalIso() const
Definition: Muon.h:142
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
Definition: Muon.cc:291
reco::TrackRef innerTrack() const
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
Definition: Muon.h:70
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:225
float trackIso() const
Definition: Muon.h:138
float hcalIso() const
Definition: Muon.h:146
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
Definition: Selector.h:177
T sqrt(T t)
Definition: SSEVec.h:28
bool ignoreCut(std::string const &s) const
ignore the cut at index &quot;s&quot;
Definition: Selector.h:160
double BeamWidthX() const
beam width X
Definition: BeamSpot.h:77
math::XYZPoint Point
point in the space
Definition: TrackBase.h:75
bool isValid() const
Definition: HandleBase.h:76
double dB(IpType type=None) const
Definition: Muon.cc:304
reco::TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon) ...
Definition: Muon.h:78
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:329
virtual double pt() const
transverse momentum
strbitset & set(bool val=true)
set method of all bits
Definition: strbitset.h:144
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:79
double y0() const
y coordinate
Definition: BeamSpot.h:67
const MuonIsolation & isolationR03() const
Definition: Muon.h:109
int cut(index_type const &i, int val) const
Access the int cut values at index &quot;s&quot;.
Definition: Selector.h:195
double x0() const
x coordinate
Definition: BeamSpot.h:65
bool MuonVPlusJetsIDSelectionFunctor::summer08Cuts ( const pat::Muon muon,
pat::strbitset ret 
)
inline

Definition at line 167 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(), reco::LeafCandidate::pt(), ExpressReco_HICollisions_FallBack::pt, runTheMatrix::ret, pat::strbitset::set(), Selector< pat::Muon >::setIgnored(), and pat::Muon::trackIso().

Referenced by operator()().

168  {
169 
170  ret.set(false);
171 
172  double norm_chi2 = muon.normChi2();
173  double corr_d0 = muon.dB();
174  int nhits = static_cast<int>( muon.numberOfValidHits() );
175 
176  double ecalVeto = muon.isolationR03().emVetoEt;
177  double hcalVeto = muon.isolationR03().hadVetoEt;
178 
179  double hcalIso = muon.hcalIso();
180  double ecalIso = muon.ecalIso();
181  double trkIso = muon.trackIso();
182  double pt = muon.pt() ;
183 
184  double relIso = (ecalIso + hcalIso + trkIso) / pt;
185 
186  if ( norm_chi2 < cut(indexChi2_, double()) || ignoreCut(indexChi2_) ) passCut(ret, indexChi2_ );
187  if ( fabs(corr_d0) < cut(indexD0_, double()) || ignoreCut(indexD0_) ) passCut(ret, indexD0_ );
188  if ( nhits >= cut(indexNHits_, int() ) || ignoreCut(indexNHits_) ) passCut(ret, indexNHits_ );
189  if ( hcalVeto < cut(indexHCalVeto_,double())|| ignoreCut(indexHCalVeto_)) passCut(ret, indexHCalVeto_);
190  if ( ecalVeto < cut(indexECalVeto_,double())|| ignoreCut(indexECalVeto_)) passCut(ret, indexECalVeto_);
191  if ( relIso < cut(indexRelIso_, double()) || ignoreCut(indexRelIso_) ) passCut(ret, indexRelIso_ );
192 
193  setIgnored(ret);
194 
195  return (bool)ret;
196  }
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
Definition: Muon.cc:278
float ecalIso() const
Definition: Muon.h:142
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
Definition: Muon.cc:291
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:225
float trackIso() const
Definition: Muon.h:138
float hcalIso() const
Definition: Muon.h:146
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
Definition: Selector.h:177
bool ignoreCut(std::string const &s) const
ignore the cut at index &quot;s&quot;
Definition: Selector.h:160
double dB(IpType type=None) const
Definition: Muon.cc:304
float emVetoEt
ecal sum-et in the veto region in r-phi
Definition: MuonIsolation.h:14
virtual double pt() const
transverse momentum
strbitset & set(bool val=true)
set method of all bits
Definition: strbitset.h:144
const MuonIsolation & isolationR03() const
Definition: Muon.h:109
int cut(index_type const &i, int val) const
Access the int cut values at index &quot;s&quot;.
Definition: Selector.h:195

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

Definition at line 317 of file MuonVPlusJetsIDSelectionFunctor.h.

Referenced by firstDataCuts(), initialize(), and spring10Cuts().

index_type MuonVPlusJetsIDSelectionFunctor::indexHCalVeto_
private
index_type MuonVPlusJetsIDSelectionFunctor::indexNHits_
private
index_type MuonVPlusJetsIDSelectionFunctor::indexNValMuHits_
private

Definition at line 320 of file MuonVPlusJetsIDSelectionFunctor.h.

Referenced by initialize(), and spring10Cuts().

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

Definition at line 318 of file MuonVPlusJetsIDSelectionFunctor.h.

Referenced by firstDataCuts(), initialize(), and spring10Cuts().

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

Definition at line 310 of file MuonVPlusJetsIDSelectionFunctor.h.

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