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

Constructor & Destructor Documentation

PFRecHitQTestHCALTimeVsDepth::PFRecHitQTestHCALTimeVsDepth ( )
inline

Definition at line 181 of file PFRecHitQTests.h.

181  {
182 
183  }
PFRecHitQTestHCALTimeVsDepth::PFRecHitQTestHCALTimeVsDepth ( const edm::ParameterSet iConfig)
inline

Definition at line 185 of file PFRecHitQTests.h.

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

185  :
186  PFRecHitQTestBase(iConfig)
187  {
188  std::vector<edm::ParameterSet> psets = iConfig.getParameter<std::vector<edm::ParameterSet> >("cuts");
189  for (unsigned int i=0;i<psets.size();++i) {
190  depths_.push_back(psets[i].getParameter<int>("depth"));
191  minTimes_.push_back(psets[i].getParameter<double>("minTime"));
192  maxTimes_.push_back(psets[i].getParameter<double>("maxTime"));
193  thresholds_.push_back(psets[i].getParameter<double>("threshold"));
194  }
195  }
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 197 of file PFRecHitQTests.h.

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

Implements PFRecHitQTestBase.

Definition at line 200 of file PFRecHitQTests.h.

Referenced by test().

200  {
201  return true;
202  }
bool PFRecHitQTestHCALTimeVsDepth::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 203 of file PFRecHitQTests.h.

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

203  {
204  return test(rh.detid(),rh.energy(),rh.time(),clean);
205  }
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 207 of file PFRecHitQTests.h.

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

207  {
208  return test(rh.detid(),rh.energy(),rh.time(),clean);
209  }
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 210 of file PFRecHitQTests.h.

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

210  {
211  return test(rh.detid(),rh.energy(),rh.time(),clean);
212  }
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 214 of file PFRecHitQTests.h.

214  {
215  return true;
216  }
bool PFRecHitQTestHCALTimeVsDepth::test ( unsigned  aDETID,
double  energy,
double  time,
bool &  clean 
)
inlineprotected

Definition at line 224 of file PFRecHitQTests.h.

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

224  {
225  HcalDetId detid(aDETID);
226  for (unsigned int i=0;i<depths_.size();++i) {
227  if (detid.depth() == depths_[i]) {
228  if ((time <minTimes_[i] || time >maxTimes_[i] ) && energy>thresholds_[i])
229  {
230  clean=true;
231  return false;
232  }
233  break;
234  }
235  }
236  return true;
237  }
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 219 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALTimeVsDepth(), and test().

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

Definition at line 221 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALTimeVsDepth(), and test().

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

Definition at line 220 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALTimeVsDepth(), and test().

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

Definition at line 222 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALTimeVsDepth(), and test().