CMS 3D CMS Logo

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

◆ DQMStore

Definition at line 16 of file CSCBaseValidation.h.

◆ MonitorElement

Definition at line 17 of file CSCBaseValidation.h.

Constructor & Destructor Documentation

◆ CSCBaseValidation()

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

◆ ~CSCBaseValidation()

virtual CSCBaseValidation::~CSCBaseValidation ( )
inlinevirtual

Definition at line 20 of file CSCBaseValidation.h.

20 {}

Member Function Documentation

◆ analyze()

virtual void CSCBaseValidation::analyze ( const edm::Event e,
const edm::EventSetup eventSetup 
)
pure virtual

◆ findLayer()

const CSCLayer * CSCBaseValidation::findLayer ( int  detId) const
protected

Definition at line 12 of file CSCBaseValidation.cc.

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

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

12  {
13  assert(theCSCGeometry != nullptr);
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

◆ isSimTrackGood()

bool CSCBaseValidation::isSimTrackGood ( const SimTrack t) const
protected

Definition at line 18 of file CSCBaseValidation.cc.

References funct::abs(), PVValHelper::eta, simTrackMaxEta_, simTrackMinEta_, simTrackMinPt_, and submitPVValidationJobs::t.

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 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

◆ setGeometry()

void CSCBaseValidation::setGeometry ( const CSCGeometry geom)
inline

Definition at line 21 of file CSCBaseValidation.h.

References relativeConstraints::geom, and theCSCGeometry.

◆ setSimHitMap()

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

◆ doSim_

bool CSCBaseValidation::doSim_
protected

◆ simTrackMaxEta_

double CSCBaseValidation::simTrackMaxEta_
protected

Definition at line 35 of file CSCBaseValidation.h.

Referenced by CSCBaseValidation(), and isSimTrackGood().

◆ simTrackMinEta_

double CSCBaseValidation::simTrackMinEta_
protected

Definition at line 34 of file CSCBaseValidation.h.

Referenced by CSCBaseValidation(), and isSimTrackGood().

◆ simTrackMinPt_

double CSCBaseValidation::simTrackMinPt_
protected

Definition at line 33 of file CSCBaseValidation.h.

Referenced by CSCBaseValidation(), and isSimTrackGood().

◆ theCSCGeometry

const CSCGeometry* CSCBaseValidation::theCSCGeometry
protected

Definition at line 31 of file CSCBaseValidation.h.

Referenced by findLayer(), and setGeometry().

◆ theSimHitMap

const PSimHitMap* CSCBaseValidation::theSimHitMap
protected