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

Constructor & Destructor Documentation

PFRecHitQTestHCALTimeVsDepth::PFRecHitQTestHCALTimeVsDepth ( )
inline

Definition at line 182 of file PFRecHitQTests.h.

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

Definition at line 186 of file PFRecHitQTests.h.

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

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

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

Implements PFRecHitQTestBase.

Definition at line 201 of file PFRecHitQTests.h.

Referenced by test().

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

Implements PFRecHitQTestBase.

Definition at line 204 of file PFRecHitQTests.h.

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

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

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

208  {
209  return test(rh.detid(),rh.energy(),rh.time(),clean);
210  }
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 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 CaloTower rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 215 of file PFRecHitQTests.h.

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

Definition at line 225 of file PFRecHitQTests.h.

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

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

Referenced by PFRecHitQTestHCALTimeVsDepth(), and test().

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

Definition at line 222 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALTimeVsDepth(), and test().

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

Definition at line 221 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALTimeVsDepth(), and test().

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

Definition at line 223 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestHCALTimeVsDepth(), and test().