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)
 
 PFRecHitQTestHCALThresholdVsDepth ()
 
 PFRecHitQTestHCALThresholdVsDepth (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)
 
bool test (reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
 
- Public Member Functions inherited from PFRecHitQTestBase
 PFRecHitQTestBase ()
 
 PFRecHitQTestBase (const edm::ParameterSet &iConfig)
 

Protected Member Functions

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

Protected Attributes

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

Detailed Description

Definition at line 265 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

PFRecHitQTestHCALThresholdVsDepth::PFRecHitQTestHCALThresholdVsDepth ( )
inline

Definition at line 267 of file PFRecHitQTests.h.

267  {
268 
269  }
PFRecHitQTestHCALThresholdVsDepth::PFRecHitQTestHCALThresholdVsDepth ( const edm::ParameterSet iConfig)
inline

Definition at line 271 of file PFRecHitQTests.h.

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

271  :
272  PFRecHitQTestBase(iConfig)
273  {
274  std::vector<edm::ParameterSet> psets = iConfig.getParameter<std::vector<edm::ParameterSet> >("cuts");
275  for (unsigned int i=0;i<psets.size();++i) {
276  depths_.push_back(psets[i].getParameter<int>("depth"));
277  thresholds_.push_back(psets[i].getParameter<double>("threshold"));
278  }
279  }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
std::vector< double > thresholds_

Member Function Documentation

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

Implements PFRecHitQTestBase.

Definition at line 281 of file PFRecHitQTests.h.

281  {
282  }
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const EcalRecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 284 of file PFRecHitQTests.h.

284  {
285  return true;
286  }
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 287 of file PFRecHitQTests.h.

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

287  {
288  return test(rh.detid(),rh.energy(),rh.time(),clean);
289  }
const DetId & detid() const
Definition: CaloRecHit.h:21
float time() const
Definition: CaloRecHit.h:19
float energy() const
Definition: CaloRecHit.h:17
std::vector< T * > clean
Definition: MVATrainer.cc:156
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean)
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 291 of file PFRecHitQTests.h.

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

291  {
292  return test(rh.detid(),rh.energy(),rh.time(),clean);
293  }
const DetId & detid() const
Definition: CaloRecHit.h:21
float time() const
Definition: CaloRecHit.h:19
float energy() const
Definition: CaloRecHit.h:17
std::vector< T * > clean
Definition: MVATrainer.cc:156
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean)
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 294 of file PFRecHitQTests.h.

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

294  {
295  return test(rh.detid(),rh.energy(),rh.time(),clean);
296  }
const DetId & detid() const
Definition: CaloRecHit.h:21
float time() const
Definition: CaloRecHit.h:19
float energy() const
Definition: CaloRecHit.h:17
std::vector< T * > clean
Definition: MVATrainer.cc:156
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean)
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 298 of file PFRecHitQTests.h.

298  {
299  return true;
300  }
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 302 of file PFRecHitQTests.h.

302  {
303  return true;
304  }
bool PFRecHitQTestHCALThresholdVsDepth::test ( unsigned  aDETID,
double  energy,
double  time,
bool &  clean 
)
inlineprotected

Definition at line 310 of file PFRecHitQTests.h.

References HcalDetId::depth(), and i.

310  {
311  HcalDetId detid(aDETID);
312  for (unsigned int i=0;i<depths_.size();++i) {
313  if (detid.depth() == depths_[i]) {
314  if ( energy<thresholds_[i])
315  {
316  clean=false;
317  return false;
318  }
319  break;
320  }
321  }
322  return true;
323  }
int i
Definition: DBlmapReader.cc:9
std::vector< double > thresholds_
std::vector< T * > clean
Definition: MVATrainer.cc:156

Member Data Documentation

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

Definition at line 307 of file PFRecHitQTests.h.

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

Definition at line 308 of file PFRecHitQTests.h.