1 #ifndef RecoParticleFlow_PFClusterProducer_PFEcalRecHitQTests_h
2 #define RecoParticleFlow_PFClusterProducer_PFEcalRecHitQTests_h
29 return fullReadOut
or pass(hit);
65 return fullReadOut
or pass(hit);
105 if (flag ==
"Standard") {
108 }
else if (flag ==
"HFInTime") {
111 }
else if (flag ==
"HFDigi") {
114 }
else if (flag ==
"HFLong") {
117 }
else if (flag ==
"HFShort") {
120 }
else if (flag ==
"HFSignalAsymmetry") {
169 unsigned theStatusValue = theStatus->
getValue();
206 depths_.push_back(
pset.getParameter<
int>(
"depth"));
240 for (
unsigned int i = 0;
i <
depths_.size(); ++
i) {
263 depths_ =
pset.getParameter<std::vector<int> >(
"depth");
266 if (thresholds_.size() !=
depths_.size()) {
267 throw cms::Exception(
"InvalidPFRecHitThreshold") <<
"PFRecHitThreshold mismatch with the numbers of depths";
321 threshold0_(iConfig.getParameter<double>(
"threshold_ring0")),
322 threshold12_(iConfig.getParameter<double>(
"threshold_ring12")) {}
377 if (endcapGeometry) {
387 return fullReadOut
or pass(hit);
546 if (
abs(detId.ieta()) == 29)
556 if (detId.ietaAbs() == 29)
574 threshold_(iConfig.getParameter<double>(
"thresholdInMIPs")),
575 mip_(iConfig.getParameter<double>(
"mipValueInkeV")),
581 throw cms::Exception(
"WrongDetector") <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
585 throw cms::Exception(
"WrongDetector") <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
590 throw cms::Exception(
"WrongDetector") <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
594 throw cms::Exception(
"WrongDetector") <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
599 throw cms::Exception(
"WrongDetector") <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
615 const double hitValueInMIPs = 1e6 * hit.
energy() /
mip_;
630 threshold_(iConfig.getParameter<double>(
"thresholdInMIPs")),
631 mip_(iConfig.getParameter<double>(
"mipValueInkeV")),
637 ddd_ = &(geoHandle->topology().dddConstants());
641 throw cms::Exception(
"WrongDetector") <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
645 throw cms::Exception(
"WrongDetector") <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
650 throw cms::Exception(
"WrongDetector") <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
654 throw cms::Exception(
"WrongDetector") <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
659 throw cms::Exception(
"WrongDetector") <<
"PFRecHitQTestThresholdInMIPs only works for HGCAL!";
669 return pass(hit, mult);
679 const double hitValueInMIPs = 1e6 * hit.
energy() / (mult *
mip_);
697 throw cms::Exception(
"WrongDetector") <<
"PFRecHitQTestHGCalThresholdSNR only works for HGCAL!";
701 throw cms::Exception(
"WrongDetector") <<
"PFRecHitQTestHGCalThresholdSNR only works for HGCAL!";
706 throw cms::Exception(
"WrongDetector") <<
"PFRecHitQTestHGCalThresholdSNR only works for HGCAL!";
710 throw cms::Exception(
"WrongDetector") <<
"PFRecHitQTestHGCalThresholdSNR only works for HGCAL!";
715 throw cms::Exception(
"WrongDetector") <<
"PFRecHitQTestHGCalThresholdSNR only works for HGCAL!";
743 return fullReadOut
or pass(hit);
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean) override
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup) override
constexpr float energy() const
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geomToken_
PFRecHitQTestHGCalThresholdSNR()
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean) override
const HcalChannelQuality * theHcalChStatus_
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean) override
PFRecHitQTestDBSeedingThreshold(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup) override
const HGCalDDDConstants * ddd_
PFRecHitQTestES(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
edm::ESGetToken< HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd > severityToken_
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup) override
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean) override
std::vector< double > minTimes_
bool pass(const reco::PFRecHit &hit)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
edm::ESGetToken< EcalPFSeedingThresholds, EcalPFSeedingThresholdsRcd > threshToken_
std::vector< int > depths_
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean) override
unsigned detId() const
rechit detId
PFRecHitQTestHCALCalib29(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
bool topologicalCleaning_
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean) override
constexpr const DetId & detid() const
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean) override
const double thresholdSNR_
std::vector< int > depths_
PFRecHitQTestECALMultiThreshold(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean) override
bool skipTTRecoveredHits_
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
bool pass(const reco::PFRecHit &hit, const float mult)
const HcalSeverityLevelComputer * hcalSevLvlComputer_
PFRecHitQTestDBThreshold(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean) override
const bool recHitEnergy_keV_
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean) override
std::vector< double > maxTimes_
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
bool applySelectionsToAllCrystals_
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean) override
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > topoToken_
PFRecHitQTestHCALTimeVsDepth()
const Item * getValues(DetId fId, bool throwOnFail=true) const
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
bool test(unsigned aDETID, double energy, double time, bool &clean)
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
const std::string geometryInstance_
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean) override
std::vector< double > cleanThresholds_
PFRecHitQTestHCALChannel(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean) override
std::vector< double > thresholds_
bool getMergePositionFlag() const
bool pass(const reco::PFRecHit &hit)
const bool recHitEnergy_keV_
const HcalTopology * theHcalTopology_
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean) override
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup) override
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean) override
const double threshold12_
PFRecHitQTestHCALChannel()
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
float signalOverSigmaNoise() const
std::vector< double > thresholds_
static void clean(char *s)
bool test(unsigned aDETID, double energy, double time, bool &clean)
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
bool getData(T &iHolder) const
PFRecHitQTestHCALCalib29()
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean) override
constexpr HcalSubdetector subdet() const
get the subdetector
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean) override
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup) override
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup) override
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean) override
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
const double recHitEnergyMultiplier_
bool checkFlag(int flag) const
check if the flag is true
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
PFRecHitQTestThreshold(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
bool applySelectionsToAllCrystals_
PFRecHitQTestHCALTimeVsDepth(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
const double recHitEnergyMultiplier_
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean) override
constexpr float time() const
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean) override
bool pass(const reco::PFRecHit &hit)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup) override
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean) override
Abs< T >::type abs(const T &t)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup) override
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean) override
int waferTypeL(int wafer) const
float energy() const
rechit energy
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean) override
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > qualityToken_
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean) override
const std::vector< double > thresholds_
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean) override
PFRecHitQTestThresholdInThicknessNormalizedMIPs()
PFRecHitQTestThresholdInThicknessNormalizedMIPs(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
PFRecHitQTestHCALThresholdVsDepth(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup) override
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean) override
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup) override
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean) override
PFRecHitQTestECAL(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
PFRecHitQTestDBThreshold()
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean) override
PFRecHitQTestHCALThresholdVsDepth()
std::vector< edm::ParameterSet > psets_
PFRecHitQTestHOThreshold()
PFRecHitQTestHGCalThresholdSNR(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
bool applySelectionsToAllCrystals_
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup) override
std::vector< int > depths_
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
edm::ESHandle< EcalPFRecHitThresholds > ths_
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean) override
PFRecHitQTestThresholdInMIPs(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
edm::ESGetToken< EcalPFRecHitThresholds, EcalPFRecHitThresholdsRcd > threshToken_
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean) override
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup) override
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup) override
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean) override
std::vector< std::string > flagStr_
std::vector< int > thresholds_
void setEnergy(float energy)
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean) override
edm::ESHandle< EcalPFSeedingThresholds > ths_
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean) override
bool pass(const reco::PFRecHit &hit)
const bool topologicalCleaning_
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > geomToken_
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean) override
HcalDetId idFront(const HcalDetId &id) const
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean) override
bool test(unsigned aDETID, double energy, int flags, bool &clean)
std::vector< edm::ParameterSet > psets_
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean) override
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup) override
double thresholdCleaning_
constexpr int depth() const
get the tower depth
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean) override
uint32_t getValue() const
bool pass(const reco::PFRecHit &hit)
const double thresholdCleaning_
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean) override
PFRecHitQTestECALMultiThreshold()
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean) override
constexpr uint32_t flags() const
std::vector< int > flags_
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
PFRecHitQTestHOThreshold(const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
PFRecHitQTestThresholdInMIPs()
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean) override
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean) override