60 if(iConfig.
existsAs<
double>(
"minR45HitE"))
64 if (iConfig.
exists(
"HcalRecHitFlagsToBeExcluded"))
67 edm::LogWarning(
"MisConfiguration")<<
"the module is missing the parameter HcalAcceptSeverityLevel. created empty.";
95 std::vector<double> TS4TS5UpperThresholdTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5UpperThreshold");
96 std::vector<double> TS4TS5UpperCutTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5UpperCut");
97 std::vector<double> TS4TS5LowerThresholdTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5LowerThreshold");
98 std::vector<double> TS4TS5LowerCutTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5LowerCut");
100 for(
int i = 0;
i < (int)TS4TS5UpperThresholdTemp.size() &&
i < (int)TS4TS5UpperCutTemp.size();
i++)
101 TS4TS5UpperCut_.push_back(std::pair<double, double>(TS4TS5UpperThresholdTemp[
i], TS4TS5UpperCutTemp[i]));
104 for(
int i = 0; i < (int)TS4TS5LowerThresholdTemp.size() && i < (int)TS4TS5LowerCutTemp.size(); i++)
105 TS4TS5LowerCut_.push_back(std::pair<double, double>(TS4TS5LowerThresholdTemp[i], TS4TS5LowerCutTemp[i]));
111 edm::LogWarning(
"HCalNoiseInfoProducer") <<
" forcing fillRecHits to be true if fillDigis is true.\n";
114 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,
115 13.5,15.,17.,19.,21.,23.,25.,27.,29.5,32.5,35.5,38.5,42.,46.,50.,54.5,59.5,
116 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,
117 124.5,129.5,137.,147.,157.,167.,177.,187.,197.,209.5,224.5,239.5,254.5,272.,
118 292.,312.,334.5,359.5,384.5,359.5,384.5,409.5,434.5,459.5,484.5,509.5,534.5,
119 559.5,584.5,609.5,634.5,659.5,684.5,709.5,747.,797.,847.,897.,947.,997.,
120 1047.,1109.5,1184.5,1259.5,1334.5,1422.,1522.,1622.,1734.5,1859.5,1984.5,
121 1859.5,1984.5,2109.5,2234.5,2359.5,2484.5,2609.5,2734.5,2859.5,2984.5,
122 3109.5,3234.5,3359.5,3484.5,3609.5,3797.,4047.,4297.,4547.,4797.,5047.,
123 5297.,5609.5,5984.5,6359.5,6734.5,7172.,7672.,8172.,8734.5,9359.5,9984.5};
124 for(
int i = 0; i < 128; i++)
125 adc2fC[i] = adc2fCTemp[i];
134 produces<HcalNoiseRBXCollection>();
136 produces<HcalNoiseSummary>();
154 auto result1 = std::make_unique<HcalNoiseRBXCollection>();
155 auto result2 = std::make_unique<HcalNoiseSummary>();
175 HcalNoiseRBXArray::iterator maxit=rbxarray.begin();
176 double maxenergy=-999;
177 bool maxwritten=
false;
178 for(HcalNoiseRBXArray::iterator rit = rbxarray.begin(); rit!=rbxarray.end(); ++rit) {
184 if(data.
energy()>maxenergy) {
200 result1->push_back(rbx);
201 if(maxit==rit) maxwritten=
true;
211 result1->push_back(rbx);
327 int NcalibTS45gt15=0;
330 double chargecalibTS45=0;
331 double chargecalibgt15TS45=0;
368 const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
369 const HcalQIEShape* shape = conditions->getHcalShape(channelCoder);
378 bool isBig=
false, isBig5=
false, isRBX=
false;
383 if((*rit)->id() == digi.
id()) {
384 if(counter==0) isBig=isBig5=
true;
385 if(counter<5) isBig5=
true;
394 for(
int ts=0; ts<tool.
size(); ++ts) {
397 if(digi[ts].
adc()==0) {
403 double corrfc = tool[ts]-calibrations.
pedestal(digi[ts].capid());
426 if(digi->id().hcalSubdet() == 0)
455 for(
int i = 0;
i < (int)digi->size();
i++)
462 if(digi->zsMarkAndPass())
continue;
467 double sumChargeHF=0;
479 double sumChargeHBHE=0;
488 chargecalibTS45+=sumChargeHBHE;
492 chargecalibgt15TS45+=sumChargeHBHE;
534 <<
" could not find HBHERecHitCollection named " <<
recHitCollName_ <<
"\n.";
556 uint32_t recHitFlag = rechit.
flags();
565 recHitFlag = (recHitFlag & bitset) ? recHitFlag-bitset : recHitFlag;
572 int severityLevel = hcalSevLvlComputer->
getSeverityLevel(
id, recHitFlag, dbStatusFlag);
573 bool isRecovered = hcalSevLvlComputer->
recoveredRecHit(
id, recHitFlag);
590 if(rechit.
eraw() > 1.5)
597 if(rechit.
flags() & isolbitset) {
601 double et = rechit.
eraw()*gp.perp()/gp.mag();
605 if(rechit.
flags() & flatbitset) {
609 double et = rechit.
eraw()*gp.perp()/gp.mag();
613 if(rechit.
flags() & spikebitset) {
617 double et = rechit.
eraw()*gp.perp()/gp.mag();
621 if(rechit.
flags() & trianglebitset) {
625 double et = rechit.
eraw()*gp.perp()/gp.mag();
629 if(rechit.
flags() & ts4ts5bitset) {
635 double et = rechit.
eraw()*gp.perp()/gp.mag();
640 if(rechit.
flags() & negativebitset) {
644 double et = rechit.
eraw()*gp.perp()/gp.mag();
660 for(HcalNoiseRBXArray::iterator rbxit=array.begin(); rbxit!=array.end(); ++rbxit) {
661 for(std::vector<HcalNoiseHPD>::iterator hpdit=rbxit->hpds_.begin(); hpdit!=rbxit->hpds_.end(); ++hpdit) {
665 it=hpdit->refrechitset_.begin(); it!=hpdit->refrechitset_.end(); ++it) {
666 hpdit->rechits_.push_back(*it);
700 std::vector<std::vector<HcalNoiseHPD>::iterator> hpditervec;
701 array.
findHPD(twr, hpditervec);
704 for(std::vector<std::vector<HcalNoiseHPD>::iterator>::iterator it=hpditervec.begin();
705 it!=hpditervec.end(); ++it)
706 (*it)->calotowers_.push_back(myRef);
722 bool goodJetFoundInLowBVRegion =
false;
733 for(reco::PFJetCollection::const_iterator
jet = pfjet_h->begin();
734 jet != pfjet_h->end(); ++
jet)
740 if (
jet->eta()>0.0 &&
jet->eta()<1.4 &&
741 jet->phi()>-1.8 &&
jet->phi()<-1.4)
747 goodJetFoundInLowBVRegion=
true;
775 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
algo_(conf.existsAs< bool >("Correct")?conf.getParameter< bool >("Correct"):true, conf.getParameter< double >("e9e25Cut"), conf.getParameter< double >("intercept2DCut"), conf.existsAs< bool >("intercept2DSlope")?conf.getParameter< double >("intercept2DSlope"):defaultSlope2D_, conf.getParameter< std::vector< double > >("e1e9Cut"), conf.getParameter< std::vector< double > >("eCOREe9Cut"), conf.getParameter< std::vector< double > >("eSeLCut"), hfvars_)
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
const DetId & detid() 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_
virtual 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
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
float minE2Over10TS(void) const
double eta() const
pseudorapidity of momentum vector
bool passLooseZeros(const CommonHcalNoiseRBXData &) const
bool goodJetFoundInLowBVRegion_
int maxRBXHits(void) const
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) 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
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 &)
T const * product() const
edm::RefVector< CaloTowerCollection > tightnoisetwrs_
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
double energy(void) 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 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
HcalNoiseInfoProducer(const edm::ParameterSet &)
void fillOtherSummaryVariables(HcalNoiseSummary &summary, const CommonHcalNoiseRBXData &data) const
int maxHPDHits(void) const
int numHPDHits(void) const
std::string recHitCollName_
float max25GeVHitTime(void) const
float max10GeVHitTime(void) const
double calibChargegt15TS45_
bool validRatio(void) const
bool passTightHits(const CommonHcalNoiseRBXData &) const
edm::EDGetTokenT< CaloTowerCollection > calotower_token_