test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
PFRecHitQTestHCALChannel Class Reference

#include <PFRecHitQTests.h>

Inheritance diagram for PFRecHitQTestHCALChannel:
PFRecHitQTestBase

Public Member Functions

void beginEvent (const edm::Event &event, const edm::EventSetup &iSetup)
 
 PFRecHitQTestHCALChannel ()
 
 PFRecHitQTestHCALChannel (const edm::ParameterSet &iConfig)
 
bool test (reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean)
 
bool test (reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
 
bool test (reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
 
bool test (reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
 
bool test (reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
 
- Public Member Functions inherited from PFRecHitQTestBase
 PFRecHitQTestBase ()
 
 PFRecHitQTestBase (const edm::ParameterSet &iConfig)
 

Protected Attributes

const HcalSeverityLevelComputerhcalSevLvlComputer_
 
const HcalChannelQualitytheHcalChStatus_
 
int threshold_
 

Detailed Description

Definition at line 61 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

PFRecHitQTestHCALChannel::PFRecHitQTestHCALChannel ( )
inline

Definition at line 63 of file PFRecHitQTests.h.

63  {
64 
65  }
PFRecHitQTestHCALChannel::PFRecHitQTestHCALChannel ( const edm::ParameterSet iConfig)
inline

Definition at line 67 of file PFRecHitQTests.h.

References edm::ParameterSet::getParameter(), and threshold_.

67  :
68  PFRecHitQTestBase(iConfig)
69  {
70  threshold_ = iConfig.getParameter<int>("maxSeverity");
71  }
T getParameter(std::string const &) const

Member Function Documentation

void PFRecHitQTestHCALChannel::beginEvent ( const edm::Event event,
const edm::EventSetup iSetup 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 73 of file PFRecHitQTests.h.

References edm::EventSetup::get(), hcalSevLvlComputer_, edm::ESHandle< class >::product(), HcalCondObjectContainerBase::setTopo(), theHcalChStatus_, and HcalCondObjectContainerBase::topo().

73  {
75  iSetup.get<IdealGeometryRecord>().get(topo);
77  iSetup.get<HcalChannelQualityRcd>().get( hcalChStatus );
78  theHcalChStatus_ = hcalChStatus.product();
80  edm::ESHandle<HcalSeverityLevelComputer> hcalSevLvlComputerHndl;
81  iSetup.get<HcalSeverityLevelComputerRcd>().get(hcalSevLvlComputerHndl);
82  hcalSevLvlComputer_ = hcalSevLvlComputerHndl.product();
83  }
const HcalChannelQuality * theHcalChStatus_
const HcalSeverityLevelComputer * hcalSevLvlComputer_
void setTopo(const HcalTopology *topo) const
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
const HcalTopology * topo() const
bool PFRecHitQTestHCALChannel::test ( reco::PFRecHit hit,
const EcalRecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 85 of file PFRecHitQTests.h.

85  {
86  return true;
87  }
bool PFRecHitQTestHCALChannel::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 88 of file PFRecHitQTests.h.

References CaloRecHit::detid(), cond::rpcobgas::detid, CaloRecHit::flags(), HcalSeverityLevelComputer::getSeverityLevel(), HcalChannelStatus::getValue(), HcalCondObjectContainer< Item >::getValues(), hcalSevLvlComputer_, theHcalChStatus_, and threshold_.

88  {
89  const HcalDetId& detid = (HcalDetId)rh.detid();
90  const HcalChannelStatus* theStatus = theHcalChStatus_->getValues(detid);
91  unsigned theStatusValue = theStatus->getValue();
92  // Now get severity of problems for the given detID, based on the rechit flag word and the channel quality status value
93  int hitSeverity=hcalSevLvlComputer_->getSeverityLevel(detid, rh.flags(),theStatusValue);
94 
95  if (hitSeverity>threshold_) {
96  clean=true;
97  return false;
98  }
99 
100  return true;
101  }
const HcalChannelQuality * theHcalChStatus_
const DetId & detid() const
Definition: CaloRecHit.h:20
const HcalSeverityLevelComputer * hcalSevLvlComputer_
const Item * getValues(DetId fId, bool throwOnFail=true) const
uint32_t flags() const
Definition: CaloRecHit.h:21
std::vector< T * > clean
Definition: MVATrainer.cc:156
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
uint32_t getValue() const
bool PFRecHitQTestHCALChannel::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 103 of file PFRecHitQTests.h.

References CaloRecHit::detid(), cond::rpcobgas::detid, CaloRecHit::flags(), HcalSeverityLevelComputer::getSeverityLevel(), HcalChannelStatus::getValue(), HcalCondObjectContainer< Item >::getValues(), hcalSevLvlComputer_, theHcalChStatus_, and threshold_.

103  {
104  const HcalDetId& detid = (HcalDetId)rh.detid();
105  const HcalChannelStatus* theStatus = theHcalChStatus_->getValues(detid);
106  unsigned theStatusValue = theStatus->getValue();
107  // Now get severity of problems for the given detID, based on the rechit flag word and the channel quality status value
108  int hitSeverity=hcalSevLvlComputer_->getSeverityLevel(detid, rh.flags(),theStatusValue);
109 
110  if (hitSeverity>threshold_) {
111  clean=true;
112  return false;
113  }
114 
115  return true;
116  }
const HcalChannelQuality * theHcalChStatus_
const DetId & detid() const
Definition: CaloRecHit.h:20
const HcalSeverityLevelComputer * hcalSevLvlComputer_
const Item * getValues(DetId fId, bool throwOnFail=true) const
uint32_t flags() const
Definition: CaloRecHit.h:21
std::vector< T * > clean
Definition: MVATrainer.cc:156
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
uint32_t getValue() const
bool PFRecHitQTestHCALChannel::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 117 of file PFRecHitQTests.h.

References CaloRecHit::detid(), cond::rpcobgas::detid, CaloRecHit::flags(), HcalSeverityLevelComputer::getSeverityLevel(), HcalChannelStatus::getValue(), HcalCondObjectContainer< Item >::getValues(), hcalSevLvlComputer_, theHcalChStatus_, and threshold_.

117  {
118 
119  const HcalDetId& detid = (HcalDetId)rh.detid();
120  const HcalChannelStatus* theStatus = theHcalChStatus_->getValues(detid);
121  unsigned theStatusValue = theStatus->getValue();
122 
123  // Now get severity of problems for the given detID, based on the rechit flag word and the channel quality status value
124 
125  int hitSeverity=hcalSevLvlComputer_->getSeverityLevel(detid, rh.flags(),theStatusValue);
126 
127  if (hitSeverity>threshold_) {
128  clean=true;
129  return false;
130  }
131 
132  return true;
133  }
const HcalChannelQuality * theHcalChStatus_
const DetId & detid() const
Definition: CaloRecHit.h:20
const HcalSeverityLevelComputer * hcalSevLvlComputer_
const Item * getValues(DetId fId, bool throwOnFail=true) const
uint32_t flags() const
Definition: CaloRecHit.h:21
std::vector< T * > clean
Definition: MVATrainer.cc:156
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
uint32_t getValue() const
bool PFRecHitQTestHCALChannel::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 135 of file PFRecHitQTests.h.

135  {
136  return true;
137 
138  }

Member Data Documentation

const HcalSeverityLevelComputer* PFRecHitQTestHCALChannel::hcalSevLvlComputer_
protected

Definition at line 143 of file PFRecHitQTests.h.

Referenced by beginEvent(), and test().

const HcalChannelQuality* PFRecHitQTestHCALChannel::theHcalChStatus_
protected

Definition at line 142 of file PFRecHitQTests.h.

Referenced by beginEvent(), and test().

int PFRecHitQTestHCALChannel::threshold_
protected

Definition at line 141 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALChannel(), and test().