CMS 3D CMS Logo

CSCBaseValidation.cc
Go to the documentation of this file.
3 
5  : doSim_(ps.getParameter<bool>("doSim")), theSimHitMap(nullptr), theCSCGeometry(nullptr) {
6  const auto &simTrack = ps.getParameter<edm::ParameterSet>("simTrack");
7  simTrackMinPt_ = simTrack.getParameter<double>("minPt");
8  simTrackMinEta_ = simTrack.getParameter<double>("minEta");
9  simTrackMaxEta_ = simTrack.getParameter<double>("maxEta");
10 }
11 
13  assert(theCSCGeometry != nullptr);
15  return dynamic_cast<const CSCLayer *>(detUnit);
16 }
17 
19  // SimTrack selection
20  if (t.noVertex())
21  return false;
22  if (t.noGenpart())
23  return false;
24  // only muons
25  if (std::abs(t.type()) != 13)
26  return false;
27  // pt selection
28  if (t.momentum().pt() < simTrackMinPt_)
29  return false;
30  // eta selection
31  const float eta(std::abs(t.momentum().eta()));
33  return false;
34  return true;
35 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const CSCGeometry * theCSCGeometry
assert(be >=bs)
bool isSimTrackGood(const SimTrack &t) const
const CSCLayer * findLayer(int detId) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
CSCBaseValidation(const edm::ParameterSet &ps)
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: CSCGeometry.cc:89