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

Constructor & Destructor Documentation

PFRecHitQTestHCALThresholdVsDepth::PFRecHitQTestHCALThresholdVsDepth ( )
inline

Definition at line 248 of file PFRecHitQTests.h.

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

Definition at line 252 of file PFRecHitQTests.h.

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

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

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

Implements PFRecHitQTestBase.

Definition at line 265 of file PFRecHitQTests.h.

Referenced by test().

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

Implements PFRecHitQTestBase.

Definition at line 268 of file PFRecHitQTests.h.

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

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

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

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

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

Definition at line 287 of file PFRecHitQTests.h.

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

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

Referenced by PFRecHitQTestHCALThresholdVsDepth(), and test().

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

Definition at line 285 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALThresholdVsDepth(), and test().