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)
 
bool test (reco::PFRecHit &hit, const CaloTower &rh, bool &clean) override
 
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 HGCRecHit &rh, bool &clean) override
 
bool test (reco::PFRecHit &hit, const HORecHit &rh, bool &clean) override
 
- Public Member Functions inherited from PFRecHitQTestBase
 PFRecHitQTestBase ()=default
 
 PFRecHitQTestBase (const edm::ParameterSet &iConfig)
 
virtual ~PFRecHitQTestBase ()=default
 

Protected Member Functions

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

Protected Attributes

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

Detailed Description

Definition at line 245 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

◆ PFRecHitQTestHCALThresholdVsDepth() [1/2]

PFRecHitQTestHCALThresholdVsDepth::PFRecHitQTestHCALThresholdVsDepth ( )
inline

Definition at line 247 of file PFRecHitQTests.h.

247 {}

◆ PFRecHitQTestHCALThresholdVsDepth() [2/2]

PFRecHitQTestHCALThresholdVsDepth::PFRecHitQTestHCALThresholdVsDepth ( const edm::ParameterSet iConfig)
inline

Definition at line 249 of file PFRecHitQTests.h.

249  : PFRecHitQTestBase(iConfig) {
250  std::vector<edm::ParameterSet> psets = iConfig.getParameter<std::vector<edm::ParameterSet> >("cuts");
251  for (auto& pset : psets) {
252  depths_ = pset.getParameter<std::vector<int> >("depth");
253  thresholds_ = pset.getParameter<std::vector<double> >("threshold");
254  detector_ = pset.getParameter<int>("detectorEnum");
255  if (thresholds_.size() != depths_.size()) {
256  throw cms::Exception("InvalidPFRecHitThreshold") << "PFRecHitThreshold mismatch with the numbers of depths";
257  }
258  }
259  }

References depths_, detector_, Exception, edm::ParameterSet::getParameter(), muonDTDigis_cfi::pset, and thresholds_.

Member Function Documentation

◆ beginEvent()

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

Implements PFRecHitQTestBase.

Definition at line 261 of file PFRecHitQTests.h.

261 {}

◆ test() [1/7]

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

Implements PFRecHitQTestBase.

Definition at line 275 of file PFRecHitQTests.h.

275 { return true; }

◆ test() [2/7]

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

Implements PFRecHitQTestBase.

Definition at line 263 of file PFRecHitQTests.h.

263 { return true; }

Referenced by test().

◆ test() [3/7]

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

Implements PFRecHitQTestBase.

Definition at line 264 of file PFRecHitQTests.h.

264  {
265  return test(rh.detid(), rh.energy(), rh.time(), clean);
266  }

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

◆ test() [4/7]

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

Implements PFRecHitQTestBase.

Definition at line 268 of file PFRecHitQTests.h.

268  {
269  return test(rh.detid(), rh.energy(), rh.time(), clean);
270  }

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

◆ test() [5/7]

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

Implements PFRecHitQTestBase.

Definition at line 277 of file PFRecHitQTests.h.

277 { return true; }

◆ test() [6/7]

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

Implements PFRecHitQTestBase.

Definition at line 271 of file PFRecHitQTests.h.

271  {
272  return test(rh.detid(), rh.energy(), rh.time(), clean);
273  }

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

◆ test() [7/7]

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

Definition at line 284 of file PFRecHitQTests.h.

284  {
285  HcalDetId detid(aDETID);
286 
287  for (unsigned int i = 0; i < thresholds_.size(); ++i) {
288  if (detid.depth() == depths_[i] && detid.subdet() == detector_) {
289  if (energy < thresholds_[i]) {
290  clean = false;
291  return false;
292  }
293  break;
294  }
295  }
296  return true;
297  }

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

Member Data Documentation

◆ depths_

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

Definition at line 280 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALThresholdVsDepth(), and test().

◆ detector_

int PFRecHitQTestHCALThresholdVsDepth::detector_
protected

Definition at line 282 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALThresholdVsDepth(), and test().

◆ thresholds_

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

Definition at line 281 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALThresholdVsDepth(), and test().

mps_fire.i
i
Definition: mps_fire.py:428
CaloRecHit::energy
constexpr float energy() const
Definition: CaloRecHit.h:29
CaloRecHit::detid
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33
PFRecHitQTestHCALThresholdVsDepth::detector_
int detector_
Definition: PFRecHitQTests.h:282
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
CaloRecHit::time
constexpr float time() const
Definition: CaloRecHit.h:31
HcalDetId
Definition: HcalDetId.h:12
PFRecHitQTestBase::PFRecHitQTestBase
PFRecHitQTestBase()=default
clean
static void clean(char *s)
Definition: ConnectionManager.cc:13
Exception
Definition: hltDiff.cc:246
PFRecHitQTestHCALThresholdVsDepth::thresholds_
std::vector< double > thresholds_
Definition: PFRecHitQTests.h:281
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
PFRecHitQTestHCALThresholdVsDepth::test
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
Definition: PFRecHitQTests.h:263
PFRecHitQTestHCALThresholdVsDepth::depths_
std::vector< int > depths_
Definition: PFRecHitQTests.h:280
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27