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
PFRecHitQTestHCALTimeVsDepth Class Reference

#include <PFRecHitQTests.h>

Inheritance diagram for PFRecHitQTestHCALTimeVsDepth:
PFRecHitQTestBase

Public Member Functions

void beginEvent (const edm::Event &event, const edm::EventSetup &iSetup)
 
 PFRecHitQTestHCALTimeVsDepth ()
 
 PFRecHitQTestHCALTimeVsDepth (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 > maxTimes_
 
std::vector< double > minTimes_
 
std::vector< double > thresholds_
 

Detailed Description

Definition at line 187 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

PFRecHitQTestHCALTimeVsDepth::PFRecHitQTestHCALTimeVsDepth ( )
inline

Definition at line 189 of file PFRecHitQTests.h.

189  {
190 
191  }
PFRecHitQTestHCALTimeVsDepth::PFRecHitQTestHCALTimeVsDepth ( const edm::ParameterSet iConfig)
inline

Definition at line 193 of file PFRecHitQTests.h.

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

193  :
194  PFRecHitQTestBase(iConfig)
195  {
196  std::vector<edm::ParameterSet> psets = iConfig.getParameter<std::vector<edm::ParameterSet> >("cuts");
197  for (unsigned int i=0;i<psets.size();++i) {
198  depths_.push_back(psets[i].getParameter<int>("depth"));
199  minTimes_.push_back(psets[i].getParameter<double>("minTime"));
200  maxTimes_.push_back(psets[i].getParameter<double>("maxTime"));
201  thresholds_.push_back(psets[i].getParameter<double>("threshold"));
202  }
203  }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
std::vector< double > minTimes_
std::vector< double > maxTimes_
std::vector< double > thresholds_
std::vector< int > depths_

Member Function Documentation

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

Implements PFRecHitQTestBase.

Definition at line 205 of file PFRecHitQTests.h.

205  {
206  }
bool PFRecHitQTestHCALTimeVsDepth::test ( reco::PFRecHit hit,
const EcalRecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 208 of file PFRecHitQTests.h.

Referenced by test().

208  {
209  return true;
210  }
bool PFRecHitQTestHCALTimeVsDepth::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 211 of file PFRecHitQTests.h.

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

211  {
212  return test(rh.detid(),rh.energy(),rh.time(),clean);
213  }
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 PFRecHitQTestHCALTimeVsDepth::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 215 of file PFRecHitQTests.h.

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

215  {
216  return test(rh.detid(),rh.energy(),rh.time(),clean);
217  }
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 PFRecHitQTestHCALTimeVsDepth::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 218 of file PFRecHitQTests.h.

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

218  {
219  return test(rh.detid(),rh.energy(),rh.time(),clean);
220  }
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 PFRecHitQTestHCALTimeVsDepth::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 222 of file PFRecHitQTests.h.

222  {
223  return true;
224  }
bool PFRecHitQTestHCALTimeVsDepth::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 226 of file PFRecHitQTests.h.

226  {
227  return true;
228  }
bool PFRecHitQTestHCALTimeVsDepth::test ( unsigned  aDETID,
double  energy,
double  time,
bool &  clean 
)
inlineprotected

Definition at line 236 of file PFRecHitQTests.h.

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

236  {
237  HcalDetId detid(aDETID);
238  for (unsigned int i=0;i<depths_.size();++i) {
239  if (detid.depth() == depths_[i]) {
240  if ((time <minTimes_[i] || time >maxTimes_[i] ) && energy>thresholds_[i])
241  {
242  clean=true;
243  return false;
244  }
245  break;
246  }
247  }
248  return true;
249  }
int i
Definition: DBlmapReader.cc:9
std::vector< double > minTimes_
std::vector< double > maxTimes_
std::vector< double > thresholds_
std::vector< T * > clean
Definition: MVATrainer.cc:156
std::vector< int > depths_

Member Data Documentation

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

Definition at line 231 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALTimeVsDepth(), and test().

std::vector<double> PFRecHitQTestHCALTimeVsDepth::maxTimes_
protected

Definition at line 233 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALTimeVsDepth(), and test().

std::vector<double> PFRecHitQTestHCALTimeVsDepth::minTimes_
protected

Definition at line 232 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALTimeVsDepth(), and test().

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

Definition at line 234 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALTimeVsDepth(), and test().