CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
PFRecHitQTestHCALThresholdVsDepth Class Reference

#include <PFRecHitQTests.h>

Inheritance diagram for PFRecHitQTestHCALThresholdVsDepth:
PFRecHitQTestBase

Public Member Functions

void beginEvent (const edm::Event &event, const edm::EventSetup &iSetup) override
 
 PFRecHitQTestHCALThresholdVsDepth ()
 
 PFRecHitQTestHCALThresholdVsDepth (const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
 
bool test (reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
 
bool test (reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean) override
 
bool test (reco::PFRecHit &hit, const HFRecHit &rh, bool &clean) override
 
bool test (reco::PFRecHit &hit, const HORecHit &rh, bool &clean) override
 
bool test (reco::PFRecHit &hit, const CaloTower &rh, bool &clean) override
 
bool test (reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean) override
 
- Public Member Functions inherited from PFRecHitQTestBase
 PFRecHitQTestBase ()=default
 
 PFRecHitQTestBase (const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
 
virtual ~PFRecHitQTestBase ()=default
 

Protected Member Functions

bool test (unsigned aDETID, double energy, double time, bool &clean)
 

Protected Attributes

std::vector< std::vector< int > > depths_
 
std::vector< int > detector_
 
std::vector< edm::ParameterSetpsets_
 
std::vector< std::vector< double > > thresholds_
 

Detailed Description

Definition at line 256 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

◆ PFRecHitQTestHCALThresholdVsDepth() [1/2]

PFRecHitQTestHCALThresholdVsDepth::PFRecHitQTestHCALThresholdVsDepth ( )
inline

Definition at line 258 of file PFRecHitQTests.h.

258 {}

◆ PFRecHitQTestHCALThresholdVsDepth() [2/2]

PFRecHitQTestHCALThresholdVsDepth::PFRecHitQTestHCALThresholdVsDepth ( const edm::ParameterSet iConfig,
edm::ConsumesCollector cc 
)
inline

Definition at line 260 of file PFRecHitQTests.h.

References depths_, detector_, Exception, muonDTDigis_cfi::pset, psets_, and thresholds_.

261  : PFRecHitQTestBase(iConfig, cc), psets_(iConfig.getParameter<std::vector<edm::ParameterSet>>("cuts")) {
262  for (auto& pset : psets_) {
263  depths_.push_back(pset.getParameter<std::vector<int>>("depth"));
264  thresholds_.push_back(pset.getParameter<std::vector<double>>("threshold"));
265  detector_.push_back(pset.getParameter<int>("detectorEnum"));
266  if (thresholds_[thresholds_.size() - 1].size() != depths_[depths_.size() - 1].size()) {
267  throw cms::Exception("InvalidPFRecHitThreshold") << "PFRecHitThreshold mismatch with the numbers of depths";
268  }
269  }
270  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
PFRecHitQTestBase()=default
std::vector< edm::ParameterSet > psets_
std::vector< std::vector< double > > thresholds_
std::vector< std::vector< int > > depths_

Member Function Documentation

◆ beginEvent()

void PFRecHitQTestHCALThresholdVsDepth::beginEvent ( const edm::Event event,
const edm::EventSetup iSetup 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 272 of file PFRecHitQTests.h.

272 {}

◆ test() [1/7]

bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const EcalRecHit rh,
bool &  clean,
bool  fullReadOut 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 274 of file PFRecHitQTests.h.

Referenced by test().

274 { return true; }

◆ test() [2/7]

bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 275 of file PFRecHitQTests.h.

References clean(), CaloRecHit::detid(), CaloRecHit::energy(), test(), and CaloRecHit::time().

275  {
276  return test(rh.detid(), rh.energy(), rh.time(), clean);
277  }
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
constexpr float energy() const
Definition: CaloRecHit.h:29
static void clean(char *s)
constexpr float time() const
Definition: CaloRecHit.h:31

◆ test() [3/7]

bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 279 of file PFRecHitQTests.h.

References clean(), CaloRecHit::detid(), CaloRecHit::energy(), test(), and CaloRecHit::time().

279  {
280  return test(rh.detid(), rh.energy(), rh.time(), clean);
281  }
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
constexpr float energy() const
Definition: CaloRecHit.h:29
static void clean(char *s)
constexpr float time() const
Definition: CaloRecHit.h:31

◆ test() [4/7]

bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 282 of file PFRecHitQTests.h.

References clean(), CaloRecHit::detid(), CaloRecHit::energy(), test(), and CaloRecHit::time().

282  {
283  return test(rh.detid(), rh.energy(), rh.time(), clean);
284  }
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
constexpr float energy() const
Definition: CaloRecHit.h:29
static void clean(char *s)
constexpr float time() const
Definition: CaloRecHit.h:31

◆ test() [5/7]

bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 286 of file PFRecHitQTests.h.

286 { return true; }

◆ test() [6/7]

bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 288 of file PFRecHitQTests.h.

288 { return true; }

◆ test() [7/7]

bool PFRecHitQTestHCALThresholdVsDepth::test ( unsigned  aDETID,
double  energy,
double  time,
bool &  clean 
)
inlineprotected

Definition at line 296 of file PFRecHitQTests.h.

References clean(), ztail::d, HcalDetId::depth(), depths_, detector_, hcalRecHitTable_cff::energy, mps_fire::i, HcalDetId::subdet(), and thresholds_.

296  {
297  HcalDetId detid(aDETID);
298 
299  for (unsigned int d = 0; d < detector_.size(); ++d) {
300  if (detid.subdet() != detector_[d])
301  continue;
302  for (unsigned int i = 0; i < thresholds_[d].size(); ++i) {
303  if (detid.depth() == depths_[d][i]) {
304  if (energy < thresholds_[d][i]) {
305  clean = false;
306  return false;
307  }
308  break;
309  }
310  }
311  }
312  return true;
313  }
static void clean(char *s)
d
Definition: ztail.py:151
std::vector< std::vector< double > > thresholds_
std::vector< std::vector< int > > depths_

Member Data Documentation

◆ depths_

std::vector<std::vector<int> > PFRecHitQTestHCALThresholdVsDepth::depths_
protected

Definition at line 292 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALThresholdVsDepth(), and test().

◆ detector_

std::vector<int> PFRecHitQTestHCALThresholdVsDepth::detector_
protected

Definition at line 294 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALThresholdVsDepth(), and test().

◆ psets_

std::vector<edm::ParameterSet> PFRecHitQTestHCALThresholdVsDepth::psets_
protected

Definition at line 291 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALThresholdVsDepth().

◆ thresholds_

std::vector<std::vector<double> > PFRecHitQTestHCALThresholdVsDepth::thresholds_
protected

Definition at line 293 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALThresholdVsDepth(), and test().