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 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 258 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

PFRecHitQTestHCALThresholdVsDepth::PFRecHitQTestHCALThresholdVsDepth ( )
inline

Definition at line 260 of file PFRecHitQTests.h.

260  {
261 
262  }
PFRecHitQTestHCALThresholdVsDepth::PFRecHitQTestHCALThresholdVsDepth ( const edm::ParameterSet iConfig)
inline

Definition at line 264 of file PFRecHitQTests.h.

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

264  :
265  PFRecHitQTestBase(iConfig)
266  {
267  std::vector<edm::ParameterSet> psets = iConfig.getParameter<std::vector<edm::ParameterSet> >("cuts");
268  for (unsigned int i=0;i<psets.size();++i) {
269  depths_.push_back(psets[i].getParameter<int>("depth"));
270  thresholds_.push_back(psets[i].getParameter<double>("threshold"));
271  }
272  }
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 274 of file PFRecHitQTests.h.

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

Implements PFRecHitQTestBase.

Definition at line 277 of file PFRecHitQTests.h.

Referenced by test().

277  {
278  return true;
279  }
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 280 of file PFRecHitQTests.h.

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

280  {
281  return test(rh.detid(),rh.energy(),rh.time(),clean);
282  }
const DetId & detid() const
Definition: CaloRecHit.h:20
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 284 of file PFRecHitQTests.h.

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

284  {
285  return test(rh.detid(),rh.energy(),rh.time(),clean);
286  }
const DetId & detid() const
Definition: CaloRecHit.h:20
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 287 of file PFRecHitQTests.h.

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

287  {
288  return test(rh.detid(),rh.energy(),rh.time(),clean);
289  }
const DetId & detid() const
Definition: CaloRecHit.h:20
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 291 of file PFRecHitQTests.h.

291  {
292  return true;
293  }
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 295 of file PFRecHitQTests.h.

295  {
296  return true;
297  }
bool PFRecHitQTestHCALThresholdVsDepth::test ( unsigned  aDETID,
double  energy,
double  time,
bool &  clean 
)
inlineprotected

Definition at line 303 of file PFRecHitQTests.h.

References HcalDetId::depth(), depths_, i, and thresholds_.

303  {
304  HcalDetId detid(aDETID);
305  for (unsigned int i=0;i<depths_.size();++i) {
306  if (detid.depth() == depths_[i]) {
307  if ( energy<thresholds_[i])
308  {
309  clean=false;
310  return false;
311  }
312  break;
313  }
314  }
315  return true;
316  }
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 300 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALThresholdVsDepth(), and test().

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

Definition at line 301 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALThresholdVsDepth(), and test().