|
|
#include <HcalHitReconstructor.h>
- Author
- J. Temple & E. Yazgan Based on HcalSimpleReconstructor.h by J. Mans
Definition at line 50 of file HcalHitReconstructor.h.
◆ SetCorrectionFcn
typedef void(HcalSimpleRecAlgo::* HcalHitReconstructor::SetCorrectionFcn) (std::shared_ptr< AbsOOTPileupCorrection >) |
|
private |
◆ HcalHitReconstructor()
Definition at line 26 of file HcalHitReconstructor.cc.
27 :
reco_(conf.getParameter<
bool>(
"correctForTimeslew"),
28 conf.getParameter<
bool>(
"correctForPhaseContainment"),
29 conf.getParameter<
double>(
"correctionPhaseNS"),
44 tsFromDB_(conf.getParameter<
bool>(
"tsFromDB")),
67 if (conf.existsAs<
bool>(
"setNegativeFlags"))
84 if (!strcasecmp(subd.c_str(),
"HO")) {
88 produces<HORecHitCollection>();
89 }
else if (!strcasecmp(subd.c_str(),
"HF")) {
108 psS9S1.
getParameter<std::vector<double> >(
"shortEnergyParams"),
109 psS9S1.
getParameter<std::vector<double> >(
"shortETParams"),
110 psS9S1.
getParameter<std::vector<double> >(
"long_optimumSlope"),
111 psS9S1.
getParameter<std::vector<double> >(
"longEnergyParams"),
112 psS9S1.
getParameter<std::vector<double> >(
"longETParams"),
118 psS8S1.
getParameter<std::vector<double> >(
"shortEnergyParams"),
119 psS8S1.
getParameter<std::vector<double> >(
"shortETParams"),
120 psS8S1.
getParameter<std::vector<double> >(
"long_optimumSlope"),
121 psS8S1.
getParameter<std::vector<double> >(
"longEnergyParams"),
122 psS8S1.
getParameter<std::vector<double> >(
"longETParams"),
128 psPET.
getParameter<std::vector<double> >(
"shortEnergyParams"),
129 psPET.
getParameter<std::vector<double> >(
"shortETParams"),
131 psPET.
getParameter<std::vector<double> >(
"longEnergyParams"),
132 psPET.
getParameter<std::vector<double> >(
"longETParams"),
137 produces<HFRecHitCollection>();
138 }
else if (!strcasecmp(subd.c_str(),
"ZDC")) {
141 produces<ZDCRecHitCollection>();
142 }
else if (!strcasecmp(subd.c_str(),
"CALIB")) {
145 produces<HcalCalibRecHitCollection>();
147 edm::LogWarning(
"Configuration") <<
"HcalHitReconstructor is not associated with a specific subdetector!"
153 if (conf.existsAs<
std::string>(
"dataOOTCorrectionName"))
155 if (conf.existsAs<
std::string>(
"dataOOTCorrectionCategory"))
157 if (conf.existsAs<
std::string>(
"mcOOTCorrectionName"))
159 if (conf.existsAs<
std::string>(
"mcOOTCorrectionCategory"))
165 htopoToken_ = esConsumes<HcalTopology, HcalRecNumberingRecord, edm::Transition::BeginRun>();
167 paramsToken_ = esConsumes<HcalRecoParams, HcalRecoParamsRcd, edm::Transition::BeginRun>();
169 digiTimeToken_ = esConsumes<HcalFlagHFDigiTimeParams, HcalFlagHFDigiTimeParamsRcd, edm::Transition::BeginRun>();
172 sevToken_ = esConsumes<HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd>();
References DetId::Calo, conditionsToken_, dataOOTCorrectionCategory_, dataOOTCorrectionName_, det_, digiTimeFromDB_, digiTimeToken_, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), HcalCalibration, HcalForward, HcalOther, HcalOuter, hfdigibit_, hfPET_, hfS8S1_, hfS9S1_, HFTimingTrustFlagSetter_, htopoToken_, inputLabel_, mcOOTCorrectionCategory_, mcOOTCorrectionName_, paramsToken_, qualToken_, recoParamsFromDB_, saturationFlagSetter_, setNegativeFlags_, setNoiseFlags_, setPileupCorrection_, setSaturationFlags_, setTimingTrustFlags_, sevToken_, AlCaHLTBitMon_QueryRunRegistry::string, subdet_, HcalZDCDetId::SubdetectorId, subdetOther_, tok_calib_, tok_hf_, tok_ho_, and tsFromDB_.
◆ ~HcalHitReconstructor()
HcalHitReconstructor::~HcalHitReconstructor |
( |
| ) |
|
|
override |
◆ beginRun()
Definition at line 185 of file HcalHitReconstructor.cc.
190 paramTS_ = std::make_unique<HcalRecoParams>(
p);
References HcalSimpleRecAlgo::beginRun(), digiTimeFromDB_, digiTimeToken_, edm::EventSetup::getData(), hFDigiTimeParams_, htopoToken_, AlCaHLTBitMon_ParallelJobs::p, paramsToken_, paramTS_, reco_, recoParamsFromDB_, and tsFromDB_.
◆ endRun()
◆ produce()
Definition at line 209 of file HcalHitReconstructor.cc.
229 auto rec = std::make_unique<HORecHitCollection>();
230 rec->reserve(digi->
size());
235 int favorite_capid = 0;
237 long capid_votes[4] = {0, 0, 0, 0};
239 capid_votes[(*i)[0].capid()]++;
241 for (
int k = 0;
k < 4;
k++)
242 if (capid_votes[
k] > capid_votes[favorite_capid])
274 <<
"HcalHitReconstructor: illegal firstSample" <<
first <<
" in subdet " <<
subdet_ << std::endl;
281 if (
i->zsMarkAndPass())
296 for (
int xx = fTS;
xx < fTS + 4 &&
xx <
i->size(); ++
xx)
297 auxflag += (
i->sample(
xx).adc())
301 auxflag += ((
i->sample(fTS).capid()) << 28);
302 (rec->back()).setAux(auxflag);
324 auto rec = std::make_unique<HFRecHitCollection>();
325 rec->reserve(digi->
size());
330 int favorite_capid = 0;
332 long capid_votes[4] = {0, 0, 0, 0};
334 capid_votes[(*i)[0].capid()]++;
336 for (
int k = 0;
k < 4;
k++)
337 if (capid_votes[
k] > capid_votes[favorite_capid])
369 <<
"HcalHitReconstructor: illegal firstSample" <<
first <<
" in subdet " <<
subdet_ << std::endl;
376 if (
i->zsMarkAndPass())
402 for (
int xx = fTS;
xx < fTS + 4 &&
xx <
i->size(); ++
xx)
403 auxflag += (
i->sample(
xx).adc())
407 auxflag += ((
i->sample(fTS).capid()) << 28);
408 (rec->back()).setAux(auxflag);
436 int depth =
i->id().depth();
437 int ieta =
i->id().ieta();
445 int depth =
i->id().depth();
446 int ieta =
i->id().ieta();
454 int depth =
i->id().depth();
455 int ieta =
i->id().ieta();
469 auto rec = std::make_unique<HcalCalibRecHitCollection>();
470 rec->reserve(digi->
size());
485 if (
i->zsMarkAndPass())
References funct::abs(), edm::SortedCollection< T, SORT >::begin(), AlignmentProducer_cff::calibrations, submitPVValidationJobs::conditions, conditionsToken_, HcalTimingCorrector::Correct(), HcalRecoParam::correctForPhaseContainment(), castor_dqm_sourceclient-live_cfg::correctForPhaseContainment, HcalRecoParam::correctForTimeslew(), castor_dqm_sourceclient-live_cfg::correctForTimeslew, HcalRecoParam::correctionPhaseNS(), HcalRecoParam::correctTiming(), correctTiming_, LEDCalibrationChannels::depth, det_, digiTimeFromDB_, HcalSeverityLevelComputer::dropChannel(), dropZSmarkedPassed_, MillePedeFileConverter_cfg::e, edm::SortedCollection< T, SORT >::end(), first, HcalRecoParam::firstAuxTS(), firstAuxTS_, HcalRecoParam::firstSample(), firstSample_, edm::EventSetup::getData(), HcalChannelStatus::getValue(), HcalCondObjectContainer< Item >::getValues(), DetId::Hcal, HcalCalibration, HcalForward, HcalOther, HcalOuter, hfdigibit_, HcalFlagHFDigiTimeParam::HFdigiflagCoefficients(), HcalFlagHFDigiTimeParam::HFdigiflagExpectedPeak(), HcalFlagHFDigiTimeParam::HFdigiflagFirstSample(), HcalFlagHFDigiTimeParam::HFdigiflagMinEThreshold(), HcalFlagHFDigiTimeParam::HFdigiflagSamplesToAdd(), hFDigiTimeParams_, hfPET_, hfS8S1_, hfS9S1_, HcalHFStatusBitFromDigis::hfSetFlagFromDigi(), HcalHF_PETalgorithm::HFSetFlagFromPET(), HcalHF_S9S1algorithm::HFSetFlagFromS9S1(), HFTimingTrustFlagSetter_, mps_fire::i, LEDCalibrationChannels::ieta, dqmdumpme::k, eostools::move(), paramTS_, HcalRecoParam::pileupCleaningID(), HcalCaloFlagLabels::PresampleADC, qualToken_, DetId::rawId(), reco_, HcalSimpleRecAlgo::reconstruct(), recoParamsFromDB_, HcalHFStatusBitFromDigis::resetParamsFromDB(), HcalRecoParam::samplesToAdd(), samplesToAdd_, saturationFlagSetter_, HFTimingTrustFlag::setHFTimingTrustFlag(), HcalSimpleRecAlgo::setLeakCorrection(), setNoiseFlags_, HcalSimpleRecAlgo::setRecoParams(), HcalADCSaturationFlag::setSaturationFlag(), setSaturationFlags_, setTimingTrustFlags_, sevToken_, edm::SortedCollection< T, SORT >::size(), subdet_, subdetOther_, tok_calib_, tok_hf_, tok_ho_, tsFromDB_, HcalRecoParam::useLeakCorrection(), useLeakCorrection_, and geometryCSVtoXML::xx.
◆ cat_
std::string HcalHitReconstructor::cat_ |
|
private |
◆ conditionsToken_
◆ correctTiming_
bool HcalHitReconstructor::correctTiming_ |
|
private |
◆ corrName_
std::string HcalHitReconstructor::corrName_ |
|
private |
◆ dataOOTCorrectionCategory_
std::string HcalHitReconstructor::dataOOTCorrectionCategory_ |
|
private |
◆ dataOOTCorrectionName_
std::string HcalHitReconstructor::dataOOTCorrectionName_ |
|
private |
◆ det_
◆ digiTimeFromDB_
bool HcalHitReconstructor::digiTimeFromDB_ |
|
private |
◆ digiTimeToken_
◆ dropZSmarkedPassed_
bool HcalHitReconstructor::dropZSmarkedPassed_ |
|
private |
◆ firstAuxTS_
int HcalHitReconstructor::firstAuxTS_ |
|
private |
◆ firstSample_
int HcalHitReconstructor::firstSample_ |
|
private |
◆ hfdigibit_
◆ hFDigiTimeParams_
◆ hfPET_
◆ hfS8S1_
◆ hfS9S1_
◆ HFTimingTrustFlagSetter_
◆ htopoToken_
◆ inputLabel_
◆ mcOOTCorrectionCategory_
std::string HcalHitReconstructor::mcOOTCorrectionCategory_ |
|
private |
◆ mcOOTCorrectionName_
std::string HcalHitReconstructor::mcOOTCorrectionName_ |
|
private |
◆ paramsToken_
◆ paramTS_
◆ qualToken_
◆ reco_
◆ recoParamsFromDB_
bool HcalHitReconstructor::recoParamsFromDB_ |
|
private |
◆ samplesToAdd_
int HcalHitReconstructor::samplesToAdd_ |
|
private |
◆ saturationFlagSetter_
◆ setHSCPFlags_
bool HcalHitReconstructor::setHSCPFlags_ |
|
private |
◆ setNegativeFlags_
bool HcalHitReconstructor::setNegativeFlags_ |
|
private |
◆ setNoiseFlags_
bool HcalHitReconstructor::setNoiseFlags_ |
|
private |
◆ setPileupCorrection_
◆ setPulseShapeFlags_
bool HcalHitReconstructor::setPulseShapeFlags_ |
|
private |
◆ setSaturationFlags_
bool HcalHitReconstructor::setSaturationFlags_ |
|
private |
◆ setTimingTrustFlags_
bool HcalHitReconstructor::setTimingTrustFlags_ |
|
private |
◆ sevToken_
◆ subdet_
int HcalHitReconstructor::subdet_ |
|
private |
◆ subdetOther_
◆ tok_calib_
◆ tok_hf_
◆ tok_ho_
◆ tsFromDB_
bool HcalHitReconstructor::tsFromDB_ |
|
private |
◆ useLeakCorrection_
bool HcalHitReconstructor::useLeakCorrection_ |
|
private |
constexpr float correctionPhaseNS() const
std::vector< double > HFdigiflagCoefficients() const
std::vector< T >::const_iterator const_iterator
std::unique_ptr< HcalRecoParams > paramTS_
edm::ESGetToken< HcalFlagHFDigiTimeParams, HcalFlagHFDigiTimeParamsRcd > digiTimeToken_
edm::ESGetToken< HcalRecoParams, HcalRecoParamsRcd > paramsToken_
uint32_t HFdigiflagSamplesToAdd() const
HFTimingTrustFlag * HFTimingTrustFlagSetter_
static void Correct(HBHERecHit &rechit, const HBHEDataFrame &digi, int favorite_capid)
void HFSetFlagFromS9S1(HFRecHit &hf, HFRecHitCollection &rec, const HcalChannelQuality *myqual, const HcalSeverityLevelComputer *mySeverity)
HcalADCSaturationFlag * saturationFlagSetter_
void beginRun(edm::EventSetup const &es)
void hfSetFlagFromDigi(HFRecHit &hf, const HFDataFrame &digi, const HcalCoder &coder, const HcalCalibrations &calib)
Log< level::Warning, false > LogWarning
const Item * getValues(DetId fId, bool throwOnFail=true) const
void HFSetFlagFromPET(HFRecHit &hf, HFRecHitCollection &rec, const HcalChannelQuality *myqual, const HcalSeverityLevelComputer *mySeverity)
std::unique_ptr< HcalFlagHFDigiTimeParams > hFDigiTimeParams_
edm::ESGetToken< HcalDbService, HcalDbRecord > conditionsToken_
uint32_t HFdigiflagExpectedPeak() const
const_iterator begin() const
constexpr bool correctForPhaseContainment() const
std::string mcOOTCorrectionName_
constexpr bool useLeakCorrection() const
void setSaturationFlag(HBHERecHit &rechit, const HBHEDataFrame &digi)
edm::ESGetToken< HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd > sevToken_
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > qualToken_
static const int SubdetectorId
constexpr unsigned int samplesToAdd() const
bool dropChannel(const uint32_t &mystatus) const
uint32_t getValue() const
HcalHF_S9S1algorithm * hfS9S1_
constexpr bool correctTiming() const
edm::EDGetTokenT< HODigiCollection > tok_ho_
void resetParamsFromDB(int firstSample, int samplesToAdd, int expectedPeak, double minthreshold, const std::vector< double > &coef)
std::vector< T >::iterator iterator
correctForPhaseContainment
HcalHFStatusBitFromDigis * hfdigibit_
const_iterator end() const
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
std::string dataOOTCorrectionCategory_
void setRecoParams(bool correctForTimeslew, bool correctForPulse, bool setLeakCorrection, int pileupCleaningID, float phaseNS)
edm::InputTag inputLabel_
SetCorrectionFcn setPileupCorrection_
HcalHF_PETalgorithm * hfPET_
bool setTimingTrustFlags_
constexpr unsigned int firstSample() const
constexpr uint32_t rawId() const
get the raw id
HcalHF_S9S1algorithm * hfS8S1_
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > htopoToken_
HcalOtherSubdetector subdetOther_
constexpr unsigned int firstAuxTS() const
T getParameter(std::string const &) const
uint32_t HFdigiflagFirstSample() const
std::string dataOOTCorrectionName_
double HFdigiflagMinEThreshold() const
Abs< T >::type abs(const T &t)
constexpr unsigned int pileupCleaningID() const
HFRecHit reconstruct(const HFDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
constexpr bool correctForTimeslew() const
void setHFTimingTrustFlag(HFRecHit &rechit, const HFDataFrame &digi)
edm::EDGetTokenT< HFDigiCollection > tok_hf_
std::string mcOOTCorrectionCategory_