1 #ifndef RecoParticleFlow_PFClusterProducer_PFEcalRecHitQTests_h 2 #define RecoParticleFlow_PFClusterProducer_PFEcalRecHitQTests_h 80 thresholds_ = iConfig.
getParameter<std::vector<int> >(
"maxSeverities");
81 cleanThresholds_ = iConfig.
getParameter<std::vector<double> >(
"cleaningThresholds");
82 std::vector<std::string>
flags = iConfig.
getParameter<std::vector<std::string> >(
"flags");
83 for (
unsigned int i=0;
i<flags.size();++
i) {
84 if (flags[
i] ==
"Standard") {
86 depths_.push_back(-1);
89 else if (flags[
i] ==
"HFInTime") {
91 depths_.push_back(-1);
93 else if (flags[
i] ==
"HFDigi") {
95 depths_.push_back(-1);
98 else if (flags[
i] ==
"HFLong") {
100 depths_.push_back(1);
103 else if (flags[
i] ==
"HFShort") {
105 depths_.push_back(2);
109 flags_.push_back(-1);
110 depths_.push_back(-1);
120 theHcalTopology_ = topo.
product();
123 theHcalChStatus_ = hcalChStatus.
product();
126 hcalSevLvlComputer_ = hcalSevLvlComputerHndl.
product();
163 detid = theHcalTopology_->
idFront(detid);
167 unsigned theStatusValue = theStatus->
getValue();
169 for (
unsigned int i=0;
i<thresholds_.size();++
i) {
171 if (energy < cleanThresholds_[
i])
175 hitSeverity=hcalSevLvlComputer_->
getSeverityLevel(detid, flags,theStatusValue);
178 hitSeverity=hcalSevLvlComputer_->
getSeverityLevel(detid, flags & flags_[i],theStatusValue);
181 if (hitSeverity>thresholds_[i] && ((depths_[i]<0 || (depths_[i]==detid.
depth())))) {
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"));
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])
274 std::vector<edm::ParameterSet> psets = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"cuts");
275 for (
unsigned int i=0;
i<psets.size();++
i) {
276 depths_.push_back(psets[
i].getParameter<int>(
"depth"));
277 thresholds_.push_back(psets[
i].getParameter<double>(
"threshold"));
312 for (
unsigned int i=0;
i<depths_.size();++
i) {
313 if (detid.
depth() == depths_[
i]) {
314 if ( energy<thresholds_[
i])
342 threshold0_ = iConfig.
getParameter<
double>(
"threshold_ring0");
343 threshold12_ = iConfig.
getParameter<
double>(
"threshold_ring12");
361 if (
abs(detid.ieta())<=4 && hit.
energy()>threshold0_)
363 if (
abs(detid.ieta())>4 && hit.
energy()>threshold12_)
395 thresholdCleaning_ = iConfig.
getParameter<
double>(
"cleaningThreshold");
396 timingCleaning_ = iConfig.
getParameter<
bool>(
"timingCleaning");
397 topologicalCleaning_ = iConfig.
getParameter<
bool>(
"topologicalCleaning");
398 skipTTRecoveredHits_ = iConfig.
getParameter<
bool>(
"skipTTRecoveredHits");
411 if ( timingCleaning_ && rh.
energy() > thresholdCleaning_ &&
417 if ( topologicalCleaning_ &&
471 thresholdCleaning_ = iConfig.
getParameter<
double>(
"cleaningThreshold");
472 topologicalCleaning_ = iConfig.
getParameter<
bool>(
"topologicalCleaning");
480 if ( rh.
energy() < thresholdCleaning_ ) {
485 if ( topologicalCleaning_ &&
543 calibFactor_ =iConfig.
getParameter<
double>(
"calibFactor");
554 if (
abs(detId.ieta())==29)
570 if (detId.ietaAbs()==29)
593 recHitEnergy_keV_ = iConfig.
getParameter<
bool>(
"recHitEnergyIs_keV");
596 recHitEnergyMultiplier_ = iConfig.
getParameter<
double>(
"recHitEnergyMultiplier");
604 <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
609 <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
615 <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
620 <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
626 <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
631 const double newE = ( recHitEnergy_keV_ ?
632 1.0e-6*rh.
energy()*recHitEnergyMultiplier_ :
633 rh.
energy()*recHitEnergyMultiplier_ );
643 const double hitValueInMIPs = 1e6*hit.
energy()/mip_;
652 geometryInstance_(
""),
653 recHitEnergy_keV_(0.),
656 recHitEnergyMultiplier_(0.) {
661 geometryInstance_(iConfig.getParameter<
std::
string>(
"geometryInstance")),
662 recHitEnergy_keV_(iConfig.getParameter<bool>(
"recHitEnergyIs_keV")),
663 threshold_(iConfig.getParameter<double>(
"thresholdInMIPs")),
664 mip_(iConfig.getParameter<double>(
"mipValueInkeV")),
665 recHitEnergyMultiplier_(iConfig.getParameter<double>(
"recHitEnergyMultiplier")) {
676 <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
681 <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
687 <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
692 <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
698 <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
703 const double newE = ( recHitEnergy_keV_ ?
704 1.0e-6*rh.
energy()*recHitEnergyMultiplier_ :
705 rh.
energy()*recHitEnergyMultiplier_ );
707 const float mult = (
float) ddd_->waferTypeL(wafer);
709 return pass(hit,mult);
719 const double hitValueInMIPs = 1e6*hit.
energy()/(mult*mip_);
double thresholdCleaning_
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
T getParameter(std::string const &) const
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
const HcalChannelQuality * theHcalChStatus_
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
const HGCalDDDConstants * ddd_
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
HcalSubdetector subdet() const
get the subdetector
std::vector< double > minTimes_
bool pass(const reco::PFRecHit &hit)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean)
std::vector< int > depths_
const DetId & detid() const
unsigned detId() const
rechit detId
PFRecHitQTestThreshold(const edm::ParameterSet &iConfig)
bool topologicalCleaning_
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
std::vector< int > depths_
bool skipTTRecoveredHits_
bool pass(const reco::PFRecHit &hit, const float mult)
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
const HcalSeverityLevelComputer * hcalSevLvlComputer_
std::vector< double > maxTimes_
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
std::vector< Variable::Flags > flags
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
PFRecHitQTestECAL(const edm::ParameterSet &iConfig)
PFRecHitQTestHCALTimeVsDepth()
const Item * getValues(DetId fId, bool throwOnFail=true) const
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
bool test(unsigned aDETID, double energy, double time, bool &clean)
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
PFRecHitQTestHCALChannel(const edm::ParameterSet &iConfig)
const std::string geometryInstance_
std::vector< double > cleanThresholds_
std::vector< double > thresholds_
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
PFRecHitQTestHCALThresholdVsDepth(const edm::ParameterSet &iConfig)
const bool recHitEnergy_keV_
bool topologicalCleaning_
const HcalTopology * theHcalTopology_
PFRecHitQTestHCALChannel()
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
std::vector< double > thresholds_
bool test(unsigned aDETID, double energy, double time, bool &clean)
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
PFRecHitQTestHCALCalib29()
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean)
int depth() const
get the tower depth
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean)
bool checkFlag(int flag) const
check if the flag is true
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
const HGCalTopology & topology() const
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
PFRecHitQTestHCALCalib29(const edm::ParameterSet &iConfig)
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
bool pass(const reco::PFRecHit &hit)
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
Abs< T >::type abs(const T &t)
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
float energy() const
rechit energy
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
PFRecHitQTestThresholdInThicknessNormalizedMIPs()
PFRecHitQTestHCALTimeVsDepth(const edm::ParameterSet &iConfig)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
PFRecHitQTestHOThreshold(const edm::ParameterSet &iConfig)
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean)
const HGCalDDDConstants & dddConstants() const
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean)
PFRecHitQTestHCALThresholdVsDepth()
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
PFRecHitQTestHOThreshold()
PFRecHitQTestThresholdInThicknessNormalizedMIPs(const edm::ParameterSet &iConfig)
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
std::vector< int > depths_
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean)
std::vector< int > thresholds_
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
void setEnergy(float energy)
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean)
PFRecHitQTestThresholdInMIPs(const edm::ParameterSet &iConfig)
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
HcalDetId idFront(const HcalDetId &id) const
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean)
bool test(unsigned aDETID, double energy, int flags, bool &clean)
double thresholdCleaning_
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
uint32_t getValue() const
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
bool withSpecialRBXHBHE() const
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
T const * product() const
std::vector< int > flags_
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
PFRecHitQTestThresholdInMIPs()
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
PFRecHitQTestES(const edm::ParameterSet &iConfig)
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)