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

Constructor & Destructor Documentation

PFRecHitQTestHCALThresholdVsDepth::PFRecHitQTestHCALThresholdVsDepth ( )
inline

Definition at line 249 of file PFRecHitQTests.h.

249  {
250 
251  }
PFRecHitQTestHCALThresholdVsDepth::PFRecHitQTestHCALThresholdVsDepth ( const edm::ParameterSet iConfig)
inline

Definition at line 253 of file PFRecHitQTests.h.

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

253  :
254  PFRecHitQTestBase(iConfig)
255  {
256  std::vector<edm::ParameterSet> psets = iConfig.getParameter<std::vector<edm::ParameterSet> >("cuts");
257  for (unsigned int i=0;i<psets.size();++i) {
258  depths_.push_back(psets[i].getParameter<int>("depth"));
259  thresholds_.push_back(psets[i].getParameter<double>("threshold"));
260  }
261  }
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 263 of file PFRecHitQTests.h.

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

Implements PFRecHitQTestBase.

Definition at line 266 of file PFRecHitQTests.h.

Referenced by test().

266  {
267  return true;
268  }
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 269 of file PFRecHitQTests.h.

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

269  {
270  return test(rh.detid(),rh.energy(),rh.time(),clean);
271  }
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 273 of file PFRecHitQTests.h.

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

273  {
274  return test(rh.detid(),rh.energy(),rh.time(),clean);
275  }
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 276 of file PFRecHitQTests.h.

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

276  {
277  return test(rh.detid(),rh.energy(),rh.time(),clean);
278  }
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 280 of file PFRecHitQTests.h.

280  {
281  return true;
282  }
bool PFRecHitQTestHCALThresholdVsDepth::test ( unsigned  aDETID,
double  energy,
double  time,
bool &  clean 
)
inlineprotected

Definition at line 288 of file PFRecHitQTests.h.

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

288  {
289  HcalDetId detid(aDETID);
290  for (unsigned int i=0;i<depths_.size();++i) {
291  if (detid.depth() == depths_[i]) {
292  if ( energy<thresholds_[i])
293  {
294  clean=false;
295  return false;
296  }
297  break;
298  }
299  }
300  return true;
301  }
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 285 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALThresholdVsDepth(), and test().

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

Definition at line 286 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALThresholdVsDepth(), and test().