CMS 3D CMS Logo

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

Constructor & Destructor Documentation

PFRecHitQTestHCALTimeVsDepth::PFRecHitQTestHCALTimeVsDepth ( )
inline

Definition at line 196 of file PFRecHitQTests.h.

196  {
197 
198  }
PFRecHitQTestHCALTimeVsDepth::PFRecHitQTestHCALTimeVsDepth ( const edm::ParameterSet iConfig)
inline

Definition at line 200 of file PFRecHitQTests.h.

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

200  :
201  PFRecHitQTestBase(iConfig)
202  {
203  std::vector<edm::ParameterSet> psets = iConfig.getParameter<std::vector<edm::ParameterSet> >("cuts");
204  for (unsigned int i=0;i<psets.size();++i) {
205  depths_.push_back(psets[i].getParameter<int>("depth"));
206  minTimes_.push_back(psets[i].getParameter<double>("minTime"));
207  maxTimes_.push_back(psets[i].getParameter<double>("maxTime"));
208  thresholds_.push_back(psets[i].getParameter<double>("threshold"));
209  }
210  }
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 212 of file PFRecHitQTests.h.

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

Implements PFRecHitQTestBase.

Definition at line 215 of file PFRecHitQTests.h.

215  {
216  return true;
217  }
bool PFRecHitQTestHCALTimeVsDepth::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 218 of file PFRecHitQTests.h.

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

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

Implements PFRecHitQTestBase.

Definition at line 222 of file PFRecHitQTests.h.

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

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

Implements PFRecHitQTestBase.

Definition at line 225 of file PFRecHitQTests.h.

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

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

Implements PFRecHitQTestBase.

Definition at line 229 of file PFRecHitQTests.h.

229  {
230  return true;
231  }
bool PFRecHitQTestHCALTimeVsDepth::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 233 of file PFRecHitQTests.h.

233  {
234  return true;
235  }
bool PFRecHitQTestHCALTimeVsDepth::test ( unsigned  aDETID,
double  energy,
double  time,
bool &  clean 
)
inlineprotected

Definition at line 243 of file PFRecHitQTests.h.

References HcalDetId::depth(), and i.

243  {
244  HcalDetId detid(aDETID);
245  for (unsigned int i=0;i<depths_.size();++i) {
246  if (detid.depth() == depths_[i]) {
247  if ((time <minTimes_[i] || time >maxTimes_[i] ) && energy>thresholds_[i])
248  {
249  clean=true;
250  return false;
251  }
252  break;
253  }
254  }
255  return true;
256  }
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 238 of file PFRecHitQTests.h.

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

Definition at line 240 of file PFRecHitQTests.h.

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

Definition at line 239 of file PFRecHitQTests.h.

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

Definition at line 241 of file PFRecHitQTests.h.