CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
CSCBaseValidation Class Referenceabstract

#include <CSCBaseValidation.h>

Inheritance diagram for CSCBaseValidation:
CSCALCTDigiValidation CSCCLCTDigiValidation CSCCLCTPreTriggerDigiValidation CSCComparatorDigiValidation CSCCorrelatedLCTDigiValidation CSCRecHit2DValidation CSCSegmentValidation CSCStripDigiValidation CSCStubEfficiencyValidation CSCStubResolutionValidation CSCWireDigiValidation

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 

Public Member Functions

virtual void analyze (const edm::Event &e, const edm::EventSetup &eventSetup)=0
 
 CSCBaseValidation (const edm::ParameterSet &ps)
 
void setGeometry (const CSCGeometry *geom)
 
void setSimHitMap (const PSimHitMap *simHitMap)
 
virtual ~CSCBaseValidation ()
 

Protected Member Functions

const CSCLayerfindLayer (int detId) const
 
bool isSimTrackGood (const SimTrack &t) const
 

Protected Attributes

bool doSim_
 
double simTrackMaxEta_
 
double simTrackMinEta_
 
double simTrackMinPt_
 
const CSCGeometrytheCSCGeometry
 
const PSimHitMaptheSimHitMap
 

Detailed Description

Definition at line 14 of file CSCBaseValidation.h.

Member Typedef Documentation

Definition at line 16 of file CSCBaseValidation.h.

Definition at line 17 of file CSCBaseValidation.h.

Constructor & Destructor Documentation

CSCBaseValidation::CSCBaseValidation ( const edm::ParameterSet ps)

Definition at line 4 of file CSCBaseValidation.cc.

References edm::ParameterSet::getParameter(), cscDigiValidation_cfi::simTrack, simTrackMaxEta_, simTrackMinEta_, and simTrackMinPt_.

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 }
const CSCGeometry * theCSCGeometry
const PSimHitMap * theSimHitMap
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
virtual CSCBaseValidation::~CSCBaseValidation ( )
inlinevirtual

Definition at line 20 of file CSCBaseValidation.h.

20 {}

Member Function Documentation

virtual void CSCBaseValidation::analyze ( const edm::Event e,
const edm::EventSetup eventSetup 
)
pure virtual
const CSCLayer * CSCBaseValidation::findLayer ( int  detId) const
protected

Definition at line 12 of file CSCBaseValidation.cc.

References cms::cuda::assert(), CSCDetId, CSCGeometry::idToDetUnit(), and theCSCGeometry.

Referenced by CSCRecHit2DValidation::analyze(), CSCSegmentValidation::analyze(), CSCWireDigiValidation::analyze(), and CSCComparatorDigiValidation::analyze().

12  {
13  assert(theCSCGeometry != nullptr);
14  const GeomDetUnit *detUnit = theCSCGeometry->idToDetUnit(CSCDetId(detId));
15  return dynamic_cast<const CSCLayer *>(detUnit);
16 }
const CSCGeometry * theCSCGeometry
assert(be >=bs)
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: CSCGeometry.cc:89
bool CSCBaseValidation::isSimTrackGood ( const SimTrack t) const
protected

Definition at line 18 of file CSCBaseValidation.cc.

References funct::abs(), PVValHelper::eta, CoreSimTrack::momentum(), SimTrack::noGenpart(), SimTrack::noVertex(), simTrackMaxEta_, simTrackMinEta_, simTrackMinPt_, and CoreSimTrack::type().

Referenced by CSCStubEfficiencyValidation::analyze(), and CSCStubResolutionValidation::analyze().

18  {
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 }
bool noGenpart() const
Definition: SimTrack.h:38
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool noVertex() const
Definition: SimTrack.h:34
int type() const
particle type (HEP PDT convension)
Definition: CoreSimTrack.h:22
const math::XYZTLorentzVectorD & momentum() const
Definition: CoreSimTrack.h:19
void CSCBaseValidation::setGeometry ( const CSCGeometry geom)
inline

Definition at line 21 of file CSCBaseValidation.h.

References relativeConstraints::geom, and theCSCGeometry.

21 { theCSCGeometry = geom; }
const CSCGeometry * theCSCGeometry
void CSCBaseValidation::setSimHitMap ( const PSimHitMap simHitMap)
inline

Definition at line 22 of file CSCBaseValidation.h.

References theSimHitMap.

22 { theSimHitMap = simHitMap; }
const PSimHitMap * theSimHitMap

Member Data Documentation

bool CSCBaseValidation::doSim_
protected
double CSCBaseValidation::simTrackMaxEta_
protected

Definition at line 35 of file CSCBaseValidation.h.

Referenced by CSCBaseValidation(), and isSimTrackGood().

double CSCBaseValidation::simTrackMinEta_
protected

Definition at line 34 of file CSCBaseValidation.h.

Referenced by CSCBaseValidation(), and isSimTrackGood().

double CSCBaseValidation::simTrackMinPt_
protected

Definition at line 33 of file CSCBaseValidation.h.

Referenced by CSCBaseValidation(), and isSimTrackGood().

const CSCGeometry* CSCBaseValidation::theCSCGeometry
protected

Definition at line 31 of file CSCBaseValidation.h.

Referenced by findLayer(), and setGeometry().

const PSimHitMap* CSCBaseValidation::theSimHitMap
protected