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 1047 of file MuonSelectors.cc.

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

Referenced by muon::makeSelectorBitset().

1047  {
1048  const auto& combinedTime = muon.time();
1049  const auto& rpcTime = muon.rpcTime();
1050  bool combinedTimeIsOk = (combinedTime.nDof > 7);
1051  bool rpcTimeIsOk = (rpcTime.nDof > 1 && fabs(rpcTime.timeAtIpInOutErr) < 0.001);
1052  bool outOfTime = false;
1053  if (rpcTimeIsOk) {
1054  if ((fabs(rpcTime.timeAtIpInOut) > 10) && !(combinedTimeIsOk && fabs(combinedTime.timeAtIpInOut) < 10))
1055  outOfTime = true;
1056  } else {
1057  if (combinedTimeIsOk && (combinedTime.timeAtIpInOut > 20 || combinedTime.timeAtIpInOut < -45))
1058  outOfTime = true;
1059  }
1060  return outOfTime;
1061 }
MuonTime time() const
get DT/CSC combined timing information
Definition: Muon.h:132
MuonTime rpcTime() const
get RPC timing information
Definition: Muon.h:136