CMS 3D CMS Logo

Namespaces | Functions
MuonSelectors.cc File Reference
#include "DataFormats/MuonReco/interface/MuonSelectors.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/MuonDetId/interface/MuonSubdetId.h"
#include "DataFormats/MuonDetId/interface/CSCDetId.h"
#include "DataFormats/VertexReco/interface/Vertex.h"
#include "DataFormats/MuonReco/interface/MuonRPCHitMatch.h"

Go to the source code of this file.

Namespaces

 muon
 

Functions

bool outOfTimeMuon (const reco::Muon &muon)
 
SelectionType muon::selectionTypeFromString (const std::string &label)
 

Function Documentation

bool outOfTimeMuon ( const reco::Muon muon)

Definition at line 984 of file MuonSelectors.cc.

References reco::Muon::rpcTime(), and reco::Muon::time().

Referenced by muon::makeSelectorBitset().

984  {
985  const auto& combinedTime = muon.time();
986  const auto& rpcTime = muon.rpcTime();
987  bool combinedTimeIsOk = (combinedTime.nDof>7);
988  bool rpcTimeIsOk = (rpcTime.nDof>1 && fabs(rpcTime.timeAtIpInOutErr)<0.001);
989  bool outOfTime = false;
990  if (rpcTimeIsOk){
991  if ( (fabs(rpcTime.timeAtIpInOut)>10 ) &&
992  !(combinedTimeIsOk && fabs(combinedTime.timeAtIpInOut)<10) )
993  outOfTime = true;
994  } else {
995  if (combinedTimeIsOk && (combinedTime.timeAtIpInOut>20 || combinedTime.timeAtIpInOut<-45))
996  outOfTime = true;
997  }
998  return outOfTime;
999 }
MuonTime time() const
get DT/CSC combined timing information
Definition: Muon.h:131
MuonTime rpcTime() const
get RPC timing information
Definition: Muon.h:135