61 if(iConfig.
existsAs<
double>(
"minR45HitE"))
65 if (iConfig.
exists(
"HcalRecHitFlagsToBeExcluded"))
68 edm::LogWarning(
"MisConfiguration")<<
"the module is missing the parameter HcalAcceptSeverityLevel. created empty.";
96 std::vector<double> TS4TS5UpperThresholdTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5UpperThreshold");
97 std::vector<double> TS4TS5UpperCutTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5UpperCut");
98 std::vector<double> TS4TS5LowerThresholdTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5LowerThreshold");
99 std::vector<double> TS4TS5LowerCutTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5LowerCut");
101 for(
int i = 0;
i < (
int)TS4TS5UpperThresholdTemp.size() &&
i < (
int)TS4TS5UpperCutTemp.size();
i++)
102 TS4TS5UpperCut_.push_back(std::pair<double, double>(TS4TS5UpperThresholdTemp[
i], TS4TS5UpperCutTemp[i]));
105 for(
int i = 0; i < (
int)TS4TS5LowerThresholdTemp.size() && i < (
int)TS4TS5LowerCutTemp.size(); i++)
106 TS4TS5LowerCut_.push_back(std::pair<double, double>(TS4TS5LowerThresholdTemp[i], TS4TS5LowerCutTemp[i]));
112 edm::LogWarning(
"HCalNoiseInfoProducer") <<
" forcing fillRecHits to be true if fillDigis is true.\n";
115 const float adc2fCTemp[128]={-0.5,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,
116 13.5,15.,17.,19.,21.,23.,25.,27.,29.5,32.5,35.5,38.5,42.,46.,50.,54.5,59.5,
117 64.5,59.5,64.5,69.5,74.5,79.5,84.5,89.5,94.5,99.5,104.5,109.5,114.5,119.5,
118 124.5,129.5,137.,147.,157.,167.,177.,187.,197.,209.5,224.5,239.5,254.5,272.,
119 292.,312.,334.5,359.5,384.5,359.5,384.5,409.5,434.5,459.5,484.5,509.5,534.5,
120 559.5,584.5,609.5,634.5,659.5,684.5,709.5,747.,797.,847.,897.,947.,997.,
121 1047.,1109.5,1184.5,1259.5,1334.5,1422.,1522.,1622.,1734.5,1859.5,1984.5,
122 1859.5,1984.5,2109.5,2234.5,2359.5,2484.5,2609.5,2734.5,2859.5,2984.5,
123 3109.5,3234.5,3359.5,3484.5,3609.5,3797.,4047.,4297.,4547.,4797.,5047.,
124 5297.,5609.5,5984.5,6359.5,6734.5,7172.,7672.,8172.,8734.5,9359.5,9984.5};
125 for(
int i = 0; i < 128; i++)
126 adc2fC[i] = adc2fCTemp[i];
135 produces<HcalNoiseRBXCollection>();
137 produces<HcalNoiseSummary>();
155 auto result1 = std::make_unique<HcalNoiseRBXCollection>();
156 auto result2 = std::make_unique<HcalNoiseSummary>();
181 HcalNoiseRBXArray::iterator maxit=rbxarray.begin();
182 double maxenergy=-999;
183 bool maxwritten=
false;
184 for(HcalNoiseRBXArray::iterator rit = rbxarray.begin(); rit!=rbxarray.end(); ++rit) {
190 if(data.
energy()>maxenergy) {
206 result1->push_back(rbx);
207 if(maxit==rit) maxwritten=
true;
217 result1->push_back(rbx);
333 int NcalibTS45gt15=0;
336 double chargecalibTS45=0;
337 double chargecalibgt15TS45=0;
384 bool isBig=
false, isBig5=
false, isRBX=
false;
389 const HcalDetId & detid = (*rit)->idFront();
390 if(
DetId(detid) == digi.
id()) {
391 if(counter==0) isBig=isBig5=
true;
392 if(counter<5) isBig5=
true;
401 for(
int ts=0; ts<tool.
size(); ++ts) {
404 if(digi[ts].
adc()==0) {
410 double corrfc = tool[ts]-calibrations.
pedestal(digi[ts].capid());
433 if(digi->id().hcalSubdet() == 0)
462 for(
int i = 0;
i < (
int)digi->size();
i++)
469 if(digi->zsMarkAndPass())
continue;
474 double sumChargeHF=0;
486 double sumChargeHBHE=0;
495 chargecalibTS45+=sumChargeHBHE;
499 chargecalibgt15TS45+=sumChargeHBHE;
541 <<
" could not find HBHERecHitCollection named " <<
recHitCollName_ <<
"\n.";
564 uint32_t recHitFlag = rechit.
flags();
573 recHitFlag = (recHitFlag & bitset) ? recHitFlag-bitset : recHitFlag;
581 bool isRecovered = hcalSevLvlComputer->
recoveredRecHit(
id, recHitFlag);
598 if(rechit.
eraw() > 1.5)
605 if(rechit.
flags() & isolbitset) {
609 double et = rechit.
eraw()*gp.perp()/gp.mag();
613 if(rechit.
flags() & flatbitset) {
617 double et = rechit.
eraw()*gp.perp()/gp.mag();
621 if(rechit.
flags() & spikebitset) {
625 double et = rechit.
eraw()*gp.perp()/gp.mag();
629 if(rechit.
flags() & trianglebitset) {
633 double et = rechit.
eraw()*gp.perp()/gp.mag();
637 if(rechit.
flags() & ts4ts5bitset) {
643 double et = rechit.
eraw()*gp.perp()/gp.mag();
648 if(rechit.
flags() & negativebitset) {
652 double et = rechit.
eraw()*gp.perp()/gp.mag();
668 for(HcalNoiseRBXArray::iterator rbxit=array.begin(); rbxit!=array.end(); ++rbxit) {
669 for(std::vector<HcalNoiseHPD>::iterator hpdit=rbxit->hpds_.begin(); hpdit!=rbxit->hpds_.end(); ++hpdit) {
673 it=hpdit->refrechitset_.begin(); it!=hpdit->refrechitset_.end(); ++it) {
674 hpdit->rechits_.push_back(*it);
708 std::vector<std::vector<HcalNoiseHPD>::iterator> hpditervec;
709 array.
findHPD(twr, hpditervec);
712 for(std::vector<std::vector<HcalNoiseHPD>::iterator>::iterator it=hpditervec.begin();
713 it!=hpditervec.end(); ++it)
714 (*it)->calotowers_.push_back(myRef);
730 bool goodJetFoundInLowBVRegion =
false;
741 for(reco::PFJetCollection::const_iterator
jet = pfjet_h->begin();
742 jet != pfjet_h->end(); ++
jet)
748 if (
jet->eta()>0.0 &&
jet->eta()<1.4 &&
749 jet->phi()>-1.8 &&
jet->phi()<-1.4)
755 goodJetFoundInLowBVRegion=
true;
783 for(reco::TrackCollection::const_iterator iTrack = handle->begin(); iTrack!=handle->end(); ++iTrack) {
int adc(sample_type sample)
get the ADC sample (12 bits)
double HPDEMF(void) const
double p() const
momentum vector magnitude
T getParameter(std::string const &) const
edm::RefVector< CaloTowerCollection > hlnoisetwrs_
double lowEHitTimeSqrd(void) const
std::vector< int > calibdigiHFtimeslices_
std::vector< int > HcalRecHitFlagsToBeExcluded_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool isProblematic(const CommonHcalNoiseRBXData &) const
bool passTightRatio(const CommonHcalNoiseRBXData &) const
bool zsMarkAndPass() const
was ZS MarkAndPass?
double minLowEHitTime(void) const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
std::string caloTowerCollName_
bool passLooseRatio(const CommonHcalNoiseRBXData &) const
CalibDetType calibFlavor() const
get the flavor of this calibration detid
void fillrechits(edm::Event &, const edm::EventSetup &, HcalNoiseRBXArray &, HcalNoiseSummary &) const
bool passTightRBXRechitR45(const CommonHcalNoiseRBXData &) const
double maxHighEHitTime(void) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool passTightTiming(const CommonHcalNoiseRBXData &) const
double maxLowEHitTime(void) const
#define DEFINE_FWK_MODULE(type)
int numLowEHits(void) const
double energyInLaserRegion_
void produce(edm::Event &, const edm::EventSetup &) override
std::vector< std::pair< double, double > > TS4TS5LowerCut_
HcalDetId id() const
get the id
std::set< edm::Ref< HBHERecHitCollection >, RefHBHERecHitEnergyComparison > refrechitset_
std::vector< HBHEDataFrame >::const_iterator const_iterator
std::vector< float > bigCharge_
float maxE2Over10TS(void) const
edm::RefVector< CaloTowerCollection > loosenoisetwrs_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
void fillcalotwrs(edm::Event &, const edm::EventSetup &, HcalNoiseRBXArray &, HcalNoiseSummary &) const
std::vector< float > big5Charge_
double pedestal(int fCapId) const
get pedestal for capid=0..3
HcalDetId idFront() const
const Item * getValues(DetId fId, bool throwOnFail=true) const
int hitsInNonLaserRegion_
bool passLooseRBXRechitR45(const CommonHcalNoiseRBXData &) const
const_iterator end() const
Termination of iteration.
float min25GeVHitTime(void) const
std::string digiCollName_
bool passHighLevelNoiseFilter(const CommonHcalNoiseRBXData &) const
std::string trackCollName_
const_iterator begin() const
Initialize an iterator over the RefVector.
double RBXEMF(void) const
edm::RefVector< HBHERecHitCollection > rechits_
edm::EDGetTokenT< reco::PFJetCollection > jet_token_
int numRBXHits(void) const
uint32_t rawId() const
get the raw id
float min10GeVHitTime(void) const
HcalNoiseRBXArray::iterator findRBX(int rbxindex)
double highEHitTimeSqrd(void) const
void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const override
float minE2Over10TS(void) const
double eta() const
pseudorapidity of momentum vector
bool passLooseZeros(const CommonHcalNoiseRBXData &) const
bool goodJetFoundInLowBVRegion_
~HcalNoiseInfoProducer() override
int maxRBXHits(void) const
bool passTightZeros(const CommonHcalNoiseRBXData &) const
double TS4TS5EnergyThreshold_
void filljetinfo(edm::Event &, const edm::EventSetup &, HcalNoiseSummary &) const
double pt() const
track transverse momentum
bool recoveredRecHit(const DetId &myid, const uint32_t &myflag) const
int numHighEHits(void) const
bool hasBadRBXRechitR45Loose_
edm::EDGetTokenT< HcalCalibDigiCollection > hcalcalibdigi_token_
bool passRatioThreshold(const CommonHcalNoiseRBXData &) const
std::vector< HcalNoiseHPD >::iterator findHPD(int hpdindex)
bool hasBadRBXRechitR45Tight_
bool dropChannel(const uint32_t &mystatus) const
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
int numHPDNoOtherHits(void) const
edm::EDGetTokenT< HBHEDigiCollection > hbhedigi_token_
double calibdigiHFthreshold_
bool passZerosThreshold(const CommonHcalNoiseRBXData &) const
std::vector< std::pair< double, double > > TS4TS5UpperCut_
float minHPDEMF(void) const
bool passLooseNoiseFilter(const CommonHcalNoiseRBXData &) const
edm::RefVector< CaloTowerCollection > rbxTowers(void) const
const_iterator end() const
std::vector< float > allCharge_
double calibdigiHBHEthreshold_
edm::EDGetTokenT< reco::TrackCollection > track_token_
bool passLooseHits(const CommonHcalNoiseRBXData &) const
static std::string join(char **cmd)
edm::EDGetTokenT< HBHERecHitCollection > hbherechit_token_
int size() const
get the size
uint32_t HcalAcceptSeverityLevel_
void filldigis(edm::Event &, const edm::EventSetup &, HcalNoiseRBXArray &, HcalNoiseSummary &)
edm::RefVector< CaloTowerCollection > tightnoisetwrs_
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
et
define resolution functions of each parameter
double energy(void) const
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
bool passLooseTiming(const CommonHcalNoiseRBXData &) const
bool passTightNoiseFilter(const CommonHcalNoiseRBXData &) const
int maxHPDNoOtherHits(void) const
char data[epos_bytes_allocation]
double minHighEHitTime(void) const
static std::atomic< unsigned int > counter
double energyInNonLaserRegion_
float minRBXEMF(void) const
std::vector< int > calibdigiHBHEtimeslices_
const HcalTopology * theHcalTopology_
const HcalDetId & id() const
bool PassTS4TS5(void) const
uint32_t getValue() const
bool passEMFThreshold(const CommonHcalNoiseRBXData &) const
void filltracks(edm::Event &, const edm::EventSetup &, HcalNoiseSummary &) const
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
HcalNoiseInfoProducer(const edm::ParameterSet &)
void fillOtherSummaryVariables(HcalNoiseSummary &summary, const CommonHcalNoiseRBXData &data) const
int maxHPDHits(void) const
int numHPDHits(void) const
T const * product() const
std::string recHitCollName_
float max25GeVHitTime(void) const
float max10GeVHitTime(void) const
const_iterator begin() const
double calibChargegt15TS45_
bool validRatio(void) const
bool passTightHits(const CommonHcalNoiseRBXData &) const
edm::EDGetTokenT< CaloTowerCollection > calotower_token_